From 42113c2c19a3e1b4112864fc142a37ad6dad5ce5 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 6 Jan 2025 09:46:46 -0500 Subject: [PATCH 1/7] Update stable dependency files (#6757) Automatic update of stable requirement files to snapshot valid python environments. Because bots are not able to trigger CI on their own, please do so by pushing an empty commit to this branch using the following command: ``` git commit --allow-empty -m 'trigger ci' ``` Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Christina Lee --- .github/stable/all_interfaces.txt | 136 ++++++++++-------- .github/stable/core.txt | 97 +++++++------ .github/stable/external.txt | 229 +++++++++++++++++------------- .github/stable/jax.txt | 106 ++++++++------ .github/stable/tf.txt | 113 ++++++++------- .github/stable/torch.txt | 118 +++++++++------ 6 files changed, 465 insertions(+), 334 deletions(-) diff --git a/.github/stable/all_interfaces.txt b/.github/stable/all_interfaces.txt index a2914bbdb23..b53f5569d44 100644 --- a/.github/stable/all_interfaces.txt +++ b/.github/stable/all_interfaces.txt @@ -2,105 +2,127 @@ absl-py==2.1.0 appdirs==1.4.4 astroid==2.6.6 astunparse==1.6.3 -autograd==1.6.2 -autoray==0.6.12 -black==24.8.0 +autograd==1.7.0 +autoray==0.7.0 +black==24.10.0 cachetools==5.5.0 -certifi==2024.7.4 +certifi==2024.12.14 cfgv==3.4.0 -charset-normalizer==3.3.2 +charset-normalizer==3.4.1 clarabel==0.9.0 -click==8.1.7 -contourpy==1.2.1 -coverage==7.6.1 +click==8.1.8 +contourpy==1.3.1 +coverage==7.6.10 cvxopt==1.3.2 -cvxpy==1.5.3 +cvxpy==1.6.0 cycler==0.12.1 -distlib==0.3.8 -ecos==2.0.14 +diastatic-malt==2.15.2 +distlib==0.3.9 exceptiongroup==1.2.2 execnet==2.1.1 -filelock==3.15.4 +filelock==3.16.1 flaky==3.8.1 -flatbuffers==24.3.25 -fonttools==4.53.1 -fsspec==2024.6.1 -future==1.0.0 +flatbuffers==24.12.23 +fonttools==4.55.3 +fsspec==2024.12.0 gast==0.6.0 +gitdb==4.0.12 +GitPython==3.1.44 google-pasta==0.2.0 -grpcio==1.65.5 -h5py==3.11.0 -identify==2.6.0 -idna==3.7 -importlib_metadata==8.4.0 -importlib_resources==6.4.3 +grpcio==1.69.0 +h5py==3.12.1 +identify==2.6.5 +idna==3.10 iniconfig==2.0.0 isort==5.13.2 -jax==0.4.23 -jaxlib==0.4.23 -Jinja2==3.1.4 -keras==3.5.0 -kiwisolver==1.4.5 +jax==0.4.28 +jaxlib==0.4.28 +Jinja2==3.1.5 +keras==3.7.0 +kiwisolver==1.4.8 lazy-object-proxy==1.10.0 libclang==18.1.1 Markdown==3.7 markdown-it-py==3.0.0 -MarkupSafe==2.1.5 -matplotlib==3.9.2 +MarkupSafe==3.0.2 +matplotlib==3.10.0 mccabe==0.6.1 mdurl==0.1.2 ml-dtypes==0.3.2 mpmath==1.3.0 mypy-extensions==1.0.0 namex==0.0.8 -networkx==3.2.1 +networkx==3.4.2 nodeenv==1.9.1 numpy==1.26.4 -opt-einsum==3.3.0 -optree==0.12.1 -osqp==0.6.7.post1 -packaging==24.1 +nvidia-cublas-cu12==12.1.3.1 +nvidia-cuda-cupti-cu12==12.1.105 +nvidia-cuda-nvrtc-cu12==12.1.105 +nvidia-cuda-runtime-cu12==12.1.105 +nvidia-cudnn-cu12==8.9.2.26 +nvidia-cufft-cu12==11.0.2.54 +nvidia-curand-cu12==10.3.2.106 +nvidia-cusolver-cu12==11.4.5.107 +nvidia-cusparse-cu12==12.1.0.106 +nvidia-nccl-cu12==2.20.5 +nvidia-nvjitlink-cu12==12.6.85 +nvidia-nvtx-cu12==12.1.105 +opt_einsum==3.4.0 +optree==0.13.1 +osqp==0.6.7.post3 +packaging==24.2 +pandas==2.2.3 pathspec==0.12.1 -PennyLane_Lightning==0.39.0 -pillow==10.4.0 -platformdirs==4.2.2 +PennyLane_Lightning==0.40.0 +pillow==11.1.0 +platformdirs==4.3.6 pluggy==1.5.0 -pre-commit==3.8.0 -protobuf==4.25.4 +pre_commit==4.0.1 +prompt_toolkit==3.0.48 +protobuf==4.25.5 py==1.11.0 py-cpuinfo==9.0.0 -Pygments==2.18.0 +pydot==3.0.4 +Pygments==2.19.0 pylint==2.7.4 -pyparsing==3.1.2 -pytest==8.3.2 -pytest-benchmark==4.0.0 -pytest-cov==5.0.0 +pyparsing==3.2.1 +pytest==8.3.4 +pytest-benchmark==5.1.0 +pytest-cov==6.0.0 pytest-forked==1.6.0 pytest-mock==3.14.0 +pytest-rng==1.0.0 +pytest-split==0.10.0 pytest-xdist==3.6.1 python-dateutil==2.9.0.post0 -pytorch-triton==2.3.0 +pytz==2024.2 PyYAML==6.0.2 -qdldl==0.1.7.post4 +qdldl==0.1.7.post5 requests==2.32.3 -rich==13.7.1 +rich==13.9.4 rustworkx==0.15.1 -scipy==1.12.0 -scs==3.2.6 -six==1.16.0 -sympy==1.13.2 +scipy==1.15.0 +scs==3.2.7.post2 +six==1.17.0 +smmap==5.0.2 +sympy==1.13.3 +tach==0.13.1 tensorboard==2.16.2 tensorboard-data-server==0.7.2 tensorflow==2.16.2 tensorflow-io-gcs-filesystem==0.37.1 -termcolor==2.4.0 +termcolor==2.5.0 tf_keras==2.16.0 toml==0.10.2 -tomli==2.0.1 +tomli==2.2.1 +tomli_w==1.1.0 +tomlkit==0.13.2 torch==2.3.0 +triton==2.3.0 typing_extensions==4.12.2 -urllib3==2.2.2 -virtualenv==20.26.3 -Werkzeug==3.0.3 +tzdata==2024.2 +urllib3==2.3.0 +virtualenv==20.28.1 +wcwidth==0.2.13 +Werkzeug==3.1.3 wrapt==1.12.1 -zipp==3.20.0 diff --git a/.github/stable/core.txt b/.github/stable/core.txt index 33cab212cf2..fc24ed2dff0 100644 --- a/.github/stable/core.txt +++ b/.github/stable/core.txt @@ -1,71 +1,88 @@ appdirs==1.4.4 astroid==2.6.6 -autograd==1.6.2 -autoray==0.6.12 -black==24.8.0 +astunparse==1.6.3 +autograd==1.7.0 +autoray==0.7.0 +black==24.10.0 cachetools==5.5.0 -certifi==2024.7.4 +certifi==2024.12.14 cfgv==3.4.0 -charset-normalizer==3.3.2 +charset-normalizer==3.4.1 clarabel==0.9.0 -click==8.1.7 -contourpy==1.2.1 -coverage==7.6.1 +click==8.1.8 +contourpy==1.3.1 +coverage==7.6.10 cvxopt==1.3.2 -cvxpy==1.5.3 +cvxpy==1.6.0 cycler==0.12.1 -distlib==0.3.8 -ecos==2.0.14 +diastatic-malt==2.15.2 +distlib==0.3.9 exceptiongroup==1.2.2 execnet==2.1.1 -filelock==3.15.4 +filelock==3.16.1 flaky==3.8.1 -fonttools==4.53.1 -future==1.0.0 -identify==2.6.0 -idna==3.7 -importlib_resources==6.4.3 +fonttools==4.55.3 +gast==0.6.0 +gitdb==4.0.12 +GitPython==3.1.44 +identify==2.6.5 +idna==3.10 iniconfig==2.0.0 isort==5.13.2 -kiwisolver==1.4.5 +kiwisolver==1.4.8 lazy-object-proxy==1.10.0 -matplotlib==3.9.2 +markdown-it-py==3.0.0 +matplotlib==3.10.0 mccabe==0.6.1 +mdurl==0.1.2 mypy-extensions==1.0.0 -networkx==3.2.1 +networkx==3.4.2 nodeenv==1.9.1 -numpy==1.26.4 -osqp==0.6.7.post1 -packaging==24.1 +numpy==2.0.2 +osqp==0.6.7.post3 +packaging==24.2 +pandas==2.2.3 pathspec==0.12.1 -PennyLane_Lightning==0.38.0 -pillow==10.4.0 -platformdirs==4.2.2 +PennyLane_Lightning==0.40.0 +pillow==11.1.0 +platformdirs==4.3.6 pluggy==1.5.0 -pre-commit==3.8.0 +pre_commit==4.0.1 +prompt_toolkit==3.0.48 py==1.11.0 py-cpuinfo==9.0.0 +pydot==3.0.4 +Pygments==2.19.0 pylint==2.7.4 -pyparsing==3.1.2 -pytest==8.3.2 -pytest-benchmark==4.0.0 -pytest-cov==5.0.0 +pyparsing==3.2.1 +pytest==8.3.4 +pytest-benchmark==5.1.0 +pytest-cov==6.0.0 pytest-forked==1.6.0 pytest-mock==3.14.0 -pytest-split==0.9.0 +pytest-rng==1.0.0 +pytest-split==0.10.0 pytest-xdist==3.6.1 python-dateutil==2.9.0.post0 +pytz==2024.2 PyYAML==6.0.2 -qdldl==0.1.7.post4 +qdldl==0.1.7.post5 requests==2.32.3 +rich==13.9.4 rustworkx==0.15.1 -scipy==1.12.0 -scs==3.2.6 -six==1.16.0 +scipy==1.15.0 +scs==3.2.7.post2 +six==1.17.0 +smmap==5.0.2 +tach==0.13.1 +termcolor==2.5.0 toml==0.10.2 -tomli==2.0.1 +tomli==2.2.1 +tomli_w==1.1.0 +tomlkit==0.13.2 typing_extensions==4.12.2 -urllib3==2.2.2 -virtualenv==20.26.3 +tzdata==2024.2 +urllib3==2.3.0 +virtualenv==20.28.1 +wcwidth==0.2.13 wrapt==1.12.1 -zipp==3.20.0 diff --git a/.github/stable/external.txt b/.github/stable/external.txt index b8551125568..5cb949a78d7 100644 --- a/.github/stable/external.txt +++ b/.github/stable/external.txt @@ -1,196 +1,233 @@ absl-py==2.1.0 -anyio==4.4.0 +annotated-types==0.7.0 +anyio==4.8.0 appdirs==1.4.4 argon2-cffi==23.1.0 argon2-cffi-bindings==21.2.0 arrow==1.3.0 astroid==2.6.6 -asttokens==2.4.1 +asttokens==3.0.0 astunparse==1.6.3 async-lru==2.0.4 -attrs==24.2.0 -autograd==1.6.2 -autoray==0.6.12 +attrs==24.3.0 +autograd==1.7.0 +autoray==0.7.0 babel==2.16.0 beautifulsoup4==4.12.3 -black==24.8.0 -bleach==6.1.0 +black==24.10.0 +bleach==6.2.0 cachetools==5.5.0 -certifi==2024.7.4 -cffi==1.17.0 +certifi==2024.12.14 +cffi==1.17.1 cfgv==3.4.0 -charset-normalizer==3.3.2 +charset-normalizer==3.4.1 +chex==0.1.88 +cirq-core==1.4.1 clarabel==0.9.0 -click==8.1.7 +click==8.1.8 comm==0.2.2 -contourpy==1.2.1 +contourpy==1.3.1 cotengra==0.6.2 -coverage==7.6.1 +coverage==7.6.10 +cryptography==44.0.0 cvxopt==1.3.2 -cvxpy==1.5.3 +cvxpy==1.6.0 cycler==0.12.1 -cytoolz==0.12.3 -debugpy==1.8.5 +cytoolz==1.0.1 +debugpy==1.8.11 decorator==5.1.1 defusedxml==0.7.1 diastatic-malt==2.15.2 -distlib==0.3.8 -ecos==2.0.14 +dill==0.3.9 +distlib==0.3.9 +duet==0.2.9 +etils==1.11.0 exceptiongroup==1.2.2 execnet==2.1.1 -executing==2.0.1 -fastjsonschema==2.20.0 -filelock==3.15.4 +executing==2.1.0 +fastjsonschema==2.21.1 +filelock==3.16.1 flaky==3.8.1 -flatbuffers==24.3.25 -fonttools==4.53.1 +flatbuffers==24.12.23 +fonttools==4.55.3 fqdn==1.5.1 -future==1.0.0 gast==0.6.0 +gitdb==4.0.12 +GitPython==3.1.44 google-pasta==0.2.0 -grpcio==1.65.5 +grpcio==1.69.0 h11==0.14.0 -h5py==3.11.0 -httpcore==1.0.5 -httpx==0.27.0 -identify==2.6.0 -idna==3.7 -importlib_metadata==8.4.0 -importlib_resources==6.4.3 +h5py==3.12.1 +httpcore==1.0.7 +httpx==0.28.1 +ibm-cloud-sdk-core==3.22.0 +ibm-platform-services==0.59.0 +identify==2.6.5 +idna==3.10 iniconfig==2.0.0 ipykernel==6.29.5 -ipython==8.18.1 +ipython==8.31.0 ipython-genutils==0.2.0 -ipywidgets==7.8.3 +ipywidgets==7.8.5 isoduration==20.11.0 isort==5.13.2 -jax==0.4.23 -jaxlib==0.4.23 -jedi==0.19.1 -Jinja2==3.1.4 -json5==0.9.25 +jax==0.4.28 +jaxlib==0.4.28 +jedi==0.19.2 +Jinja2==3.1.5 +json5==0.10.0 jsonpointer==3.0.0 jsonschema==4.23.0 -jsonschema-specifications==2023.12.1 -jupyter-events==0.10.0 +jsonschema-specifications==2024.10.1 +jupyter-events==0.11.0 jupyter-lsp==2.2.5 -jupyter_client==8.6.2 +jupyter_client==8.6.3 jupyter_core==5.7.2 -jupyter_server==2.14.2 +jupyter_server==2.15.0 jupyter_server_terminals==0.5.3 -jupyterlab==4.2.4 +jupyterlab==4.3.4 jupyterlab_pygments==0.3.0 jupyterlab_server==2.27.3 -jupyterlab_widgets==1.1.9 -keras==3.5.0 -kiwisolver==1.4.5 +jupyterlab_widgets==1.1.11 +keras==3.7.0 +kiwisolver==1.4.8 lark==1.1.9 lazy-object-proxy==1.10.0 libclang==18.1.1 llvmlite==0.43.0 Markdown==3.7 markdown-it-py==3.0.0 -MarkupSafe==2.1.5 -matplotlib==3.9.2 +MarkupSafe==3.0.2 +matplotlib==3.10.0 matplotlib-inline==0.1.7 mccabe==0.6.1 mdurl==0.1.2 -mistune==3.0.2 +mistune==3.1.0 +mitiq==0.42.0 ml-dtypes==0.3.2 +mpmath==1.3.0 mypy-extensions==1.0.0 namex==0.0.8 -nbclient==0.10.0 -nbconvert==7.16.4 +nbclient==0.10.2 +nbconvert==7.16.5 nbformat==5.10.4 nest-asyncio==1.6.0 -networkx==3.2.1 +networkx==3.4.2 nodeenv==1.9.1 -notebook==7.2.1 +notebook==7.3.2 notebook_shim==0.2.4 numba==0.60.0 numpy==1.26.4 -opt-einsum==3.3.0 -optree==0.12.1 -osqp==0.6.7.post1 +opt_einsum==3.4.0 +optax==0.2.4 +optree==0.13.1 +osqp==0.6.7.post3 overrides==7.7.0 -packaging==24.1 +packaging==24.2 +pandas==2.2.3 pandocfilters==1.5.1 parso==0.8.4 pathspec==0.12.1 -PennyLane-Catalyst==0.9.0 -PennyLane_Lightning==0.39.0 +pbr==6.1.0 +PennyLane-Catalyst==0.10.0.dev39 +PennyLane-qiskit @ git+https://github.com/PennyLaneAI/pennylane-qiskit.git@40a4d24f126e51e0e3e28a4cd737f883a6fd5ebc +PennyLane_Lightning==0.40.0 +PennyLane_Lightning_Kokkos==0.40.0.dev41 pexpect==4.9.0 -pillow==10.4.0 -platformdirs==4.2.2 +pillow==11.1.0 +platformdirs==4.3.6 pluggy==1.5.0 -pre-commit==3.8.0 -prometheus_client==0.20.0 -prompt_toolkit==3.0.47 -protobuf==4.25.4 -psutil==6.0.0 +ply==3.11 +pre_commit==4.0.1 +prometheus_client==0.21.1 +prompt_toolkit==3.0.48 +protobuf==4.25.5 +psutil==6.1.1 ptyprocess==0.7.0 pure_eval==0.2.3 py==1.11.0 py-cpuinfo==9.0.0 pycparser==2.22 -Pygments==2.18.0 +pydantic==2.10.4 +pydantic_core==2.27.2 +pydot==3.0.4 +Pygments==2.19.0 +PyJWT==2.10.1 pylint==2.7.4 -pyparsing==3.1.2 +pyparsing==3.2.1 pyperclip==1.9.0 -pytest==8.3.2 -pytest-benchmark==4.0.0 -pytest-cov==5.0.0 +pyspnego==0.11.2 +pytest==8.3.4 +pytest-benchmark==5.1.0 +pytest-cov==6.0.0 pytest-forked==1.6.0 pytest-mock==3.14.0 +pytest-rng==1.0.0 +pytest-split==0.10.0 pytest-xdist==3.6.1 python-dateutil==2.9.0.post0 -python-json-logger==2.0.7 +python-json-logger==3.2.1 +pytz==2024.2 PyYAML==6.0.2 -pyzmq==26.1.1 +pyzmq==26.2.0 pyzx==0.8.0 -qdldl==0.1.7.post4 -quimb==1.8.4 +qdldl==0.1.7.post5 +qiskit==1.2.4 +qiskit-aer==0.15.1 +qiskit-ibm-provider==0.11.0 +qiskit-ibm-runtime==0.29.0 +quimb==1.10.0 referencing==0.35.1 requests==2.32.3 +requests_ntlm==1.3.0 rfc3339-validator==0.1.4 rfc3986-validator==0.1.1 -rich==13.7.1 -rpds-py==0.20.0 +rich==13.9.4 +rpds-py==0.22.3 rustworkx==0.15.1 -scipy==1.12.0 -scs==3.2.6 -semantic-version==2.10.0 +scipy==1.14.1 +scipy-openblas32==0.3.28.0.2 +scs==3.2.7.post2 Send2Trash==1.8.3 -six==1.16.0 +six==1.17.0 +smmap==5.0.2 sniffio==1.3.1 +sortedcontainers==2.4.0 soupsieve==2.6 stack-data==0.6.3 -stim==1.13.0 +stevedore==5.4.0 +stim==1.14.0 +symengine==0.13.0 +sympy==1.12.1 +tabulate==0.9.0 +tach==0.13.1 tensorboard==2.16.2 tensorboard-data-server==0.7.2 tensorflow==2.16.2 tensorflow-io-gcs-filesystem==0.37.1 -termcolor==2.4.0 +termcolor==2.5.0 terminado==0.18.1 tf_keras==2.16.0 -tinycss2==1.3.0 +tinycss2==1.4.0 toml==0.10.2 -tomli==2.0.1 +tomli==2.2.1 +tomli_w==1.1.0 tomlkit==0.13.2 -toolz==0.12.1 -tornado==6.4.1 -tqdm==4.66.5 +toolz==1.0.0 +tornado==6.4.2 +tqdm==4.67.1 traitlets==5.14.3 -types-python-dateutil==2.9.0.20240821 +types-python-dateutil==2.9.0.20241206 typing_extensions==4.12.2 +tzdata==2024.2 uri-template==1.3.0 -urllib3==2.2.2 -virtualenv==20.26.3 +urllib3==2.3.0 +virtualenv==20.28.1 wcwidth==0.2.13 -webcolors==24.8.0 +webcolors==24.11.1 webencodings==0.5.1 websocket-client==1.8.0 -Werkzeug==3.0.3 -widgetsnbextension==3.6.8 +websockets==14.1 +Werkzeug==3.1.3 +widgetsnbextension==3.6.10 wrapt==1.12.1 -zipp==3.20.0 diff --git a/.github/stable/jax.txt b/.github/stable/jax.txt index 0ea92c77f54..ed2c0b32037 100644 --- a/.github/stable/jax.txt +++ b/.github/stable/jax.txt @@ -1,76 +1,92 @@ appdirs==1.4.4 astroid==2.6.6 -autograd==1.6.2 -autoray==0.6.12 -black==24.8.0 +astunparse==1.6.3 +autograd==1.7.0 +autoray==0.7.0 +black==24.10.0 cachetools==5.5.0 -certifi==2024.7.4 +certifi==2024.12.14 cfgv==3.4.0 -charset-normalizer==3.3.2 +charset-normalizer==3.4.1 clarabel==0.9.0 -click==8.1.7 -contourpy==1.2.1 -coverage==7.6.1 +click==8.1.8 +contourpy==1.3.1 +coverage==7.6.10 cvxopt==1.3.2 -cvxpy==1.5.3 +cvxpy==1.6.0 cycler==0.12.1 -distlib==0.3.8 -ecos==2.0.14 +diastatic-malt==2.15.2 +distlib==0.3.9 exceptiongroup==1.2.2 execnet==2.1.1 -filelock==3.15.4 +filelock==3.16.1 flaky==3.8.1 -fonttools==4.53.1 -future==1.0.0 -identify==2.6.0 -idna==3.7 -importlib_metadata==8.4.0 -importlib_resources==6.4.3 +fonttools==4.55.3 +gast==0.6.0 +gitdb==4.0.12 +GitPython==3.1.44 +identify==2.6.5 +idna==3.10 iniconfig==2.0.0 isort==5.13.2 -jax==0.4.23 -jaxlib==0.4.23 -kiwisolver==1.4.5 +jax==0.4.28 +jaxlib==0.4.28 +kiwisolver==1.4.8 lazy-object-proxy==1.10.0 -matplotlib==3.9.2 +markdown-it-py==3.0.0 +matplotlib==3.10.0 mccabe==0.6.1 -ml-dtypes==0.4.0 +mdurl==0.1.2 +ml_dtypes==0.5.0 mypy-extensions==1.0.0 -networkx==3.2.1 +networkx==3.4.2 nodeenv==1.9.1 -numpy==1.26.4 -opt-einsum==3.3.0 -osqp==0.6.7.post1 -packaging==24.1 +numpy==2.0.2 +opt_einsum==3.4.0 +osqp==0.6.7.post3 +packaging==24.2 +pandas==2.2.3 pathspec==0.12.1 -PennyLane_Lightning==0.38.0 -pillow==10.4.0 -platformdirs==4.2.2 +PennyLane_Lightning==0.40.0 +pillow==11.1.0 +platformdirs==4.3.6 pluggy==1.5.0 -pre-commit==3.8.0 +pre_commit==4.0.1 +prompt_toolkit==3.0.48 py==1.11.0 py-cpuinfo==9.0.0 +pydot==3.0.4 +Pygments==2.19.0 pylint==2.7.4 -pyparsing==3.1.2 -pytest==8.3.2 -pytest-benchmark==4.0.0 -pytest-cov==5.0.0 +pyparsing==3.2.1 +pytest==8.3.4 +pytest-benchmark==5.1.0 +pytest-cov==6.0.0 pytest-forked==1.6.0 pytest-mock==3.14.0 -pytest-split==0.9.0 +pytest-rng==1.0.0 +pytest-split==0.10.0 pytest-xdist==3.6.1 python-dateutil==2.9.0.post0 +pytz==2024.2 PyYAML==6.0.2 -qdldl==0.1.7.post4 +qdldl==0.1.7.post5 requests==2.32.3 +rich==13.9.4 rustworkx==0.15.1 -scipy==1.12.0 -scs==3.2.6 -six==1.16.0 +scipy==1.15.0 +scs==3.2.7.post2 +six==1.17.0 +smmap==5.0.2 +tach==0.13.1 +termcolor==2.5.0 toml==0.10.2 -tomli==2.0.1 +tomli==2.2.1 +tomli_w==1.1.0 +tomlkit==0.13.2 typing_extensions==4.12.2 -urllib3==2.2.2 -virtualenv==20.26.3 +tzdata==2024.2 +urllib3==2.3.0 +virtualenv==20.28.1 +wcwidth==0.2.13 wrapt==1.12.1 -zipp==3.20.0 diff --git a/.github/stable/tf.txt b/.github/stable/tf.txt index 6ae16b32099..634fbd09526 100644 --- a/.github/stable/tf.txt +++ b/.github/stable/tf.txt @@ -2,98 +2,107 @@ absl-py==2.1.0 appdirs==1.4.4 astroid==2.6.6 astunparse==1.6.3 -autograd==1.6.2 -autoray==0.6.12 -black==24.8.0 +autograd==1.7.0 +autoray==0.7.0 +black==24.10.0 cachetools==5.5.0 -certifi==2024.7.4 +certifi==2024.12.14 cfgv==3.4.0 -charset-normalizer==3.3.2 +charset-normalizer==3.4.1 clarabel==0.9.0 -click==8.1.7 -contourpy==1.2.1 -coverage==7.6.1 +click==8.1.8 +contourpy==1.3.1 +coverage==7.6.10 cvxopt==1.3.2 -cvxpy==1.5.3 +cvxpy==1.6.0 cycler==0.12.1 -distlib==0.3.8 -ecos==2.0.14 +diastatic-malt==2.15.2 +distlib==0.3.9 exceptiongroup==1.2.2 execnet==2.1.1 -filelock==3.15.4 +filelock==3.16.1 flaky==3.8.1 -flatbuffers==24.3.25 -fonttools==4.53.1 -future==1.0.0 +flatbuffers==24.12.23 +fonttools==4.55.3 gast==0.6.0 +gitdb==4.0.12 +GitPython==3.1.44 google-pasta==0.2.0 -grpcio==1.65.5 -h5py==3.11.0 -identify==2.6.0 -idna==3.7 -importlib_metadata==8.4.0 -importlib_resources==6.4.3 +grpcio==1.69.0 +h5py==3.12.1 +identify==2.6.5 +idna==3.10 iniconfig==2.0.0 isort==5.13.2 -keras==3.5.0 -kiwisolver==1.4.5 +keras==3.7.0 +kiwisolver==1.4.8 lazy-object-proxy==1.10.0 libclang==18.1.1 Markdown==3.7 markdown-it-py==3.0.0 -MarkupSafe==2.1.5 -matplotlib==3.9.2 +MarkupSafe==3.0.2 +matplotlib==3.10.0 mccabe==0.6.1 mdurl==0.1.2 ml-dtypes==0.3.2 mypy-extensions==1.0.0 namex==0.0.8 -networkx==3.2.1 +networkx==3.4.2 nodeenv==1.9.1 numpy==1.26.4 -opt-einsum==3.3.0 -optree==0.12.1 -osqp==0.6.7.post1 -packaging==24.1 +opt_einsum==3.4.0 +optree==0.13.1 +osqp==0.6.7.post3 +packaging==24.2 +pandas==2.2.3 pathspec==0.12.1 -PennyLane_Lightning==0.38.0 -pillow==10.4.0 -platformdirs==4.2.2 +PennyLane_Lightning==0.40.0 +pillow==11.1.0 +platformdirs==4.3.6 pluggy==1.5.0 -pre-commit==3.8.0 -protobuf==4.25.4 +pre_commit==4.0.1 +prompt_toolkit==3.0.48 +protobuf==4.25.5 py==1.11.0 py-cpuinfo==9.0.0 -Pygments==2.18.0 +pydot==3.0.4 +Pygments==2.19.0 pylint==2.7.4 -pyparsing==3.1.2 -pytest==8.3.2 -pytest-benchmark==4.0.0 -pytest-cov==5.0.0 +pyparsing==3.2.1 +pytest==8.3.4 +pytest-benchmark==5.1.0 +pytest-cov==6.0.0 pytest-forked==1.6.0 pytest-mock==3.14.0 -pytest-split==0.9.0 +pytest-rng==1.0.0 +pytest-split==0.10.0 pytest-xdist==3.6.1 python-dateutil==2.9.0.post0 +pytz==2024.2 PyYAML==6.0.2 -qdldl==0.1.7.post4 +qdldl==0.1.7.post5 requests==2.32.3 -rich==13.7.1 +rich==13.9.4 rustworkx==0.15.1 -scipy==1.12.0 -scs==3.2.6 -six==1.16.0 +scipy==1.15.0 +scs==3.2.7.post2 +six==1.17.0 +smmap==5.0.2 +tach==0.13.1 tensorboard==2.16.2 tensorboard-data-server==0.7.2 tensorflow==2.16.2 tensorflow-io-gcs-filesystem==0.37.1 -termcolor==2.4.0 +termcolor==2.5.0 tf_keras==2.16.0 toml==0.10.2 -tomli==2.0.1 +tomli==2.2.1 +tomli_w==1.1.0 +tomlkit==0.13.2 typing_extensions==4.12.2 -urllib3==2.2.2 -virtualenv==20.26.3 -Werkzeug==3.0.3 +tzdata==2024.2 +urllib3==2.3.0 +virtualenv==20.28.1 +wcwidth==0.2.13 +Werkzeug==3.1.3 wrapt==1.12.1 -zipp==3.20.0 diff --git a/.github/stable/torch.txt b/.github/stable/torch.txt index ebbdcf153a3..3ab4c0e93f2 100644 --- a/.github/stable/torch.txt +++ b/.github/stable/torch.txt @@ -1,77 +1,107 @@ appdirs==1.4.4 astroid==2.6.6 -autograd==1.6.2 -autoray==0.6.12 -black==24.8.0 +astunparse==1.6.3 +autograd==1.7.0 +autoray==0.7.0 +black==24.10.0 cachetools==5.5.0 -certifi==2024.7.4 +certifi==2024.12.14 cfgv==3.4.0 -charset-normalizer==3.3.2 +charset-normalizer==3.4.1 clarabel==0.9.0 -click==8.1.7 -contourpy==1.2.1 -coverage==7.6.1 +click==8.1.8 +contourpy==1.3.1 +coverage==7.6.10 cvxopt==1.3.2 -cvxpy==1.5.3 +cvxpy==1.6.0 cycler==0.12.1 -distlib==0.3.8 -ecos==2.0.14 +diastatic-malt==2.15.2 +distlib==0.3.9 exceptiongroup==1.2.2 execnet==2.1.1 -filelock==3.15.4 +filelock==3.16.1 flaky==3.8.1 -fonttools==4.53.1 -fsspec==2024.6.1 -future==1.0.0 -identify==2.6.0 -idna==3.7 -importlib_resources==6.4.3 +fonttools==4.55.3 +fsspec==2024.12.0 +gast==0.6.0 +gitdb==4.0.12 +GitPython==3.1.44 +identify==2.6.5 +idna==3.10 iniconfig==2.0.0 isort==5.13.2 -Jinja2==3.1.4 -kiwisolver==1.4.5 +Jinja2==3.1.5 +kiwisolver==1.4.8 lazy-object-proxy==1.10.0 -MarkupSafe==2.1.5 -matplotlib==3.9.2 +markdown-it-py==3.0.0 +MarkupSafe==3.0.2 +matplotlib==3.10.0 mccabe==0.6.1 +mdurl==0.1.2 mpmath==1.3.0 mypy-extensions==1.0.0 -networkx==3.2.1 +networkx==3.4.2 nodeenv==1.9.1 -numpy==1.26.4 -osqp==0.6.7.post1 -packaging==24.1 +numpy==2.0.2 +nvidia-cublas-cu12==12.1.3.1 +nvidia-cuda-cupti-cu12==12.1.105 +nvidia-cuda-nvrtc-cu12==12.1.105 +nvidia-cuda-runtime-cu12==12.1.105 +nvidia-cudnn-cu12==8.9.2.26 +nvidia-cufft-cu12==11.0.2.54 +nvidia-curand-cu12==10.3.2.106 +nvidia-cusolver-cu12==11.4.5.107 +nvidia-cusparse-cu12==12.1.0.106 +nvidia-nccl-cu12==2.20.5 +nvidia-nvjitlink-cu12==12.6.85 +nvidia-nvtx-cu12==12.1.105 +osqp==0.6.7.post3 +packaging==24.2 +pandas==2.2.3 pathspec==0.12.1 -PennyLane_Lightning==0.38.0 -pillow==10.4.0 -platformdirs==4.2.2 +PennyLane_Lightning==0.40.0 +pillow==11.1.0 +platformdirs==4.3.6 pluggy==1.5.0 -pre-commit==3.8.0 +pre_commit==4.0.1 +prompt_toolkit==3.0.48 py==1.11.0 py-cpuinfo==9.0.0 +pydot==3.0.4 +Pygments==2.19.0 pylint==2.7.4 -pyparsing==3.1.2 -pytest==8.3.2 -pytest-benchmark==4.0.0 -pytest-cov==5.0.0 +pyparsing==3.2.1 +pytest==8.3.4 +pytest-benchmark==5.1.0 +pytest-cov==6.0.0 pytest-forked==1.6.0 pytest-mock==3.14.0 +pytest-rng==1.0.0 +pytest-split==0.10.0 pytest-xdist==3.6.1 python-dateutil==2.9.0.post0 -pytorch-triton==2.3.0 +pytz==2024.2 PyYAML==6.0.2 -qdldl==0.1.7.post4 +qdldl==0.1.7.post5 requests==2.32.3 +rich==13.9.4 rustworkx==0.15.1 -scipy==1.12.0 -scs==3.2.6 -six==1.16.0 -sympy==1.13.2 +scipy==1.15.0 +scs==3.2.7.post2 +six==1.17.0 +smmap==5.0.2 +sympy==1.13.3 +tach==0.13.1 +termcolor==2.5.0 toml==0.10.2 -tomli==2.0.1 +tomli==2.2.1 +tomli_w==1.1.0 +tomlkit==0.13.2 torch==2.3.0 +triton==2.3.0 typing_extensions==4.12.2 -urllib3==2.2.2 -virtualenv==20.26.3 +tzdata==2024.2 +urllib3==2.3.0 +virtualenv==20.28.1 +wcwidth==0.2.13 wrapt==1.12.1 -zipp==3.20.0 From 6478d8a7d66bd879ee43d6091589f1e7bfcc36a5 Mon Sep 17 00:00:00 2001 From: Pietropaolo Frisoni Date: Mon, 6 Jan 2025 10:18:52 -0500 Subject: [PATCH 2/7] 0.41.0 setup (#6758) Created automatically from the `pennylane_version_bump.sh` script. - **Remove rc0 from version number** - **Changes to set up 0.41.0 dev branch** --------- Co-authored-by: Mudit Pandey --- .github/workflows/rc_sync.yml | 2 +- doc/development/release_notes.md | 2 ++ doc/releases/changelog-dev.md | 19 +++++++++++++++++++ pennylane/_version.py | 2 +- 4 files changed, 23 insertions(+), 2 deletions(-) create mode 100644 doc/releases/changelog-dev.md diff --git a/.github/workflows/rc_sync.yml b/.github/workflows/rc_sync.yml index dc1d09dad56..88993144eef 100644 --- a/.github/workflows/rc_sync.yml +++ b/.github/workflows/rc_sync.yml @@ -71,4 +71,4 @@ jobs: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | git checkout ${{ env.tmp_branch }} - gh pr create --title "Daily rc sync to master" --body "" --reviewer "mudit2812,albi3ro" + gh pr create --title "Daily rc sync to master" --body "" --reviewer "PietropaoloFrisoni,albi3ro" diff --git a/doc/development/release_notes.md b/doc/development/release_notes.md index 2c189078a48..213fa02b448 100644 --- a/doc/development/release_notes.md +++ b/doc/development/release_notes.md @@ -3,6 +3,8 @@ Release notes This page contains the release notes for PennyLane. +.. mdinclude:: ../releases/changelog-dev.md + .. mdinclude:: ../releases/changelog-0.40.0.md .. mdinclude:: ../releases/changelog-0.39.0.md diff --git a/doc/releases/changelog-dev.md b/doc/releases/changelog-dev.md new file mode 100644 index 00000000000..b27d4a1a9b4 --- /dev/null +++ b/doc/releases/changelog-dev.md @@ -0,0 +1,19 @@ +:orphan: + +# Release 0.41.0-dev (development release) + +

New features since last release

+ +

Improvements 🛠

+ +

Breaking changes 💔

+ +

Deprecations 👋

+ +

Documentation 📝

+ +

Bug fixes 🐛

+ +

Contributors ✍️

+ +This release contains contributions from (in alphabetical order): diff --git a/pennylane/_version.py b/pennylane/_version.py index 6c04c4a5261..8cad5d6c924 100644 --- a/pennylane/_version.py +++ b/pennylane/_version.py @@ -16,4 +16,4 @@ Version number (major.minor.patch[-label]) """ -__version__ = "0.40.0rc0" +__version__ = "0.41.0-dev0" From f2662b63ee13002e8feeb9ccb68d971836883911 Mon Sep 17 00:00:00 2001 From: ringo-but-quantum Date: Tue, 7 Jan 2025 09:51:37 +0000 Subject: [PATCH 3/7] [no ci] bump nightly version --- pennylane/_version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pennylane/_version.py b/pennylane/_version.py index 8cad5d6c924..79162cab764 100644 --- a/pennylane/_version.py +++ b/pennylane/_version.py @@ -16,4 +16,4 @@ Version number (major.minor.patch[-label]) """ -__version__ = "0.41.0-dev0" +__version__ = "0.41.0-dev1" From 8bdf28941acba5b1a9eb6b5896841d99f2cca8cf Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 7 Jan 2025 15:19:18 -0500 Subject: [PATCH 4/7] Daily rc sync to master (#6771) Co-authored-by: PietropaoloFrisoni Co-authored-by: Christina Lee Co-authored-by: GitHub Actions Bot <> --- doc/releases/changelog-0.40.0.md | 3 +++ pennylane/workflow/resolution.py | 24 ++++++++--------- tests/test_qnode.py | 22 +++++++++++++++ .../workflow/test_resolve_execution_config.py | 27 +++++++++++++++++++ 4 files changed, 64 insertions(+), 12 deletions(-) diff --git a/doc/releases/changelog-0.40.0.md b/doc/releases/changelog-0.40.0.md index b381ea18ed0..e3769326619 100644 --- a/doc/releases/changelog-0.40.0.md +++ b/doc/releases/changelog-0.40.0.md @@ -625,6 +625,9 @@ same information.

Bug fixes 🐛

+* Adds validation so the device vjp is only used when the device actually supports it. + [(#6755)](https://github.com/PennyLaneAI/pennylane/pull/6755/) + * `qml.counts` returns all outcomes when the `all_outcomes` argument is `True` and mid-circuit measurements are present. [(#6732)](https://github.com/PennyLaneAI/pennylane/pull/6732) diff --git a/pennylane/workflow/resolution.py b/pennylane/workflow/resolution.py index 502a9810ed6..77d85aae9b3 100644 --- a/pennylane/workflow/resolution.py +++ b/pennylane/workflow/resolution.py @@ -86,9 +86,7 @@ def _use_tensorflow_autograph(): return not tf.executing_eagerly() -def _resolve_interface( - interface: Union[str, Interface, None], tapes: QuantumScriptBatch -) -> Interface: +def _resolve_interface(interface: Union[str, Interface], tapes: QuantumScriptBatch) -> Interface: """Helper function to resolve an interface based on a set of tapes. Args: @@ -249,22 +247,24 @@ def _resolve_execution_config( ): updated_values["grad_on_execution"] = False - if execution_config.use_device_jacobian_product and isinstance( - device, qml.devices.LegacyDeviceFacade - ): - raise qml.QuantumFunctionError( - "device provided jacobian products are not compatible with the old device interface." - ) - if ( "lightning" in device.name - and (transform_program and qml.metric_tensor in transform_program) + and transform_program + and qml.metric_tensor in transform_program and execution_config.gradient_method == "best" ): execution_config = replace(execution_config, gradient_method=qml.gradients.param_shift) - execution_config = _resolve_diff_method(execution_config, device, tape=tapes[0]) + if execution_config.use_device_jacobian_product and not device.supports_vjp( + execution_config, tapes[0] + ): + raise qml.QuantumFunctionError( + f"device_vjp=True is not supported for device {device}," + f" diff_method {execution_config.gradient_method}," + " and the provided circuit." + ) + if execution_config.gradient_method is qml.gradients.param_shift_cv: updated_values["gradient_keyword_arguments"]["dev"] = device diff --git a/tests/test_qnode.py b/tests/test_qnode.py index 22f16a45ff9..5ac318333a3 100644 --- a/tests/test_qnode.py +++ b/tests/test_qnode.py @@ -873,6 +873,7 @@ def circuit(x, y): assert np.allclose(res, expected, atol=tol, rtol=0) + # pylint: disable=too-many-positional-arguments @pytest.mark.parametrize("dev_name", ["default.qubit", "default.mixed"]) @pytest.mark.parametrize("first_par", np.linspace(0.15, np.pi - 0.3, 3)) @pytest.mark.parametrize("sec_par", np.linspace(0.15, np.pi - 0.3, 3)) @@ -1170,6 +1171,27 @@ def decomposition(self) -> list: res = qml.execute([tape], dev) assert qml.math.get_interface(res) == "numpy" + def test_error_device_vjp_unsuppoprted(self): + """Test that an error is raised in the device_vjp is unsupported.""" + + class DummyDev(qml.devices.Device): + + def execute(self, circuits, execution_config=qml.devices.ExecutionConfig()): + return 0 + + def supports_derivatives(self, execution_config=None, circuit=None): + return execution_config and execution_config.gradient_method == "vjp_grad" + + def supports_vjp(self, execution_config=None, circuit=None) -> bool: + return execution_config and execution_config.gradient_method == "vjp_grad" + + @qml.qnode(DummyDev(), diff_method="parameter-shift", device_vjp=True) + def circuit(): + return qml.expval(qml.Z(0)) + + with pytest.raises(qml.QuantumFunctionError, match="device_vjp=True is not supported"): + circuit() + class TestShots: """Unit tests for specifying shots per call.""" diff --git a/tests/workflow/test_resolve_execution_config.py b/tests/workflow/test_resolve_execution_config.py index 87a67c8292e..96e7cb9f595 100644 --- a/tests/workflow/test_resolve_execution_config.py +++ b/tests/workflow/test_resolve_execution_config.py @@ -116,3 +116,30 @@ def test_jax_jit_interface(): expected_mcm_config = MCMConfig(mcm_method="deferred", postselect_mode="fill-shots") assert resolved_config.mcm_config == expected_mcm_config + + +# pylint: disable=unused-argument +def test_no_device_vjp_if_not_supported(): + """Test that an error is raised for device_vjp=True if the device does not support it.""" + + class DummyDev(qml.devices.Device): + + def execute(self, circuits, execution_config=qml.devices.ExecutionConfig()): + return 0 + + def supports_derivatives(self, execution_config=None, circuit=None): + return execution_config and execution_config.gradient_method == "vjp_grad" + + def supports_vjp(self, execution_config=None, circuit=None) -> bool: + return execution_config and execution_config.gradient_method == "vjp_grad" + + config_vjp_grad = ExecutionConfig(use_device_jacobian_product=True, gradient_method="vjp_grad") + tape = qml.tape.QuantumScript() + # no error + _ = _resolve_execution_config(config_vjp_grad, DummyDev(), (tape,)) + + config_parameter_shift = ExecutionConfig( + use_device_jacobian_product=True, gradient_method="parameter-shift" + ) + with pytest.raises(qml.QuantumFunctionError, match="device_vjp=True is not supported"): + _resolve_execution_config(config_parameter_shift, DummyDev(), (tape,)) From 4e011ec01fb7adeebe6cb3c454ebbc83b0c4f940 Mon Sep 17 00:00:00 2001 From: ringo-but-quantum Date: Wed, 8 Jan 2025 09:51:46 +0000 Subject: [PATCH 5/7] [no ci] bump nightly version --- pennylane/_version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pennylane/_version.py b/pennylane/_version.py index 79162cab764..a5d50fca8dd 100644 --- a/pennylane/_version.py +++ b/pennylane/_version.py @@ -16,4 +16,4 @@ Version number (major.minor.patch[-label]) """ -__version__ = "0.41.0-dev1" +__version__ = "0.41.0-dev2" From e85fff3241c676c266af02daee0208a309a5fcae Mon Sep 17 00:00:00 2001 From: Diksha Dhawan <40900030+ddhawan11@users.noreply.github.com> Date: Wed, 8 Jan 2025 09:23:34 -0500 Subject: [PATCH 6/7] Added examples for vibrational Hamiltonian functions (#6717) **Context:** Added missing examples for vibrational Hamiltonian functions. **Description of the Change:** **Benefits:** **Possible Drawbacks:** **Related GitHub Issues:** --- doc/releases/changelog-dev.md | 4 ++ pennylane/bose/bosonic_mapping.py | 55 ++++++++++++------- pennylane/qchem/vibrational/localize_modes.py | 16 ++++++ .../qchem/vibrational/vibrational_class.py | 33 +++++++++++ 4 files changed, 88 insertions(+), 20 deletions(-) diff --git a/doc/releases/changelog-dev.md b/doc/releases/changelog-dev.md index b27d4a1a9b4..0f9e46664b9 100644 --- a/doc/releases/changelog-dev.md +++ b/doc/releases/changelog-dev.md @@ -12,8 +12,12 @@

Documentation 📝

+* Updated documentation for vibrational Hamiltonians + [(#6717)](https://github.com/PennyLaneAI/pennylane/pull/6717) +

Bug fixes 🐛

Contributors ✍️

This release contains contributions from (in alphabetical order): +Diksha Dhawan \ No newline at end of file diff --git a/pennylane/bose/bosonic_mapping.py b/pennylane/bose/bosonic_mapping.py index 559ded8b68d..5c5eb55341d 100644 --- a/pennylane/bose/bosonic_mapping.py +++ b/pennylane/bose/bosonic_mapping.py @@ -67,14 +67,16 @@ def binary_mapping( >>> w = qml.bose.BoseWord({(0, 0): "+"}) >>> qml.binary_mapping(w, n_states=4) - 0.6830127018922193 * X(0) - + -0.1830127018922193 * X(0) @ Z(1) - + -0.6830127018922193j * Y(0) - + 0.1830127018922193j * Y(0) @ Z(1) - + 0.3535533905932738 * X(0) @ X(1) - + -0.3535533905932738j * X(0) @ Y(1) - + 0.3535533905932738j * Y(0) @ X(1) - + (0.3535533905932738+0j) * Y(0) @ Y(1) + ( + 0.6830127018922193 * X(0) + + -0.1830127018922193 * X(0) @ Z(1) + + -0.6830127018922193j * Y(0) + + 0.1830127018922193j * Y(0) @ Z(1) + + 0.3535533905932738 * X(0) @ X(1) + + -0.3535533905932738j * X(0) @ Y(1) + + 0.3535533905932738j * Y(0) @ X(1) + + (0.3535533905932738+0j) * Y(0) @ Y(1) + ) """ qubit_operator = _binary_mapping_dispatch(bose_operator, n_states, tol=tol) @@ -190,18 +192,20 @@ def unary_mapping( >>> w = qml.bose.BoseWord({(0, 0): "+"}) >>> qml.unary_mapping(w, n_states=4) - 0.25 * X(0) @ X(1) - + -0.25j * X(0) @ Y(1) - + 0.25j * Y(0) @ X(1) - + (0.25+0j) * Y(0) @ Y(1) - + 0.3535533905932738 * X(1) @ X(2) - + -0.3535533905932738j * X(1) @ Y(2) - + 0.3535533905932738j * Y(1) @ X(2) - + (0.3535533905932738+0j) * Y(1) @ Y(2) - + 0.4330127018922193 * X(2) @ X(3) - + -0.4330127018922193j * X(2) @ Y(3) - + 0.4330127018922193j * Y(2) @ X(3) - + (0.4330127018922193+0j) * Y(2) @ Y(3) + ( + 0.25 * X(0) @ X(1) + + -0.25j * X(0) @ Y(1) + + 0.25j * Y(0) @ X(1) + + (0.25+0j) * Y(0) @ Y(1) + + 0.3535533905932738 * X(1) @ X(2) + + -0.3535533905932738j * X(1) @ Y(2) + + 0.3535533905932738j * Y(1) @ X(2) + + (0.3535533905932738+0j) * Y(1) @ Y(2) + + 0.4330127018922193 * X(2) @ X(3) + + -0.4330127018922193j * X(2) @ Y(3) + + 0.4330127018922193j * Y(2) @ X(3) + + (0.4330127018922193+0j) * Y(2) @ Y(3) + ) """ qubit_operator = _unary_mapping_dispatch(bose_operator, n_states, tol=tol) @@ -334,6 +338,17 @@ def christiansen_mapping( Returns: Union[PauliSentence, Operator]: A linear combination of qubit operators. + + **Example** + + >>> w = qml.bose.BoseWord({(0,0):"+", (1,1): "-"}) + >>> qml.christiansen_mapping(w) + ( + 0.25 * (X(0) @ X(1)) + + 0.25j * (X(0) @ Y(1)) + + -0.25j * (Y(0) @ X(1)) + + (0.25+0j) * (Y(0) @ Y(1)) + ) """ qubit_operator = _christiansen_mapping_dispatch(bose_operator, tol) diff --git a/pennylane/qchem/vibrational/localize_modes.py b/pennylane/qchem/vibrational/localize_modes.py index 1826d393f37..22966258693 100644 --- a/pennylane/qchem/vibrational/localize_modes.py +++ b/pennylane/qchem/vibrational/localize_modes.py @@ -195,6 +195,22 @@ def localize_normal_modes(freqs, vecs, bins=[2600]): - TensorLike[float] : localization matrix describing the relationship between original and localized modes. + **Example** + + >>> freqs = np.array([1326.66001461, 2297.26736859, 2299.65032901]) + >>> vectors = np.array([[[ 5.71518696e-18, -4.55642350e-01, 5.20920552e-01], + [ 1.13167924e-17, 4.55642350e-01, 5.20920552e-01], + [-1.23163569e-17, 5.09494945e-12, -3.27565762e-02]], + [[-4.53008817e-17, 4.90364125e-01, 4.90363894e-01], + [-1.98591028e-16, 4.90361513e-01, -4.90361744e-01], + [-2.78235498e-18, -3.08350419e-02, -6.75886679e-08]], + [[ 5.75393451e-17, 5.37047963e-01, 4.41957355e-01], + [ 6.53049347e-17, -5.37050348e-01, 4.41959740e-01], + [-5.49709883e-17, 7.49851221e-08, -2.77912798e-02]]]) + >>> freqs_loc, vecs_loc, uloc = qml.qchem.localize_normal_modes(freqs, vectors) + >>> freqs_loc + array([1332.62008773, 2296.73455892, 2296.7346082 ]) + """ if not bins: raise ValueError("The `bins` list cannot be empty.") diff --git a/pennylane/qchem/vibrational/vibrational_class.py b/pennylane/qchem/vibrational/vibrational_class.py index d8da57f4e8e..fb198c2b6e7 100644 --- a/pennylane/qchem/vibrational/vibrational_class.py +++ b/pennylane/qchem/vibrational/vibrational_class.py @@ -40,6 +40,28 @@ class VibrationalPES: 1, 2, or 3 for upto one-mode dipole, two-mode dipole and three-mode dipole, respectively. Default value is 1. + **Example** + + >>> freqs = np.array([0.01885397]) + >>> grid, weights = np.polynomial.hermite.hermgauss(9) + >>> pes_onebody = [[0.05235573, 0.03093067, 0.01501878, 0.00420778, 0.0, + 0.00584504, 0.02881817, 0.08483433, 0.22025702]] + >>> pes_twobody = None + >>> dipole_onebody = [[[-1.92201700e-16, 1.45397041e-16, -1.40451549e-01], + [-1.51005108e-16, 9.53185441e-17, -1.03377032e-01], + [-1.22793018e-16, 7.22781963e-17, -6.92825934e-02], + [-1.96537436e-16, -5.86686504e-19, -3.52245369e-02], + [ 0.00000000e+00, 0.00000000e+00, 0.00000000e+00], + [ 5.24758835e-17, -1.40650833e-16, 3.69955543e-02], + [-4.52407941e-17, 1.38406311e-16, 7.60888733e-02], + [-4.63820104e-16, 5.42928787e-17, 1.17726042e-01], + [ 1.19224372e-16, 9.12491386e-17, 1.64013197e-01]]] + >>> vib_obj = qml.qchem.VibrationalPES(freqs=freqs, grid=grid, gauss_weights=weights, + uloc = None, pes_data=[pes_onebody, pes_twobody], + dipole_data=[dipole_onebody], localized=False) + >>> vib_obj.freqs + array([0.01885397]) + """ def __init__( @@ -150,6 +172,17 @@ def optimize_geometry(molecule, method="rhf"): Returns: array[array[float]]: optimized atomic positions in Cartesian coordinates + **Example** + + >>> symbols = ['H', 'F'] + >>> geometry = np.array([[0.0, 0.0, 0.0], + [0.0, 0.0, 1.0]]) + >>> mol = qml.qchem.Molecule(symbols, geometry) + >>> eq_geom = qml.qchem.optimize_geometry(mol) + >>> eq_geom + array([[ 0. , 0. , -0.40277116], + [ 0. , 0. , 1.40277116]]) + """ pyscf = _import_pyscf() geometric = _import_geometric() From 5efeffbcbbd89e9ea90b3e4cf4c3a043e73cf053 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 8 Jan 2025 16:22:34 +0000 Subject: [PATCH 7/7] Daily rc sync to master (#6782) Co-authored-by: PietropaoloFrisoni Co-authored-by: Christina Lee Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Mudit Pandey Co-authored-by: ringo-but-quantum Co-authored-by: Andrija Paurevic <46359773+andrijapau@users.noreply.github.com> Co-authored-by: GitHub Actions Bot <> --- pennylane/devices/qubit/sampling.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pennylane/devices/qubit/sampling.py b/pennylane/devices/qubit/sampling.py index d8036a6fb99..06ae78b5708 100644 --- a/pennylane/devices/qubit/sampling.py +++ b/pennylane/devices/qubit/sampling.py @@ -330,7 +330,7 @@ def _process_single_shot(samples): prng_key=prng_key, ) except ValueError as e: - if str(e) != "probabilities contain NaN": + if "probabilities contain nan" not in str(e).lower(): raise e samples = qml.math.full((shots.total_shots, len(wires)), 0)