7
7
8
8
import stim ._detect_machine_architecture as _tmp
9
9
10
+
10
11
_tmp = _tmp ._UNSTABLE_detect_march ()
11
- # NOTE: avx2 disabled until https://github.com/quantumlib/Stim/issues/432 is fixed
12
- # if _tmp == 'avx2':
13
- # from stim._stim_avx2 import *
14
- # from stim._stim_avx2 import _UNSTABLE_raw_format_data, __version__
15
- if _tmp == 'avx2' or _tmp == 'sse2' :
16
- from stim ._stim_sse2 import *
17
- from stim ._stim_sse2 import _UNSTABLE_raw_format_data , __version__
18
- else :
19
- from stim ._stim_polyfill import *
12
+ try :
13
+ # NOTE: avx2 disabled until https://github.com/quantumlib/Stim/issues/432 is fixed
14
+ # if _tmp == 'avx2':
15
+ # from stim._stim_avx2 import _UNSTABLE_raw_format_data, __version__
16
+ # from stim._stim_avx2 import *
17
+ if _tmp == 'avx2' or _tmp == 'sse2' :
18
+ from stim ._stim_sse2 import _UNSTABLE_raw_format_data , __version__
19
+ from stim ._stim_sse2 import *
20
+ else :
21
+ from stim ._stim_polyfill import _UNSTABLE_raw_format_data , __version__
22
+ from stim ._stim_polyfill import *
23
+ except ModuleNotFoundError :
20
24
from stim ._stim_polyfill import _UNSTABLE_raw_format_data , __version__
25
+ from stim ._stim_polyfill import *
26
+
21
27
del _tmp
22
28
23
29
@@ -26,10 +32,12 @@ def _pytest_pycharm_pybind_repr_bug_workaround(cls):
26
32
cls .__repr__ = lambda e : f (e )
27
33
cls .__repr__ .__doc__ = f .__doc__
28
34
_pytest_pycharm_pybind_repr_bug_workaround (Circuit )
35
+ _pytest_pycharm_pybind_repr_bug_workaround (CircuitErrorLocation )
29
36
_pytest_pycharm_pybind_repr_bug_workaround (CircuitErrorLocationStackFrame )
30
37
_pytest_pycharm_pybind_repr_bug_workaround (CircuitInstruction )
31
38
_pytest_pycharm_pybind_repr_bug_workaround (CircuitRepeatBlock )
32
39
_pytest_pycharm_pybind_repr_bug_workaround (CircuitTargetsInsideInstruction )
40
+ _pytest_pycharm_pybind_repr_bug_workaround (CompiledDemSampler )
33
41
_pytest_pycharm_pybind_repr_bug_workaround (CompiledDetectorSampler )
34
42
_pytest_pycharm_pybind_repr_bug_workaround (CompiledMeasurementSampler )
35
43
_pytest_pycharm_pybind_repr_bug_workaround (CompiledMeasurementsToDetectionEventsConverter )
@@ -39,10 +47,15 @@ def _pytest_pycharm_pybind_repr_bug_workaround(cls):
39
47
_pytest_pycharm_pybind_repr_bug_workaround (DemTargetWithCoords )
40
48
_pytest_pycharm_pybind_repr_bug_workaround (DetectorErrorModel )
41
49
_pytest_pycharm_pybind_repr_bug_workaround (ExplainedError )
50
+ _pytest_pycharm_pybind_repr_bug_workaround (FlipSimulator )
42
51
_pytest_pycharm_pybind_repr_bug_workaround (FlippedMeasurement )
52
+ _pytest_pycharm_pybind_repr_bug_workaround (Flow )
53
+ _pytest_pycharm_pybind_repr_bug_workaround (GateData )
43
54
_pytest_pycharm_pybind_repr_bug_workaround (GateTarget )
44
55
_pytest_pycharm_pybind_repr_bug_workaround (GateTargetWithCoords )
45
56
_pytest_pycharm_pybind_repr_bug_workaround (PauliString )
57
+ _pytest_pycharm_pybind_repr_bug_workaround (PauliStringIterator )
46
58
_pytest_pycharm_pybind_repr_bug_workaround (Tableau )
59
+ _pytest_pycharm_pybind_repr_bug_workaround (TableauIterator )
47
60
_pytest_pycharm_pybind_repr_bug_workaround (TableauSimulator )
48
61
del _pytest_pycharm_pybind_repr_bug_workaround
0 commit comments