netket.operator#

The Operator module defines the common interfaces used to interact with quantum operators and super-operators, as well as several concrete implementations of different operators such as netket.hilbert.LocalOperator, netket.hilbert.Ising and others.

NetKet’s operators are all sub-classes of the abstract class netket.hilbert.AbstractOperator, which defines a small set of API respected by all implementations. The inheritance diagram for the class hierarchy of the Operators included with NetKet is shown below (you can click on the nodes in the graph to go to their API documentation page). Dashed nodes represent abstract classes that cannot be instantiated, while the others are concrete and they can be instantiated.

Inheritance diagram of netket.operator, netket.experimental.operator

Abstract Classes#

Below you find a list of all public classes defined in this module Those classes cannot be directly instantiated, but you can inherit from one of them if you want to define new hilbert spaces.

AbstractOperator

Abstract class for quantum Operators.

AbstractSuperOperator

Generic base class for super-operators acting on the tensor product (DoubledHilbert) space β„‹βŠ—β„‹, where β„‹ is the physical space.

DiscreteOperator

This class is the base class for operators defined on a discrete Hilbert space.

DiscreteJaxOperator

Abstract base class for discrete operators that can be manipulated inside of jax function transformations.

ContinuousOperator

This class is the abstract base class for operators defined on a continuous Hilbert space.

Concrete Classes#

Below you find a list of all concrete Operators that you can create on DiscreteHilbert spaces.

BoseHubbard

An extended Bose Hubbard model Hamiltonian operator, containing both on-site interactions and nearest-neighboring density-density interactions.

GraphOperator

A graph-based quantum operator.

LocalOperator

A custom local operator.

Ising

The Transverse-Field Ising Hamiltonian \(-h\sum_i \sigma_i^{(x)} +J\sum_{\langle i,j\rangle} \sigma_i^{(z)}\sigma_j^{(z)}\).

IsingJax

Heisenberg

The Heisenberg hamiltonian on a lattice.

PauliStrings

A Hamiltonian consisting of the sum of products of Pauli operators.

PauliStringsJax

Jax-compatible version of netket.operator.PauliStrings.

LocalLiouvillian

LocalLiouvillian super-operator, acting on the DoubledHilbert (tensor product) space β„‹βŠ—β„‹.

In the experimental submodule there is also a class to represent fermionic operators.

experimental.operator.FermionOperator2nd

A fermionic operator in \(2^{nd}\) quantization, using Numba for indexing.

Continuous space operators#

This is a list of operators that you can define on ContinuousHilbert spaces.

KineticEnergy

This is the kinetic energy operator (hbar = 1).

PotentialEnergy

Returns the local potential energy defined in afun

SumOperator

This class implements the action of the _expect_kernel()-method of ContinuousOperator for a sum of ContinuousOperator objects.

Pre-defined operators#

Those are easy-to-use constructors for a LocalOperator.

boson.create

Builds the boson creation operator \(\hat{a}^\dagger\) acting on the site-th of the Hilbert space hilbert.

boson.destroy

Builds the boson destruction operator \(\hat{a}\) acting on the site-th of the Hilbert space hilbert.

boson.identity

Builds the \(\mathbb{I}\) identity operator.

boson.number

Builds the number operator \(\hat{a}^\dagger\hat{a}\) acting on the site-th of the Hilbert space hilbert.

boson.proj

Builds the projector operator \(|n\rangle\langle n |\) acting on the site-th of the Hilbert space hilbert and collapsing on the state with n bosons.

spin.identity

Builds the \(\mathbb{I}\) identity operator.

spin.sigmax

Builds the \(\sigma^x\) operator acting on the site-th of the Hilbert space hilbert.

spin.sigmay

Builds the \(\sigma^y\) operator acting on the site-th of the Hilbert space hilbert.

spin.sigmaz

Builds the \(\sigma^z\) operator acting on the site-th of the Hilbert space hilbert.

spin.sigmap

Builds the \(\sigma^{+} = \frac{1}{2}(\sigma^x + i \sigma^y)\) operator acting on the site-th of the Hilbert space hilbert.

spin.sigmam

Builds the \(\sigma^{-} = \frac{1}{2}(\sigma^x - i \sigma^y)\) operator acting on the site-th of the Hilbert space hilbert.

In the experimental submodule there are also easy-to-use constructors for common FermionOperator2nd.

experimental.operator.fermion.create

Builds the fermion creation operator \(\hat{a}^\dagger\) acting on the site-th of the Hilbert space hilbert.

experimental.operator.fermion.destroy

Builds the fermion destruction operator \(\hat{a}\) acting on the site-th of the Hilbert space hilbert.

experimental.operator.fermion.identity

Builds the \(\mathbb{I}\) identity operator.

experimental.operator.fermion.number

Builds the number operator \(\hat{a}^\dagger\hat{a}\) acting on the site-th of the Hilbert space hilbert.