# Differences

This shows you the differences between two versions of the page.

 — documentation:language_reference:functions:newwavefunction [2016/10/10 09:41] (current) 2016/10/09 21:50 Maurits W. Haverkort created 2016/10/09 21:50 Maurits W. Haverkort created Line 1: Line 1: + ====== NewWavefunction ====== + ### + //​NewWavefunction(Nf,​ Nb, DeterminantTable)//​ creates a wave-function with $Nf$ fermions and $Nb$ bosons as a sum over determinants given by the determinant table. Determinant Table is of the form of a string of 1's and 0's followed by a prefactor, for example: //​{{"​100000",​math.sqrt(1/​2)},​ ...}//. NewWavefunction can take a forth element specifying options. + ### + + ===== Input ===== + + * Nf : Integer + * Nb : Integer + * Determinant Table : Table of tables containing the determinant in terms of 1's and 0's specifying occupied and unoccupied Fermions followed by a real or complex prefactor. + * Possible options are + * "​Name"​ a string specifying the name of the wavefunction + * "​NBitsKey"​ a list of integers specifying the number of bits in the key used for the hash lookup tables. For optimal performance 2<​sup>​NBitsKey​ should be about 1.5 times larger than the maximum number of determinants encountered in the wavefunction. + + + ===== Output ===== + + * psi : Wavefunction + + ===== Example ===== + + ### + description text + ### + + ==== Input ==== + ​ + Nf=6 + Nb=0 + + psi0=NewWavefunction(Nf,​ Nb, {{"​100000",​math.sqrt(1/​2)},​ {"​000001",​math.sqrt(1/​2)}}) + + print(psi0) + ​ + + ==== Result ==== + ​ + WaveFunction:​ Wave Function + QComplex ​        ​= ​         0 (Real==0 or Complex==1) + N                =          2 (Number of basis functions used to discribe psi) + NFermionic modes =          6 (Number of fermions in the one particle basis) + NBosonic modes   ​= ​         0 (Number of bosons in the one particle basis) + + #      pre-factor ​        ​Determinant + ​1 ​  ​7.071067811865E-01 ​      ​100000 + ​2 ​  ​7.071067811865E-01 ​      ​000001 + ​ + + ===== Table of contents ===== + {{indexmenu>​.#​1}}