Skip to content

Commit 25b838c

Browse files
Rescue tests with full_invert_mask
1 parent fee4f39 commit 25b838c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

qsimcirq/qsim_simulator.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,7 @@ def _sample_measure_results(
379379
for i in range(repetitions):
380380
for key, op in meas_ops.items():
381381
meas_indices = [qubit_map[qubit] for qubit in op.qubits]
382-
invert_mask = op.gate.invert_mask
382+
invert_mask = op.gate.full_invert_mask()
383383
for j, q in enumerate(meas_indices):
384384
results[key][i][j] = full_results[i][q] ^ invert_mask[j]
385385
else:
@@ -392,7 +392,7 @@ def _sample_measure_results(
392392
options["s"] = self.get_seed()
393393
measurements = sampler_fn(options)
394394
for key, bound in bounds.items():
395-
invert_mask = meas_ops[key].gate.invert_mask
395+
invert_mask = meas_ops[key].gate.full_invert_mask()
396396
for j in range(bound[1] - bound[0]):
397397
results[key][i][j] = int(
398398
measurements[bound[0] + j] ^ invert_mask[j]

0 commit comments

Comments
 (0)