pygsti.tools.symplectic.find_postmultipled_pauli

pygsti.tools.symplectic.find_postmultipled_pauli#

find_postmultipled_pauli(s, p_implemented, p_target, qubit_labels=None)#

Finds the Pauli layer that should be appended to a circuit to implement a given Clifford.

If some circuit implements the clifford described by the symplectic matrix s and the vector p_implemented, this function returns the Pauli layer that should be appended to this circuit to implement the clifford described by s and the vector p_target.

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

  • p_implemented (numpy array) – The ‘phase vector’ over the integers mod 4 representing the Clifford implemented by the circuit

  • p_target (numpy array) – The ‘phase vector’ over the integers mod 4 that, together with s represents the Clifford that you want to implement. Together with s, this vector must define a valid Clifford.

  • qubit_labels (list, optional) – A list of qubit labels, that are strings or ints. The length of this list should be equal to the number of qubits the Clifford acts on. The ith element of the list is the label corresponding to the qubit at the ith index of s and the two phase vectors. If None, defaults to the integers from 0 to number of qubits - 1.

Returns:

A list that defines a Pauli layer, with the ith element containing one of the 4 tuples (P,qubit_labels[i]) with P = ‘I’, ‘Z’, ‘Y’ and ‘Z’

Return type:

list