pub trait LatticeState<const D: usize> {
    const CA: Real;

    fn link_matrix(&self) -> &LinkMatrix;
    fn set_link_matrix(&mut self, link_matrix: LinkMatrix);
    fn lattice(&self) -> &LatticeCyclic<D>;
    fn beta(&self) -> Real;
    fn hamiltonian_links(&self) -> Real;

    fn monte_carlo_step<M>(self, m: &mut M) -> Result<Self, M::Error>
    where
        Self: Sized,
        M: MonteCarlo<Self, D> + ?Sized
, { ... } fn average_trace_plaquette(&self) -> Option<Complex> { ... } }
Expand description

Trait to represent a pure gauge lattice state of dimension D.

It defines only one field: link_matrix of type LinkMatrix.

Example

They are many examples throughout the carte see by instance super::monte_carlo::hybrid_monte_carlo.

Associated Constants

C_A constant of the model, usually it is 3.

Required methods

Get the link matrices of this state.

This is the field that stores the link matrices.

Example
use lattice_qcd_rs::lattice::{DirectionEnum, LatticePoint};
use lattice_qcd_rs::simulation::{LatticeState, LatticeStateDefault};

let point = LatticePoint::new_zero();
let state = LatticeStateDefault::<4>::new_cold(1_f64, 10_f64, 4)?;
let _plaquette = state.link_matrix().pij(
    &point,
    &DirectionEnum::XPos.into(),
    &DirectionEnum::YPos.into(),
    state.lattice(),
);

Replace the links matrices with the given input. It should panic if link matrix is not of the correct size.

Panic

Panic if the length of link_matrix is different from lattice.get_number_of_canonical_links_space()

Get the lattice into which the state exists.

Returns the beta parameter of the states.

Returns the Hamiltonian of the links configuration.

Provided methods

Do one monte carlo step with the given method.

Errors

The error form MonteCarlo::get_next_element is propagated.

Example

see super::monte_carlo::hybrid_monte_carlo.

Take the average of the trace of all plaquettes.

Example

see the crate documentation crate.

Implementors

We just transmit the function of State, there is nothing new.