qml.spin.transverse_ising

transverse_ising(lattice, n_cells, coupling=1.0, h=1.0, boundary_condition=False, neighbour_order=1)[source]

Generates the Hamiltonian for the transverse-field Ising model on a lattice.

The Hamiltonian is represented as:

\[\hat{H} = -J \sum_{<i,j>} \sigma_i^{z} \sigma_j^{z} - h\sum_{i} \sigma_{i}^{x}\]

where \(J\) is the coupling parameter defined for the Hamiltonian, \(h\) is the strength of the transverse magnetic field, \(<i,j>\) represents the indices for neighbouring sites and \(\sigma\) is a Pauli operator.

Parameters
  • lattice (str) – Shape of the lattice. Input values can be 'chain', 'square', 'rectangle', 'triangle', 'honeycomb', 'kagome', 'lieb', 'cubic', 'bcc', 'fcc' or 'diamond'.

  • n_cells (List[int]) – Number of cells in each direction of the grid.

  • coupling (float or tensor_like[float]) – Coupling between spins. It should be a number, an array of length equal to neighbour_order or a square matrix of shape (num_spins,  num_spins), where num_spins is the total number of spins. Default value is 1.0.

  • h (float) – Value of external magnetic field. Default is 1.0.

  • boundary_condition (bool or list[bool]) – Specifies whether or not to enforce periodic boundary conditions for the different lattice axes. Default is False indicating open boundary condition.

  • neighbour_order (int) – Specifies the interaction level for neighbors within the lattice. Default is 1, indicating nearest neighbours.

Returns

Hamiltonian for the transverse-field Ising model.

Return type

Sum

Example

>>> n_cells = [2,2]
>>> j = 0.5
>>> h = 0.1
>>> spin_ham = qml.spin.transverse_ising("square", n_cells, coupling=j, h=h)
>>> spin_ham
(
-0.5 * (Z(0) @ Z(1))
+ -0.5 * (Z(0) @ Z(2))
+ -0.5 * (Z(1) @ Z(3))
+ -0.5 * (Z(2) @ Z(3))
+ -0.1 * X(0)
+ -0.1 * X(1)
+ -0.1 * X(2)
+ -0.1 * X(3)
)