QuantumState#

class QuantumState(means: Union[jax.Array, numpy.ndarray, numpy.bool_, numpy.number, bool, int, float, complex], cov: Union[jax.Array, numpy.ndarray, numpy.bool_, numpy.number, bool, int, float, complex], ports: Union[str, List[str]] = None, convention: str = 'xpxp')[source]#

Bases: simphony.simulation.SimDevice

Represents a quantum state in a quantum model as a covariance matrix.

All quantum states are represented in the xpxp convention.

Parameters
  • means (ArrayLike) – The means of the X and P quadratures of the quantum state. For example, a coherent state \(\alpha = 3+4i\) has means defined as :math:`begin{bmatrix} 3 & 4 \end{bmatrix}’. The shape of the means must be 2 * N.

  • cov (ArrayLike) – The covariance matrix of the quantum state. For example, all coherent states has a covariance matrix of \(\begin{bmatrix} 1/4 & 0 \\ 0 & 1/4 \\end{bmatrix}\). The shape of the matrix must be 2 * N x 2 * N.

  • ports (str or list of str) – The ports to which the quantum state is connected. Each mode corresponds in order to each port provided.

  • convention (str) – The convention of the means and covariance matrix. Default is ‘xpxp’.