Bargmann Utilities¶
Outputting the X and Y matrices corresponding to a channel determined by the "A" matrix. |
|
Helper for finding the Au of a unitary from its symplectic rep. |
|
Function to derive the covariance matrix and mean vector of a Gaussian state from its Wigner characteristic function in ABC form. |
|
Returns the Cayley transform of a matrix: \(cay(X) = (X - cI)(X + cI)^{-1}\). |
|
The inverse of au2Symplectic i.e., returns symplectic, given Au. |
|
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). |
XY_of_channel¶
- mrmustard.physics.bargmann_utils.XY_of_channel(A)[source]¶
Outputting the X and Y matrices corresponding to a channel determined by the “A” matrix.
- Parameters:
A (ComplexMatrix) – the A matrix of the channel
au2Symplectic¶
bargmann_Abc_to_phasespace_cov_means¶
- mrmustard.physics.bargmann_utils.bargmann_Abc_to_phasespace_cov_means(A, b, c)[source]¶
Function to derive the covariance matrix and mean vector of a Gaussian state from its Wigner characteristic function in ABC form.
The covariance matrix and mean vector can be used to write the characteristic function of a Gaussian state
- Math:
Chi_G(r) = expleft( -frac{1}{2}r^T Omega^T cov Omega r + i r^TOmega^T mean right),
- Parameters:
- Return type:
and the Wigner function of a Gaussian state:
- Math:
W_G(r) = frac{1}{sqrt{Det(cov)}} expleft( -frac{1}{2}(r - mean)^T cov^{-1} (r-mean) right).
- Parameters:
- Return type:
The internal expression of our Gaussian state \(\rho\) is in Bargmann representation, one can write the characteristic function of a Gaussian state in Bargmann representation as
- Math:
Chi_G(alpha) = Tr(rho D) = c expleft( -frac{1}{2}alpha^T A alpha + alpha^T b right).
- Parameters:
- Return type:
This function is to go from the Abc triple in characteristic phase space into the covariance and mean vector for Gaussian state.
- Parameters:
- Returns:
The covariance matrix, mean vector and coefficient of the state in characteristic phase space.
- Return type:
cayley¶
symplectic2Au¶
wigner_to_bargmann_psi¶
wigner_to_bargmann_rho¶
- mrmustard.physics.bargmann_utils.wigner_to_bargmann_rho(cov, means)[source]¶
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). The order of the rows/columns of A and B corresponds to a density matrix with the usual ordering of the indices.
Note that here A and B are defined with respect to the literature.