neuralqx.operators.number module

This file contains the implementation of the U(1) number operator

get_quantum_number(H, site, is_complex=False, complex_gc=False, is_4d=False)

A function to return the quantum number at the given site. Essentially, it acts like a number operator which is just a diagonal matrix where the diagonal is composed of the allowed quantum numbers

Parameters:
  • H (AbstractHilbertInterface) – the Hilbert space the operator acts on

  • site (int) – (int): the vertex on which the operator should act

Return type:

Union[LocalOperatorJax, FunctionalLocalOperator]

Returns:

(netket.operator.LocalOperator): the operator returning the quantum number on the given site

shifted_get_quantum_number(H, site, shift_dict, graph_level, comp_idx, direction, is_complex=False, complex_gc=False, is_4d=False)

A function to return the shifted quantum number at the given site. Essentially, it acts like a number operator which is just a diagonal matrix where the diagonal is composed of the allowed quantum numbers. The shift is introduced by adding as many deltas as there are in the h sub-dict of the shift_dict and subtracting as many deltas as there are in the ha sub-dict.

Parameters:
  • complex_gc (bool) – a flag to determine whether we want complex valued operators to be used in the Gauss constraint

  • is_complex (bool) – a flag to determine whether we want complex valued operators

  • comp_idx (int) – the current component graph level being computed in the triple-scalar-product

  • graph_level (int) – the current graph level we are in

  • shift_dict (dict) – the dict containing all the shifts

  • is_4d (bool) – a flag to determine whether we work in 4-spacetime dimensions

  • H (AbstractHilbertInterface) – the Hilbert space the operator acts on

  • site (int) – the vertex on which the operator should act

  • direction (str) – the direction of the shift

Return type:

Union[LocalOperatorJax, FunctionalLocalOperator]

Returns:

(netket.operator.LocalOperator): the operator returning the quantum number on the given site