Operators module (quspin.operators)

Classes and functions for constructing and manipulating quantum operators, and implementing Schroedinger time evolution.

Many-body operators in QuSpin are defined by a string of letters representing the operator types, together with a list which holds the indices for the lattice sites that each operator acts on.

For example, in a spin-1/2 system we can represent any multi-spin operator as:

\[\begin{array}{cccc} \text{operator string} & \text{site-coupling list} & & \text{spin operator} \newline \mu_1,\dots,\mu_n & [J,i_1,\dots,i_n] & \Leftrightarrow & J\sigma_{i_1}^{\mu_1}\cdots\sigma_{i_n}^{\mu_n} \newline \end{array}\]

where \(\mu_i\) can be “I”, z”, “+”, “-“, “x” or “y”. Here, \(\sigma_{i_n}^{\mu_n}\) is the Pauli spin operator acting on lattice site \(i_n\). This representation provides a way to conveniently define any multi-body spin-1/2 operator, and generalises to bosons, fermions and higher spin in a natural way.

To construct operators for different particle spieces, check out the basis constructor classes for the supported operator strings.

classes

hamiltonian(static_list, dynamic_list[, N, …])

Constructs time-dependent (hermitian and nonhermitian) operators.

quantum_operator(input_dict[, N, basis, …])

Constructs parameter-dependent (hermitian and nonhermitian) operators.

exp_op(O[, a, start, stop, num, endpoint, …])

Constructs matrix exponentials of quantum operators.

quantum_LinearOperator(*args, **kwargs)

Applies a quantum operator directly onto a state, without constructing the operator matrix.

functions

commutator(H1, H2)

Calculates the commutator of two Hamiltonians \(H_1\) and \(H_2\).

anti_commutator(H1, H2)

Calculates the anticommutator of two Hamiltonians \(H_1\) and \(H_2\).

ishamiltonian(obj)

Checks if instance is object of hamiltonian class.

isquantum_operator(obj)

Checks if instance is object of quantum_operator class.

isexp_op(obj)

Checks if instance is object of exp_op class.

isquantum_LinearOperator(obj)

Checks if instance is object of quantum_LinearOperator class.

save_zip(archive, op[, save_basis])

save a quantum_operator to a zip archive to be used later.

load_zip(archive)

Load quantum_operator object from a zip archive.