pygsti.circuits.circuitconstruction.translate_circuit#
- translate_circuit(circuit, alias_dict)#
Translates circuit according to the aliases in alias_dict.
Creates a new
Circuitobject from an existing one by replacing operation labels in circuit by (possibly multiple) new labels according to alias_dict.- Parameters:
circuit (Circuit) – The circuit 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 circuit is returned.
- Return type: