Spin-based Hamiltonians#
- class HamHeisenberg(mu: ndarray, J_eq: ndarray, J_ax: ndarray, connectivity: ndarray | None = None)#
XXZ Heisenberg Hamiltonian.
- __init__(mu: ndarray, J_eq: ndarray, J_ax: ndarray, connectivity: ndarray | None = None)#
Initialize XXZ Heisenberg Hamiltonian.
- Parameters:
mu (np.ndarray) – Zeeman term
J_eq (np.ndarray) – J equatorial term
J_ax (np.ndarray) – J axial term
connectivity (np.ndarray) – symmetric numpy array that specifies the connectivity between sites
Notes
The form of the Hamiltonian is given by:
\[\hat{H}_{X X Z}=\sum_p\left(\mu_p^Z-J_{p p}^{\mathrm{eq}}\right) S_p^Z+\sum_{p q} J_{p q}^{\mathrm{ax}} S_p^Z S_q^Z+\sum_{p q} J_{p q}^{\mathrm{eq}} S_p^{+} S_q^{-}\]
- generate_one_body_integral(dense: bool, basis='spinorbital basis')#
Generate one body integral.
- Parameters:
dense (bool)
basis (str)
- Return type:
scipy.sparse.csr_matrix or np.ndarray
- generate_two_body_integral(sym=1, dense=False, basis='spinorbital basis')#
Generate two body integral in spatial or spinorbital basis.
- Parameters:
basis (str) – [‘spinorbital basis’, ‘spatial basis’]
dense (bool) – dense or sparse matrix; default False
sym (int) – symmetry – [2, 4, 8] default is 1
- Return type:
scipy.sparse.csr_matrix or np.ndarray
- generate_zero_body_integral()#
Generate zero body term.
- Returns:
zero_energy
- Return type:
float
- class HamIsing(mu: ndarray, J_ax: ndarray, connectivity: ndarray | None = None)#
Ising Hamiltonian.
- __init__(mu: ndarray, J_ax: ndarray, connectivity: ndarray | None = None)#
Initialize XXZ Heisenberg Hamiltonian.
- Parameters:
mu (np.ndarray) – Zeeman term
J_ax (np.ndarray) – J axial term
connectivity (np.ndarray) – symmetric numpy array that specifies the connectivity between sites
Notes
The form of the Hamiltonian is given by:
\[\hat{H}_{Ising}=\sum_p\mu_p^Z S_p^Z+\sum_{p q} J_{p q}^{\mathrm{ax}} S_p^Z S_q^Z\]
- class HamRG(mu: ndarray, J_eq: ndarray, connectivity: ndarray | None = None)#
Richardson-Gaudin Hamiltonian.
- __init__(mu: ndarray, J_eq: ndarray, connectivity: ndarray | None = None)#
Initialize XXZ Heisenberg Hamiltonian.
- Parameters:
mu (np.ndarray) – Zeeman term
J_eq (np.ndarray) – J equatorial term
connectivity (np.ndarray)
Notes
The form of the Hamiltonian is given by:
\[\hat{H}_{RG}=\sum_p\left(\mu_p^Z-J_{p p}^{\mathrm{eq}}\right) S_p^Z+\sum_{p q} J_{p q}^{\mathrm{eq}} S_p^{+} S_q^{-}\]