Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
documentation:language_reference:functions:newoperator [2016/10/09 21:48] – created Maurits W. Haverkort | documentation:language_reference:functions:newoperator [2024/10/01 11:40] (current) – Henrik hahn | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== NewOperator ====== | ||
+ | ### | ||
+ | // | ||
+ | ### | ||
+ | |||
+ | ### | ||
+ | // | ||
+ | \begin{eqnarray} | ||
+ | \nonumber | ||
+ | \nonumber + \sum_i | ||
+ | \nonumber + \sum_{i,j} && \alpha^{(2, | ||
+ | + \sum_{i, | ||
+ | \end{eqnarray} | ||
+ | The format of // | ||
+ | // | ||
+ | Whereby positive indices create a particle, negative indices annihilate a particle. Index $i$ for 0 to Nf-1 label Fermions, from Nf to Nf+Nb label Bosons. $\alpha$ can be either a real or a complex number. NewOperator can take a forth element specifying options. | ||
+ | ### | ||
+ | |||
+ | ===== Input ===== | ||
+ | |||
+ | * Nf : Integer | ||
+ | * Nb : Integer | ||
+ | * CreationTable : Table of tables, whereby each table is a list of orbital indices where a particle needs to be created (positive) or annihilated (negative) and a prefactor (real or complex number). Note that -0 and +0 are different. | ||
+ | * Possible options | ||
+ | * " | ||
+ | * " | ||
+ | * " | ||
+ | |||
+ | |||
+ | ===== Output ===== | ||
+ | |||
+ | * O : Operator | ||
+ | |||
+ | ===== Example ===== | ||
+ | |||
+ | ### | ||
+ | description text | ||
+ | ### | ||
+ | |||
+ | ==== Input ==== | ||
+ | <code Quanty NewOperator.Quanty> | ||
+ | Nf = 5 | ||
+ | Nb = 0 | ||
+ | O = NewOperator(Nf, | ||
+ | | ||
+ | | ||
+ | {{" | ||
+ | print(O) | ||
+ | </ | ||
+ | |||
+ | ==== Result ==== | ||
+ | <file Quanty_Output NewOperator.out> | ||
+ | Operator: Liberty | ||
+ | QComplex | ||
+ | MaxLength | ||
+ | NFermionic modes = 5 (Number of fermionic modes (site, spin, orbital, ...) in the one particle basis) | ||
+ | NBosonic modes | ||
+ | |||
+ | Operator of Length | ||
+ | QComplex | ||
+ | N | ||
+ | | 1.00000000000000E+01 | ||
+ | |||
+ | Operator of Length | ||
+ | QComplex | ||
+ | N | ||
+ | C 0 A 0 | 3.00000000000000E+00 | ||
+ | |||
+ | Operator of Length | ||
+ | QComplex | ||
+ | N | ||
+ | C 4 C 3 C 2 C 1 C 0 | 1.00000000000000E+00 | ||
+ | </ | ||
+ | |||
+ | ===== Table of contents ===== | ||
+ | {{indexmenu> |