cuquantum.densitymat.OperatorSpectrumResult

class cuquantum.densitymat.OperatorSpectrumResult(evals: Union[numpy.ndarray, cupy.ndarray], evecs: Sequence[DensePureState], residual_norms: numpy.ndarray)[source]

A data class for capturing the results of spectral computation from the OperatorSpectrumSolver eigensolver.

This class encapsulates all outputs from the eigenvalue/eigenstate computation, including convergence information and residual norms for analysis of solution quality.

evals

The computed eigenvalues as a 1D array. For batched computations, this will be a 2D array with shape [num_eigvals, batch_size]. Elements are ordered according to the which parameter used in the solver initialization.

Type

Union[numpy.ndarray, cupy.ndarray]

evecs

The computed eigenstates as a sequence of DensePureState objects. Each state corresponds to one (or batch of) eigenvalue(s) and contains the eigenstate data. For batched computations, each State object contains all batch elements for that particular eigenstate.

Type

Sequence[cuquantum.densitymat.state.DensePureState]

residual_norms

The residual norms ||A*x - lambda*x|| for each computed eigenvalue-eigenstate pair. Shape is [num_eigvals, batch_size] where smaller values indicate better convergence. Always returned as a numpy array regardless of the backend used.

Type

numpy.ndarray