neuralqx.lqx.abstract_lqx_interface module

class AbstractLqxInterface(H, gauge_group, *, lazy_load=True, model_name='')

Bases: ABC

An interface for arbitrary LQX models. This interface should provide access to the constraint of the model, the gauge group, Hilbert space and graph.

property hilbert
property graph
property gauge_group
property constraint: LocalOperatorJax | ComputationalOperator | ComputationalJaxOperator

Any subclass of the AbstractLqxInterface should implement this property which should yield back the constraint of the model. The constraint encoded here will be the one minimised.

property hilbert_dimensions
property gauge_dimensions
property spacetime_dimensions
property model_name
property model
property ground_state
property ground_energy
property has_ground_energy

Returns True if a ground energy is already available (either user-supplied or computed), without triggering exact diagonalisation.

property has_ground_state: bool
initialize_constraint()

An intermediate method which initialises the constraint of the model and promote it to the interface.

exact_diagonalization(ground_energy=None, *, recompute=False)

This method attempts to perform exact diagonalisation of the constraint to obtain a true ground state and the smallest eigenvalue. This method uses the iterative Lanczos algorithm to obtain these values. If the Hilbert space is too large (as in, not indexable), this method will not run.

Return type:

None