measurement#
Photonic measurements
Classes
|
General Bosonic measurement. |
|
General-dyne measurement. |
|
Homodyne measurement. |
|
Photon-number-resolving measurement for Bosonic state. |
- class GeneralBosonic(cov: Any, weight: Any, nmode: int = 1, wires: int | list[int] | None = None, cutoff: int | None = None, name: str = 'GeneralBosonic')[source]#
Bases:
OperationGeneral Bosonic measurement.
- Parameters:
cov (Any) – The covariance matrices for the general Bosonic measurement.
weight (Any) – The weights for the general Bosonic measurement.
nmode (int) – The number of modes that the quantum operation acts on. Default: 1
wires (int | list[int] | None) – The indices of the modes that the quantum operation acts on. Default:
Nonecutoff (int | None) – The Fock space truncation. Default:
Nonename (str) – The name of the measurement. Default:
'GeneralBosonic'
- forward(x: list[Tensor], samples: Any = None) list[Tensor][source]#
Perform a forward pass for Gaussian (Bosonic) states.
See https://arxiv.org/abs/2103.05530 Eq.(30-31) and Eq.(35-37)
- class Generaldyne(cov_m: Any, nmode: int = 1, wires: int | list[int] | None = None, cutoff: int | None = None, den_mat: bool = False, name: str = 'Generaldyne', noise: bool = False, mu: float = 0, sigma: float = 0.1)[source]#
Bases:
OperationGeneral-dyne measurement.
- Parameters:
cov_m (Any) – The covariance matrix for the general-dyne measurement.
nmode (int) – The number of modes that the quantum operation acts on. Default: 1
wires (int | list[int] | None) – The indices of the modes that the quantum operation acts on. Default:
Nonecutoff (int | None) – The Fock space truncation. Default:
Noneden_mat (bool) – Whether to use density matrix representation. Default:
Falsename (str) – The name of the measurement. Default:
'Generaldyne'noise (bool) – Whether to introduce Gaussian noise. Default:
Falsemu (float) – The mean of Gaussian noise. Default: 0
sigma (float) – The standard deviation of Gaussian noise. Default: 0.1
- forward(x: list[Tensor], samples: Any = None) list[Tensor][source]#
Perform a forward pass for Gaussian (Bosonic) states.
See Quantum Continuous Variables: A Primer of Theoretical Methods (2024) by Alessio Serafini Eq.(5.143) and Eq.(5.144) in page 121
For Bosonic state, see https://arxiv.org/abs/2103.05530 Eq.(35-37)
- class Homodyne(phi: Any = None, nmode: int = 1, wires: int | list[int] | None = None, cutoff: int | None = None, den_mat: bool = False, eps: float = 0.0002, requires_grad: bool = False, noise: bool = False, mu: float = 0, sigma: float = 0.1, name: str = 'Homodyne')[source]#
Bases:
GeneraldyneHomodyne measurement.
- Parameters:
phi (Any) – The homodyne measurement angle. Default:
Nonenmode (int) – The number of modes that the quantum operation acts on. Default: 1
wires (int | list[int] | None) – The indices of the modes that the quantum operation acts on. Default:
Nonecutoff (int | None) – The Fock space truncation. Default:
Noneden_mat (bool) – Whether to use density matrix representation. Default:
Falseeps (float) – The measurement accuracy. Default: 2e-4
requires_grad (bool) – Whether the parameter is
nn.Parameterorbuffer. Default:False(which meansbuffer)noise (bool) – Whether to introduce Gaussian noise. Default:
Falsemu (float) – The mean of Gaussian noise. Default: 0
sigma (float) – The standard deviation of Gaussian noise. Default: 0.1
name (str) – The name of the measurement. Default:
'Homodyne'
- forward(x: Tensor | list[Tensor], samples: Any = None) Tensor | list[Tensor][source]#
Perform a forward pass.
- class PhotonNumberResolvingBosonic(n: int, r: Any = 0.05, nmode: int = 1, wires: int | list[int] | None = None, cutoff: int | None = None, name: str = 'PhotonNumberResolvingBosonic')[source]#
Bases:
GeneralBosonicPhoton-number-resolving measurement for Bosonic state.
- Parameters:
n (int) – Photon number.
r (Any) – The quality parameter for the approximation. Default: 0.05
nmode (int) – The number of modes that the quantum operation acts on. Default: 1
wires (int | list[int] | None) – The indices of the modes that the quantum operation acts on. Default:
Nonecutoff (int | None) – The Fock space truncation. Default:
Nonename (str) – The name of the measurement. Default:
'PhotonNumberResolvingBosonic'