string, read and write.
A string representing the name of the wavefunction. The name of the wavefunction is printed during print statements and error messages. Note that the name of the wavefunction is not the same as the variable name that stores the wavefunction.
We 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, $$ and print the name of this wavefunction. (standard name of wavefunctions is “Wavefunction”). Next we change the name and print the full wavefunction.
NF=3 NB=0 psi = NewWavefunction(NF, NB, {{"110",sqrt(1/4)},{"101",sqrt(1/4)},{"011",(1+I)*sqrt(1/4)}}) print(psi.Name) psi.Name="My test wavefunction" print(psi)
Wave Function WaveFunction: My test wavefunction QComplex = 1 (Real==0 or Complex==1) N = 3 (Number of basis functions used to discribe psi) NFermionic modes = 3 (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 110 2 5.000000000000E-01 0.000000000000E+00 101 3 5.000000000000E-01 5.000000000000E-01 011