pycommute.models
Functions in this module return
real
or
complex expression objects
corresponding to some Hamiltonians widely used in the theory of quantum
many-body systems, quantum optics and statistical mechanics of interacting
spins.
By default, these functions use integer indices 0, 1, ...
to label
fermionic, bosonic and spin operators corresponding to individual basis states
(lattice sites, orbitals) in the output expressions. They also accept
custom lists of indices, which can come in two forms,
A list of integer and/or string indices, e.g.
[0, "a", 2, 5, "xyz"]
;A list of multi-indices, e.g.
[('a', 1), ('b', 2), ('c', 'd')]
.
It is also allowed to mix indices and multi-indices in the same list.
Quantum many-body theory
- pycommute.models.tight_binding(t: ndarray, *, indices: Sequence[int | str | Tuple[int | str, ...]] = None, statistics: int = -3) ExpressionR | ExpressionC
Constructs a tight-binding lattice Hamiltonian from a matrix of hopping elements \(t\).
\[\hat H = \sum_{i,j=0}^{N-1} t_{ij} \hat O^\dagger_{i} \hat O_{j}.\]By default, the corresponding lattice is a collection of sites with integer indices \(i = 0, \ldots, N-1\). Operators \(\hat O^\dagger_i\) and \(\hat O_j\) can be fermionic or bosonic creation/annihilation operators. The on-site energies are given by the diagonal elements of the hopping matrix \(t_{ij}\).
- Parameters:
t – An \(N\times N\) matrix of hopping elements \(t_{ij}\).
indices – An optional list of \(N\) (multi-)indices to be used instead of the simple numeric indices \(i\).
statistics – Statistics of the particles in question, either
pycommute.expression.FERMION
orpycommute.expression.BOSON
.
- Returns:
Tight-binding Hamiltonian \(\hat H\).
- pycommute.models.dispersion(eps: ndarray, *, indices: Sequence[int | str | Tuple[int | str, ...]] = None, statistics: int = -3) ExpressionR | ExpressionC
Constructs an energy dispersion term of a system of many fermions or bosons from a list of energy levels.
\[\hat H = \sum_{i=0}^{N-1} \varepsilon_i \hat O^\dagger_{i} \hat O_{i}.\]By default, individual degrees of freedom carry integer indices \(i = 0, \ldots, N-1\). Operators \(\hat O^\dagger_i\) and \(\hat O_j\) can be fermionic or bosonic creation/annihilation operators.
- Parameters:
eps – A length-\(N\) list of energy levels \(\varepsilon_i\).
indices – An optional list of \(N\) (multi-)indices to be used instead of the simple numeric indices \(i\).
statistics – Statistics of the particles in question, either
pycommute.expression.FERMION
orpycommute.expression.BOSON
.
- Returns:
Dispersion term \(\hat H\).
- pycommute.models.pairing(delta: ndarray, *, indices: Sequence[int | str | Tuple[int | str, ...]] = None)
Constructs a pairing Hamiltonian from a matrix of pairing parameters \(\Delta\).
\[\hat H = \sum_{i,j=0}^{N-1} ( \Delta_{ij} \hat c_i \hat c_j - \Delta^*_{ij} \hat c^\dagger_i \hat c^\dagger_j).\]- Parameters:
delta – An \(N\times N\) matrix of the pairing parameters \(\Delta_{ij}\).
indices – An optional list of \(N\) (multi-)indices to be used instead of the simple numeric indices \(i\).
- Returns:
Pairing Hamiltonian \(\hat H\).
- pycommute.models.zeeman(b: ndarray, *, indices_up: Sequence[int | str | Tuple[int | str, ...]] = None, indices_dn: Sequence[int | str | Tuple[int | str, ...]] = None) ExpressionR | ExpressionC
Constructs a Zeeman coupling term describing a system of \(N\) electrons (spin-1/2 fermions) in an external magnetic field,
\[\hat H = 2 \sum_{i=0}^{N-1} \hat{\mathbf{S}}_i \cdot \mathbf{B}_i = \sum_{i=0}^{N-1} \sum_{\sigma,\sigma'=\uparrow,\downarrow} (\boldsymbol{\tau}_{\sigma\sigma'} \cdot \mathbf{B}_i) \hat c^\dagger_{i,\sigma} \hat c_{i,\sigma'}.\]The pre-factor 2 is the spin Landé factor, while the Bohr magneton and the Planck constant are set to unity. \(\boldsymbol{\tau}\) is a vector of Pauli matrices, and operators \(\hat c^\dagger_{i,\sigma}\)/\(\hat c_{i,\sigma}\) create/annihilate electrons at site \(i\) with the 3-rd spin projection \(\sigma\).
- Parameters:
b –
One of the following:
An \(N\times 3\) matrix, whose rows are the local magnetic field vectors \(\mathbf{b}_i = \{b^x_i, b^y_i, b^z_i\}\).
A length-\(N\) vector of 3-rd projections \(b^z_i\). It is assumed that \(b^x_i = b^y_i = 0\) in this case.
indices_up – An optional list of \(N\) (multi-)indices to label the spin-up operators. By default, the spin-up operators carry indices
(0, "up"), (1, "up"), ...
.indices_dn – An optional list of \(N\) (multi-)indices to label the spin-down operators. By default, the spin-down operators carry indices
(0, "dn"), (1, "dn"), ...
.
- Returns:
Zeeman coupling term \(\hat H\).
- pycommute.models.hubbard_int(U: ndarray, *, indices_up: Sequence[int | str | Tuple[int | str, ...]] = None, indices_dn: Sequence[int | str | Tuple[int | str, ...]] = None) ExpressionR | ExpressionC
Constructs an interaction term of the Fermi-Hubbard model defined on a finite lattice (collection of sites \(i = 0, \ldots, N-1\)),
\[\hat H = \sum_{i=0}^{N-1} U_i \hat n_{i,\uparrow} \hat n_{i,\downarrow}.\]- Parameters:
U – A length-\(N\) vector of Hubbard interaction parameters \(U_i\).
indices_up – An optional list of \(N\) (multi-)indices to label the spin-up operators. By default, the spin-up operators carry indices
(0, "up"), (1, "up"), ...
.indices_dn – An optional list of \(N\) (multi-)indices to label the spin-down operators. By default, the spin-down operators carry indices
(0, "dn"), (1, "dn"), ...
.
- Returns:
Interaction term \(\hat H\).
- pycommute.models.bose_hubbard_int(U: ndarray, *, indices: Sequence[int | str | Tuple[int | str, ...]] = None) ExpressionR | ExpressionC
Constructs an interaction term of the Bose-Hubbard model defined on a finite lattice (collection of sites \(i = 0, \ldots, N-1\)),
\[\hat H = \sum_{i=0}^{N-1} U_i \hat a^\dagger_i \hat a_i (\hat a^\dagger_i \hat a_i - 1).\]- Parameters:
U – A length-\(N\) vector of Hubbard interaction parameters \(U_i\).
indices – An optional list of \(N\) (multi-)indices to be used instead of the simple numeric indices \(i\).
- Returns:
Interaction term \(\hat H\).
- pycommute.models.extended_hubbard_int(V: ndarray, *, indices_up: Sequence[int | str | Tuple[int | str, ...]] = None, indices_dn: Sequence[int | str | Tuple[int | str, ...]] = None) ExpressionR | ExpressionC
Constructs an interaction term of the extended Fermi-Hubbard model defined on a finite lattice (collection of sites \(i = 0, \ldots, N-1\)),
\[\hat H = \frac{1}{2} \sum_{i,j=0}^{N-1} V_{ij} \hat n_i \hat n_j,\]where \(\hat n_i = \hat n_{i,\uparrow} + \hat n_{i,\downarrow}\) is the total electron occupation number at site \(i\). The local part of the interaction is encoded in the diagonal matrix elements \(V_{ii}\).
- Parameters:
V – An \(N\times N\) matrix of interaction parameters \(V_{ij}\).
indices_up – An optional list of \(N\) (multi-)indices to label the spin-up operators. By default, the spin-up operators carry indices
(0, "up"), (1, "up"), ...
.indices_dn – An optional list of \(N\) (multi-)indices to label the spin-down operators. By default, the spin-down operators carry indices
(0, "dn"), (1, "dn"), ...
.
- Returns:
Interaction term \(\hat H\).
- pycommute.models.t_j_int(J: ndarray, *, indices_up: Sequence[int | str | Tuple[int | str, ...]] = None, indices_dn: Sequence[int | str | Tuple[int | str, ...]] = None) ExpressionR | ExpressionC
Constructs an interaction term of the t-J model defined on a finite lattice (collection of sites \(i = 0, \ldots, N-1\)),
\[\hat H = \sum_{i,j=0}^{N-1} J_{ij} \left( \hat{\mathbf{S}}_i \cdot \hat{\mathbf{S}}_j - \frac{1}{4} \hat n_i \hat n_j \right),\]where
\[\hat{\mathbf{S}}_i = \sum_{\sigma\sigma'} \frac{\boldsymbol{\tau}_{\sigma\sigma'}}{2} \hat c^\dagger_{i,\sigma} \hat c_{i,\sigma'}\]is the spin vector of the electron localized at site \(i\), and \(\hat n_i = \hat n_{i,\uparrow} + \hat n_{i,\downarrow}\) is the total electron occupation number at site \(i\).
- Parameters:
J – An \(N\times N\) matrix of coupling parameters \(J_{ij}\).
indices_up – An optional list of \(N\) (multi-)indices to label the spin-up operators. By default, the spin-up operators carry indices
(0, "up"), (1, "up"), ...
.indices_dn – An optional list of \(N\) (multi-)indices to label the spin-down operators. By default, the spin-down operators carry indices
(0, "dn"), (1, "dn"), ...
.
- Returns:
Interaction term \(\hat H\).
- pycommute.models.kondo_int(J: ndarray, *, indices_up: Sequence[int | str | Tuple[int | str, ...]] = None, indices_dn: Sequence[int | str | Tuple[int | str, ...]] = None, indices_spin: Sequence[int | str | Tuple[int | str, ...]] = None, spin: float = 0.5) ExpressionR | ExpressionC
Constructs an interaction term of the Kondo lattice model defined on a finite collection of sites \(i = 0, \ldots, N-1\),
\[\hat H = \sum_{i=0}^{N-1} J_i \hat{\mathbf{s}}_i \cdot \hat{\mathbf{S}}_i,\]where
\[\hat{\mathbf{s}}_i = \sum_{\sigma\sigma'} \frac{\boldsymbol{\tau}_{\sigma\sigma'}}{2} \hat c^\dagger_{i,\sigma} \hat c_{i,\sigma'}\]is the spin vector of the electron localized at site \(i\).
- Parameters:
J – A length-\(N\) vector of coupling constants \(J_i\).
indices_up – An optional list of \(N\) (multi-)indices to label the spin-up operators \(\hat c^\dagger_{i,\uparrow}\)/ \(\hat c_{i,\uparrow}\). By default, the spin-up operators carry indices
(0, "up"), (1, "up"), ...
.indices_dn – An optional list of \(N\) (multi-)indices to label the spin-down operators \(\hat c^\dagger_{i,\downarrow}\)/ \(\hat c_{i,\downarrow}\). By default, the spin-down operators carry indices
(0, "dn"), (1, "dn"), ...
.indices_spin – An optional list of \(N\) (multi-)indices to label the localized spin operators \(\hat{\mathbf{S}}_i\). By default, the localized spin operators carry indices
0, 1, ...
.spin – Spin of operators \(\hat{\mathbf{S}}_i\), 1/2 by default.
- Returns:
Interaction term \(\hat H\).
- pycommute.models.holstein_int(g: ndarray, *, indices_up: Sequence[int | str | Tuple[int | str, ...]] = None, indices_dn: Sequence[int | str | Tuple[int | str, ...]] = None, indices_boson: Sequence[int | str | Tuple[int | str, ...]] = None) ExpressionR | ExpressionC
Constructs an electron-phonon coupling term of the Holstein model defined on a finite collection of sites \(i = 0, \ldots, N-1\),
\[\hat H = \sum_{i=0}^{N-1}\sum_\sigma g_i \hat n_{i,\sigma} (\hat a^\dagger_i + \hat a_i).\]- Parameters:
g – A length-\(N\) vector of coupling constants \(g_i\).
indices_up – An optional list of \(N\) (multi-)indices to label the spin-up operators. By default, the spin-up operators carry indices
(0, "up"), (1, "up"), ...
.indices_dn – An optional list of \(N\) (multi-)indices to label the spin-down operators. By default, the spin-down operators carry indices
(0, "dn"), (1, "dn"), ...
.indices_boson – An optional list of \(N\) (multi-)indices to label the localized boson (phonon) operators \(\hat a_i\). By default, the localized boson operators carry indices
0, 1, ...
.
- Returns:
Electron-phonon coupling term \(\hat H\).
- pycommute.models.quartic_int(U: ndarray, *, indices: Sequence[int | str | Tuple[int | str, ...]] = None, statistics: int = -3) ExpressionR | ExpressionC
Constructs a general 4-fermion or 4-boson interaction Hamiltonian
\[\hat H = \frac{1}{2}\sum_{ijkl=0}^{N-1} U_{ijkl} \hat O^\dagger_i \hat O^\dagger_j \hat O_l \hat O_k.\]Operators \(\hat O^\dagger_i\) and \(\hat O_j\) can be fermionic or bosonic creation/annihilation operators.
- Parameters:
U – An \(N\times N\times N\times N\) tensor of interaction matrix elements \(U_{ijkl}\).
indices – An optional list of \(N\) (multi-)indices to be used instead of the simple numeric indices \(i\).
statistics – Statistics of the particles in question, either
pycommute.expression.FERMION
orpycommute.expression.BOSON
.
- Returns:
Interaction Hamiltonian \(\hat H\).
- pycommute.models.kanamori_int(M: int, U: float | complex, J: float | complex, Up: float | complex = None, Jx: float | complex = None, Jp: float | complex = None, *, indices_up: Sequence[int | str | Tuple[int | str, ...]] = None, indices_dn: Sequence[int | str | Tuple[int | str, ...]] = None) ExpressionR | ExpressionC
Constructs a generalized Kanamori multiorbital Hamiltonian with \(M\) orbitals,
\[\begin{split}\hat H = U \sum_{m=0}^{M-1} \hat n_{m,\uparrow} \hat n_{m,\downarrow} + U' \sum_{m\neq m'=0}^{M-1} \hat n_{m,\uparrow} \hat n_{m',\downarrow} + (U'-J) \sum_{m<m'}^{M-1} \sum_\sigma \hat n_{m,\sigma} \hat n_{m',\sigma}\\ + J_X \sum_{m\neq m'=0}^{M-1} \hat d^\dagger_{m,\uparrow} \hat d^\dagger_{m',\downarrow} \hat d_{m,\downarrow} \hat d_{m',\uparrow} + J_P \sum_{m\neq m'=0}^{M-1} \hat d^\dagger_{m,\uparrow} \hat d^\dagger_{m,\downarrow} \hat d_{m',\downarrow} \hat d_{m',\uparrow}.\end{split}\]This function will derive values of the optional parameters according to the following rules.
If only \(U\) and \(J\) are provided, then the rest of parameters will be defined according to \(U'=U-2J\) and \(J_X=J_P=J\) (this choice results in a rotationally invariant form of the model).
If \(U\), \(J\) and \(U'\) are provided, then \(J_X = J_P = J\).
If \(J_X\) is provided, then \(J_P\) must also be provided (and vice versa).
- Parameters:
M – Number of orbitals \(M\).
U – Intra-orbital Coulomb repulsion \(U\).
J – Hund coupling constant \(J\).
Up – Inter-orbital Coulomb repulsion \(U'\).
Jx – Spin-flip coupling constant \(J_X\).
Jp – Pair-hopping coupling constant \(J_P\).
indices_up – An optional list of \(M\) (multi-)indices to label the spin-up operators. By default, the spin-up operators carry indices
(0, "up"), (1, "up"), ...
.indices_dn – An optional list of \(M\) (multi-)indices to label the spin-down operators. By default, the spin-down operators carry indices
(0, "dn"), (1, "dn"), ...
.
- Returns:
Kanamori Hamiltonian \(\hat H\).
- pycommute.models.slater_int(F: ndarray, *, indices_up: Sequence[int | str | Tuple[int | str, ...]] = None, indices_dn: Sequence[int | str | Tuple[int | str, ...]] = None) ExpressionR | ExpressionC
Constructs a \((2L+1)\)-orbital fully rotationally-invariant electron interaction Hamiltonian using Slater parametrization,
\[\hat H = \frac{1}{2} \sum_{m_1, m_2, m_3, m_4 = -L}^{L} \sum_{\sigma, \sigma'} U^{\sigma, \sigma'}_{m_1, m_2, m_3, m_4} \hat c^\dagger_{m_1, \sigma} \hat c^\dagger_{m_2, \sigma'} \hat c_{m_4, \sigma'} \hat c_{m_3, \sigma}.\]The interaction tensor \(U\) is a linear combination of \(L+1\) radial integrals \(F_0, F_2, F_4, \ldots, F_{2L}\) with coefficients given by the angular interaction matrix elements \(A_k(m_1, m_2, m_3, m_4)\),
\[U^{\sigma, \sigma'}_{m_1, m_2, m_3, m_4} = \sum_{k=0}^{2L} F_k A_k(m_1, m_2, m_3, m_4).\]All odd-\(k\) angular matrix elements vanish, while for the even \(k\)
\[\begin{split}\begin{multline} A_k(m_1, m_2, m_3, m_4) =\\= (2l+1)^2 \begin{pmatrix} l & k & l \\ 0 & 0 & 0 \end{pmatrix}^2 \sum_{q=-k}^k (-1)^{m_1+m_2+q} \begin{pmatrix} l & k & l \\ -m_1 & q & m_3 \end{pmatrix} \begin{pmatrix} l & k & l \\ -m_2 & -q & m_4 \end{pmatrix}. \end{multline}\end{split}\]- Parameters:
F – List of \(L+1\) radial Slater integrals \(F_0, F_2, F_4, \ldots\).
indices_up – An optional list of \(2L+1\) (multi-)indices to label the spin-up operators. By default, the spin-up operators carry indices
(-L, "up"), (-L+1, "up"), ..., (L, "up")
.indices_dn – An optional list of \(2L+1\) (multi-)indices to label the spin-down operators. By default, the spin-down operators carry indices
(-L, "dn"), (-L+1, "dn"), ..., (L, "dn")
.
- Returns:
Slater interaction Hamiltonian \(\hat H\).
Spin lattice models
- pycommute.models.ising(J: ndarray, h_l: ndarray = None, h_t: ndarray = None, *, indices: Sequence[int | str | Tuple[int | str, ...]] = None, spin: float = 0.5) ExpressionR | ExpressionC
Constructs Hamiltonian of the quantum Ising model on a finite lattice (collection of sites \(i = 0, \ldots, N-1\)),
\[\hat H = -\sum_{i,j = 0}^{N-1} J_{ij} \hat{S}^z_i \hat{S}^z_j - \sum_{i=0}^{N-1} (h^l_i \hat{S}^z_i + h^t_i \hat{S}^x_i).\]- Parameters:
J – An \(N\times N\) matrix of coupling constants \(J_{ij}\).
h_l – A length-\(N\) vector of the local longitudinal magnetic fields \(h^l_i\). By default, all magnetic fields are zero.
h_t – A length-\(N\) vector of the local transverse magnetic fields \(h^t_i\). By default, all magnetic fields are zero.
indices – An optional list of \(N\) (multi-)indices to be used instead of the simple numeric indices \(i\).
spin – Spin of operators \(\hat{S}^\alpha_i\), 1/2 by default.
- Returns:
Hamiltonian \(\hat H\).
- pycommute.models.heisenberg(J: ndarray, h: ndarray = None, *, indices: Sequence[int | str | Tuple[int | str, ...]] = None, spin: float = 0.5) ExpressionR | ExpressionC
Constructs Hamiltonian of the quantum Heisenberg model on a finite lattice (collection of sites \(i = 0, \ldots, N-1\)),
\[\hat H = -\sum_{i,j = 0}^{N-1} J_{ij} \hat{\mathbf{S}}_i \cdot \hat{\mathbf{S}}_j - \sum_{i=0}^{N-1} \mathbf{h}_i \cdot \hat{\mathbf{S}}_i.\]- Parameters:
J – An \(N\times N\) matrix of Heisenberg coupling constants \(J_{ij}\).
h – An \(N\times 3\) matrix, whose rows are the local magnetic field vectors \(\mathbf{h}_i = \{h^x_i, h^y_i, h^z_i\}\). By default, all magnetic fields are zero.
indices – An optional list of \(N\) (multi-)indices to be used instead of the simple numeric indices \(i\).
spin – Spin of operators \(\hat{\mathbf{S}}_i\), 1/2 by default.
- Returns:
Hamiltonian \(\hat H\).
- pycommute.models.anisotropic_heisenberg(J: Tuple[ndarray, ndarray, ndarray], h: ndarray = None, *, indices: Sequence[int | str | Tuple[int | str, ...]] = None, spin: float = 0.5) ExpressionC
Constructs Hamiltonian of the anisotropic quantum Heisenberg model on a finite lattice (collection of sites \(i = 0, \ldots, N-1\)),
\[\hat H = -\sum_{i,j = 0}^{N-1}\left[ J^x_{ij}\hat{S}^x_i \hat{S}^x_j + J^y_{ij}\hat{S}^y_i \hat{S}^y_j + J^z_{ij}\hat{S}^z_i \hat{S}^z_j \right] - \sum_{i=0}^{N-1} \mathbf{h}_i \cdot \hat{\mathbf{S}}_i.\]- Parameters:
J – A triplet of \(N\times N\) matrices of Heisenberg coupling constants \((J^x_{ij}, J^y_{ij}, J^z_{ij})\).
h – An \(N\times 3\) matrix, whose rows are the local magnetic field vectors \(\mathbf{h}_i = \{h^x_i, h^y_i, h^z_i\}\). By default, all magnetic fields are zero.
indices – An optional list of \(N\) (multi-)indices to be used instead of the simple numeric indices \(i\).
spin – Spin of operators \(\hat{\mathbf{S}}_i\), 1/2 by default.
- Returns:
Hamiltonian \(\hat H\).
- pycommute.models.biquadratic_spin_int(J: ndarray, *, indices: Sequence[int | str | Tuple[int | str, ...]] = None, spin: float = 1) ExpressionR | ExpressionC
Constructs a biquadratic spin interaction term on a finite lattice (collection of sites \(i = 0, \ldots, N-1\)),
\[\hat H = \sum_{i,j = 0}^{N-1} J_{ij} \left(\hat{\mathbf{S}}_i \cdot \hat{\mathbf{S}}_j\right)^2\]- Parameters:
J – An \(N\times N\) matrix of Heisenberg coupling constants \(J_{ij}\).
indices – An optional list of \(N\) (multi-)indices to be used instead of the simple numeric indices \(i\).
spin – Spin of operators \(\hat{\mathbf{S}}_i\), 1 by default.
- Returns:
Interaction term \(\hat H\).
- pycommute.models.dzyaloshinskii_moriya(D: ndarray, *, indices: Sequence[int | str | Tuple[int | str, ...]] = None, spin: float = 0.5) ExpressionC
Constructs Dzyaloshinskii–Moriya interaction Hamiltonian on a finite lattice (collection of sites \(i = 0, \ldots, N-1\)).
\[\hat H = \sum_{i,j=0}^{N-1} \mathbf{D}_{ij} \cdot (\hat{\mathbf{S}}_i \times \hat{\mathbf{S}}_j).\]- Parameters:
D – An \(N\times N \times 3\) array, whose slices
D[i,j,:]
are vectors \(\mathbf{D}_{ij}\).indices – An optional list of \(N\) (multi-)indices to be used instead of the simple numeric indices \(i\).
spin – Spin of operators \(\hat{\mathbf{S}}_i\), 1/2 by default.
- Returns:
Hamiltonian \(\hat H\).
Quantum optics and quantum dissipation
- pycommute.models.spin_boson(eps: ndarray, delta: ndarray, omega: ndarray, lambda_: ndarray, *, indices_spin: Sequence[int | str | Tuple[int | str, ...]] = None, indices_boson: Sequence[int | str | Tuple[int | str, ...]] = None, spin: float = 0.5) ExpressionR | ExpressionC
Constructs Hamiltonian of the general multi-spin-boson model with \(N\) spin degrees of freedom and \(M\) bosonic modes,
\[\hat H = \sum_{i=0}^{N-1} \left( -\epsilon_i \hat S^z_i +\Delta_i \hat S^x_i \right) + \sum_{m=0}^{M-1} \omega_m \hat a^\dagger_m \hat a_m + \sum_{i=0}^{N-1} \sum_{m=0}^{M-1} \hat S^z_i (\lambda_{im}\hat a^\dagger_m + \lambda^*_{im}\hat a_m).\]- Parameters:
eps – A length-\(N\) vector of energy biases \(\epsilon_i\).
delta – A length-\(N\) vector of tunneling amplitudes \(\Delta_i\).
omega – A length-\(M\) vector of bosonic frequencies \(\omega_m\).
lambda – An \(N \times M\) matrix of spin-boson coupling constants \(\lambda_{im}\).
indices_spin – An optional list of \(N\) (multi-)indices to be used instead of the simple numeric indices \(i\).
indices_boson – An optional list of \(M\) (multi-)indices to be used instead of the simple numeric indices \(m\).
spin – Spin of operators \(\hat{S}^\alpha_i\), 1/2 by default.
- Returns:
Spin-boson Hamiltonian \(\hat H\).
- pycommute.models.rabi(eps: ndarray, omega: ndarray, g: ndarray, *, indices_atom: Sequence[int | str | Tuple[int | str, ...]] = None, indices_boson: Sequence[int | str | Tuple[int | str, ...]] = None, spin: float = 0.5) ExpressionR | ExpressionC
Constructs Hamiltonian of the general multi-mode multi-atom Rabi model with \(N\) atomic degrees of freedom and \(M\) cavity modes,
\[\hat H = \sum_{i=0}^{N-1} \epsilon_i \hat S^z_i + \sum_{m=0}^{M-1} \omega_m \hat a^\dagger_m \hat a_m + \sum_{i=0}^{N-1} \sum_{m=0}^{M-1} g_{im} \hat S^x_i (\hat a^\dagger_m + \hat a_m).\]- Parameters:
eps – A length-\(N\) vector of atomic transition frequencies \(\epsilon_i\).
omega – A length-\(M\) vector of cavity frequencies \(\omega_m\).
g – An \(N \times M\) matrix of atom-cavity coupling constants \(g_{im}\).
indices_atom – An optional list of \(N\) (multi-)indices to be used instead of the simple numeric indices \(i\).
indices_boson – An optional list of \(M\) (multi-)indices to be used instead of the simple numeric indices \(m\).
spin – Pseudo-spin of operators \(\hat{S}^\alpha_i\), 1/2 by default (two-level atoms).
- Returns:
Spin-boson Hamiltonian \(\hat H\).
- pycommute.models.jaynes_cummings(eps: ndarray, omega: ndarray, g: ndarray, *, indices_atom: Sequence[int | str | Tuple[int | str, ...]] = None, indices_boson: Sequence[int | str | Tuple[int | str, ...]] = None, spin: float = 0.5) ExpressionR | ExpressionC
Constructs Hamiltonian of the multi-mode multi-atom Jaynes-Cummings model (Tavis-Cummings model) with \(N\) atomic degrees of freedom and \(M\) cavity modes,
\[\hat H = \sum_{i=0}^{N-1} \epsilon_i \hat S^z_i + \sum_{m=0}^{M-1} \omega_m \hat a^\dagger_m \hat a_m + \sum_{i=0}^{N-1} \sum_{m=0}^{M-1} (g_{im} \hat a^\dagger_m \hat S^-_i + g^*_{im} \hat a_m \hat S^+_i).\]- Parameters:
eps – A length-\(N\) vector of atomic transition frequencies \(\epsilon_i\).
omega – A length-\(M\) vector of cavity frequencies \(\omega_m\).
g – An \(N \times M\) matrix of atom-cavity coupling constants \(g_{im}\).
indices_atom – An optional list of \(N\) (multi-)indices to be used instead of the simple numeric indices \(i\).
indices_boson – An optional list of \(M\) (multi-)indices to be used instead of the simple numeric indices \(m\).
spin – Pseudo-spin of operators \(\hat{S}^\alpha_i\), 1/2 by default (two-level atoms).
- Returns:
Spin-boson Hamiltonian \(\hat H\).