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 onsite (
int) – (int): the vertex on which the operator should act
- Return type:
- 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 constraintis_complex (
bool) – a flag to determine whether we want complex valued operatorscomp_idx (
int) – the current component graph level being computed in the triple-scalar-productgraph_level (
int) – the current graph level we are inshift_dict (
dict) – the dict containing all the shiftsis_4d (
bool) – a flag to determine whether we work in 4-spacetime dimensionsH (
AbstractHilbertInterface) – the Hilbert space the operator acts onsite (
int) – the vertex on which the operator should actdirection (
str) – the direction of the shift
- Return type:
- Returns:
(netket.operator.LocalOperator): the operator returning the quantum number on the given site