pygsti.circuits.circuitconstruction.translate_circuits

pygsti.circuits.circuitconstruction.translate_circuits#

translate_circuits(circuits, alias_dict)#

Applies translate_circuit() to each element of circuits.

Creates a new list of Circuit objects from an existing one by replacing operation labels in circuits by (possibly multiple) new labels according to alias_dict.

Parameters:
  • circuits (list of Circuits) – The list of circuits to use as the base for find & replace operations.

  • alias_dict (dict) – A dictionary whose keys are single operation labels and whose values are lists or tuples of the new operation labels that should replace that key. If alias_dict is None then circuits is returned.

Return type:

list of Circuits