def _convert_physical_z(op: ops.Operation, proto: v2.program_pb2.Operation): if 'type' in proto.args: if proto.args['type'].arg_value.string_value == PHYSICAL_Z: return op.with_tags(PhysicalZTag()) return op
def map_operation(self, operation: ops.Operation) -> ops.Operation: return operation.transform_qubits(self.qubit_map)
def _add_phase_match(op: ops.Operation, proto: v2.program_pb2.Operation): if 'phase_match' in proto.args: if proto.args[ 'phase_match'].arg_value.string_value == PHASE_MATCH_PHYS_Z: return op.with_tags(PhysicalZTag()) return op