photon
qoptcraft.basis.photon
get_photon_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:
Name | Type | Description |
---|---|---|
BasisPhoton |
BasisPhoton
|
basis of the Hilbert space. |
Source code in qoptcraft/basis/photon.py
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
|
photon_basis(modes, photons)
Given a number of photons and modes, generate the basis of the Hilbert space.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
photons |
int
|
number of photons. |
required |
modes |
int
|
number of modes. |
required |
Returns:
Name | Type | Description |
---|---|---|
BasisPhoton |
BasisPhoton
|
basis of the Hilbert space. |
Source code in qoptcraft/basis/photon.py
39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 |
|