def _convert_physical_z(op: cirq.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 _add_phase_match(op: cirq.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