pygsti.protocols.mirror_edesign.compute_inverse

pygsti.protocols.mirror_edesign.compute_inverse#

compute_inverse(circ, gate_set, inverse=None, inv_kwargs=None)#

Computes the inverse of a given circuit based on the specified gate set.

Parameters:
  • circ (pygsti.circuits.Circuit) – The circuit for which to compute the inverse.

  • gate_set (str) – The set of gates used in the circuit (e.g., ‘u3_cx_cz’).

  • inverse (Optional[Callable[[_Circuit], _Circuit]], optional) – A custom function to compute the inverse of the circuit. Default is None.

  • inv_kwargs (Optional[dict], optional) – Additional keyword arguments for the custom inverse function. Default is None.

Returns:

A new circuit that is the inverse of the input circuit.

Return type:

pygsti.circuits.Circuit