Skip to content

Commit c751757

Browse files
committed
Get Python 3.13 Windows working by allowing new NumPy
1 parent 93b9ac4 commit c751757

File tree

4 files changed

+9
-6
lines changed

4 files changed

+9
-6
lines changed

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
.DEFAULT_GOAL := help
22

33
# Try to autodetect if python3 or python is the python executable used.
4-
PYTHONPATH := $(shell which python3 2>/dev/null || which python 2>/dev/null)
4+
PYTHONPATH := $(shell which python 2>/dev/null || which python3 2>/dev/null)
55

66
SHELL=bash
77

88
# Get absolute path of venv directory
99
BASE_DIR := $(shell realpath .)
1010
VENV=$(BASE_DIR)/.venv
1111
ifeq ($(OS),Windows_NT)
12-
VENV_BIN := $(VENV)/Scriptsexit
12+
VENV_BIN := $(VENV)/Scripts
1313
else
1414
VENV_BIN := $(VENV)/bin
1515
endif

python/quantum-pecos/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ keywords = ["quantum", "QEC", "simulation", "PECOS"]
3030
dependencies = [
3131
"pecos-rslib==0.6.0.dev6",
3232
"phir>=0.3.3",
33-
"numpy>=1.15.0,<2.0",
33+
"numpy>=1.15.0",
3434
"scipy>=1.1.0",
3535
"networkx>=2.1.0",
3636
"matplotlib>=2.2.0",

python/quantum-pecos/requirements.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
#
77
annotated-types==0.7.0
88
attrs==24.2.0
9+
colorama==0.4.6
910
contourpy==1.3.1
1011
cycler==0.12.1
1112
fonttools==4.55.2
@@ -16,7 +17,7 @@ markdown-it-py==3.0.0
1617
matplotlib==3.9.3
1718
mdurl==0.1.2
1819
networkx==3.4.2
19-
numpy==1.26.4
20+
numpy==2.1.3
2021
packaging==24.2
2122
phir==0.3.3
2223
pillow==11.0.0

python/quantum-pecos/src/pecos/classical_interpreters/phir_classical_interpreter.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -284,8 +284,10 @@ def assign_int(self, cvar, val: int):
284284
if i is None:
285285
cval = val
286286
else:
287-
cval &= ~(1 << i)
288-
cval |= (val & 1) << i
287+
one = dtype(1)
288+
i = dtype(i)
289+
cval &= ~(one << i)
290+
cval |= (val & one) << i
289291

290292
if type(cval) not in signed_data_types.values():
291293
# mask off bits given the size of the register

0 commit comments

Comments
 (0)