Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
documentation:language_reference:functions:ytozmatrix [2018/09/25 13:43] – created Simon Heinze | documentation:language_reference:functions:ytozmatrix [2018/09/25 16:29] (current) – minor typo Simon Heinze | ||
---|---|---|---|
Line 2: | Line 2: | ||
### | ### | ||
- | alligned paragraph text | + | YtoZMatrix($orb$) takes the angular momentum $l$ or the name of a non-relativistic atomic orbital and returns the corresponding matrix to rotate from a basis of spherical harmonics to tesseral harmonics. It is also possible to give a list of $l$ numbers or orbital names, in which case the output is a block diagonal matrix with the rotation matrices as entries. |
### | ### | ||
===== Input ===== | ===== Input ===== | ||
- | * bla : Integer | + | * $orb$ : An integer number, or a list of integer numbers, or a string that can be interpreted as a non-relativistic atomic orbital, or a list or strings. |
- | * bla2 : Real | + | * Options: |
+ | * " | ||
===== Output ===== | ===== Output ===== | ||
- | * bla : real | + | * $R$ : Rotation Matrix from a basis of spherical to tesseral harmonics. |
===== Example ===== | ===== Example ===== | ||
- | ### | ||
- | description text | ||
- | ### | ||
==== Input ==== | ==== Input ==== | ||
<code Quanty Example.Quanty> | <code Quanty Example.Quanty> | ||
- | -- some example code | + | print("" |
+ | print(" | ||
+ | print(YtoZMatrix(0)) | ||
+ | |||
+ | print("" | ||
+ | print(" | ||
+ | print(YtoZMatrix(" | ||
+ | |||
+ | print("" | ||
+ | print(" | ||
+ | print(YtoZMatrix(1)) | ||
+ | |||
+ | print("" | ||
+ | print(" | ||
+ | print(YtoZMatrix(" | ||
+ | |||
+ | print("" | ||
+ | print(" | ||
+ | print(YtoZMatrix(2)) | ||
+ | |||
+ | print("" | ||
+ | print(" | ||
+ | print(YtoZMatrix(" | ||
+ | |||
+ | print("" | ||
+ | print(" | ||
+ | print(YtoZMatrix({0, | ||
+ | |||
+ | print("" | ||
+ | print(" | ||
+ | print(YtoZMatrix({" | ||
+ | |||
+ | print(" | ||
+ | print(" | ||
+ | Orbitals = {" | ||
+ | Indices, NF = CreateAtomicIndicesDict(Orbitals) | ||
+ | |||
+ | --Some Operator definition on spherical harmonics | ||
+ | op = NewOperator(" | ||
+ | print(" | ||
+ | print(op) | ||
+ | |||
+ | opZ = Rotate(op, YtoZMatrix(Orbitals)) | ||
+ | print(" | ||
+ | print(opZ) | ||
</ | </ | ||
==== Result ==== | ==== Result ==== | ||
<file Quanty_Output> | <file Quanty_Output> | ||
- | text produced as output | + | YtoZMatrix(0) |
+ | { { 1 , 0 } , | ||
+ | { 0 , 1 } } | ||
+ | |||
+ | YtoZMatrix(" | ||
+ | { { 1 } } | ||
+ | |||
+ | YtoZMatrix(1) | ||
+ | { { (0 + 0.70710678118655 I) , 0 , 0 , 0 , (0 + 0.70710678118655 I) , 0 } , | ||
+ | { 0 , (0 + 0.70710678118655 I) , 0 , 0 , 0 , (0 + 0.70710678118655 I) } , | ||
+ | { 0 , 0 , 1 , 0 , 0 , 0 } , | ||
+ | { 0 , 0 , 0 , 1 , 0 , 0 } , | ||
+ | { 0.70710678118655 , 0 , 0 , 0 , -0.70710678118655 , 0 } , | ||
+ | { 0 , 0.70710678118655 , 0 , 0 , 0 , -0.70710678118655 } } | ||
+ | |||
+ | YtoZMatrix(" | ||
+ | { { (0 + 0.70710678118655 I) , 0 , 0 , 0 , (0 + 0.70710678118655 I) , 0 } , | ||
+ | { 0 , (0 + 0.70710678118655 I) , 0 , 0 , 0 , (0 + 0.70710678118655 I) } , | ||
+ | { 0 , 0 , 1 , 0 , 0 , 0 } , | ||
+ | { 0 , 0 , 0 , 1 , 0 , 0 } , | ||
+ | { 0.70710678118655 , 0 , 0 , 0 , -0.70710678118655 , 0 } , | ||
+ | { 0 , 0.70710678118655 , 0 , 0 , 0 , -0.70710678118655 } } | ||
+ | |||
+ | YtoZMatrix(2) | ||
+ | { { (0 + 0.70710678118655 I) , 0 , 0 , 0 , 0 , 0 , 0 , 0 , (0 - 0.70710678118655 I) , 0 } , | ||
+ | { 0 , (0 + 0.70710678118655 I) , 0 , 0 , 0 , 0 , 0 , 0 , 0 , (0 - 0.70710678118655 I) } , | ||
+ | { 0 , 0 , (0 + 0.70710678118655 I) , 0 , 0 , 0 , (0 + 0.70710678118655 I) , 0 , 0 , 0 } , | ||
+ | { 0 , 0 , 0 , (0 + 0.70710678118655 I) , 0 , 0 , 0 , (0 + 0.70710678118655 I) , 0 , 0 } , | ||
+ | { 0 , 0 , 0 , 0 , 1 , 0 , 0 , 0 , 0 , 0 } , | ||
+ | { 0 , 0 , 0 , 0 , 0 , 1 , 0 , 0 , 0 , 0 } , | ||
+ | { 0 , 0 , 0.70710678118655 , 0 , 0 , 0 , -0.70710678118655 , 0 , 0 , 0 } , | ||
+ | { 0 , 0 , 0 , 0.70710678118655 , 0 , 0 , 0 , -0.70710678118655 , 0 , 0 } , | ||
+ | { 0.70710678118655 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0.70710678118655 , 0 } , | ||
+ | { 0 , 0.70710678118655 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0.70710678118655 } } | ||
+ | |||
+ | YtoZMatrix(" | ||
+ | { { (0 + 0.70710678118655 I) , 0 , 0 , 0 , 0 , 0 , 0 , 0 , (0 - 0.70710678118655 I) , 0 } , | ||
+ | { 0 , (0 + 0.70710678118655 I) , 0 , 0 , 0 , 0 , 0 , 0 , 0 , (0 - 0.70710678118655 I) } , | ||
+ | { 0 , 0 , (0 + 0.70710678118655 I) , 0 , 0 , 0 , (0 + 0.70710678118655 I) , 0 , 0 , 0 } , | ||
+ | { 0 , 0 , 0 , (0 + 0.70710678118655 I) , 0 , 0 , 0 , (0 + 0.70710678118655 I) , 0 , 0 } , | ||
+ | { 0 , 0 , 0 , 0 , 1 , 0 , 0 , 0 , 0 , 0 } , | ||
+ | { 0 , 0 , 0 , 0 , 0 , 1 , 0 , 0 , 0 , 0 } , | ||
+ | { 0 , 0 , 0.70710678118655 , 0 , 0 , 0 , -0.70710678118655 , 0 , 0 , 0 } , | ||
+ | { 0 , 0 , 0 , 0.70710678118655 , 0 , 0 , 0 , -0.70710678118655 , 0 , 0 } , | ||
+ | { 0.70710678118655 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0.70710678118655 , 0 } , | ||
+ | { 0 , 0.70710678118655 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0.70710678118655 } } | ||
+ | |||
+ | YtoZMatrix({0, | ||
+ | { { 1 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 } , | ||
+ | { 0 , (0 + 0.70710678118655 I) , 0 , (0 + 0.70710678118655 I) , 0 , 0 , 0 , 0 , 0 } , | ||
+ | { 0 , 0 , 1 , 0 , 0 , 0 , 0 , 0 , 0 } , | ||
+ | { 0 , 0.70710678118655 , 0 , -0.70710678118655 , 0 , 0 , 0 , 0 , 0 } , | ||
+ | { 0 , 0 , 0 , 0 , (0 + 0.70710678118655 I) , 0 , 0 , 0 , (0 - 0.70710678118655 I) } , | ||
+ | { 0 , 0 , 0 , 0 , 0 , (0 + 0.70710678118655 I) , 0 , (0 + 0.70710678118655 I) , 0 } , | ||
+ | { 0 , 0 , 0 , 0 , 0 , 0 , 1 , 0 , 0 } , | ||
+ | { 0 , 0 , 0 , 0 , 0 , 0.70710678118655 , 0 , -0.70710678118655 , 0 } , | ||
+ | { 0 , 0 , 0 , 0 , 0.70710678118655 , 0 , 0 , 0 , 0.70710678118655 } } | ||
+ | |||
+ | YtoZMatrix({" | ||
+ | { { 1 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 } , | ||
+ | { 0 , (0 + 0.70710678118655 I) , 0 , (0 + 0.70710678118655 I) , 0 , 0 , 0 , 0 , 0 } , | ||
+ | { 0 , 0 , 1 , 0 , 0 , 0 , 0 , 0 , 0 } , | ||
+ | { 0 , 0.70710678118655 , 0 , -0.70710678118655 , 0 , 0 , 0 , 0 , 0 } , | ||
+ | { 0 , 0 , 0 , 0 , (0 + 0.70710678118655 I) , 0 , 0 , 0 , (0 - 0.70710678118655 I) } , | ||
+ | { 0 , 0 , 0 , 0 , 0 , (0 + 0.70710678118655 I) , 0 , (0 + 0.70710678118655 I) , 0 } , | ||
+ | { 0 , 0 , 0 , 0 , 0 , 0 , 1 , 0 , 0 } , | ||
+ | { 0 , 0 , 0 , 0 , 0 , 0.70710678118655 , 0 , -0.70710678118655 , 0 } , | ||
+ | { 0 , 0 , 0 , 0 , 0.70710678118655 , 0 , 0 , 0 , 0.70710678118655 } } | ||
+ | |||
+ | |||
+ | |||
+ | A more realistic example | ||
+ | Operator on a basis of spherical harmonics | ||
+ | |||
+ | Operator: Coulomb Operator | ||
+ | QComplex | ||
+ | MaxLength | ||
+ | NFermionic modes = 10 (Number of fermionic modes (site, spin, orbital, ...) in the one particle basis) | ||
+ | NBosonic modes | ||
+ | |||
+ | Operator of Length | ||
+ | QComplex | ||
+ | N | ||
+ | C 5 C 4 A 5 A 4 | -3.999999999999999E-02 | ||
+ | C 7 C 5 A 7 A 5 | 2.000000000000000E-01 | ||
+ | C 6 C 5 A 6 A 5 | 7.999999999999999E-02 | ||
+ | C 7 C 4 A 7 A 4 | 7.999999999999999E-02 | ||
+ | C 6 C 4 A 6 A 4 | 2.000000000000000E-01 | ||
+ | C 9 C 5 A 9 A 5 | 2.000000000000000E-01 | ||
+ | C 8 C 5 A 8 A 5 | -3.999999999999999E-02 | ||
+ | C 9 C 4 A 9 A 4 | -3.999999999999999E-02 | ||
+ | C 8 C 4 A 8 A 4 | 2.000000000000000E-01 | ||
+ | C 7 C 6 A 7 A 6 | -1.600000000000000E-01 | ||
+ | C 9 C 7 A 9 A 7 | 2.000000000000000E-01 | ||
+ | C 8 C 7 A 8 A 7 | 7.999999999999999E-02 | ||
+ | C 9 C 6 A 9 A 6 | 7.999999999999999E-02 | ||
+ | C 8 C 6 A 8 A 6 | 2.000000000000000E-01 | ||
+ | C 9 C 8 A 9 A 8 | -3.999999999999999E-02 | ||
+ | C 6 C 5 A 7 A 4 | 1.200000000000000E-01 | ||
+ | C 7 C 4 A 6 A 5 | 1.200000000000000E-01 | ||
+ | C 8 C 5 A 7 A 6 | -1.200000000000000E-01 | ||
+ | C 9 C 4 A 7 A 6 | 1.200000000000000E-01 | ||
+ | C 8 C 5 A 9 A 4 | 2.400000000000000E-01 | ||
+ | C 9 C 4 A 8 A 5 | 2.400000000000000E-01 | ||
+ | C 7 C 6 A 8 A 5 | -1.200000000000000E-01 | ||
+ | C 7 C 6 A 9 A 4 | 1.200000000000000E-01 | ||
+ | C 8 C 7 A 9 A 6 | 1.200000000000000E-01 | ||
+ | C 9 C 6 A 8 A 7 | 1.200000000000000E-01 | ||
+ | |||
+ | |||
+ | Operator on a basis of tesseral harmonics | ||
+ | |||
+ | Operator: Coulomb Operator | ||
+ | QComplex | ||
+ | MaxLength | ||
+ | NFermionic modes = 10 (Number of fermionic modes (site, spin, orbital, ...) in the one particle basis) | ||
+ | NBosonic modes | ||
+ | |||
+ | Operator of Length | ||
+ | QComplex | ||
+ | N | ||
+ | C 5 C 4 A 5 A 4 | -1.599999999999999E-01 | ||
+ | C 9 C 8 A 5 A 4 | -1.200000000000000E-01 | ||
+ | C 9 C 4 A 9 A 4 | 7.999999999999997E-02 | ||
+ | C 8 C 5 A 9 A 4 | 1.200000000000000E-01 | ||
+ | C 9 C 4 A 8 A 5 | 1.200000000000000E-01 | ||
+ | C 8 C 5 A 8 A 5 | 7.999999999999997E-02 | ||
+ | C 5 C 4 A 9 A 8 | -1.200000000000000E-01 | ||
+ | C 9 C 8 A 9 A 8 | -1.599999999999999E-01 | ||
+ | C 7 C 5 A 7 A 5 | 1.999999999999999E-01 | ||
+ | C 9 C 7 A 9 A 7 | 1.999999999999999E-01 | ||
+ | C 6 C 5 A 6 A 5 | 7.999999999999997E-02 | ||
+ | C 9 C 6 A 9 A 6 | 7.999999999999997E-02 | ||
+ | C 7 C 4 A 7 A 4 | 7.999999999999997E-02 | ||
+ | C 8 C 7 A 8 A 7 | 7.999999999999997E-02 | ||
+ | C 6 C 4 A 6 A 4 | 1.999999999999999E-01 | ||
+ | C 8 C 6 A 8 A 6 | 1.999999999999999E-01 | ||
+ | C 9 C 5 A 9 A 5 | 1.999999999999999E-01 | ||
+ | C 8 C 4 A 8 A 4 | 1.999999999999999E-01 | ||
+ | C 7 C 6 A 7 A 6 | -1.600000000000000E-01 | ||
+ | C 6 C 5 A 7 A 4 | 1.200000000000000E-01 | ||
+ | C 9 C 6 A 8 A 7 | 1.200000000000000E-01 | ||
+ | C 7 C 4 A 6 A 5 | 1.200000000000000E-01 | ||
+ | C 8 C 7 A 9 A 6 | 1.200000000000000E-01 | ||
+ | C 5 C 4 A 7 A 6 | -1.200000000000000E-01 | ||
+ | C 9 C 8 A 7 A 6 | -1.200000000000000E-01 | ||
+ | C 7 C 6 A 5 A 4 | -1.200000000000000E-01 | ||
+ | C 7 C 6 A 9 A 8 | -1.200000000000000E-01 | ||
</ | </ | ||