Calculations on Bargmann objects

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

Functions

XY_of_channel(A)

Outputting the X and Y matrices corresponding to a channel determined by the "A" matrix.

au2Symplectic(A)

helper for finding the Au of a unitary from its symplectic rep.

bargmann_Abc_to_phasespace_cov_means(A, b, c)

Function to derive the covariance matrix and mean vector of a Gaussian state from its Wigner characteristic function in ABC form.

cayley(X, c)

Returns the Cayley transform of a matrix: \(cay(X) = (X - cI)(X + cI)^{-1}\)

norm_ket(A, b, c)

Calculates the l2 norm of a Ket with a representation given by the Bargmann triple A,b,c.

pq_to_aadag(X)

maps a matrix or vector from the q/p basis to the a/adagger basis

symplectic2Au(S)

The inverse of au2Symplectic i.e., returns symplectic, given Au

trace_dm(A, b, c)

Calculates the total trace of the density matrix with representation given by the Bargmann triple A,b,c.

wigner_to_bargmann_Choi(X, Y, d)

Converts the wigner representation in terms of covariance matrix and mean vector into the Bargmann A,B,C triple for a channel (i.e. for M modes, A has shape 4M x 4M and B has shape 4M).

wigner_to_bargmann_U(X, d)

Converts the wigner representation in terms of covariance matrix and mean vector into the Bargmann A,B,C triple for a unitary (i.e. for M modes, A has shape 2M x 2M and B has shape 2M).

wigner_to_bargmann_psi(cov, means)

Converts the wigner representation in terms of covariance matrix and mean vector into the Bargmann A,B,C triple for a Hilbert vector (i.e. for M modes, A has shape M x M and B has shape M).

wigner_to_bargmann_rho(cov, means)

Converts the wigner representation in terms of covariance matrix and mean vector into the Bargmann A,B,C triple for a density matrix (i.e. for M modes, A has shape 2M x 2M and B has shape 2M).

wigner_to_husimi(cov, means)

Returns the husimi complex covariance matrix and means vector.

Variables

ComplexMatrix

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

Matrix

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

Scalar

alias of R | C | Z | N

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.