spheres.symplectic

Functions for converting between Gaussian Hamiltonians, complex symplectic matrices, and real symplectic matrices.

Functions

complex_real_symplectic(S, s)

Converts a complex symplectic transformation into a real symplectic transformation.

complex_real_symplectic2(S, s)

Converts a complex symplectic matrix/vector to a real symplectic matrix/vector.

gaussian_complex_symplectic(H, h[, expm, theta])

Converts a Gaussian transformation (in the form of a Hermitian matrix and a displacement vector) into a complex symplectic transformation (in the form of a complex symplectic matrix and displacement vector).

is_complex_symplectic(S)

Test if an matrix is complex symplectic.

is_real_symplectic(R)

Test if an matrix is real symplectic.

make_gaussian_operator(A[, B, h])

omega_c(n)

\(2n \times 2n\) complex symplectic form: \(\Omega_{c} = \begin{pmatrix}I_{n} & 0 \\ 0 & -I_{n} \end{pmatrix}\).

omega_r(n)

\(2n \times 2n\) real symplectic form: \(\Omega_{c} = \begin{pmatrix}0 & I_{n} \\ -I_{n} & 0 \end{pmatrix}\).

operator_real_symplectic(O[, expm, theta])

Converts a first quantized operator into a real symplectic matrix via: make_gaussian_operator(), gaussian_complex_symplectic(), \(complex_real_symplectic\).

random_gaussian_operator(n)

Returns random Gaussian transformation in the form of a Hermitian matrix and a displacement vector.

symplectic_xyz()

Returns Pauli matrices expressed as real symplectic transformations.

upgrade_single_mode_operator(O, i, n_modes)

Upgrades a single mode real symplectic operator O to act on the i’th of n modes (where the latter are represented in terms of their first and second moments.)

upgrade_two_mode_operator(O, i, j, n_modes)

Upgrades a two mode real symplectic matrix to act on subsystems i and j of n modes, (where the modes are represented in terms of their first and second moments).