pygsti.tools.symplectic.symplectic_rep_of_clifford_circuit

pygsti.tools.symplectic.symplectic_rep_of_clifford_circuit#

symplectic_rep_of_clifford_circuit(circuit, srep_dict=None, pspec=None)#

Returns the symplectic representation of the composite Clifford implemented by the specified Clifford circuit.

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

Parameters:
  • circuit (Circuit) – The Clifford circuit to calculate the global action of, input as a Circuit object.

  • srep_dict (dict, optional) – If not None, a dictionary providing the (symplectic matrix, phase vector) tuples associated with each operation label. If the circuit layer contains only ‘standard’ gates which have a hard-coded symplectic representation this may be None. Alternatively, if pspec is specified and it contains the gates in circuit in a Clifford model, it also does not need to be specified (and it is ignored if it is specified). Otherwise it must be specified.

  • pspec (QubitProcessorSpec, optional) – A QubitProcessorSpec that contains a Clifford model that defines the symplectic action of all of the gates in circuit. If this is not None it over-rides srep_dict. Both pspec and srep_dict can only be None if the circuit contains only gates with names that are hard-coded into pyGSTi.

Returns:

  • s (numpy array) – The symplectic matrix representing the Clifford implement by the input circuit

  • p (dictionary of numpy arrays) – The phase vector representing the Clifford implement by the input circuit