tdm#
Time domain multiplexing
Classes
|
Time-domain-multiplexed photonic quantum circuit. |
- class QumodeCircuitTDM(nmode: int, init_state: Any, cutoff: int | None = None, backend: str = 'gaussian', name: str | None = None, noise: bool = False, mu: float = 0, sigma: float = 0.1)[source]#
Bases:
QumodeCircuitTime-domain-multiplexed photonic quantum circuit.
Note
When using large squeezing parameters, we recommend using a double data type and a smaller
epsfor Homodyne to avoid issues with non-positive definiteness of the covariance matrix.- Parameters:
nmode (int) – The number of spatial modes in the circuit.
init_state (Any) – The initial state of the circuit. It can be a vacuum state with
'vac'. For Gaussian backend, it can be arbitrary Gaussian states with[cov, mean]. Usexxppconvention and \(\hbar=2\) by default.cutoff (int | None) – The Fock space truncation. Default:
Nonebackend (str) – Use
'gaussian'for Gaussian backend or'bosonic'for Bosonic backend. Default:'gaussian'name (str | None) – The name of the circuit. Default:
Nonenoise (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(data: Tensor | None = None, state: Any = None, nstep: int | None = None) list[Tensor][source]#
Perform a forward pass of the TDM photonic quantum circuit and return the final state.
- Parameters:
data (Tensor | None) – The input data for the
encoderswith the shape of \((\text{batch}, \text{ntimes}, \text{nfeat})\). Default:Nonestate (Any) – The initial state for the photonic quantum circuit. Default:
Nonenstep (int | None) – The number of the evolved time steps. Default:
None
- Returns:
The covariance matrix and displacement vector of the measured final state.
- Return type:
list[Tensor]