qrunch.chemistry.orbital_optimizers.reduced_density_matrices_protocols
Module for reduced density matrix (RDM) calculators.
Classes
Protocol for implementing reduced density matrix calculators. |
|
Dataclass for handling restricted reduced density matrices. |
|
Dataclass for handling unrestricted reduced density matrices. |
- class ReducedDensityMatrixCalculator
Bases:
ProtocolProtocol for implementing reduced density matrix calculators.
- __init__(*args, **kwargs)
- calculate(circuit: Circuit, shots: int | None = None) UnrestrictedReducedDensityMatrices | RestrictedReducedDensityMatrices
Calculate the 1- and 2-particle RDMs.
- Parameters:
circuit (Circuit) – Circuit to use as the ansatz for estimating the RDMs.
shots (int | None) – The number of shots to use in the estimation. Defaults to None.
- Return type:
UnrestrictedReducedDensityMatrices | RestrictedReducedDensityMatrices
- class RestrictedReducedDensityMatrices
Bases:
objectDataclass for handling restricted reduced density matrices. This means there is only pure alpha components.
The restricted single excitation RMD consist of only alpha-alpha component. The restricted double excitation RDM consist of only alpha-alpha-alpha-alpha component.
- Parameters:
dimension – Dimension of the RDMs.
single_excitations – The single excitation RDM
double_excitations – The double excitation RDM
- __init__(dimension: int, single_excitations: ndarray[Any, dtype[float64]], double_excitations: ndarray[Any, dtype[float64]]) None
- Parameters:
dimension (int)
single_excitations (ndarray[Any, dtype[float64]])
double_excitations (ndarray[Any, dtype[float64]])
- Return type:
None
- dimension: int
- double_excitations: ndarray[Any, dtype[float64]]
- single_excitations: ndarray[Any, dtype[float64]]
- class UnrestrictedReducedDensityMatrices
Bases:
objectDataclass for handling unrestricted reduced density matrices.
The unrestricted single excitation RMD consist of both alpha-alpha and beta-beta components. The unrestricted double excitation RDM consist of alpha-alpha-alpha-alpha, beta-beta-beta-beta, and beta-alpha-beta-alpha component (physics ordering).
- Parameters:
dimension – Dimension of the RDMs.
single_excitations – The single excitation RDM
double_excitations – The double excitation RDM
- __init__(dimension: int, single_excitations: SingleExcitationsArray, double_excitations: DoubleExcitationsArray) None
- Parameters:
dimension (int)
single_excitations (SingleExcitationsArray)
double_excitations (DoubleExcitationsArray)
- Return type:
None
- dimension: int
- double_excitations: DoubleExcitationsArray
- single_excitations: SingleExcitationsArray