eigen_decomposition_compute#

cuquantum.bindings.cudensitymat.eigen_decomposition_compute(
intptr_t handle,
intptr_t eigen_decomposition,
double time,
int64_t batch_size,
int32_t num_params,
intptr_t params,
int32_t num_eigen_states,
eigenstates,
intptr_t eigenvalues,
intptr_t tolerances,
intptr_t workspace,
intptr_t stream,
)[source]#

Computes the eigen-decomposition of an operator.

Parameters:
  • handle (intptr_t) – Library handle.

  • eigen_decomposition (intptr_t) – Eigen-decomposition computation object.

  • time (double) – Specified time.

  • batch_size (int64_t) – Batch size (must be 1 in this release; >1 returns CUDENSITYMAT_STATUS_NOT_SUPPORTED at Compute).

  • num_params (int32_t) – Number of variable parameters defined by the user.

  • params (intptr_t) – GPU-accessible pointer to an F-order 2d-array of user-defined real parameter values: params[num_params, batch_size].

  • num_eigen_states (int32_t) – Actual number of eigenstates to compute, which must not exceed the value of the maxEigenStates parameter provided during the preparation of the eigen-decomposition computation object.

  • eigenstates (object) –

    Quantum eigenstates. The initial values of the provided quantum states will be used as the initial guesses for the iterative solver. It can be:

    • an int as the pointer address to the array, or

    • a Python sequence of ints (as pointer addresses).

  • eigenvalues (intptr_t) – Pointer to the eigenvalues storage (F-order array of shape [num_eigen_states, batch_size]) in GPU-accessible RAM (same data type as used by the quantum state and operator). For the shift-invert DMRG split kind, the input value is the target energy sigma (the returned eigenpair is the one whose eigenvalue is nearest sigma); it is ignored on input by other split kinds/approaches. On output, holds the computed eigenvalue(s).

  • tolerances (intptr_t) – Pointer to an F-order array of shape [num_eigen_states, batch_size] in CPU-accessible RAM. On input, the desired solver convergence tolerances for all eigen-states; on output, the actually achieved solver convergence residual norms (which may differ from the requested values in either direction). These characterize solver convergence, not the representation error of the returned state. For the full-state solver they coincide with the eigenpair residual ||H x - E x||; for split (DMRG / shift-invert) solvers the returned value is the local per-site solver residual, NOT the global ||H|psi> - E|psi>||. The representation error is a separate quantity (dedicated query, when available).

  • workspace (intptr_t) – Allocated workspace descriptor.

  • stream (intptr_t) – CUDA stream.