Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
documentation:language_reference:functions:densitymatrix [2016/10/09 22:05] – created Maurits W. Haverkort | documentation:language_reference:functions:densitymatrix [2024/02/14 12:55] (current) – Sina Shokri | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== DensityMatrix ====== | ||
+ | ### | ||
+ | // | ||
+ | ### | ||
+ | |||
+ | ===== Input ===== | ||
+ | |||
+ | * psi : Wavefunction or a list of wavefunctions | ||
+ | * 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: { {" | ||
+ | |||
+ | ===== Output ===== | ||
+ | |||
+ | * rho : Matrix (Table of Tables) of reals of dimension # | ||
+ | |||
+ | ===== Example ===== | ||
+ | |||
+ | ### | ||
+ | description text | ||
+ | ### | ||
+ | |||
+ | ==== Input ==== | ||
+ | <code Quanty DensityMatrix.Quanty> | ||
+ | dofile(" | ||
+ | |||
+ | print(" | ||
+ | print(psi1) | ||
+ | print(" | ||
+ | rho = DensityMatrix(psi1) | ||
+ | print(rho) | ||
+ | print(" | ||
+ | rho = DensityMatrix(psi1, | ||
+ | print(rho) | ||
+ | </ | ||
+ | |||
+ | ==== Result ==== | ||
+ | <file Quanty_Output DensityMatrix.out> | ||
+ | For the wave-function | ||
+ | |||
+ | WaveFunction: | ||
+ | QComplex | ||
+ | N = 2 (Number of basis functions used to discribe psi) | ||
+ | NFermionic modes = 6 (Number of fermions in the one particle basis) | ||
+ | NBosonic modes | ||
+ | |||
+ | # pre-factor | ||
+ | | ||
+ | | ||
+ | |||
+ | |||
+ | 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 } } | ||
+ | </ | ||
+ | |||
+ | ===== Table of contents ===== | ||
+ | {{indexmenu> |