Print

For a wavefunction psi, psi.Print() prints the wavefunction psi. For small wavefunctions print(psi) is preferred over psi.Print(). psi.Print() is more memory efficient and therefore useful for large wavefunctions. psi.Print() returns nill and prints the wavefunction to standard output. Options can be specified if you want to print to file

Options

psi.Print() accepts options. Several options are specified as a list {} of single options. A single option is given as a list of name and value, {“name”,value}.

"File"

“File” of type string: A string specifying the file name to which the wavefunction is printed (over writing the old file)

"Full"

“Full” of type boolean: A boolean character (standard false). If true additional information about Hash tables, fragmentation and collisions is printed. Only needed for debug or memory management optimization purposes.

"Binary"

“Binary” of type boolean: A boolean character (standard false). If true the wavefunctions are stored in binary format.

Example

description text

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)
psi.Print()

Result

WaveFunction: Wave Function
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
 
 
 
WaveFunction: Wave Function
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       C0
   2   5.000000000000E-01         0.000000000000E+00       A0
   3   5.000000000000E-01         5.000000000000E-01       60

Available methods

Print/export