Skip to content

Commit ee158fb

Browse files
Upgrade sympy to 1.4 (#1674)
- Upgrades sympy and fixes typechecking issues that result. Fixes: #1646 --------- Co-authored-by: Matthew Harrigan <mpharrigan@google.com>
1 parent b8fcee9 commit ee158fb

18 files changed

Lines changed: 263 additions & 259 deletions

File tree

dev_tools/conf/mypy.ini

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ ignore_missing_imports = true
2525
follow_imports = silent
2626
ignore_missing_imports = true
2727

28+
[mypy-sympy.*]
29+
follow_untyped_imports = True
2830

2931
# Treat symbols imported from Google's protobuf library as type Any.
3032
# This suppresses errors due to attributes not known to typeshed,
Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,4 @@
11
# the mypy dependency file
22
mypy~=1.9
33
mypy-protobuf
4-
5-
# Newer sympy versions cause many [operator] mypy errors
6-
# including ones seemingly unrelated to sympy
7-
# https://github.com/quantumlib/Qualtran/pull/1167
8-
sympy<1.13
4+
sympy

dev_tools/requirements/envs/dev.env.txt

Lines changed: 48 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#
55
# pip-compile --output-file=envs/dev.env.txt deps/dev-tools.txt deps/runtime.txt
66
#
7-
absl-py==2.3.0
7+
absl-py==2.3.1
88
# via tensorflow-docs
99
accessible-pygments==0.0.5
1010
# via pydata-sphinx-theme
@@ -51,7 +51,7 @@ attrs==25.3.0
5151
# referencing
5252
autograd==1.8.0
5353
# via pennylane
54-
autoray==0.7.1
54+
autoray==0.7.2
5555
# via
5656
# cotengra
5757
# pennylane
@@ -77,11 +77,11 @@ blinker==1.9.0
7777
# via flask
7878
build==1.2.2.post1
7979
# via pip-tools
80-
cachetools==6.0.0
80+
cachetools==6.1.0
8181
# via
8282
# -r deps/runtime.txt
8383
# pennylane
84-
certifi==2025.4.26
84+
certifi==2025.7.9
8585
# via
8686
# httpcore
8787
# httpx
@@ -111,17 +111,17 @@ comm==0.2.2
111111
# ipywidgets
112112
contourpy==1.3.2
113113
# via matplotlib
114-
cotengra==0.7.4
114+
cotengra==0.7.5
115115
# via quimb
116-
coverage[toml]==7.8.2
116+
coverage[toml]==7.9.2
117117
# via pytest-cov
118-
cryptography==45.0.4
118+
cryptography==45.0.5
119119
# via secretstorage
120120
cycler==0.12.1
121121
# via matplotlib
122122
cytoolz==1.0.1
123123
# via quimb
124-
dash==3.0.4
124+
dash==3.1.1
125125
# via -r deps/runtime.txt
126126
debugpy==1.8.14
127127
# via ipykernel
@@ -161,11 +161,11 @@ filelock==3.18.0
161161
# -r deps/pylint.txt
162162
# -r deps/pytest.txt
163163
# virtualenv
164-
flask==3.0.3
164+
flask==3.1.1
165165
# via dash
166166
flynt==0.78
167167
# via -r deps/format.txt
168-
fonttools==4.58.2
168+
fonttools==4.58.5
169169
# via matplotlib
170170
fqdn==1.5.1
171171
# via jsonschema
@@ -179,9 +179,9 @@ graphviz==0.20.3
179179
# via qref
180180
greenlet==3.2.3
181181
# via sqlalchemy
182-
grpcio==1.73.0
182+
grpcio==1.73.1
183183
# via grpcio-tools
184-
grpcio-tools==1.73.0
184+
grpcio-tools==1.73.1
185185
# via -r deps/packaging.txt
186186
h11==0.16.0
187187
# via
@@ -242,7 +242,7 @@ jaraco-classes==3.4.0
242242
# via keyring
243243
jaraco-context==6.0.1
244244
# via keyring
245-
jaraco-functools==4.1.0
245+
jaraco-functools==4.2.1
246246
# via keyring
247247
jax==0.4.38
248248
# via openfermion
@@ -306,7 +306,7 @@ jupyter-server==2.16.0
306306
# notebook-shim
307307
jupyter-server-terminals==0.5.3
308308
# via jupyter-server
309-
jupyterlab==4.4.3
309+
jupyterlab==4.4.4
310310
# via notebook
311311
jupyterlab-pygments==0.3.0
312312
# via nbconvert
@@ -331,6 +331,7 @@ markdown-it-py==3.0.0
331331
# rich
332332
markupsafe==3.0.2
333333
# via
334+
# flask
334335
# jinja2
335336
# nbconvert
336337
# werkzeug
@@ -361,7 +362,7 @@ more-itertools==10.7.0
361362
# jaraco-functools
362363
mpmath==1.3.0
363364
# via sympy
364-
mypy==1.16.0
365+
mypy==1.16.1
365366
# via -r deps/mypy.txt
366367
mypy-extensions==1.1.0
367368
# via
@@ -373,7 +374,7 @@ myst-nb==1.2.0
373374
# via -r deps/docs.txt
374375
myst-parser==4.0.1
375376
# via myst-nb
376-
narwhals==1.42.0
377+
narwhals==1.46.0
377378
# via plotly
378379
nbclient==0.10.2
379380
# via
@@ -407,7 +408,7 @@ networkx==3.4.2
407408
# pennylane
408409
nh3==0.2.21
409410
# via readme-renderer
410-
notebook==7.4.3
411+
notebook==7.4.4
411412
# via
412413
# -r deps/dev-tools.txt
413414
# -r deps/runtime.txt
@@ -467,7 +468,7 @@ packaging==25.0
467468
# pytest
468469
# sphinx
469470
# twine
470-
pandas==2.3.0
471+
pandas==2.3.1
471472
# via cirq-core
472473
pandocfilters==1.5.1
473474
# via nbconvert
@@ -485,7 +486,7 @@ pennylane-lightning==0.41.1
485486
# via pennylane
486487
pexpect==4.9.0
487488
# via ipython
488-
pillow==11.2.1
489+
pillow==11.3.0
489490
# via matplotlib
490491
pip-tools==7.4.1
491492
# via -r deps/pip-tools.txt
@@ -495,12 +496,14 @@ platformdirs==4.3.8
495496
# jupyter-core
496497
# pylint
497498
# virtualenv
498-
plotly==6.1.2
499+
plotly==6.2.0
499500
# via
500501
# -r deps/runtime.txt
501502
# dash
502503
pluggy==1.6.0
503-
# via pytest
504+
# via
505+
# pytest
506+
# pytest-cov
504507
prometheus-client==0.22.1
505508
# via jupyter-server
506509
prompt-toolkit==3.0.51
@@ -515,7 +518,7 @@ psutil==7.0.0
515518
# via
516519
# ipykernel
517520
# quimb
518-
psygnal==0.13.0
521+
psygnal==0.14.0
519522
# via anywidget
520523
ptyprocess==0.7.0
521524
# via
@@ -527,17 +530,17 @@ pure-eval==0.2.3
527530
# via stack-data
528531
pycparser==2.22
529532
# via cffi
530-
pydantic==2.11.5
533+
pydantic==2.11.7
531534
# via
532535
# bartiq
533536
# qref
534537
pydantic-core==2.33.2
535538
# via pydantic
536539
pydata-sphinx-theme==0.16.1
537540
# via -r deps/docs.txt
538-
pydot==4.0.0
541+
pydot==4.0.1
539542
# via -r deps/runtime.txt
540-
pygments==2.19.1
543+
pygments==2.19.2
541544
# via
542545
# accessible-pygments
543546
# ipython
@@ -561,7 +564,7 @@ pyproject-hooks==1.2.0
561564
# pip-tools
562565
pyscf==2.9.0
563566
# via openfermion
564-
pytest==8.4.0
567+
pytest==8.4.1
565568
# via
566569
# -r deps/pylint.txt
567570
# -r deps/pytest.txt
@@ -570,9 +573,9 @@ pytest==8.4.0
570573
# pytest-xdist
571574
pytest-asyncio==1.0.0
572575
# via -r deps/pytest.txt
573-
pytest-cov==6.1.1
576+
pytest-cov==6.2.1
574577
# via -r deps/pytest.txt
575-
pytest-xdist==3.7.0
578+
pytest-xdist==3.8.0
576579
# via -r deps/pytest.txt
577580
python-dateutil==2.9.0.post0
578581
# via
@@ -591,7 +594,7 @@ pyyaml==6.0.2
591594
# myst-nb
592595
# myst-parser
593596
# tensorflow-docs
594-
pyzmq==26.4.0
597+
pyzmq==27.0.0
595598
# via
596599
# ipykernel
597600
# jupyter-client
@@ -602,11 +605,11 @@ qref==0.11.0
602605
# via
603606
# -r deps/runtime.txt
604607
# bartiq
605-
qsharp==1.17.0
608+
qsharp==1.18.0
606609
# via -r deps/runtime.txt
607-
qsharp-widgets==1.17.0
610+
qsharp-widgets==1.18.0
608611
# via -r deps/runtime.txt
609-
quimb==1.11.0
612+
quimb==1.11.1
610613
# via -r deps/runtime.txt
611614
readme-renderer==44.0
612615
# via twine
@@ -627,7 +630,7 @@ requests==2.32.4
627630
# twine
628631
requests-toolbelt==1.0.0
629632
# via twine
630-
retrying==1.3.4
633+
retrying==1.4.0
631634
# via dash
632635
rfc3339-validator==0.1.4
633636
# via
@@ -641,7 +644,7 @@ rfc3986-validator==0.1.1
641644
# jupyter-events
642645
rich==14.0.0
643646
# via twine
644-
rpds-py==0.25.1
647+
rpds-py==0.26.0
645648
# via
646649
# jsonschema
647650
# referencing
@@ -657,7 +660,7 @@ scipy==1.15.3
657660
# pennylane
658661
# pyscf
659662
# quimb
660-
scipy-openblas32==0.3.29.265.1
663+
scipy-openblas32==0.3.30.0.1
661664
# via pennylane-lightning
662665
secretstorage==3.3.3
663666
# via keyring
@@ -667,7 +670,6 @@ six==1.17.0
667670
# via
668671
# astunparse
669672
# python-dateutil
670-
# retrying
671673
# rfc3339-validator
672674
sniffio==1.3.1
673675
# via anyio
@@ -703,9 +705,9 @@ sqlalchemy==2.0.41
703705
# via jupyter-cache
704706
stack-data==0.6.3
705707
# via ipython
706-
starlette==0.47.0
708+
starlette==0.47.1
707709
# via sphinx-autobuild
708-
sympy==1.12.1
710+
sympy==1.14.0
709711
# via
710712
# -r deps/mypy.txt
711713
# -r deps/runtime.txt
@@ -774,11 +776,11 @@ traitlets==5.14.3
774776
# nbformat
775777
twine==6.1.0
776778
# via -r deps/packaging.txt
777-
types-protobuf==6.30.2.20250516
779+
types-protobuf==6.30.2.20250703
778780
# via mypy-protobuf
779-
types-python-dateutil==2.9.0.20250516
781+
types-python-dateutil==2.9.0.20250708
780782
# via arrow
781-
typing-extensions==4.14.0
783+
typing-extensions==4.14.1
782784
# via
783785
# -r deps/runtime.txt
784786
# anyio
@@ -803,6 +805,7 @@ typing-extensions==4.14.0
803805
# referencing
804806
# rich
805807
# sqlalchemy
808+
# starlette
806809
# typing-inspection
807810
# uvicorn
808811
typing-inspection==0.4.1
@@ -811,15 +814,15 @@ tzdata==2025.2
811814
# via pandas
812815
uri-template==1.3.0
813816
# via jsonschema
814-
urllib3==2.4.0
817+
urllib3==2.5.0
815818
# via
816819
# requests
817820
# twine
818-
uvicorn==0.34.3
821+
uvicorn==0.35.0
819822
# via sphinx-autobuild
820823
virtualenv==20.31.2
821824
# via -r deps/packaging.txt
822-
watchfiles==1.0.5
825+
watchfiles==1.1.0
823826
# via sphinx-autobuild
824827
wcwidth==0.2.13
825828
# via prompt-toolkit
@@ -833,7 +836,7 @@ websocket-client==1.8.0
833836
# via jupyter-server
834837
websockets==15.0.1
835838
# via sphinx-autobuild
836-
werkzeug==3.0.6
839+
werkzeug==3.1.3
837840
# via
838841
# dash
839842
# flask

0 commit comments

Comments
 (0)