Skip to content

Commit

Permalink
Merge branch 'master' into Deprecate_map_batch_transform
Browse files Browse the repository at this point in the history
  • Loading branch information
PietropaoloFrisoni committed May 14, 2024
2 parents fd473ef + be35a7b commit 3cf957d
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 6 deletions.
3 changes: 3 additions & 0 deletions doc/releases/changelog-dev.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,9 @@

<h3>Bug fixes 🐛</h3>

* Use vanilla NumPy arrays in `test_projector_expectation` to avoid differentiating `qml.Projector` with respect to the state attribute.
[(#5683)](https://github.com/PennyLaneAI/pennylane/pull/5683)

* `qml.Projector` is now compatible with jax-jit.
[(#5595)](https://github.com/PennyLaneAI/pennylane/pull/5595)

Expand Down
10 changes: 6 additions & 4 deletions pennylane/devices/tests/test_compare_default_qubit.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
"""Tests that a device gives the same output as the default device."""
import numpy as np

# pylint: disable=no-self-use,no-member
import pytest
from flaky import flaky
Expand Down Expand Up @@ -90,10 +92,10 @@ def workload():
[0, 1, 0, 0],
[0, 0, 1, 0],
[0, 0, 0, 1],
pnp.array([1, 1, 0, 0]) / pnp.sqrt(2),
pnp.array([0, 1, 0, 1]) / pnp.sqrt(2),
pnp.array([1, 1, 1, 0]) / pnp.sqrt(3),
pnp.array([1, 1, 1, 1]) / 2,
np.array([1, 1, 0, 0]) / np.sqrt(2),
np.array([0, 1, 0, 1]) / np.sqrt(2),
np.array([1, 1, 1, 0]) / np.sqrt(3),
np.array([1, 1, 1, 1]) / 2,
],
)
def test_projector_expectation(self, device, state, tol, benchmark):
Expand Down
2 changes: 1 addition & 1 deletion requirements-ci.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ autograd
toml
appdirs
semantic_version
autoray
autoray>=0.6.1,<0.6.10
matplotlib
requests
tomli # Drop once minimum Python version is 3.11
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ autograd~=1.4
toml~=0.10
appdirs~=1.4
semantic_version~=2.10
autoray>=0.6.1
autoray>=0.6.1,<0.6.10
matplotlib~=3.5
opt_einsum~=3.3
requests~=2.31.0
Expand Down

0 comments on commit 3cf957d

Please sign in to comment.