no way to compare when less than two revisions
Differences
This shows you the differences between two versions of the page.
— | documentation:language_reference:functions:operatorsetonsiteenergy [2018/11/12 10:48] (current) – created Simon Heinze | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== OperatorSetOnsiteEnergy ====== | ||
+ | |||
+ | ### | ||
+ | (available with next release) | ||
+ | |||
+ | OperatorSetOnsiteEnergy($O$, | ||
+ | |||
+ | After the operation the operator has the property | ||
+ | \begin{equation*} | ||
+ | \sum_{j=\{i_1, | ||
+ | \frac{O_{jj}}{n} | ||
+ | = | ||
+ | t | ||
+ | \hspace{0.3cm} | ||
+ | , | ||
+ | \end{equation*} | ||
+ | where $O_{jj}$ are the prefactors of the diagonal quadratic terms of the operator, | ||
+ | \begin{equation*} | ||
+ | O | ||
+ | = | ||
+ | \sum_{i,j} | ||
+ | O_{ij} a_i^\dagger a_j^{\phantom{\dagger}} | ||
+ | + | ||
+ | ... | ||
+ | \hspace{0.3cm} | ||
+ | . | ||
+ | \end{equation*} | ||
+ | ### | ||
+ | |||
+ | ===== Input ===== | ||
+ | |||
+ | * $O$ : Operator | ||
+ | * $t$ : New value of the trace average (Default 0) | ||
+ | * {$i_1, | ||
+ | |||
+ | ===== Output ===== | ||
+ | |||
+ | * $O^\prime$ : Operator with newly set trace average | ||
+ | |||
+ | ===== Example ===== | ||
+ | |||
+ | |||
+ | ==== Input ==== | ||
+ | <code Quanty Example.Quanty> | ||
+ | Orbitals = {" | ||
+ | Indices, NF = CreateAtomicIndicesDict(Orbitals) | ||
+ | e1s = 1 | ||
+ | e2s = 2 | ||
+ | F0ss = 0.5 | ||
+ | O = NewOperator(" | ||
+ | + NewOperator(" | ||
+ | + NewOperator(" | ||
+ | + NewOperator(" | ||
+ | O.Name = " | ||
+ | print(O) | ||
+ | |||
+ | print(" | ||
+ | OperatorSetOnsiteEnergy(O) | ||
+ | print(O) | ||
+ | |||
+ | print(" | ||
+ | OperatorSetOnsiteEnergy(O, | ||
+ | print(O) | ||
+ | |||
+ | print(" | ||
+ | OperatorSetOnsiteEnergy(O, | ||
+ | OperatorSetOnsiteEnergy(O, | ||
+ | print(O) | ||
+ | </ | ||
+ | |||
+ | ==== Result ==== | ||
+ | <file Quanty_Output> | ||
+ | Operator: Operator | ||
+ | QComplex | ||
+ | MaxLength | ||
+ | NFermionic modes = 4 (Number of fermionic modes (site, spin, orbital, ...) in the one particle basis) | ||
+ | NBosonic modes | ||
+ | |||
+ | Operator of Length | ||
+ | QComplex | ||
+ | N | ||
+ | C 0 A 0 | 1.000000000000000E+00 | ||
+ | C 1 A 1 | 1.000000000000000E+00 | ||
+ | C 2 A 2 | 2.000000000000000E+00 | ||
+ | C 3 A 3 | 2.000000000000000E+00 | ||
+ | |||
+ | Operator of Length | ||
+ | QComplex | ||
+ | N | ||
+ | C 1 C 0 A 1 A 0 | -5.000000000000000E-01 | ||
+ | C 3 C 2 A 3 A 2 | -5.000000000000000E-01 | ||
+ | |||
+ | |||
+ | Set Operator trace average to 0 | ||
+ | |||
+ | Operator: Operator | ||
+ | QComplex | ||
+ | MaxLength | ||
+ | NFermionic modes = 4 (Number of fermionic modes (site, spin, orbital, ...) in the one particle basis) | ||
+ | NBosonic modes | ||
+ | |||
+ | Operator of Length | ||
+ | QComplex | ||
+ | N | ||
+ | C 0 A 0 | -5.000000000000000E-01 | ||
+ | C 1 A 1 | -5.000000000000000E-01 | ||
+ | C 2 A 2 | 5.000000000000000E-01 | ||
+ | C 3 A 3 | 5.000000000000000E-01 | ||
+ | |||
+ | Operator of Length | ||
+ | QComplex | ||
+ | N | ||
+ | C 1 C 0 A 1 A 0 | -5.000000000000000E-01 | ||
+ | C 3 C 2 A 3 A 2 | -5.000000000000000E-01 | ||
+ | |||
+ | |||
+ | Set Operator trace average to 2 | ||
+ | |||
+ | Operator: Operator | ||
+ | QComplex | ||
+ | MaxLength | ||
+ | NFermionic modes = 4 (Number of fermionic modes (site, spin, orbital, ...) in the one particle basis) | ||
+ | NBosonic modes | ||
+ | |||
+ | Operator of Length | ||
+ | QComplex | ||
+ | N | ||
+ | C 0 A 0 | 1.500000000000000E+00 | ||
+ | C 1 A 1 | 1.500000000000000E+00 | ||
+ | C 2 A 2 | 2.500000000000000E+00 | ||
+ | C 3 A 3 | 2.500000000000000E+00 | ||
+ | |||
+ | Operator of Length | ||
+ | QComplex | ||
+ | N | ||
+ | C 1 C 0 A 1 A 0 | -5.000000000000000E-01 | ||
+ | C 3 C 2 A 3 A 2 | -5.000000000000000E-01 | ||
+ | |||
+ | |||
+ | Set trace average of 1s orbitals to -1, and trace average of 2s orbitals to 15 | ||
+ | |||
+ | Operator: Operator | ||
+ | QComplex | ||
+ | MaxLength | ||
+ | NFermionic modes = 4 (Number of fermionic modes (site, spin, orbital, ...) in the one particle basis) | ||
+ | NBosonic modes | ||
+ | |||
+ | Operator of Length | ||
+ | QComplex | ||
+ | N | ||
+ | C 0 A 0 | -1.000000000000000E+00 | ||
+ | C 1 A 1 | -1.000000000000000E+00 | ||
+ | C 2 A 2 | 1.500000000000000E+01 | ||
+ | C 3 A 3 | 1.500000000000000E+01 | ||
+ | |||
+ | Operator of Length | ||
+ | QComplex | ||
+ | N | ||
+ | C 1 C 0 A 1 A 0 | -5.000000000000000E-01 | ||
+ | C 3 C 2 A 3 A 2 | -5.000000000000000E-01 | ||
+ | |||
+ | </ | ||
+ | |||
+ | ===== Table of contents ===== | ||
+ | {{indexmenu> | ||