algebra
qoptcraft.basis.algebra
algebra_basis(modes, photons)
Generate the basis for the algebra and image algebra.
Source code in qoptcraft/basis/algebra.py
59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 |
|
antisym_matrix(mode_1, mode_2, dim)
Create the element of the algebra 1/2(|j>
Source code in qoptcraft/basis/algebra.py
89 90 91 92 93 94 |
|
get_algebra_basis(modes, photons)
Return a basis for the Hilbert space with n photons and m modes. If the basis was saved retrieve it, otherwise the function creates and saves the basis to a file.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
photons |
int
|
number of photons. |
required |
modes |
int
|
number of modes. |
required |
Returns:
Type | Description |
---|---|
tuple[BasisAlgebra, BasisAlgebra]
|
BasisAlgebra, BasisAlgebra: basis of the algebra and the image algebra. |
Source code in qoptcraft/basis/algebra.py
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 |
|
image_antisym_matrix(mode_1, mode_2, photon_basis)
Image of the antisymmetric basis matrix by the lie algebra homomorphism.
Source code in qoptcraft/basis/algebra.py
116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 |
|
image_sym_matrix(mode_1, mode_2, photon_basis)
Image of the symmetric basis matrix by the lie algebra homomorphism.
Source code in qoptcraft/basis/algebra.py
97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 |
|
sym_matrix(mode_1, mode_2, dim)
Create the element of the algebra i/2(|j>
Source code in qoptcraft/basis/algebra.py
81 82 83 84 85 86 |
|