# Restrictions

list of restrictions, read and write

For an operator O, O.Restrictions defines a set of restrictions that apply to occupations when an operator acts on a given wave-function. Restrictions are given as a table, containing as the first two elements the number of Fermions and Bosons in the basis of the operator. (repetition of information in O.NF and O.NB). After this an arbitrary number of restrictions is allowed to follow. Restrictions are given as a table containing a bitfield of length NFermion + NBoson stating if the particular fermion or boson is included in the counting and then a minimum and maximum occupation.

Restrictions can be removed by setting the value to nil.

Restrictions are not inherited during operator arithmetic. If operator O1 and O2 have restrictions then O3 = O1 + O2 does not have restrictions. This can be tricky as O3 = 2 * O1 also does not inherent the restrictions from O1. This behavior might change in future versions, and one should consider operator arithmetic on operators with restrictions to be ill defined on the resulting restrictions at the moment, i.e. you need to reset the restrictions after operator arithmetic.

## Example

description text

### Input

Example.Quanty
-- some example code

### Result

text produced as output