qrunch.quantum.operators.second_quantization.second_quantized_hamiltonian
A second-quantized Hamiltonian represented by its decomposition into Hermitian terms.
Functions
|
Decompose a second-quantized Hermitian sum into its individual Hermitian terms. |
Classes
A second-quantized Hamiltonian as its decomposition into Hermitian one- and two-body terms. |
- class SecondQuantizedHamiltonian
Bases:
objectA second-quantized Hamiltonian as its decomposition into Hermitian one- and two-body terms.
Each term is an
(indices, coefficient)pair with a real coefficient. The number of indices identifies the operator kind: one-body indices are(p,)(number) or(p, q)(hop); two-body indices are(i, j)(density-density),(c, a, b)(number-controlled hop), or(p, q, r, s)(double excitation).- Parameters:
single_body – The one-body Hermitian terms as
(indices, coefficient)pairs.double_body – The two-body Hermitian terms as
(indices, coefficient)pairs.number_of_qubits – The number of qubits the terms act on.
is_hardcore_bosonic – Whether the source Hamiltonian is paired hard-core bosonic.
- __init__(single_body: list[tuple[tuple[int, ...], float]], double_body: list[tuple[tuple[int, ...], float]], number_of_qubits: int, is_hardcore_bosonic: bool) None
- Parameters:
single_body (list[tuple[tuple[int, ...], float]])
double_body (list[tuple[tuple[int, ...], float]])
number_of_qubits (int)
is_hardcore_bosonic (bool)
- Return type:
None
- double_body: list[tuple[tuple[int, ...], float]]
- is_hardcore_bosonic: bool
- number_of_qubits: int
- single_body: list[tuple[tuple[int, ...], float]]
- to_second_quantized_hamiltonian(hamiltonian: FermionHermitianSum | PairedHardcoreBosonHermitianSum) SecondQuantizedHamiltonian
Decompose a second-quantized Hermitian sum into its individual Hermitian terms.
- Parameters:
hamiltonian (FermionHermitianSum | PairedHardcoreBosonHermitianSum) – The second-quantized Hamiltonian, either fermionic or paired hard-core bosonic.
- Return type: