Differences
This shows you the differences between two versions of the page.
documentation:language_reference:functions:meanfieldgroundstate [2016/10/09 22:10] – created Maurits W. Haverkort | documentation:language_reference:functions:meanfieldgroundstate [2016/10/10 09:41] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== MeanFieldGroundstate ====== | ||
+ | ### | ||
+ | // | ||
+ | $rho$ stores the expectation values of $a^{\dagger}_{\tau}a^{\phantom{\dagger}}_{\tau' | ||
+ | $O^{(0)}$ a constant, | ||
+ | $O^{(1)}$ a one particle operator of the form $\sum_{\tau, | ||
+ | $O^{(2)}$ a two particle operator of the form $\sum_{\tau, | ||
+ | |||
+ | The two particle operator will be replaced in mean-field, using the Hartree-Fock approximation by: | ||
+ | \begin{eqnarray} | ||
+ | a^{\dagger}_{i}a^{\dagger}_{j}a^{\phantom{\dagger}}_{k}a^{\phantom{\dagger}}_{l} & | ||
+ | \nonumber &-& a^{\dagger}_{i}a^{\phantom{\dagger}}_{k} \langle a^{\dagger}_{j}a^{\phantom{\dagger}}_{l} \rangle \\ | ||
+ | \nonumber &+& a^{\dagger}_{i}a^{\phantom{\dagger}}_{l} \langle a^{\dagger}_{j}a^{\phantom{\dagger}}_{k} \rangle \\ | ||
+ | \nonumber &+& a^{\dagger}_{j}a^{\phantom{\dagger}}_{k} \langle a^{\dagger}_{i}a^{\phantom{\dagger}}_{l} \rangle \\ | ||
+ | \nonumber &-& a^{\dagger}_{j}a^{\phantom{\dagger}}_{l} \langle a^{\dagger}_{i}a^{\phantom{\dagger}}_{k} \rangle \\ | ||
+ | \nonumber &-& \langle a^{\dagger}_{i}a^{\phantom{\dagger}}_{l} \rangle \langle a^{\dagger}_{j}a^{\phantom{\dagger}}_{k} \rangle \\ | ||
+ | \nonumber &+& \langle a^{\dagger}_{i}a^{\phantom{\dagger}}_{k} \rangle \langle a^{\dagger}_{j}a^{\phantom{\dagger}}_{l} \rangle | ||
+ | \end{eqnarray} | ||
+ | |||
+ | the function MeanFieldGroundState searches for a self consistent solution such that the lowest eigen-state of the mean-field approximated operator has the same density matrix as is used to calculate the operator. | ||
+ | ### | ||
+ | |||
+ | ===== Input ===== | ||
+ | |||
+ | * $O$ : Operator | ||
+ | * $rho$ : Matrix (Table of Table of length $O.NF$) of doubles | ||
+ | * $T$ : Real | ||
+ | |||
+ | ===== Output ===== | ||
+ | |||
+ | * $rho_{MF}$ : Matrix (Table of Table of length $O.NF$ The self consistent density matrix | ||
+ | * $E_{MF}$ : The mean-field ground state energy | ||
+ | * $O_{MF}$ The mean-field approximated operator | ||
+ | |||
+ | ===== Example ===== | ||
+ | |||
+ | ### | ||
+ | description text | ||
+ | ### | ||
+ | |||
+ | ==== Input ==== | ||
+ | <code Quanty MeanFieldGroundstate.Quanty> | ||
+ | dofile(" | ||
+ | |||
+ | -- we define an arbitrary operator | ||
+ | Opp = -(2*OppSy + OppLy)*(2*OppSy + OppLy) + (2*OppSy + OppLy) + 0.0000001 * OppLy | ||
+ | -- and a starting density | ||
+ | rho = DensityMatrix(psi1) | ||
+ | -- as well as a temperature needed to average over degenerate states | ||
+ | T = 0.0001 | ||
+ | -- calculate the ground-state in mean-field | ||
+ | rhogrd, E, OppMF = MeanFieldGroundState(Opp, | ||
+ | |||
+ | -- print the resulting density | ||
+ | print(Chop(rhogrd)) | ||
+ | -- print the ground-state energy | ||
+ | print(E) | ||
+ | -- print the Hamiltonian in mean-field, i.e. a potential optimized for the ground-state density | ||
+ | print(Chop(OppMF)) | ||
+ | |||
+ | -- lets compare the eigenstates of Opp and OppMF | ||
+ | |||
+ | Npsi=15 | ||
+ | |||
+ | -- In order to make sure we have a filling of 2 | ||
+ | -- electrons we need to define some restrictions | ||
+ | StartRestrictions = {Nf, Nb, {" | ||
+ | |||
+ | -- We now can create the lowest Npsi eigenstates: | ||
+ | psiList | ||
+ | psiListMF = Eigensystem(OppMF, | ||
+ | |||
+ | |||
+ | -- We define a list of some operators to look at their expectation values | ||
+ | oppList={Opp, | ||
+ | |||
+ | -- after we've created the eigen states we can look | ||
+ | -- at a list of their expectation values | ||
+ | -- on the left we show the full eigen-states, | ||
+ | print(" | ||
+ | for i=1,# | ||
+ | for j=1,# | ||
+ | io.write(string.format(" | ||
+ | end | ||
+ | io.write(" | ||
+ | for j=1,# | ||
+ | io.write(string.format(" | ||
+ | end | ||
+ | io.write(" | ||
+ | end | ||
+ | </ | ||
+ | |||
+ | ==== Result ==== | ||
+ | <file Quanty_Output MeanFieldGroundstate.out> | ||
+ | { { 0.37500001606196 , (-5.3632883498142e-09 + 0.375 I) , (-7.5782580190366e-09 + 0.17677669529663 I) , (-0.17677671801051 + 8.4602858479628e-12 I) , (0.12499998393969 + 1.1964467459925e-11 I) , (5.3539869430386e-09 + 0.125 I) } , | ||
+ | { (-5.3632883498142e-09 - 0.375 I) , 0.37499998393804 , (0.17677667258276 + 8.460206504589e-12 I) , (7.5782580958409e-09 + 0.17677669529663 I) , (5.3539868459665e-09 - 0.125 I) , (0.12500001606031 - 1.1964561947813e-11 I) } , | ||
+ | { (-7.5782580190366e-09 - 0.17677669529663 I) , (0.17677667258276 - 8.460206504589e-12 I) , 0.24999996787773 , (1.0707423359528e-08 + 0.25 I) , (7.564325232475e-09 + 0.17677669529663 I) , (-0.17677667258276 - 8.4601954064865e-12 I) } , | ||
+ | { (-0.17677671801051 - 8.4602858479628e-12 I) , (7.5782580958409e-09 - 0.17677669529663 I) , (1.0707423359528e-08 - 0.25 I) , 0.25000003212227 , (0.17677671801051 - 8.4602042449046e-12 I) , (-7.5643252261757e-09 + 0.17677669529663 I) } , | ||
+ | { (0.12499998393969 - 1.1964467459925e-11 I) , (5.3539868459665e-09 + 0.125 I) , (7.564325232475e-09 - 0.17677669529663 I) , (0.17677671801051 + 8.4602042449046e-12 I) , 0.37500001606196 , (-5.3435844501437e-09 + 0.375 I) } , | ||
+ | { (5.3539869430386e-09 - 0.125 I) , (0.12500001606031 + 1.1964561947813e-11 I) , (-0.17677667258276 + 8.4601954064865e-12 I) , (-7.5643252261757e-09 - 0.17677669529663 I) , (-5.3435844501437e-09 - 0.375 I) , 0.37499998393804 } } | ||
+ | -12.0000001 | ||
+ | |||
+ | Operator: Operator | ||
+ | QComplex | ||
+ | MaxLength | ||
+ | NFermionic modes = 6 (Number of fermionic modes (site, spin, orbital, ...) in the one particle basis) | ||
+ | NBosonic modes | ||
+ | |||
+ | Operator of Length | ||
+ | QComplex | ||
+ | N | ||
+ | C 0 A 0 | 1.999999871509219E+00 -5.054768245166573E-25 | ||
+ | C 0 A 1 | 4.286855070714231E-08 | ||
+ | C 0 A 2 | 6.059819870986585E-08 | ||
+ | C 0 A 3 | 1.817109998858424E-07 | ||
+ | C 0 A 4 | 1.284874287521554E-07 | ||
+ | C 0 A 5 | -4.283024376372977E-08 | ||
+ | C 1 A 0 | 4.286855070714231E-08 -5.499999999999948E+00 | ||
+ | C 1 A 1 | 2.000000128490683E+00 | ||
+ | C 1 A 2 | 1.817109995805311E-07 | ||
+ | C 1 A 3 | -6.059819876404298E-08 | ||
+ | C 1 A 4 | -4.283024384034779E-08 -4.999999999999832E-01 | ||
+ | C 1 A 5 | -1.284874284745996E-07 -4.785812149118257E-11 | ||
+ | C 2 A 0 | 6.059819870986585E-08 -3.535533976643392E+00 | ||
+ | C 2 A 1 | 1.817109995805311E-07 -3.384080224126484E-11 | ||
+ | C 2 A 2 | 2.000000256978111E+00 | ||
+ | C 2 A 3 | -8.565938661503036E-08 | ||
+ | C 2 A 4 | -6.054246758567044E-08 | ||
+ | C 2 A 5 | -1.817109991364418E-07 -3.384080224126484E-11 | ||
+ | C 3 A 0 | 1.817109998858424E-07 -3.384084768552549E-11 | ||
+ | C 3 A 1 | -6.059819876404298E-08 -3.535533976643392E+00 | ||
+ | C 3 A 2 | -8.565938661503036E-08 -4.999999999999965E+00 | ||
+ | C 3 A 3 | 1.999999743021791E+00 -5.054768245166573E-25 | ||
+ | C 3 A 4 | -1.817109997748201E-07 -3.384084768552549E-11 | ||
+ | C 3 A 5 | 6.054246753149332E-08 | ||
+ | C 4 A 0 | 1.284874287521554E-07 -4.785818575907231E-11 | ||
+ | C 4 A 1 | -4.283024384034779E-08 | ||
+ | C 4 A 2 | -6.054246758567044E-08 -3.535533976643392E+00 | ||
+ | C 4 A 3 | -1.817109997748201E-07 | ||
+ | C 4 A 4 | 1.999999871509220E+00 -7.122719776549142E-25 | ||
+ | C 4 A 5 | 4.278973491884084E-08 | ||
+ | C 5 A 0 | -4.283024376372977E-08 -4.999999999999833E-01 | ||
+ | C 5 A 1 | -1.284874284745996E-07 | ||
+ | C 5 A 2 | -1.817109991364418E-07 | ||
+ | C 5 A 3 | 6.054246753149332E-08 -3.535533976643392E+00 | ||
+ | C 5 A 4 | 4.278973491884084E-08 -5.499999999999948E+00 | ||
+ | C 5 A 5 | 2.000000128490682E+00 -9.188651824014346E-26 | ||
+ | |||
+ | |||
+ | < | ||
+ | -12.000 -12.000 | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | 0.000 | ||
+ | 0.000 | ||
+ | 0.000 | ||
+ | 0.000 | ||
+ | 0.000 | ||
+ | </ | ||
+ | |||
+ | ===== Table of contents ===== | ||
+ | {{indexmenu> |