PlaquetteTerm Class

class ed_lgt.modeling.plaquette_term.PlaquetteTerm(axes, op_list, op_names_list, print_plaq=True, **kwargs)[source]

Bases: QMBTerm

This function introduce all the fundamental information to define a Plaquette Hamiltonian Term and possible eventual measures of it.

Parameters:
  • axes (list of str) – list of 2 axes along which the Plaquette term should be applied

  • op_list (list of 2 scipy.sparse.matrices) – list of the two operators involved in the 2Body Term

  • op_names_list (list of 2 str) – list of the names of the two operators

get_Hamiltonian(strength, add_dagger=False, mask=None)[source]

The function calculates the Plaquette Hamiltonian by summing up 4body terms for each lattice site, potentially with some sites excluded based on the mask. The result is scaled by the strength parameter before being returned. Eventually, it is possible to sum also the dagger part of the Hamiltonian.

Parameters:
  • strength (scalar) – Coupling of the Hamiltonian term.

  • add_dagger (bool, optional) – If true, it add the hermitian conjugate of the resulting Hamiltonian. Defaults to False.

  • mask (np.ndarray, optional) – 2D array with bool variables specifying (if True) where to apply the local term. Defaults to None.

Returns:

Plaquette Hamiltonian term ready to be used for exact diagonalization/expectation values.

Return type:

scipy.sparse

get_expval(psi, get_imag=False, stag_label=None)[source]

The function calculates the expectation value (and it variance) of the Plaquette Hamiltonian and its average over all the lattice sites.

Parameters:
  • psi (numpy.ndarray) – QMB state where the expectation value has to be computed

  • get_imag (bool, optional) – if true, it results the imaginary part of the expectation value, otherwise, the real part. Default to False.

  • stag_label (str, optional) – if odd/even, then the expectation value is performed only on that kind of sites. Defaults to None.

Raises:

TypeError – If the input arguments are of incorrect types or formats.

print_Plaquette(sites_list, value)[source]