Skip to content

Commit 275baeb

Browse files
committed
Version 1.12.1
- Fix `HERALDED_PAULI_CHANNEL_1` targeting the wrong qubits - Was targeting by target offset instead of target value - Add python 3.12 wheels
1 parent 1179fc3 commit 275baeb

File tree

12 files changed

+96
-37
lines changed

12 files changed

+96
-37
lines changed

.github/workflows/ci.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ jobs:
3535
{os: ubuntu-latest, dist: cp39-manylinux_x86_64},
3636
{os: ubuntu-latest, dist: cp310-manylinux_x86_64},
3737
{os: ubuntu-latest, dist: cp311-manylinux_x86_64},
38+
{os: ubuntu-latest, dist: cp312-manylinux_x86_64},
3839

3940
{os: ubuntu-latest, dist: cp36-manylinux_i686},
4041
{os: ubuntu-latest, dist: cp37-manylinux_i686},
@@ -92,11 +93,13 @@ jobs:
9293
{os: macos-latest, dist: cp39-macosx_x86_64, macosarch: x86_64},
9394
{os: macos-latest, dist: cp310-macosx_x86_64, macosarch: x86_64},
9495
{os: macos-latest, dist: cp311-macosx_x86_64, macosarch: x86_64},
96+
{os: macos-latest, dist: cp312-macosx_x86_64, macosarch: x86_64},
9597

9698
{os: macos-latest, dist: cp38-macosx_arm64, macosarch: arm64},
9799
{os: macos-latest, dist: cp39-macosx_arm64, macosarch: arm64},
98100
{os: macos-latest, dist: cp310-macosx_arm64, macosarch: arm64},
99101
{os: macos-latest, dist: cp311-macosx_arm64, macosarch: arm64},
102+
{os: macos-latest, dist: cp312-macosx_arm64, macosarch: arm64},
100103

101104
# pypy OSX builds disabled because numpy isn't prebuilt and fails to build.
102105
#
@@ -119,6 +122,7 @@ jobs:
119122
{os: windows-2019, dist: cp39-win_amd64},
120123
{os: windows-2019, dist: cp310-win_amd64},
121124
{os: windows-2019, dist: cp311-win_amd64},
125+
{os: windows-2019, dist: cp312-win_amd64},
122126

123127
{os: windows-2019, dist: cp36-win32},
124128
{os: windows-2019, dist: cp37-win32},
@@ -152,7 +156,7 @@ jobs:
152156
- run: mkdir -p output/stim
153157
- run: mkdir -p output/stimcirq
154158
- run: mkdir -p output/sinter
155-
- run: python -m pip install pybind11==2.9.2 cibuildwheel==2.11.1
159+
- run: python -m pip install pybind11~=2.11.1 cibuildwheel~=2.16.2 setuptools wheel
156160
- run: python -m cibuildwheel --print-build-identifiers
157161
- run: python -m cibuildwheel --output-dir output/stim
158162
- run: python setup.py sdist
@@ -173,7 +177,7 @@ jobs:
173177
steps:
174178
- uses: actions/checkout@v3
175179
- uses: actions/setup-python@v3
176-
- run: python -m pip install pybind11==2.9.2
180+
- run: python -m pip install pybind11~=2.11.1 cibuildwheel~=2.16.2 setuptools wheel
177181
- run: python setup.py sdist
178182
- run: pip install dist/*.tar.gz
179183
upload_dev_release_to_pypi:

doc/getting_started.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@
9292
"name": "stdout",
9393
"output_type": "stream",
9494
"text": [
95-
"1.12.0\n"
95+
"1.12.1\n"
9696
]
9797
}
9898
],

glue/cirq/setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
with open('README.md', encoding='UTF-8') as f:
1818
long_description = f.read()
1919

20-
__version__ = '1.12.0'
20+
__version__ = '1.12.1'
2121

2222
setup(
2323
name='stimcirq',

glue/cirq/stimcirq/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
__version__ = '1.12.0'
1+
__version__ = '1.12.1'
22
from ._cirq_to_stim import cirq_circuit_to_stim_circuit
33
from ._cx_swap_gate import CXSwapGate
44
from ._det_annotation import DetAnnotation

glue/sample/setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
with open('requirements.txt', encoding='UTF-8') as f:
2020
requirements = f.read().splitlines()
2121

22-
__version__ = '1.12.0'
22+
__version__ = '1.12.1'
2323

2424
setup(
2525
name='sinter',

glue/sample/src/sinter/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
__version__ = '1.12.0'
1+
__version__ = '1.12.1'
22

33
from sinter._anon_task_stats import (
44
AnonTaskStats,

glue/zx/setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
with open('README.md', encoding='UTF-8') as f:
1818
long_description = f.read()
1919

20-
__version__ = '1.12.0'
20+
__version__ = '1.12.1'
2121

2222
setup(
2323
name='stimzx',

glue/zx/stimzx/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
__version__ = '1.12.0'
1+
__version__ = '1.12.1'
22
from ._external_stabilizer import (
33
ExternalStabilizer,
44
)

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
HEADER_FILES = glob.glob("src/**/*.h", recursive=True) + glob.glob("src/**/*.inl", recursive=True)
2626
RELEVANT_SOURCE_FILES = sorted(set(ALL_SOURCE_FILES) - set(TEST_FILES + PERF_FILES + MAIN_FILES + MUX_SOURCE_FILES))
2727

28-
__version__ = '1.12.0'
28+
__version__ = '1.12.1'
2929

3030
if sys.platform.startswith('win'):
3131
common_compile_args = [

src/stim/simulators/frame_simulator.inl

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -767,16 +767,17 @@ void FrameSimulator<W>::do_HERALDED_PAULI_CHANNEL_1(const CircuitInstruction &in
767767
RareErrorIterator::for_samples(t, nt * batch_size, rng, [&](size_t s) {
768768
auto shot = s % batch_size;
769769
auto target = s / batch_size;
770+
auto qubit = inst.targets[target].qubit_value();
770771
m_record.storage[m_record.stored + target][shot] = 1;
771772

772773
double p = dist(rng) * t;
773774
if (p < hx) {
774-
x_table[target][shot] ^= 1;
775+
x_table[qubit][shot] ^= 1;
775776
} else if (p < hx + hz) {
776-
z_table[target][shot] ^= 1;
777+
z_table[qubit][shot] ^= 1;
777778
} else if (p < hx + hz + hy) {
778-
x_table[target][shot] ^= 1;
779-
z_table[target][shot] ^= 1;
779+
x_table[qubit][shot] ^= 1;
780+
z_table[qubit][shot] ^= 1;
780781
}
781782
});
782783

0 commit comments

Comments
 (0)