sf.decompositions.hamil_to_covmat

hamil_to_covmat(H, tol=1e-10)[source]

Converts a Hamiltonian matrix to a covariance matrix.

Given a Hamiltonian matrix of a Gaussian state H, finds the equivalent covariance matrix V in the xp ordering.

For more details, see https://arxiv.org/abs/1507.01941

Parameters
  • H (array) – positive definite Hamiltonian matrix

  • tol (int) – the number of decimal places to use when determining if the Hamiltonian is symmetric

Returns

Gaussian covariance matrix

Return type

array