Exemplo n.º 1
0
 def _with_measurement_key_mapping_(self, key_map: Dict[str, str]):
     sub_op = protocols.with_measurement_key_mapping(
         self.sub_operation, key_map)
     if sub_op is NotImplemented:
         return NotImplemented
     return TaggedOperation(sub_op, *self.tags)
Exemplo n.º 2
0
 def _with_measurement_key_mapping_(self, key_map: Dict[str, str]):
     return self.with_key(
         protocols.with_measurement_key_mapping(self.mkey, key_map))
 def _with_measurement_key_mapping_(
         self, key_map: Mapping[str, str]) -> 'PauliMeasurementGate':
     return self.with_key(
         protocols.with_measurement_key_mapping(self.mkey, key_map))
Exemplo n.º 4
0
 def _with_measurement_key_mapping_(self, key_map: Mapping[str, str]):
     return Moment(
         protocols.with_measurement_key_mapping(op, key_map) if protocols.
         measurement_keys_touched(op) else op for op in self.operations)
Exemplo n.º 5
0
 def _with_measurement_key_mapping_(self, key_map: Dict[str, str]):
     return Moment(
         protocols.with_measurement_key_mapping(op, key_map) if protocols.
         is_measurement(op) else op for op in self.operations)