Triples

XY_to_channel_Abc

The method to compute the A,b,c triple of a channel based on its X, Y, and d parameters in the Wigner representation.

amplifier_Abc

The (A, b, c) triple of an amplifier.

attenuator_Abc

The (A, b, c) triple of an attenuator.

attenuator_kraus_Abc

The entire family of Kraus operators of the attenuator (loss) channel as a single (A, b, c) triple.

bargmann_eigenstate_Abc

The Abc triple of a Bargmann eigenstate.

bargmann_to_quadrature_Abc

The (A, b, c) triple of the multi-mode kernel \(\langle \vec{p}|\vec{z} \rangle\) between bargmann representation with ABC Ansatz form and quadrature representation with ABC Ansatz.

bargmann_to_wigner_Abc

The Abc triple of the Bargmann to Wigner/Husimi transformation.

beamsplitter_gate_Abc

The (A, b, c) triple of a tensor product of a two-mode beamsplitter gate.

coherent_state_Abc

The (A, b, c) triple of a pure coherent state.

displaced_squeezed_vacuum_state_Abc

The (A, b, c) triple of a displaced squeezed vacuum state.

displacement_gate_Abc

The (A, b, c) triple of a tensor product of a displacement gate.

displacement_map_s_parametrized_Abc

The (A, b, c) triple of a multi-mode s-parametrized displacement map.

fock_damping_Abc

The (A, b, c) triple of a Fock damper.

gaussian_random_noise_Abc

The triple (A, b, c) for the gaussian random noise channel.

gdm_state_Abc

The A,b,c parameters of a Gaussian mixed state that is defined by the action of a Guassian on a thermal state.

gket_state_Abc

The A,b,c parameters of a Gaussian Ket (Gket) state.

homodyne_projector_Abc

The (A, b, c) triple of a homodyne projector.

identity_Abc

The (A, b, c) triple of a tensor product of identity gates.

quadrature_eigenstates_Abc

The (A, b, c) triple of a quadrature eigenstate.

rotation_gate_Abc

The (A, b, c) triple of of a tensor product of a rotation gate.

sauron_state_Abc

The A,b,c parametrization of Sauron states.

squeezed_vacuum_state_Abc

The (A, b, c) triple of a squeezed vacuum state.

squeezing_gate_Abc

The (A, b, c) triple of a squeezing gate.

thermal_state_Abc

The (A, b, c) triple of a thermal state.

two_mode_squeezed_vacuum_state_Abc

The (A, b, c) triple of a two mode squeezed vacuum state.

twomode_squeezing_gate_Abc

The (A, b, c) triple of a tensor product of a two-mode squeezing gate.

vacuum_state_Abc

The (A, b, c) triple of a tensor product of vacuum states on n_modes.

XY_to_channel_Abc

mrmustard.physics.triples.XY_to_channel_Abc(X, Y, d=None)[source]

The method to compute the A,b,c triple of a channel based on its X, Y, and d parameters in the Wigner representation.

Parameters:
  • X (RealMatrix) – The X matrix of the channel

  • Y (RealMatrix) – The Y matrix of the channel

  • d (ComplexVector | None) – The d (displacement) vector of the channel – if None, we consider it as 0

Returns:

The A,b,c triple of the channel.

Return type:

tuple[ComplexMatrix, ComplexVector, ComplexScalar]

amplifier_Abc

mrmustard.physics.triples.amplifier_Abc(gain)[source]

The (A, b, c) triple of an amplifier.

Parameters:

gain (float | Sequence[float]) – The values of the gains.

Returns:

The (A, b, c) triple of the amplifier channel.

Raises:

ValueError – If g is smaller than 1.

Return type:

tuple[mrmustard.utils.typing.ComplexMatrix, mrmustard.utils.typing.ComplexVector, mrmustard.utils.typing.ComplexScalar]

attenuator_Abc

mrmustard.physics.triples.attenuator_Abc(transmissivity)[source]

The (A, b, c) triple of an attenuator.

Parameters:

transmissivity (float | Sequence[float]) – The values of the transmissivities.

Returns:

The (A, b, c) triple of the attenuator channel.

Raises:

ValueError – If eta is larger than 1 or smaller than 0.

Return type:

tuple[mrmustard.utils.typing.ComplexMatrix, mrmustard.utils.typing.ComplexVector, mrmustard.utils.typing.ComplexScalar]

attenuator_kraus_Abc

mrmustard.physics.triples.attenuator_kraus_Abc(eta)[source]

The entire family of Kraus operators of the attenuator (loss) channel as a single (A, b, c) triple. The last index is the “bond” index which should be summed/integrated over.

Parameters:

eta (float | Sequence[float]) – The value of the transmissivity.

Returns:

The (A, b, c) triple of the kraus operators of the attenuator (loss) channel.

Return type:

tuple[mrmustard.utils.typing.ComplexMatrix, mrmustard.utils.typing.ComplexVector, mrmustard.utils.typing.ComplexScalar]

bargmann_eigenstate_Abc

mrmustard.physics.triples.bargmann_eigenstate_Abc(alpha)[source]

The Abc triple of a Bargmann eigenstate.

Parameters:

alpha (complex | Sequence[complex]) – The eigenvalue of the Bargmann eigenstate.

Returns:

The (A, b, c) triple of the Bargmann eigenstate.

Return type:

tuple[mrmustard.utils.typing.ComplexMatrix, mrmustard.utils.typing.ComplexVector, mrmustard.utils.typing.ComplexScalar]

bargmann_to_quadrature_Abc

mrmustard.physics.triples.bargmann_to_quadrature_Abc(n_modes, phi)[source]

The (A, b, c) triple of the multi-mode kernel \(\langle \vec{p}|\vec{z} \rangle\) between bargmann representation with ABC Ansatz form and quadrature representation with ABC Ansatz. The kernel can be considered as a Unitary-like component: the out_ket wires are related to the real variable \(\vec{p}\) in quadrature representation and the in_ket wires are related to the complex variable \(\vec{z}\).

If one wants to transform from quadrature representation to Bargmann representation, the kernel will be the dual of this component, but be careful that the inner product will then have to use the real integral.

Parameters:
  • n_modes (int) – The number of modes.

  • phi (float | Sequence[float]) – The quadrature angle. 0 corresponds to the x quadrature, and \(\pi/2\) to the p quadrature.

Returns:

The (A, b, c) triple of the map from bargmann representation with ABC Ansatz to quadrature representation with ABC Ansatz.

Return type:

tuple[mrmustard.utils.typing.ComplexMatrix, mrmustard.utils.typing.ComplexVector, mrmustard.utils.typing.ComplexScalar]

bargmann_to_wigner_Abc

mrmustard.physics.triples.bargmann_to_wigner_Abc(s, n_modes)[source]

The Abc triple of the Bargmann to Wigner/Husimi transformation.

Parameters:
  • s (float) – The s parameter of this channel. The case s=-1 corresponds to Husimi, s=0 to Wigner, and s=1 to Glauber P function.

  • n_modes (int) – The number of modes.

Returns:

The Abc triple of the Bargmann to Wigner/Husimi transformation.

Return type:

tuple[mrmustard.utils.typing.ComplexMatrix, mrmustard.utils.typing.ComplexVector, mrmustard.utils.typing.ComplexScalar]

beamsplitter_gate_Abc

mrmustard.physics.triples.beamsplitter_gate_Abc(theta, phi=0)[source]

The (A, b, c) triple of a tensor product of a two-mode beamsplitter gate.

Parameters:
  • theta (float | Sequence[float]) – The transmissivity parameters.

  • phi (float | Sequence[float]) – The phase parameters.

Returns:

The (A, b, c) triple of the beamsplitter gate.

Return type:

tuple[mrmustard.utils.typing.ComplexMatrix, mrmustard.utils.typing.ComplexVector, mrmustard.utils.typing.ComplexScalar]

coherent_state_Abc

mrmustard.physics.triples.coherent_state_Abc(alpha)[source]

The (A, b, c) triple of a pure coherent state.

Parameters:

alpha (complex | Sequence[complex]) – The complex displacement.

Returns:

The (A, b, c) triple of the pure coherent state.

Return type:

tuple[mrmustard.utils.typing.ComplexMatrix, mrmustard.utils.typing.ComplexVector, mrmustard.utils.typing.ComplexScalar]

displaced_squeezed_vacuum_state_Abc

mrmustard.physics.triples.displaced_squeezed_vacuum_state_Abc(alpha=0, r=0, phi=0)[source]

The (A, b, c) triple of a displaced squeezed vacuum state.

Parameters:
  • alpha (complex | Sequence[complex]) – The complex displacement.

  • r (float | Sequence[float]) – The squeezing magnitudes.

  • phi (float | Sequence[float]) – The squeezing angles.

Returns:

The (A, b, c) triple of the squeezed vacuum state.

Return type:

tuple[mrmustard.utils.typing.ComplexMatrix, mrmustard.utils.typing.ComplexVector, mrmustard.utils.typing.ComplexScalar]

displacement_gate_Abc

mrmustard.physics.triples.displacement_gate_Abc(alpha)[source]

The (A, b, c) triple of a tensor product of a displacement gate.

Parameters:

alpha (complex | Sequence[complex]) – The displacement in the complex phase space.

Returns:

The (A, b, c) triple of the displacement gate.

Return type:

tuple[mrmustard.utils.typing.ComplexMatrix, mrmustard.utils.typing.ComplexVector, mrmustard.utils.typing.ComplexScalar]

displacement_map_s_parametrized_Abc

mrmustard.physics.triples.displacement_map_s_parametrized_Abc(s, n_modes)[source]

The (A, b, c) triple of a multi-mode s-parametrized displacement map.

Math:

D_s(vec{gamma}^*, vec{gamma}) = e^{frac{s}{2}|vec{gamma}|^2} D(vec{gamma}^*, vec{gamma}) = e^{frac{s}{2}|vec{gamma}|^2} e^{frac{1}{2}|vec{z}|^2} e^{vec{z}^*vec{gamma} - vec{z} vec{gamma}^*}.

Parameters:
  • s (float | Sequence[float])

  • n_modes (int)

Return type:

tuple[mrmustard.utils.typing.ComplexMatrix, mrmustard.utils.typing.ComplexVector, mrmustard.utils.typing.ComplexScalar]

The indices of the final triple correspond to the variables \((\gamma_1^*, \gamma_2^*, ..., z_1, z_2, ..., \gamma_1, \gamma_2, ..., z_1^*, z_2^*, ...)\) of the Bargmann function of the s-parametrized displacement map, and correspond to out_bra, in_bra, out_ket, in_ket wires.

Parameters:
  • s (float | Sequence[float]) – The phase space parameter

  • n_modes (int) – the number of modes for this map.

Returns:

The (A, b, c) triple of the multi-mode s-parametrized dispalcement map \(D_s(\gamma)\).

Return type:

tuple[mrmustard.utils.typing.ComplexMatrix, mrmustard.utils.typing.ComplexVector, mrmustard.utils.typing.ComplexScalar]

fock_damping_Abc

mrmustard.physics.triples.fock_damping_Abc(damping)[source]

The (A, b, c) triple of a Fock damper.

Parameters:

damping (float | Sequence[float]) – The damping parameter.

Returns:

The (A, b, c) triple of the Fock damping operator.

Return type:

tuple[mrmustard.utils.typing.ComplexMatrix, mrmustard.utils.typing.ComplexVector, mrmustard.utils.typing.ComplexScalar]

gaussian_random_noise_Abc

mrmustard.physics.triples.gaussian_random_noise_Abc(Y)[source]

The triple (A, b, c) for the gaussian random noise channel.

Parameters:

Y (RealMatrix) – the Y matrix of the Gaussian random noise channel.

Returns:

The (A, b, c) triple of the Gaussian random noise channel.

Return type:

tuple[mrmustard.utils.typing.ComplexMatrix, mrmustard.utils.typing.ComplexVector, mrmustard.utils.typing.ComplexScalar]

gdm_state_Abc

mrmustard.physics.triples.gdm_state_Abc(beta, symplectic)[source]

The A,b,c parameters of a Gaussian mixed state that is defined by the action of a Guassian on a thermal state.

Parameters:
  • beta (ComplexVector) – the list of betas corresponding to the temperatures of the initial thermal state

  • symplectic (RealMatrix) – the symplectic matrix of the Gaussian

Returns:

The (A,b,c) triple of the resulting Gaussian DM state.

gket_state_Abc

mrmustard.physics.triples.gket_state_Abc(symplectic)[source]

The A,b,c parameters of a Gaussian Ket (Gket) state. This is simply a Gaussian acted on the vacuum.

Parameters:

symplectic (RealMatrix) – the symplectic representation of the Gaussian

Returns:

The (A,b,c) triple of the Gket state.

homodyne_projector_Abc

mrmustard.physics.triples.homodyne_projector_Abc(bs_theta, bs_phi, homodyne_angle, homodyne_outcome, hbar=None)[source]

The (A, b, c) triple of a homodyne projector.

Parameters:
  • bs_theta (float | RealMatrix) – The values of the beamsplitter angles.

  • bs_phi (float | RealMatrix) – The values of the beamsplitter phases.

  • homodyne_angle (float | RealMatrix) – The values of the homodyne angles.

  • homodyne_outcome (float | RealMatrix) – The values of the homodyne outcomes.

  • hbar (float | None) – The value of hbar to use. If None, settings.HBAR is used.

Returns:

The (A, b, c) triple of the homodyne projector.

Return type:

tuple[ComplexMatrix, ComplexVector, ComplexScalar]

identity_Abc

mrmustard.physics.triples.identity_Abc(n_modes)[source]

The (A, b, c) triple of a tensor product of identity gates.

Parameters:

n_modes (int) – The number of modes.

Returns:

The (A, b, c) triple of the identities.

Return type:

tuple[mrmustard.utils.typing.ComplexMatrix, mrmustard.utils.typing.ComplexVector, mrmustard.utils.typing.ComplexScalar]

quadrature_eigenstates_Abc

mrmustard.physics.triples.quadrature_eigenstates_Abc(x, phi)[source]

The (A, b, c) triple of a quadrature eigenstate.

Parameters:
  • x (float | Sequence[float]) – The quadrature eigenvalues.

  • phi (float | Sequence[float]) – The quadrature angles.

Returns:

The (A, b, c) triple of the quadrature eigenstate.

Return type:

tuple[mrmustard.utils.typing.ComplexMatrix, mrmustard.utils.typing.ComplexVector, mrmustard.utils.typing.ComplexScalar]

rotation_gate_Abc

mrmustard.physics.triples.rotation_gate_Abc(theta)[source]

The (A, b, c) triple of of a tensor product of a rotation gate.

Parameters:

theta (float | Sequence[float]) – The rotation angles.

Returns:

The (A, b, c) triple of the rotation gate.

Return type:

tuple[mrmustard.utils.typing.ComplexMatrix, mrmustard.utils.typing.ComplexVector, mrmustard.utils.typing.ComplexScalar]

sauron_state_Abc

mrmustard.physics.triples.sauron_state_Abc(n, epsilon)[source]

The A,b,c parametrization of Sauron states. These are Fock states written as a linear superposition of a ring of coherent states.

Parameters:
  • n (int) – The number of photons.

  • epsilon (float) – The size of the ring. The approximation is exact in the limit for epsilon that goes to zero.

Returns:

The (A, b, c) triple of the sauron state.

Return type:

tuple[mrmustard.utils.typing.ComplexMatrix, mrmustard.utils.typing.ComplexVector, mrmustard.utils.typing.ComplexScalar]

squeezed_vacuum_state_Abc

mrmustard.physics.triples.squeezed_vacuum_state_Abc(r, phi=0.0)[source]

The (A, b, c) triple of a squeezed vacuum state.

Parameters:
  • r (float | Sequence[float]) – The squeezing magnitudes.

  • phi (float | Sequence[float]) – The squeezing angles.

Returns:

The (A, b, c) triple of a squeezed vacuum state.

Return type:

tuple[mrmustard.utils.typing.ComplexMatrix, mrmustard.utils.typing.ComplexVector, mrmustard.utils.typing.ComplexScalar]

squeezing_gate_Abc

mrmustard.physics.triples.squeezing_gate_Abc(r, phi=0)[source]

The (A, b, c) triple of a squeezing gate.

Parameters:
  • r (float | Sequence[float]) – The squeezing magnitudes.

  • phi (float | Sequence[float]) – The squeezing angles.

Returns:

The (A, b, c) triple of the squeezing gate.

Return type:

tuple[mrmustard.utils.typing.ComplexMatrix, mrmustard.utils.typing.ComplexVector, mrmustard.utils.typing.ComplexScalar]

thermal_state_Abc

mrmustard.physics.triples.thermal_state_Abc(nbar)[source]

The (A, b, c) triple of a thermal state.

Parameters:

nbar (float | Sequence[float]) – The average number of photons.

Returns:

The (A, b, c) triple of the thermal state.

Return type:

tuple[mrmustard.utils.typing.ComplexMatrix, mrmustard.utils.typing.ComplexVector, mrmustard.utils.typing.ComplexScalar]

two_mode_squeezed_vacuum_state_Abc

mrmustard.physics.triples.two_mode_squeezed_vacuum_state_Abc(r, phi=0)[source]

The (A, b, c) triple of a two mode squeezed vacuum state.

Parameters:
  • r (float | Sequence[float]) – The squeezing magnitudes.

  • phi (float | Sequence[float]) – The squeezing angles.

Returns:

The (A, b, c) triple of the squeezed vacuum state.

Return type:

tuple[mrmustard.utils.typing.ComplexMatrix, mrmustard.utils.typing.ComplexVector, mrmustard.utils.typing.ComplexScalar]

twomode_squeezing_gate_Abc

mrmustard.physics.triples.twomode_squeezing_gate_Abc(r, phi=0)[source]

The (A, b, c) triple of a tensor product of a two-mode squeezing gate.

Parameters:
  • r (float | Sequence[float]) – The squeezing magnitudes.

  • phi (float | Sequence[float]) – The squeezing phase.

Returns:

The (A, b, c) triple of the two mode squeezing gate.

Return type:

tuple[mrmustard.utils.typing.ComplexMatrix, mrmustard.utils.typing.ComplexVector, mrmustard.utils.typing.ComplexScalar]

vacuum_state_Abc

mrmustard.physics.triples.vacuum_state_Abc(n_modes)[source]

The (A, b, c) triple of a tensor product of vacuum states on n_modes.

Parameters:

n_modes (int) – The number of modes.

Returns:

The (A, b, c) triple of the vacuum states.

Return type:

tuple[mrmustard.utils.typing.ComplexMatrix, mrmustard.utils.typing.ComplexVector, mrmustard.utils.typing.ComplexScalar]