operator#

Main class#

Operator

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 import PARTICLE_TYPE
from quantax.sites import Square
from quantax.operator import create

# Anti-periodic boundary
lattice = Square(4, boundary=-1, particle_type=PARTICLE_TYPE.spinless_fermion)

# The two following definitions are equivalent
op1 = -create(0, 0)
op2 = create(0, 4)

sigma_x(*index)

\(\sigma^x\) operator for spin and fermion systems.

sigma_y(*index)

\(\sigma^y\) operator for spin and fermion systems.

sigma_z(*index)

\(\sigma^z\) operator for spin and fermion systems.

sigma_p(*index)

\(\sigma^+\) operator for spin systems.

sigma_m(*index)

\(\sigma^-\) operator for spin systems.

S_x(*index)

\(S^x\) operator for spin and fermion systems.

S_y(*index)

\(S^y\) operator

S_z(*index)

\(S^z\) operator

S_p(*index)

\(S^+\) operator

S_m(*index)

\(S^-\) operator

create(*index)

\(c^†\) operator

create_u(*index)

\(c_↑^†\) operator

create_d(*index)

\(c_↓^†\) operator

annihilate(*index)

\(c\) operator

annihilate_u(*index)

\(c_↑\) operator

annihilate_d(*index)

\(c_↓\) operator

number(*index)

\(n = c^† c\) operator

number_u(*index)

\(n_↑ = c_↑^† c_↑\) operator

number_d(*index)

\(n_↓ = c_↓^† c_↓\) operator

Hamiltonians#

Heisenberg([J, n_neighbor, msr])

Heisenberg Hamiltonian \(H = \sum_n J_n \sum_{\left< ij \right>_n} \boldsymbol{\sigma}_i \cdot \boldsymbol{\sigma}_j\)

Ising([h, J])

Transverse-field Ising Hamiltonian \(H = -J \sum_{\left< ij \right>} \sigma^z_i \sigma^z_j - h \sum_i \sigma^x_i\)

Hubbard(U[, t, n_neighbor])

Hubbard Hamiltonian \(H = -\sum_n t_n \sum_{\left< ij \right>_n} \sum_{s \in \{↑,↓\}} (c_{i,s}^† c_{j,s} + c_{j,s}^† c_{i,s}) + U \sum_i n_{i↑} n_{i↓}\)

tJ(J[, J_neighbor, t, t_neighbor])

t-J hamiltonian

tV(V[, V_neighbor, t, t_neighbor])

t-V hamiltonian \(H = -\sum_n t_n \sum_{\left< ij \right>_n} (c_{i}^† c_{j} + c_{j}^† c_{i}) + \sum_m V_m \sum_{\left< ij \right>_m} n_{i} n_{j}\)