# Built-in Hamiltonians

NetKet provides a library of built-in Hamiltonians, that can be accessed specifying the Name tag in the Hamiltonian section of the input. Those Hamiltonians are typically defined over a certain graph (say, particles on a square lattice), thus the user must also specify either an Built-in or a Custom graph.

## Ising

The transverse-field Ising model for spin $1/2$ particles

where the interaction terms runs over pairs of nearest-neighbors on a given graph. To use this Hamiltonian, you must specify a valid Graph in the input.

Parameter Possible values Description Default value
h Float The transverse field $h$ None
J Float The coupling constant $J$ 1

### Example

pars['Hamiltonian']={
'Name'           : 'Ising',
'h'              : 1.0,
}


## Heisenberg

The antiferromagnetic Heisenberg model for spin $1/2$ particles

where the exchange terms run over pairs of nearest-neighbors on a given graph. To use this Hamiltonian, you must specify a valid Graph in the input.

Parameter Possible values Description Default value
TotalSz Float If specified, the sampling is restricted to the given value of $\sum_i \sigma_{i}^{z}$ Unspecified

### Example

pars['Hamiltonian']={
'Name'           : 'Heisenberg',
'TotalSz'        : 0,
}


## BoseHubbard

The Bose-Hubbard model for soft-core bosons,

where the hopping term runs over pairs of nearest-neighbors on a given graph. To use this Hamiltonian, you must specify a valid Graph in the input.

Parameter Possible values Description Default value
Nbosons Integer If specified, the sampling is restricted to the given value of $\sum_i n_{i}$ Unspecified
Nmax Integer The maximum number of bosons per site None
Mu Float The chemical potential $\mu$ 0
U Float The Hubbard interaction strength $U$ None

### Example

pars['Hamiltonian']={
'Name'           : 'BoseHubbard',
'U'              : 4.0,
'Nmax'           : 3,
'Nbosons'        : 12,
}