Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
documentation:language_reference:functions:newwavefunction [2022/09/30 06:34] Maurits W. Haverkortdocumentation:language_reference:functions:newwavefunction [2022/09/30 16:34] (current) Maurits W. Haverkort
Line 2: Line 2:
  
 ### ###
-//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.+//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 ===== ===== Input =====
Line 19: Line 18:
  
   * psi : Wavefunction   * psi : Wavefunction
- 
  
 ===== Example ===== ===== Example =====
  
 ### ###
-This example defines a new wave-function with one electron on a basis of six spin-orbitals. The state contains two determinants. After the state is defined we print the state.+description text
 ### ###
- 
  
 ==== Input ==== ==== Input ====
 +<code Quanty NewWavefunction.Quanty>
 +Nf=6
 +Nb=0
  
 +psi0=NewWavefunction(Nf, Nb, { { "100000",math.sqrt(1/2)}, {"000001",math.sqrt(1/2)} } )
  
 +print(psi0)
 +</code>
  
 ==== Result ==== ==== Result ====
 +<file Quanty_Output NewWavefunction.out>
 +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 
 +     7.071067811865E-01       100000 
 +     7.071067811865E-01       000001 
 +</file>
  
 ===== Table of contents ===== ===== Table of contents =====
  
- +{{indexmenu>.#1}}
Print/export