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
Last revisionBoth sides next revision
documentation:language_reference:functions:braket [2022/09/30 17:50] Maurits W. Haverkortdocumentation:language_reference:functions:braket [2022/09/30 18:50] Maurits W. Haverkort
Line 8: Line 8:
  
   * psi1 or psiList1 : Wavefunction or list of Wavefunctions   * psi1 or psiList1 : Wavefunction or list of Wavefunctions
-  * O                : Operator+  * O : Operator
   * psi2 or psiList2 : Wavefunction or list of Wavefunctions   * psi2 or psiList2 : Wavefunction or list of Wavefunctions
  
Line 42: Line 42:
  
 -- note that I made one list of length 3, the other of length 2 so that the order is clear -- note that I made one list of length 3, the other of length 2 so that the order is clear
-print("The expectation value of a two states with two other states")+print("The expectation value of a three states with two other states")
 print(Braket({psi0,psi1},OppSy,{psi0,psi1,psi1})) print(Braket({psi0,psi1},OppSy,{psi0,psi1,psi1}))
 </code> </code>
Line 52: Line 52:
 The expectation value of a single state with two other states The expectation value of a single state with two other states
 { 0 , 0.5 } { 0 , 0.5 }
-The expectation value of a two states with two other states+The expectation value of a three states with two other states
 { { 0 , (0 + 0.5 I) , (0 + 0.5 I) } ,  { { 0 , (0 + 0.5 I) , (0 + 0.5 I) } , 
   { (0 - 0.5 I) , 0 , 0 } }   { (0 - 0.5 I) , 0 , 0 } }
Print/export