piel.tools.qutip.fock#
Attributes#
Functions#
For a specific amount of modes, we can generate all the possible Fock states for whatever amount of input photons we desire. This returns a list of all corresponding Fock states. |
|
|
|
This function converts a Fock state defined as: |
|
|
This function returns the indexes of the nonzero elements of a Fock state. |
|
This function returns a list of valid Fock states that fulfill a condition of having a maximum photon number at a specific mode index. |
This function returns a list of valid Fock states where each state has a maximum photon number, but only in one mode. |
Module Contents#
- all_fock_states_from_photon_number(mode_amount: int, photon_amount: int = 1, output_type: Literal['qutip', 'jax'] = 'qutip') list[source]#
For a specific amount of modes, we can generate all the possible Fock states for whatever amount of input photons we desire. This returns a list of all corresponding Fock states.
- Parameters:
mode_amount (int) – The amount of modes in the system.
photon_amount (int, optional) – The amount of photons in the system. Defaults to 1.
output_type (str, optional) – The type of output. Defaults to “qutip”.
- Returns:
A list of all the Fock states.
- Return type:
list
- convert_output_type#
- fock_state_to_photon_number_factorial(fock_state: Any) float[source]#
This function converts a Fock state defined as:
\[\]ewcommand{ket}[1]{left|{#1} ight angle}
ket{f_1} = ket{j_1, j_2, … j_N}$
and returns:
\[j_1^{'}! j_2^{'}! ... j_N^{'}!\]- Args:
fock_state (qutip.Qobj): A QuTip QObj representation of the Fock state.
- Returns:
float: The photon number factorial of the Fock state.
- fock_state_nonzero_indexes(fock_state: Any) tuple[int][source]#
This function returns the indexes of the nonzero elements of a Fock state.
- Parameters:
fock_state (qutip.Qobj) – A QuTip QObj representation of the Fock state.
- Returns:
The indexes of the nonzero elements of the Fock state.
- Return type:
tuple
- fock_states_at_mode_index(mode_amount: int, target_mode_index: int, maximum_photon_amount: int | None = 1, output_type: Literal['qutip', 'jax'] = 'qutip') list[source]#
This function returns a list of valid Fock states that fulfill a condition of having a maximum photon number at a specific mode index.
- Parameters:
mode_amount (int) – The amount of modes in the system.
target_mode_index (int) – The mode index to check the photon number at.
maximum_photon_amount (int, optional) – The amount of photons in the system. Defaults to 1.
output_type (str, optional) – The type of output. Defaults to “qutip”.
- Returns:
A list of all the Fock states.
- Return type:
list
- fock_states_only_individual_modes(mode_amount: int, maximum_photon_amount: int | None = 1, output_type: Literal['qutip', 'jax', 'numpy', 'list', 'tuple'] = 'qutip') list[source]#
This function returns a list of valid Fock states where each state has a maximum photon number, but only in one mode.
- Parameters:
mode_amount (int) – The amount of modes in the system.
maximum_photon_amount (int) – The maximum amount of photons in a single mode.
output_type (str, optional) – The type of output. Defaults to “qutip”.
- Returns:
A list of all the valid Fock states.
- Return type:
list