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.
description text
dofile("../definitions.Quanty") print("For the wave-function") print(psi1) print("the density matrix is") rho = DensityMatrix(psi1) print(rho) print("the density matrix of orbital 1 and 4 is (counting starts at 0)") rho = DensityMatrix(psi1,{1,4}) print(rho)
For the wave-function 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 9.486832980505E-01 100010 2 3.162277660168E-01 110000 the density matrix is { { 1 , 0 , 0 , 0 , 0 , 0 } , { 0 , 0.1 , 0 , 0 , 0.3 , 0 } , { 0 , 0 , 0 , 0 , 0 , 0 } , { 0 , 0 , 0 , 0 , 0 , 0 } , { 0 , 0.3 , 0 , 0 , 0.9 , 0 } , { 0 , 0 , 0 , 0 , 0 , 0 } } the density matrix of orbital 1 and 4 is (counting starts at 0) { { 0.1 , 0.3 } , { 0.3 , 0.9 } }