stimcirq 1.15.dev1737603589__tar.gz → 1.15.dev1737977492__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {stimcirq-1.15.dev1737603589 → stimcirq-1.15.dev1737977492}/PKG-INFO +1 -1
- {stimcirq-1.15.dev1737603589 → stimcirq-1.15.dev1737977492}/setup.py +1 -1
- {stimcirq-1.15.dev1737603589 → stimcirq-1.15.dev1737977492}/stimcirq/__init__.py +1 -1
- {stimcirq-1.15.dev1737603589 → stimcirq-1.15.dev1737977492}/stimcirq/_cirq_to_stim_test.py +13 -1
- {stimcirq-1.15.dev1737603589 → stimcirq-1.15.dev1737977492}/stimcirq/_measure_and_or_reset_gate.py +4 -2
- {stimcirq-1.15.dev1737603589 → stimcirq-1.15.dev1737977492}/stimcirq.egg-info/PKG-INFO +1 -1
- {stimcirq-1.15.dev1737603589 → stimcirq-1.15.dev1737977492}/README.md +0 -0
- {stimcirq-1.15.dev1737603589 → stimcirq-1.15.dev1737977492}/setup.cfg +0 -0
- {stimcirq-1.15.dev1737603589 → stimcirq-1.15.dev1737977492}/stimcirq/_cirq_to_stim.py +0 -0
- {stimcirq-1.15.dev1737603589 → stimcirq-1.15.dev1737977492}/stimcirq/_cx_swap_gate.py +0 -0
- {stimcirq-1.15.dev1737603589 → stimcirq-1.15.dev1737977492}/stimcirq/_cx_swap_test.py +0 -0
- {stimcirq-1.15.dev1737603589 → stimcirq-1.15.dev1737977492}/stimcirq/_cz_swap_gate.py +0 -0
- {stimcirq-1.15.dev1737603589 → stimcirq-1.15.dev1737977492}/stimcirq/_cz_swap_test.py +0 -0
- {stimcirq-1.15.dev1737603589 → stimcirq-1.15.dev1737977492}/stimcirq/_det_annotation.py +0 -0
- {stimcirq-1.15.dev1737603589 → stimcirq-1.15.dev1737977492}/stimcirq/_det_annotation_test.py +0 -0
- {stimcirq-1.15.dev1737603589 → stimcirq-1.15.dev1737977492}/stimcirq/_measure_and_or_reset_gate_test.py +0 -0
- {stimcirq-1.15.dev1737603589 → stimcirq-1.15.dev1737977492}/stimcirq/_obs_annotation.py +0 -0
- {stimcirq-1.15.dev1737603589 → stimcirq-1.15.dev1737977492}/stimcirq/_obs_annotation_test.py +0 -0
- {stimcirq-1.15.dev1737603589 → stimcirq-1.15.dev1737977492}/stimcirq/_shift_coords_annotation.py +0 -0
- {stimcirq-1.15.dev1737603589 → stimcirq-1.15.dev1737977492}/stimcirq/_shift_coords_annotation_test.py +0 -0
- {stimcirq-1.15.dev1737603589 → stimcirq-1.15.dev1737977492}/stimcirq/_stim_sampler.py +0 -0
- {stimcirq-1.15.dev1737603589 → stimcirq-1.15.dev1737977492}/stimcirq/_stim_sampler_test.py +0 -0
- {stimcirq-1.15.dev1737603589 → stimcirq-1.15.dev1737977492}/stimcirq/_stim_to_cirq.py +0 -0
- {stimcirq-1.15.dev1737603589 → stimcirq-1.15.dev1737977492}/stimcirq/_stim_to_cirq_test.py +0 -0
- {stimcirq-1.15.dev1737603589 → stimcirq-1.15.dev1737977492}/stimcirq/_sweep_pauli.py +0 -0
- {stimcirq-1.15.dev1737603589 → stimcirq-1.15.dev1737977492}/stimcirq/_sweep_pauli_test.py +0 -0
- {stimcirq-1.15.dev1737603589 → stimcirq-1.15.dev1737977492}/stimcirq/_two_qubit_asymmetric_depolarize.py +0 -0
- {stimcirq-1.15.dev1737603589 → stimcirq-1.15.dev1737977492}/stimcirq/_two_qubit_asymmetric_depolarize_test.py +0 -0
- {stimcirq-1.15.dev1737603589 → stimcirq-1.15.dev1737977492}/stimcirq.egg-info/SOURCES.txt +0 -0
- {stimcirq-1.15.dev1737603589 → stimcirq-1.15.dev1737977492}/stimcirq.egg-info/dependency_links.txt +0 -0
- {stimcirq-1.15.dev1737603589 → stimcirq-1.15.dev1737977492}/stimcirq.egg-info/requires.txt +0 -0
- {stimcirq-1.15.dev1737603589 → stimcirq-1.15.dev1737977492}/stimcirq.egg-info/top_level.txt +0 -0
|
@@ -377,7 +377,7 @@ def test_on_tagged_loop():
|
|
|
377
377
|
repetitions=3,
|
|
378
378
|
).with_tags('my_tag')
|
|
379
379
|
)
|
|
380
|
-
|
|
380
|
+
|
|
381
381
|
stim_circuit = stimcirq.cirq_circuit_to_stim_circuit(c)
|
|
382
382
|
assert stim.CircuitRepeatBlock in {type(instr) for instr in stim_circuit}
|
|
383
383
|
|
|
@@ -410,3 +410,15 @@ def test_custom_tagging():
|
|
|
410
410
|
H[PAIR] 0
|
|
411
411
|
TICK
|
|
412
412
|
""")
|
|
413
|
+
|
|
414
|
+
|
|
415
|
+
def test_round_trip_example_circuit():
|
|
416
|
+
stim_circuit = stim.Circuit.generated(
|
|
417
|
+
"surface_code:rotated_memory_x",
|
|
418
|
+
distance=3,
|
|
419
|
+
rounds=1,
|
|
420
|
+
after_clifford_depolarization=0.01,
|
|
421
|
+
)
|
|
422
|
+
cirq_circuit = stimcirq.stim_circuit_to_cirq_circuit(stim_circuit.flattened())
|
|
423
|
+
circuit_back = stimcirq.cirq_circuit_to_stim_circuit(cirq_circuit)
|
|
424
|
+
assert len(circuit_back.shortest_graphlike_error()) == 3
|
{stimcirq-1.15.dev1737603589 → stimcirq-1.15.dev1737977492}/stimcirq/_measure_and_or_reset_gate.py
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
from typing import Any, Dict, List
|
|
1
|
+
from typing import Any, Dict, List, Tuple
|
|
2
2
|
|
|
3
3
|
import cirq
|
|
4
4
|
import stim
|
|
@@ -91,7 +91,9 @@ class MeasureAndOrResetGate(cirq.Gate):
|
|
|
91
91
|
result += self.basis
|
|
92
92
|
return result
|
|
93
93
|
|
|
94
|
-
def _stim_conversion_(self, *, edit_circuit: stim.Circuit, targets: List[int], tag: str, **kwargs):
|
|
94
|
+
def _stim_conversion_(self, *, edit_circuit: stim.Circuit, targets: List[int], tag: str, edit_measurement_key_lengths: List[Tuple[str, int]], **kwargs):
|
|
95
|
+
if self.measure:
|
|
96
|
+
edit_measurement_key_lengths.append((self.key, 1))
|
|
95
97
|
if self.invert_measure:
|
|
96
98
|
targets[0] = stim.target_inv(targets[0])
|
|
97
99
|
if self.measure_flip_probability:
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{stimcirq-1.15.dev1737603589 → stimcirq-1.15.dev1737977492}/stimcirq/_det_annotation_test.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{stimcirq-1.15.dev1737603589 → stimcirq-1.15.dev1737977492}/stimcirq/_obs_annotation_test.py
RENAMED
|
File without changes
|
{stimcirq-1.15.dev1737603589 → stimcirq-1.15.dev1737977492}/stimcirq/_shift_coords_annotation.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{stimcirq-1.15.dev1737603589 → stimcirq-1.15.dev1737977492}/stimcirq.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|