Calculations on Bargmann objects

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

Functions

cayley(X, c)

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

complex_gaussian_integral(Abc, idx_z, idx_zconj)

Computes the Gaussian integral of the exponential of a complex quadratic form.

contract_two_Abc(Abc1, Abc2, idx1, idx2)

Returns the contraction of two (A,b,c) triples with given indices.

join_Abc(Abc1, Abc2)

Joins two (A,b,c) triples into a single (A,b,c) triple by block addition of the A matrices and concatenating the b vectors.

pq_to_aadag(X)

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

reorder_abc(Abc, order)

Reorders the indices of the A matrix and b vector of an (A,b,c) triple.

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,

ComplexVector

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

Sequence

A generic version of collections.abc.Sequence.

Tuple

Deprecated alias to builtins.tuple.

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.