Gaussian

fidelity

Returns the fidelity of two gaussian states.

number_means

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

purity

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

symplectic_eigenvals

Returns the sympletic eigenspectrum of a covariance matrix.

von_neumann_entropy

Returns the Von Neumann entropy.

fidelity

mrmustard.physics.gaussian.fidelity(mu1, cov1, mu2, cov2)[source]

Returns the fidelity of two gaussian states.

Reference: arXiv:2102.05748, equations 95-99. Note that we compute the square of equation 98.

Parameters:
  • mu1 (Vector) – The means vector of state 1.

  • cov1 (Matrix) – The covariance matrix of state 1.

  • mu2 (Vector) – The means vector of state 2.

  • cov2 (Matrix) – The covariance matrix of state 2.

Returns:

The fidelity of the two states.

Return type:

float

number_means

mrmustard.physics.gaussian.number_means(cov, means)[source]

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

Parameters:
  • cov (Matrix) – the Wigner covariance matrix

  • means (Vector) – the Wigner means vector

Returns:

the photon number means vector

Return type:

Vector

purity

mrmustard.physics.gaussian.purity(cov)[source]

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

Parameters:

cov (Matrix) – the covariance matrix

Returns:

the purity

Return type:

float

symplectic_eigenvals

mrmustard.physics.gaussian.symplectic_eigenvals(cov)[source]

Returns the sympletic eigenspectrum of a covariance matrix.

For a pure state, we expect the sympletic eigenvalues to be 1.

Parameters:

cov (Matrix) – the covariance matrix

Returns:

the sympletic eigenvalues

Return type:

List[float]

von_neumann_entropy

mrmustard.physics.gaussian.von_neumann_entropy(cov)[source]

Returns the Von Neumann entropy.

For a pure state, we expect the Von Neumann entropy to be 0.

Reference: (https://arxiv.org/pdf/1110.3234.pdf), Equations 46-47.

Parameters:

cov (Matrix) – the covariance matrix

Returns:

the Von Neumann entropy

Return type:

float