Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| documentation:language_reference:functions:rotate [2016/10/09 21:51] – created Maurits W. Haverkort | documentation:language_reference:functions:rotate [2025/11/20 03:29] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ====== Rotate ====== | ||
| + | ### | ||
| + | // | ||
| + | |||
| + | $R$ needs to be a matrix of dimension $N_1\times N_2$, where $N_2$ equals the number of rows of $M$, or $N_{Fermion}+N_{Boson}$ of $\psi$, $O$ or $TB$. The rotation matrix $R$ is not required to be quadratic, it is therefore possible to use rotations to change the number of dimensions of the Hilbert-space. | ||
| + | |||
| + | $R^\ast \cdot R^T = 1$ is not checked by Quanty, to allow scaling rotations. | ||
| + | |||
| + | |||
| + | ### | ||
| + | |||
| + | ===== Input ===== | ||
| + | |||
| + | * $M$, $\psi$, $O$ or $TB$ : a quadratic (complex or real valued) matrix, a wave-function, | ||
| + | * $R$ : a complex or real valued generalised rotation matrix. | ||
| + | |||
| + | ===== Output ===== | ||
| + | |||
| + | * $M^\prime$, $\psi^\prime$, | ||
| + | |||
| + | ===== Example ===== | ||
| + | |||
| + | ### | ||
| + | A small example: | ||
| + | ### | ||
| + | |||
| + | ==== Input ==== | ||
| + | <code Quanty Rotate.Quanty> | ||
| + | dofile(" | ||
| + | |||
| + | OpppxR = Chop(Rotate(Opppx, | ||
| + | OpppyR = Chop(Rotate(Opppy, | ||
| + | OpppzR = Chop(Rotate(Opppz, | ||
| + | |||
| + | print(" | ||
| + | print(rotmat) | ||
| + | print(" | ||
| + | print(" | ||
| + | print(" | ||
| + | print(" | ||
| + | print(" | ||
| + | print(" | ||
| + | |||
| + | psixdnR = Chop(Rotate(psixdn, | ||
| + | psixupR = Chop(Rotate(psixup, | ||
| + | psiydnR = Chop(Rotate(psiydn, | ||
| + | psiyupR = Chop(Rotate(psiyup, | ||
| + | psizdnR = Chop(Rotate(psizdn, | ||
| + | psizupR = Chop(Rotate(psizup, | ||
| + | |||
| + | print(" | ||
| + | print(" | ||
| + | print(" | ||
| + | print(" | ||
| + | print(" | ||
| + | print(" | ||
| + | |||
| + | print(" | ||
| + | print(" | ||
| + | print(" | ||
| + | print(" | ||
| + | print(" | ||
| + | print(" | ||
| + | </ | ||
| + | |||
| + | ==== Result ==== | ||
| + | <file Quanty_Output Rotate.out> | ||
| + | The matrix rotating an operator on the basis of spherical harmonics with alternating spin to a basis of kubic harmonics with alternating spin for a p orbital is: | ||
| + | { { 0.70710678118655 , 0 , 0 , 0 , -0.70710678118655 , 0 } , | ||
| + | { 0 , 0.70710678118655 , 0 , 0 , 0 , -0.70710678118655 } , | ||
| + | { (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 } } | ||
| + | The operator adding a potential to the px orbital on a basis of spherical harmonics is: | ||
| + | Operator: Opp px | ||
| + | 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 | 4.999999999999999E-01 | ||
| + | C 1 A 1 | 4.999999999999999E-01 | ||
| + | C 4 A 4 | 4.999999999999999E-01 | ||
| + | C 5 A 5 | 4.999999999999999E-01 | ||
| + | C 4 A 0 | -5.000000000000000E-01 | ||
| + | C 5 A 1 | -5.000000000000000E-01 | ||
| + | C 0 A 4 | -5.000000000000000E-01 | ||
| + | C 1 A 5 | -5.000000000000000E-01 | ||
| + | |||
| + | |||
| + | The operator adding a potential to the px orbital on a basis of kubic harmonics is: | ||
| + | Operator: Opp px | ||
| + | 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.000000000000000E+00 | ||
| + | C 1 A 1 | 1.000000000000000E+00 | ||
| + | |||
| + | |||
| + | The operator adding a potential to the py orbital on a basis of spherical harmonics is: | ||
| + | Operator: Opp py | ||
| + | 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 | 4.999999999999999E-01 | ||
| + | C 1 A 1 | 4.999999999999999E-01 | ||
| + | C 4 A 4 | 4.999999999999999E-01 | ||
| + | C 5 A 5 | 4.999999999999999E-01 | ||
| + | C 4 A 0 | 5.000000000000000E-01 | ||
| + | C 5 A 1 | 5.000000000000000E-01 | ||
| + | C 0 A 4 | 5.000000000000000E-01 | ||
| + | C 1 A 5 | 5.000000000000000E-01 | ||
| + | |||
| + | |||
| + | The operator adding a potential to the py orbital on a basis of kubic harmonics is: | ||
| + | Operator: Opp py | ||
| + | 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 2 A 2 | 1.000000000000000E+00 | ||
| + | C 3 A 3 | 1.000000000000000E+00 | ||
| + | |||
| + | |||
| + | The operator adding a potential to the pz orbital on a basis of spherical harmonics is: | ||
| + | Operator: Opp pz | ||
| + | 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 2 A 2 | 9.999999999999999E-01 | ||
| + | C 3 A 3 | 9.999999999999999E-01 | ||
| + | |||
| + | |||
| + | The operator adding a potential to the pz orbital on a basis of kubic harmonics is: | ||
| + | Operator: Opp pz | ||
| + | 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 4 A 4 | 9.999999999999999E-01 | ||
| + | C 5 A 5 | 9.999999999999999E-01 | ||
| + | |||
| + | |||
| + | The px orbital with spin down on a basis of spherical harmonics is: | ||
| + | WaveFunction: | ||
| + | QComplex | ||
| + | N = 2 (Number of basis functions used to discribe psi) | ||
| + | NFermionic modes = 6 (Number of fermions in the one particle basis) | ||
| + | NBosonic modes | ||
| + | |||
| + | # pre-factor | ||
| + | | ||
| + | | ||
| + | |||
| + | |||
| + | The px orbital with spin down on a basis of kubic harmonics is: | ||
| + | WaveFunction: | ||
| + | QComplex | ||
| + | N = 1 (Number of basis functions used to discribe psi) | ||
| + | NFermionic modes = 6 (Number of fermions in the one particle basis) | ||
| + | NBosonic modes | ||
| + | |||
| + | # pre-factor | ||
| + | | ||
| + | |||
| + | |||
| + | The py orbital with spin down on a basis of spherical harmonics is: | ||
| + | WaveFunction: | ||
| + | QComplex | ||
| + | N = 2 (Number of basis functions used to discribe psi) | ||
| + | NFermionic modes = 6 (Number of fermions in the one particle basis) | ||
| + | NBosonic modes | ||
| + | |||
| + | # pre-factor | ||
| + | | ||
| + | | ||
| + | |||
| + | |||
| + | The py orbital with spin down on a basis of kubic harmonics is: | ||
| + | WaveFunction: | ||
| + | QComplex | ||
| + | N = 1 (Number of basis functions used to discribe psi) | ||
| + | NFermionic modes = 6 (Number of fermions in the one particle basis) | ||
| + | NBosonic modes | ||
| + | |||
| + | # pre-factor | ||
| + | | ||
| + | |||
| + | |||
| + | The pz orbital with spin down on a basis of spherical harmonics is: | ||
| + | WaveFunction: | ||
| + | QComplex | ||
| + | N = 1 (Number of basis functions used to discribe psi) | ||
| + | NFermionic modes = 6 (Number of fermions in the one particle basis) | ||
| + | NBosonic modes | ||
| + | |||
| + | # pre-factor | ||
| + | | ||
| + | |||
| + | |||
| + | The pz orbital with spin down on a basis of kubic harmonics is: | ||
| + | WaveFunction: | ||
| + | QComplex | ||
| + | N = 1 (Number of basis functions used to discribe psi) | ||
| + | NFermionic modes = 6 (Number of fermions in the one particle basis) | ||
| + | NBosonic modes | ||
| + | |||
| + | # pre-factor | ||
| + | | ||
| + | |||
| + | |||
| + | Counting the px orbital on a basis of spherical harmonics: 1 | ||
| + | Counting the px orbital on a basis of kubic | ||
| + | Counting the py orbital on a basis of spherical harmonics: 1 | ||
| + | Counting the py orbital on a basis of kubic | ||
| + | Counting the pz orbital on a basis of spherical harmonics: 1 | ||
| + | Counting the pz orbital on a basis of kubic | ||
| + | </ | ||
| + | |||
| + | ===== Table of contents ===== | ||
| + | {{indexmenu> | ||