pygsti.tools.symplectic.inverse_clifford

pygsti.tools.symplectic.inverse_clifford#

inverse_clifford(s, p)#

Returns the inverse of a Clifford gate in the symplectic representation.

This uses the formulas derived in Hostens and De Moor PRA 71, 042315 (2005).

Parameters:
  • s (numpy array) – The symplectic matrix over the integers mod 2 representing the Clifford

  • p (numpy array) – The ‘phase vector’ over the integers mod 4 representing the Clifford

Returns:

  • sinverse (numpy array) – The symplectic matrix representing the inverse of the input Clifford.

  • pinverse (numpy array) – The ‘phase vector’ representing the inverse of the input Clifford.