For an operator O, O.Print() prints the operator O. For small operators print(O) is preferred over O.Print(). O.Print() is more memory efficient and therefore useful for large operators. O.Print() returns nill and prints the operator to standard output. Options can be specified if you want to print to file
O.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” of type string: A string specifying the file name to which the operator is printed (over writing the old file)
“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.
We define: $$O=3.4+1.2a^{\dagger}_{0}\,a^{\phantom{\dagger}}_{0}+(2.5+I)a^{\dagger}_{1}\,a^{\phantom{\dagger}}_{2},$$ and show two ways to print this operator with the same result.
NF=3 NB=0 O = NewOperator(NF,NB,{{3.4},{0,-0,1.2},{1,-2,2.5+I}}) print(O) O.Print()
Operator: Operator QComplex = 2 (Real==0 or Complex==1 or Mixed==2) MaxLength = 2 (largest number of product of lader operators) NFermionic modes = 3 (Number of fermionic modes (site, spin, orbital, ...) in the one particle basis) NBosonic modes = 0 (Number of bosonic modes (phonon modes, ...) in the one particle basis) Operator of Length 0 QComplex = 0 (Real==0 or Complex==1) N = 1 (number of operators of length 0) | 3.400000000000000E+00 Operator of Length 2 QComplex = 1 (Real==0 or Complex==1) N = 2 (number of operators of length 2) C 0 A 0 | 1.200000000000000E+00 0.000000000000000E+00 C 1 A 2 | 2.500000000000000E+00 1.000000000000000E+00 Operator: Operator QComplex = 2 (Real==0 or Complex==1 or Mixed==2) MaxLength = 2 (largest number of product of lader operators) NFermionic modes = 3 (Number of fermions in the one particle basis) NBosonic modes = 0 (Number of bosons in the one particle basis) Operator of Length 0 QComplex = 0 (Real==0 or Complex==1) N = 1 (number of operators of length 0) | 3.400000000000000E+00 Operator of Length 2 QComplex = 1 (Real==0 or Complex==1) N = 2 (number of operators of length 2) C 0 A 0 | 1.200000000000000E+00 0.000000000000000E+00 C 1 A 2 | 2.500000000000000E+00 1.000000000000000E+00