Exemplo n.º 1
0
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
Exemplo n.º 2
0
 def map_operation(self, operation: ops.Operation) -> ops.Operation:
     return operation.transform_qubits(self.qubit_map)
Exemplo n.º 3
0
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
Exemplo n.º 4
0
 def map_operation(self, operation: ops.Operation) -> ops.Operation:
     return operation.transform_qubits(self.qubit_map)