Calculations on Fock objects¶
This module contains functions for performing calculations on objects in the Fock representations.
Functions¶
|
Converts a unitary transformation to a Choi tensor. |
|
Applies a choi operator to a density matrix. |
|
Applies a choi operator to a ket. |
|
Applies a kraus operator to a density matrix. |
|
Applies a kraus operator to a ket. |
|
Returns the cutoffs of a Gaussian state by computing the 1-mode marginals until the probability of the marginal is less than |
|
|
|
Contracts two states in the specified modes. |
|
|
|
Maps a density matrix to a ket if the state is pure. |
|
Extracts the diagonals of a density matrix. |
|
Estimates a suitable quadrature discretization interval dx. |
|
Generates a suitable quadrature axis. |
|
Estimates a suitable quadrature axis length |
|
Computes the fidelity between two states in Fock representation. |
|
The Fock array of a tensor product of one-mode |
|
Evaluates if a density matrix represents a mixed state. |
|
Maps a ket to a density matrix. |
|
Maps a ket to probabilities. |
|
Least-recently-used cache decorator. |
|
Returns the norm of a ket or the trace of the density matrix. |
|
Returns the normalized ket state. |
|
Returns the mean of the number operator in each mode. |
|
Returns the variance of the number operator in each mode. |
|
Harmonic oscillator eigenstate wavefunction psi_n(q) = <n|q>. |
|
Returns the purity of a density matrix. |
|
Given the Fock basis representation return the quadrature basis representation. |
|
Given the ket or density matrix of a single-mode state, it generates the probability density distribution \(\tr [ \rho |x_\phi><x_\phi| ]\) where rho is the density matrix of the state and |x_phi> the quadrature eigenvector with angle phi equal to |
|
Given a single-mode state, it generates the pdf of \(\tr [ \rho |x_\phi><x_\phi| ]\) where rho is the reduced density matrix of the state. |
|
|
|
|
|
Decorator function to cache functions with a 1D Tensor (Vector) and int as arguments, that is, functions with signature |
|
Computes the partial trace of a density matrix. |
|
Validates the indices used for the contraction of a tensor. |
|
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). |
|
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). |
|
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). |
|
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). |
|
Returns the Fock representation of a Gaussian Choi matrix. |
|
Returns the Fock representation of a Gaussian unitary transformation. |
|
Returns the Fock representation of a Gaussian state. |
Variables¶
|
ndarray(shape, dtype=float, buffer=None, offset=0, |
|
A generic version of collections.abc.Iterable. |
|
ndarray(shape, dtype=float, buffer=None, offset=0, |
ndarray(shape, dtype=float, buffer=None, offset=0, |
|
|
alias of |
|
A generic version of collections.abc.Sequence. |
|
ndarray(shape, dtype=float, buffer=None, offset=0, |
|
ndarray(shape, dtype=float, buffer=None, offset=0, |
A class to manage the different backends supported by Mr Mustard. |
|
A class containing various settings that are used by Mr Mustard throughout a session. |