operator#
Main class#
Quantum operator |
Site operators#
The customized operators are supported by simple operations of site operators. See the definition of transverse-field Ising Hamiltonian below as an example.
from quantax.sites import Square
from quantax.operator import sigma_x, sigma_z
lattice = Square(4)
TFIsing = -sum(sigma_x(i) for i in range(lattice.nstates))
TFIsing += -sum(sigma_z(i) * sigma_z(j) for i, j in lattice.get_neighbor())
The index of site operators can be a site index or a site coordinate. In the latter case, the boundary condition is taken into account automatically. For example,
from quantax.sites import Square
from quantax.operator import create_u
lattice = Square(4, boundary=-1, is_fermion=True) # Anti-periodic boundary
# The two following definitions are equivalent
op1 = -create_u(0, 0)
op2 = create_u(0, 4)
|
\(\sigma^x\) operator for spin and fermion systems. |
|
\(\sigma^y\) operator for spin and fermion systems. |
|
\(\sigma^z\) operator for spin and fermion systems. |
|
\(\sigma^+\) operator for spin systems. |
|
\(\sigma^-\) operator for spin systems. |
|
\(S^x\) operator for spin and fermion systems. |
|
\(S^y\) operator |
|
\(S^z\) operator |
|
\(S^+\) operator |
|
\(S^-\) operator |
|
\(c_↑^†\) operator |
|
\(c_↓^†\) operator |
|
\(c_↑\) operator |
|
\(c_↓\) operator |
|
\(n_↑ = c_↑^† c_↑\) operator |
|
\(n_↓ = c_↓^† c_↓\) operator |
Hamiltonians#
|
Heisenberg Hamiltonian \(H = J_n \sum_{<ij>_n} \mathbf{\sigma}_i \cdot \mathbf{\sigma}_j\) |
|
Transverse-field Ising Hamiltonian \(H = -J \sum_{<ij>} \sigma^z_i \sigma^z_j - h \sum_i \sigma^x_i\) |
|
Hubbard Hamiltonian \(H = -t_n \sum_{<ij>_n} \sum_{s \in \{↑,↓\}} (c_{i,s}^† c_{j,s} + c_{j,s}^† c_{i,s}) + U \sum_i n_{i↑} n_{i↓}\) |