Table of Contents
NF
unsigned integer, read and write
An integer representing the number of Fermionic modes in the basis. For wavefunction psi, index 0 to psi.NF-1 refers to Fermions, index psi.NF to psi.NF+psi.NB-1 refers to Bosons. Changing this number changes the operator. If the new number of Fermions is smaller than the old number all modes referring to Fermions larger than NF-1 will be removed from the determinants. The index of Bosonic modes is shifted to start at psi.NF-1.
Example
We can define the function: $$ |\psi\rangle = \left(\frac{1}{\sqrt{4}} a^{\dagger}_0 a^{\dagger}_1 + \frac{1}{\sqrt{4}} a^{\dagger}_0 a^{\dagger}_2 + (1+I)\frac{1}{\sqrt{4}} a^{\dagger}_1 a^{\dagger}_2 \right)|0\rangle, $$ changing the number of fermions in the basis from 3 to 2 results in the new function: $$ |\psi\rangle = \left(\frac{1}{\sqrt{4}} a^{\dagger}_0 a^{\dagger}_1 + \frac{1}{\sqrt{4}} a^{\dagger}_0 + (1+I)\frac{1}{\sqrt{4}} a^{\dagger}_1 \right)|0\rangle. $$ Note that the later is normalized, but does not contain a fixed number of electrons.
Input
- Example.Quanty
NF=3 NB=0 psi = NewWavefunction(NF, NB, {{"110",sqrt(1/4)},{"101",sqrt(1/4)},{"011",(1+I)*sqrt(1/4)}}) print(psi.NF) psi.NF=2 print(psi)
Result
3 WaveFunction: Wave Function QComplex = 1 (Real==0 or Complex==1) N = 3 (Number of basis functions used to discribe psi) NFermionic modes = 2 (Number of fermions in the one particle basis) NBosonic modes = 0 (Number of bosons in the one particle basis) # pre-factor +I pre-factor Determinant 1 5.000000000000E-01 0.000000000000E+00 11 2 5.000000000000E-01 0.000000000000E+00 10 3 5.000000000000E-01 5.000000000000E-01 01