Skip to content

Commit

Permalink
Merge branch 'master' into prod-accepts-qfunc
Browse files Browse the repository at this point in the history
  • Loading branch information
timmysilv committed May 3, 2023
2 parents cd04baf + c3206fc commit 43561e4
Show file tree
Hide file tree
Showing 29 changed files with 56 additions and 2,388 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/tests-gpu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ concurrency:
cancel-in-progress: true

env:
TORCH_VERSION: 1.13.0
TORCH_VERSION: 2.0.0

jobs:
gpu-tests:
Expand Down Expand Up @@ -69,7 +69,7 @@ jobs:
- name: Setup Python virtual environment
id: setup_venv
env:
VENV_NAME: venv_${{ steps.setup_python.outputs.python-version }}_${{ github.sha }}
VENV_NAME: ${{ github.workspace }}/venv_${{ steps.setup_python.outputs.python-version }}_${{ github.sha }}
run: |
# Clear any pre-existing venvs
rm -rf venv_*
Expand Down Expand Up @@ -97,7 +97,7 @@ jobs:
- name: Install Torch
run: |
python -m pip install torch==${{ env.TORCH_VERSION }} -f https://download.pytorch.org/whl/cu113/torch_stable.html
python -m pip install --no-cache-dir torch==${{ env.TORCH_VERSION }} -f https://download.pytorch.org/whl/cu118/torch_stable.html
- name: Install PennyLane
run: |
Expand All @@ -120,3 +120,4 @@ jobs:
rm -rf .git
rm -rf .gitignore
rm -rf .github
pip cache purge
19 changes: 10 additions & 9 deletions doc/development/deprecations.rst
Original file line number Diff line number Diff line change
Expand Up @@ -57,23 +57,24 @@ Pending deprecations
some_qfunc(params)
return qml.expval(Hamiltonian)
* The ``collections`` module has been deprecated.
- Deprecated in v0.29
- Will be removed in v0.31
Completed deprecation cycles
----------------------------

* ``qml.op_sum``` is deprecated. Users should use ``qml.sum`` instead.
* The ``qml.utils.sparse_hamiltonian`` function is deprecated. ``~.Hamiltonian.sparse_matrix`` should be used instead.

- Deprecated in v0.29.
- Will be removed in v0.31.
- Deprecated in v0.29
- Removed in v0.31

* The ``qml.utils.sparse_hamiltonian`` function is deprecated. ``~.Hamiltonian.sparse_matrix`` should be used instead.
* The ``collections`` module has been deprecated.

- Deprecated in v0.29
- Removed in v0.31

Completed deprecation cycles
----------------------------
* ``qml.op_sum``` is deprecated. Users should use ``qml.sum`` instead.

- Deprecated in v0.29.
- Removed in v0.31.

* ``Evolution`` now adds a ``-1`` to the input parameter. Beforehand, the minus sign was not included.

Expand Down
17 changes: 16 additions & 1 deletion doc/releases/changelog-dev.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@

<h3>Improvements 🛠</h3>

* An error is now raised by `qchem.molecular_hamiltonian` when the `dhf` method is used for an
open-shell system. This duplicates a similar error in `qchem.Molecule` but makes it easier to
inform the users that the `pyscf` backend can be used for open-shell calculations.
[(4058)](https://github.com/PennyLaneAI/pennylane/pull/4058)

* Added a `shots` property to `QuantumScript`. This will allow shots to be tied to executions instead of devices more
concretely.
[(#4067)](https://github.com/PennyLaneAI/pennylane/pull/4067)
Expand All @@ -18,16 +23,26 @@

<h3>Breaking changes 💔</h3>

* `pennylane.collections`, `pennylane.op_sum`, and `pennylane.utils.sparse_hamiltonian` are removed.

<h3>Deprecations 👋</h3>

<h3>Documentation 📝</h3>

* The description of `mult` in the `qchem.Molecule` docstring now correctly states the value
of `mult` that is supported.
[(4058)](https://github.com/PennyLaneAI/pennylane/pull/4058)

<h3>Bug fixes 🐛</h3>

<h3>Contributors ✍️</h3>

This release contains contributions from (in alphabetical order):

Isaac De Vlugt,
Soran Jahangiri,
Christina Lee,
Mudit Pandey,
Matthew Silverman,
Jay Soni,
Jay Soni

4 changes: 1 addition & 3 deletions pennylane/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
shadow_expval,
)
from pennylane.ops import *
from pennylane.ops import adjoint, ctrl, exp, sum, pow, prod, s_prod, op_sum
from pennylane.ops import adjoint, ctrl, exp, sum, pow, prod, s_prod
from pennylane.templates import broadcast, layer
from pennylane.templates.embeddings import *
from pennylane.templates.layers import *
Expand Down Expand Up @@ -106,8 +106,6 @@
import pennylane.data
import pennylane.pulse

# collections needs to be imported after all other pennylane imports
from .collections import QNodeCollection, map
import pennylane.gradients # pylint:disable=wrong-import-order
import pennylane.qinfo # pylint:disable=wrong-import-order
from pennylane.interfaces import execute # pylint:disable=wrong-import-order
Expand Down
23 changes: 0 additions & 23 deletions pennylane/collections/__init__.py

This file was deleted.

60 changes: 0 additions & 60 deletions pennylane/collections/apply.py

This file was deleted.

158 changes: 0 additions & 158 deletions pennylane/collections/dot.py

This file was deleted.

Loading

0 comments on commit 43561e4

Please sign in to comment.