Hamiltonians#
In addition to states, we provide some convenience classes to represent quantum Hamiltonians acting on composite quantum systems. These Hamiltonians can be constant, time-dependent or translationally invariant. They can be converted to matrices, tensors or matrix-product operators.
The basic class is the NNHamiltonian
, an abstract object representing
a sum of nearest-neighbor operators \(H = \sum_{i=0}^{N-2} h_{i,i+1}\)
where each \(h_{i,i+1}\) acts on a different, consecutive pair of quantum
objects. This class is extended by different convenience classes that simplify
the construction of such models, or provide specific, well-known ones:
|
Abstract class representing a Hamiltonian for a 1D system with nearest-neighbor interactions. |
|
Nearest-neighbor 1D Hamiltonian with constant terms. |
|
Translationally invariant Hamiltonian with constant nearest-neighbor interactions. |
|
Nearest-neighbor Hamiltonian with constant Heisenberg interactions over 'size' S=1/2 spins. |
As example of use, we can inspect the HeisenbergHamiltonian
class,
which creates the model \(\sum_i \vec{S}_i\cdot\vec{S}_{i+1}\) more or less
like this:
>>> SdotS = 0.25 * (sp.kron(σx, σx) + sp.kron(σy, σy) + sp.kron(σz, σz))
>>> ConstantTIHamiltonian(size, SdotS)