sf.physics.gaussian.CPTP

mrmustard.physics.gaussian.CPTP(cov, means, X, Y, d, state_modes, transf_modes)[source]

Returns the cov matrix and means vector of a state after undergoing a CPTP channel.

Computed as cov = X \cdot cov \cdot X^T + Y and d = X \cdot means + d.

If the channel is single-mode, modes can contain M modes to apply the channel to, otherwise it must contain as many modes as the number of modes in the channel.

Parameters:
  • cov (Matrix) – covariance matrix

  • means (Vector) – means vector

  • X (Matrix) – the X matrix of the CPTP channel

  • Y (Matrix) – noise matrix of the CPTP channel

  • d (Vector) – displacement vector of the CPTP channel

  • state_modes (Sequence[int]) – modes the state is defined on

  • transf_modes (Sequence[int]) – modes on which the channel acts

Returns:

the covariance matrix and the means vector of the state after the CPTP channel

Return type:

Tuple[Matrix, Vector]