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:densitymatrix [2016/10/10 09:41] – external edit 127.0.0.1documentation:language_reference:functions:densitymatrix [2024/02/14 12:55] (current) Sina Shokri
Line 2: Line 2:
  
 ### ###
-//DensityMatrix(psi, OrbitalTable)// creates the density matrix of psi $a^{\dagger}_{\tau}a^{\phantom{\dagger}}_{\tau'}$ for the orbitals included in orbitaltable. It returns a table.+//DensityMatrix(psi, OrbitalTable, options)// creates the density matrix of psi $a^{\dagger}_{\tau}a^{\phantom{\dagger}}_{\tau'}$ for the orbitals included in orbitaltable. It returns a table.
 ### ###
  
 ===== Input ===== ===== Input =====
  
-  * psi : Wavefunction +  * psi : Wavefunction or a list of wavefunctions 
-  * OrbitalTable : Vector (table) of unsigned integers. Orbitals start at 0.+  * OrbitalTable : Vector (table) of unsigned integers. Orbitals start at 0. If the table is not given, all orbitals will be included. 
 +  * options: a list of options. Currently, only one option can be given: { {"Tensor", bool} }, where bool can be true or false. This option can be used when a list of wavefunctions are given. If the option is set to true, the density matrix is taken with respect to all wavefunctions $\langle \psi_{n} | a^{\dagger}_{\tau}a^{\phantom{\dagger}}_{\tau'} | \psi_{n'} \rangle $. The default value is false, where those density matrices with $n = n'$ will be calculated. The output will be a matrix of density matrices.
  
 ===== Output ===== ===== Output =====
Print/export