Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| documentation:language_reference:objects:matrix:functions:tooperator [2024/12/12 15:41] – created Maurits W. Haverkort | documentation:language_reference:objects:matrix:functions:tooperator [2025/11/20 04:20] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 3: | Line 3: | ||
| ### | ### | ||
| - | alligned paragraph text | + | Matrix.Operator(M) creates an operator $O = \sum_{i,j} M[i][j] a^{\dagger}_{i-1} a_{j-1}^{\phantom{\dagger}}$ from the matrix $M$ |
| ### | ### | ||
| ===== Example ===== | ===== Example ===== | ||
| - | |||
| - | ### | ||
| - | description text | ||
| - | ### | ||
| ==== Input ==== | ==== Input ==== | ||
| <code Quanty Example.Quanty> | <code Quanty Example.Quanty> | ||
| - | -- some example code | + | M = {{1,2*I}, |
| + | {-2*I,4}} | ||
| + | |||
| + | O = Matrix.ToOperator(M) | ||
| + | print(O) | ||
| </ | </ | ||
| ==== Result ==== | ==== Result ==== | ||
| <file Quanty_Output> | <file Quanty_Output> | ||
| - | text produced as output | + | Operator: Operator |
| + | QComplex | ||
| + | MaxLength | ||
| + | NFermionic modes = 2 (Number of fermionic modes (site, spin, orbital, ...) in the one particle basis) | ||
| + | NBosonic modes | ||
| + | |||
| + | Operator of Length | ||
| + | QComplex | ||
| + | N | ||
| + | C 0 A 0 | 1.00000000000000E+00 | ||
| + | C 0 A 1 | 0.00000000000000E+00 | ||
| + | C 1 A 0 | -0.00000000000000E+00 -2.00000000000000E+00 | ||
| + | C 1 A 1 | 4.00000000000000E+00 | ||
| </ | </ | ||