qrunch.quantum.operators.second_quantization.hardcore_boson.sums
A compact representation of a hard-core bosonic operator consisting only of single and double excitations.
Classes
Compact representation of the full second quantization hard-core bosonic hermitian sum. |
|
Compact representation of the full second quantization hard-core bosonic hermitian sum. |
- class PairedHardcoreBosonHermitianSum
Bases:
PairedHardcoreBosonHermitianSumProtocol,HasCustomEncodingCompact representation of the full second quantization hard-core bosonic hermitian sum.
This operator takes single and double fermionic excitation operators and translate them into Paired Hard Core Boson operators.
Note that only dense array types are supported for the single and double excitations currently.
- __init__(single_excitations: ndarray[Any, dtype[float64]] | ndarray[Any, dtype[complex128]] | DenseArray, double_excitations: ndarray[Any, dtype[float64]] | ndarray[Any, dtype[complex128]] | DenseArray, *, tolerance: float = 1e-12) None
Initialize the full operator.
- Parameters:
single_excitations (ndarray[Any, dtype[float64]] | ndarray[Any, dtype[complex128]] | DenseArray) – Single excitation part of the operator.
double_excitations (ndarray[Any, dtype[float64]] | ndarray[Any, dtype[complex128]] | DenseArray) – Double excitation part of the operator.
tolerance (float) – Remove terms with a value lower than this.
- Return type:
None
- classmethod decode(data: dict[str, Any]) PairedHardcoreBosonHermitianSum
Decode a dictionary to an instance of TensorHyperContractionIntegrals.
- Parameters:
data (dict[str, Any]) – The dictionary representation of a TensorHyperContractionIntegrals instance.
- Return type:
- double_data() ndarray[Any, dtype[float64]]
Return the single data.
- Return type:
ndarray[Any, dtype[float64]]
- property double_excitations: Array
Return the double excitations in the Paired Hard Core Boson representation.
- encode() dict[str, Any]
Encode the instance into a dictionary.
- Return type:
dict[str, Any]
- static is_hardcore_bosonic() Literal[True]
Return True, if it is hard core bosonic.
- Return type:
Literal[True]
- rotate(rotation_matrices: tuple[ndarray[Any, dtype[float64]], ...]) PairedHardcoreBosonHermitianSum
Rotate the excitations.
- Parameters:
rotation_matrices (tuple[ndarray[Any, dtype[float64]], ...]) – The matrix to rotate with.
- Return type:
- rotation_matrix_structure() list[RotationBlockDefinition]
Get information on which blocks should be non-zero in the rotation matrix.
- Return type:
list[RotationBlockDefinition]
- single_data() ndarray[Any, dtype[float64]]
Return the single data.
- Return type:
ndarray[Any, dtype[float64]]
- class PairedHardcoreBosonHermitianSumProtocol
Bases:
ProtocolCompact representation of the full second quantization hard-core bosonic hermitian sum.
- __init__(*args, **kwargs)
- double_data() ndarray[Any, dtype[float64]]
Return the double data.
- Return type:
ndarray[Any, dtype[float64]]
- property double_excitations: Array
Return the double excitations in the Paired Hard Core Boson representation.
- static is_hardcore_bosonic() Literal[True]
Return True, if it is hard core bosonic.
- Return type:
Literal[True]
- rotate(rotation_matrices: tuple[ndarray[Any, dtype[float64]], ...]) Self
Rotate the excitations.
- Parameters:
rotation_matrices (tuple[ndarray[Any, dtype[float64]], ...]) – The matrix to rotate with.
- Return type:
Self
- rotation_matrix_structure() list[RotationBlockDefinition]
Get information on which blocks should be non-zero in the rotation matrix.
- Return type:
list[RotationBlockDefinition]
- single_data() ndarray[Any, dtype[float64]]
Return the single data.
- Return type:
ndarray[Any, dtype[float64]]