Differences

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

Link to this comparison view

documentation:language_reference:functions:determinantstring [2018/06/21 15:16]
Simon Heinze created
documentation:language_reference:functions:determinantstring [2018/06/21 16:22] (current)
Simon Heinze Filled with content
Line 2: Line 2:
  
 ### ###
-alligned paragraph text+DeterminantString(//​Inds//,//​NF//​) creates a string of length //NF// and sets all characters to '​0',​ except for those indices included in //Inds//, which it sets to '​1'​. This automatizes the input of functions like NewWavefunction or Eigensystem.
 ### ###
  
 ===== Input ===== ===== Input =====
  
-  * bla Integer +  * //​Inds// ​A list of indices. 
-  * bla2 Real+  * //​NF// ​The number of fermionic states (and hence the length of the resulting string).
  
 ===== Output ===== ===== Output =====
  
-  * bla real+  * //​Det// ​A string that can be used as determinant input for wavefunctions,​ restrictions,​ or the like.
  
 ===== Example ===== ===== Example =====
  
 ### ###
-description text+A small example:
 ### ###
  
 ==== Input ==== ==== Input ====
 <code Quanty Example.Quanty>​ <code Quanty Example.Quanty>​
--- some example code+orbitals = {"​H_1s","​Fe_2s","​Fe_2p","​Fe_3s","​Fe_3d"​} 
 +groupings = { {"​H_states",​ {"​H_1s"​} }, {"​Fe_states",​ {"​Fe_2s","​Fe_2p","​Fe_3s","​Fe_3d"​}} } 
 +Ind, NF = CreateAtomicIndicesDict(orbitals,​groupings) 
 + 
 +print("​\nDeterminantString({0,​1,​2,​3},​NF):"​ ) 
 +print(DeterminantString({0,​1,​2,​3},​NF) ) 
 +print("​\nDeterminantString(Ind[\"​Fe_2p\"​],​NF):"​) 
 +print(DeterminantString(Ind["​Fe_2p"​],​NF) ) 
 +print("​\nDeterminantString(Ind[\"​H_states\"​],​NF):"​) 
 +print(DeterminantString(Ind["​H_states"​],​NF) ) 
 +print("​\nDeterminantString(Ind[\"​Fe_states\"​],​NF):"​) 
 +print(DeterminantString(Ind["​Fe_states"​],​NF) ) 
 + 
 +psi = NewWavefunction(NF,​0,​{{DeterminantString(Ind["​Fe_3d"​],​NF) , 1}}) 
 +print(psi)
 </​code>​ </​code>​
  
 ==== Result ==== ==== Result ====
 <file Quanty_Output>​ <file Quanty_Output>​
-text produced as output+DeterminantString({0,​1,​2,​3},​NF):​ 
 +1111000000000000000000 
 + 
 +DeterminantString(Ind["​Fe_2p"​],​NF):​ 
 +0000111111000000000000 
 + 
 +DeterminantString(Ind["​H_states"​],​NF):​ 
 +1100000000000000000000 
 + 
 +DeterminantString(Ind["​Fe_states"​],​NF):​ 
 +0011111111111111111111 
 + 
 +WaveFunction:​ Wave Function 
 +QComplex ​        ​= ​         0 (Real==0 or Complex==1) 
 +N                =          1 (Number of basis functions used to discribe psi) 
 +NFermionic modes =         22 (Number of fermions in the one particle basis) 
 +NBosonic modes   ​= ​         0 (Number of bosons in the one particle basis) 
 + 
 +#      pre-factor ​        ​Determinant 
 +   ​1 ​  ​1.000000000000E+00 ​      ​0000000000001111111111 
 </​file>​ </​file>​
  
Print/export