Calculations on Gaussian objects

This module contains functions for performing calculations on objects in the Gaussian representations.

Functions

CPTP(cov, means, X, Y, d, state_modes, ...)

Returns the cov matrix and means vector of a state after undergoing a CPTP channel.

XYd_dual(X, Y, d)

Returns the dual channel (X, Y, d).

amp_XYd(gain, nbar)

Returns the X, Y matrices and the d vector for the noisy amplifier channel.

beam_splitter_symplectic(theta, phi)

Symplectic matrix of a Beam-splitter gate.

compose_channels_XYd(X1, Y1, d1, X2, Y2, d2)

Returns the combined X, Y, and d for two CPTP channels.

controlled_X(g)

Controlled NOT gate of two-gaussian modes.

controlled_Z(g)

Controlled PHASE gate of two-gaussian modes.

displacement(x, y)

Returns the displacement vector for a displacement by \(alpha = x + iy\).

fidelity(mu1, cov1, mu2, cov2)

Returns the fidelity of two gaussian states.

gaussian_cov(symplectic[, eigenvalues])

Returns the covariance matrix of a Gaussian state.

general_dyne(cov, means, proj_cov[, ...])

Returns the results of a general-dyne measurement.

join_covs(covs)

Joins the given covariance matrices into a single covariance matrix.

join_means(means)

Joins the given means vectors into a single means vector.

log_negativity(cov)

Returns the log_negativity of a Gaussian state.

loss_XYd(transmissivity, nbar)

Returns the X, Y matrices and the d vector for the noisy loss (attenuator) channel.

mz_symplectic(phi_a, phi_b[, internal])

Symplectic matrix of a Mach-Zehnder gate.

noise_Y(noise)

Returns the X, Y matrices and the d vector for the additive noise channel (Y = noise * (\hbar / 2) * I)

number_cov(cov, means)

Returns the photon number covariance matrix given a Wigner covariance matrix and a means vector.

number_means(cov, means)

Returns the photon number means vector given a Wigner covariance matrix and a means vector.

partition_cov(cov, Amodes)

Partitions the covariance matrix into the A and B subsystems and the AB coherence block.

partition_means(means, Amodes)

Partitions the means vector into the A and B subsystems.

physical_partial_transpose(cov, modes)

Returns the covariance matrix that corresponds to applying the partial transposition on the density matrix of a given set of modes.

purity(cov)

Returns the purity of the state with the given covariance matrix.

quadratic_phase(s)

Quadratic phase single mode gate.

rotation_symplectic(angle)

Symplectic matrix of a rotation gate.

squeezed_vacuum_cov(r, phi)

Returns the real covariance matrix and real means vector of a squeezed vacuum state.

squeezing_symplectic(r, phi)

Symplectic matrix of a squeezing gate.

symplectic_eigenvals(cov)

Returns the sympletic eigenspectrum of a covariance matrix.

symplectic_inverse(S)

Returns the inverse of a symplectic matrix.

thermal_cov(nbar)

Returns the real covariance matrix and real means vector of a thermal state.

trace(cov, means, Bmodes)

Returns the covariances and means after discarding the specified modes.

two_mode_squeezed_vacuum_cov(r, phi)

Returns the real covariance matrix and real means vector of a two-mode squeezed vacuum state.

two_mode_squeezing_symplectic(r, phi)

Symplectic matrix of a two-mode squeezing gate.

vacuum_cov(num_modes)

Returns the real covariance matrix of the vacuum state.

vacuum_means(num_modes)

Returns the real covariance matrix and real means vector of the vacuum state.

von_neumann_entropy(cov)

Returns the Von Neumann entropy.

Variables

Matrix

ndarray(shape, dtype=float, buffer=None, offset=0,

Optional

Optional[X] is equivalent to Union[X, None].

Scalar

alias of Union[R, C, Z, N]

Sequence

A generic version of collections.abc.Sequence.

Tuple

Deprecated alias to builtins.tuple.

Union

Union type; Union[X, Y] means either X or Y.

Vector

ndarray(shape, dtype=float, buffer=None, offset=0,

math

A class to manage the different backends supported by Mr Mustard.

settings

A class containing various settings that are used by Mr Mustard throughout a session.