operator_spectrum_compute#

cuquantum.bindings.cudensitymat.operator_spectrum_compute(
intptr_t handle,
intptr_t spectrum,
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-spectrum of an operator.

Parameters:
  • handle (intptr_t) – Library handle.

  • spectrum (intptr_t) – Eigen-spectrum computation object.

  • time (double) – Specified time.

  • batch_size (int64_t) – Batch size (==1).

  • 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-spectrum computation object.

  • eigenstates (object) –

    Quantum eigenstates (cannot be batched). The initial values of the provided quantum states will be used as the initial guesses for the first Krylov subspace block (if the block size is smaller than the number of requested eigenstates, only the leading quantum states will be used). 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).

  • tolerances (intptr_t) – Pointer to an F-order array of shape [num_eigen_states, batch_size] in CPU-accessible RAM. The initial values represent the desirable convergence tolerances for all eigen-states. The returned values represent the actually achieved residual norms for all eigen-states.

  • workspace (intptr_t) – Allocated workspace descriptor.

  • stream (intptr_t) – CUDA stream.