Skip to content

Commit

Permalink
Fix scipy sqrtm precision issue (#864)
Browse files Browse the repository at this point in the history
* Use eigendecomposition inplace of la.sqrtm.

* Update envs.

* Upper limit on cirq due to gate equality failure.

* Update dependencies.

* Fix comment typo about sqrt.
  • Loading branch information
fdmalone authored Jan 16, 2024
1 parent dbef820 commit 39a0b08
Show file tree
Hide file tree
Showing 11 changed files with 199 additions and 183 deletions.
5 changes: 2 additions & 3 deletions dev_tools/requirements/deps/runtime.txt
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
cirq-core~=1.0
cirq-core~=1.0,<1.3.0
deprecation
h5py>=2.8
networkx
numpy>=1.11.0
pubchempy
requests>=2.18

# https://github.com/scipy/scipy/issues/18250
scipy>=1.1.0,<1.10.0
scipy>=1.1.0

sympy
68 changes: 34 additions & 34 deletions dev_tools/requirements/envs/dev.env.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ ase==3.22.1
# via -r deps/resource_estimates_runtime.txt
astroid==2.13.5
# via pylint
attrs==23.1.0
attrs==23.2.0
# via
# jsonschema
# referencing
black==23.3.0
# via -r deps/format.txt
build==1.0.3
# via pip-tools
certifi==2023.7.22
certifi==2023.11.17
# via requests
charset-normalizer==3.3.2
# via requests
Expand All @@ -28,7 +28,7 @@ click==8.1.7
# pip-tools
contourpy==1.2.0
# via matplotlib
coverage[toml]==7.3.2
coverage[toml]==7.4.0
# via pytest-cov
cycler==0.12.1
# via matplotlib
Expand All @@ -38,45 +38,45 @@ dill==0.3.7
# via pylint
duet==0.2.9
# via cirq-core
exceptiongroup==1.1.3
exceptiongroup==1.2.0
# via pytest
execnet==2.0.2
# via pytest-xdist
fastjsonschema==2.18.1
fastjsonschema==2.19.1
# via nbformat
fonttools==4.43.0
fonttools==4.47.2
# via matplotlib
h5py==3.10.0
# via
# -r deps/runtime.txt
# pyscf
idna==3.4
idna==3.6
# via requests
iniconfig==2.0.0
# via pytest
isort==5.12.0
isort==5.13.2
# via pylint
jax==0.4.20
jax==0.4.23
# via -r deps/resource_estimates_runtime.txt
jaxlib==0.4.20
jaxlib==0.4.23
# via -r deps/resource_estimates_runtime.txt
jsonschema==4.19.2
jsonschema==4.21.0
# via nbformat
jsonschema-specifications==2023.7.1
jsonschema-specifications==2023.12.1
# via jsonschema
jupyter-core==5.5.0
jupyter-core==5.7.1
# via nbformat
kiwisolver==1.4.5
# via matplotlib
lazy-object-proxy==1.9.0
lazy-object-proxy==1.10.0
# via astroid
matplotlib==3.8.1
matplotlib==3.8.2
# via
# ase
# cirq-core
mccabe==0.7.0
# via pylint
ml-dtypes==0.3.1
ml-dtypes==0.3.2
# via
# jax
# jaxlib
Expand All @@ -94,7 +94,7 @@ networkx==3.2.1
# via
# -r deps/runtime.txt
# cirq-core
numpy==1.25.2
numpy==1.26.3
# via
# -r deps/runtime.txt
# ase
Expand All @@ -118,15 +118,15 @@ packaging==23.2
# deprecation
# matplotlib
# pytest
pandas==2.1.2
pandas==2.1.4
# via cirq-core
pathspec==0.11.2
pathspec==0.12.1
# via black
pillow==10.1.0
pillow==10.2.0
# via matplotlib
pip-tools==7.3.0
# via -r deps/pip-tools.txt
platformdirs==3.11.0
platformdirs==4.1.0
# via
# black
# jupyter-core
Expand All @@ -143,35 +143,35 @@ pyproject-hooks==1.0.0
# via build
pyscf==2.4.0
# via -r deps/resource_estimates_runtime.txt
pytest==7.4.3
pytest==7.4.4
# via
# -r deps/pytest.txt
# pytest-asyncio
# pytest-cov
# pytest-xdist
pytest-asyncio==0.21.1
pytest-asyncio==0.23.3
# via -r deps/pytest.txt
pytest-cov==4.1.0
# via -r deps/pytest.txt
pytest-xdist==3.3.1
pytest-xdist==3.5.0
# via -r deps/pytest.txt
python-dateutil==2.8.2
# via
# matplotlib
# pandas
pytz==2023.3.post1
# via pandas
referencing==0.30.2
referencing==0.32.1
# via
# jsonschema
# jsonschema-specifications
requests==2.31.0
# via -r deps/runtime.txt
rpds-py==0.10.6
rpds-py==0.17.1
# via
# jsonschema
# referencing
scipy==1.9.3
scipy==1.11.4
# via
# -r deps/runtime.txt
# ase
Expand All @@ -196,28 +196,28 @@ tomli==2.0.1
# pylint
# pyproject-hooks
# pytest
tomlkit==0.12.2
tomlkit==0.12.3
# via pylint
tqdm==4.66.1
# via cirq-core
traitlets==5.13.0
traitlets==5.14.1
# via
# jupyter-core
# nbformat
typed-ast==1.4.3
# via mypy
typing-extensions==4.8.0
typing-extensions==4.9.0
# via
# astroid
# cirq-core
# mypy
tzdata==2023.3
tzdata==2023.4
# via pandas
urllib3==2.0.7
urllib3==2.1.0
# via requests
wheel==0.41.3
wheel==0.42.0
# via pip-tools
wrapt==1.15.0
wrapt==1.16.0
# via astroid

# The following packages are considered to be unsafe in a requirements file:
Expand Down
26 changes: 13 additions & 13 deletions dev_tools/requirements/envs/format.env.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ black==23.3.0
# via
# -c envs/dev.env.txt
# -r deps/format.txt
certifi==2023.7.22
certifi==2023.11.17
# via
# -c envs/dev.env.txt
# requests
Expand Down Expand Up @@ -40,23 +40,23 @@ duet==0.2.9
# via
# -c envs/dev.env.txt
# cirq-core
fonttools==4.43.0
fonttools==4.47.2
# via
# -c envs/dev.env.txt
# matplotlib
h5py==3.10.0
# via
# -c envs/dev.env.txt
# -r deps/runtime.txt
idna==3.4
idna==3.6
# via
# -c envs/dev.env.txt
# requests
kiwisolver==1.4.5
# via
# -c envs/dev.env.txt
# matplotlib
matplotlib==3.8.1
matplotlib==3.8.2
# via
# -c envs/dev.env.txt
# cirq-core
Expand All @@ -73,7 +73,7 @@ networkx==3.2.1
# -c envs/dev.env.txt
# -r deps/runtime.txt
# cirq-core
numpy==1.25.2
numpy==1.26.3
# via
# -c envs/dev.env.txt
# -r deps/runtime.txt
Expand All @@ -89,19 +89,19 @@ packaging==23.2
# black
# deprecation
# matplotlib
pandas==2.1.2
pandas==2.1.4
# via
# -c envs/dev.env.txt
# cirq-core
pathspec==0.11.2
pathspec==0.12.1
# via
# -c envs/dev.env.txt
# black
pillow==10.1.0
pillow==10.2.0
# via
# -c envs/dev.env.txt
# matplotlib
platformdirs==3.11.0
platformdirs==4.1.0
# via
# -c envs/dev.env.txt
# black
Expand All @@ -126,7 +126,7 @@ requests==2.31.0
# via
# -c envs/dev.env.txt
# -r deps/runtime.txt
scipy==1.9.3
scipy==1.11.4
# via
# -c envs/dev.env.txt
# -r deps/runtime.txt
Expand All @@ -152,15 +152,15 @@ tqdm==4.66.1
# via
# -c envs/dev.env.txt
# cirq-core
typing-extensions==4.8.0
typing-extensions==4.9.0
# via
# -c envs/dev.env.txt
# cirq-core
tzdata==2023.3
tzdata==2023.4
# via
# -c envs/dev.env.txt
# pandas
urllib3==2.0.7
urllib3==2.1.0
# via
# -c envs/dev.env.txt
# requests
22 changes: 11 additions & 11 deletions dev_tools/requirements/envs/mypy.env.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#
# pip-compile --constraint=envs/dev.env.txt --output-file=envs/mypy.env.txt deps/mypy.txt deps/runtime.txt
#
certifi==2023.7.22
certifi==2023.11.17
# via
# -c envs/dev.env.txt
# requests
Expand Down Expand Up @@ -32,23 +32,23 @@ duet==0.2.9
# via
# -c envs/dev.env.txt
# cirq-core
fonttools==4.43.0
fonttools==4.47.2
# via
# -c envs/dev.env.txt
# matplotlib
h5py==3.10.0
# via
# -c envs/dev.env.txt
# -r deps/runtime.txt
idna==3.4
idna==3.6
# via
# -c envs/dev.env.txt
# requests
kiwisolver==1.4.5
# via
# -c envs/dev.env.txt
# matplotlib
matplotlib==3.8.1
matplotlib==3.8.2
# via
# -c envs/dev.env.txt
# cirq-core
Expand All @@ -69,7 +69,7 @@ networkx==3.2.1
# -c envs/dev.env.txt
# -r deps/runtime.txt
# cirq-core
numpy==1.25.2
numpy==1.26.3
# via
# -c envs/dev.env.txt
# -r deps/runtime.txt
Expand All @@ -84,11 +84,11 @@ packaging==23.2
# -c envs/dev.env.txt
# deprecation
# matplotlib
pandas==2.1.2
pandas==2.1.4
# via
# -c envs/dev.env.txt
# cirq-core
pillow==10.1.0
pillow==10.2.0
# via
# -c envs/dev.env.txt
# matplotlib
Expand All @@ -113,7 +113,7 @@ requests==2.31.0
# via
# -c envs/dev.env.txt
# -r deps/runtime.txt
scipy==1.9.3
scipy==1.11.4
# via
# -c envs/dev.env.txt
# -r deps/runtime.txt
Expand All @@ -139,16 +139,16 @@ typed-ast==1.4.3
# via
# -c envs/dev.env.txt
# mypy
typing-extensions==4.8.0
typing-extensions==4.9.0
# via
# -c envs/dev.env.txt
# cirq-core
# mypy
tzdata==2023.3
tzdata==2023.4
# via
# -c envs/dev.env.txt
# pandas
urllib3==2.0.7
urllib3==2.1.0
# via
# -c envs/dev.env.txt
# requests
Loading

0 comments on commit 39a0b08

Please sign in to comment.