Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix regex pattern for exception thrown in tests #318

Merged
merged 7 commits into from
Jul 28, 2022
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,13 @@

### Bug fixes

* Test updates to reflect new additions to PennyLane.
[(#318)](https://github.com/PennyLaneAI/pennylane-lightning/pull/318)

### Contributors

This release contains contributions from (in alphabetical order):
Lee James O'Riordan

Amintor Dusko, Lee James O'Riordan

Expand Down
2 changes: 1 addition & 1 deletion pennylane_lightning/_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@
Version number (major.minor.patch[-label])
"""

__version__ = "0.25.0-dev3"
__version__ = "0.25.0-dev4"
5 changes: 4 additions & 1 deletion tests/test_apply.py
Original file line number Diff line number Diff line change
Expand Up @@ -506,7 +506,10 @@ def test_apply_errors_qubit_state_vector(self, qubit_device_2_wires):
with pytest.raises(ValueError, match="Sum of amplitudes-squared does not equal one."):
qubit_device_2_wires.apply([qml.QubitStateVector(np.array([1, -1]), wires=[0])])

with pytest.raises(ValueError, match=r"State vector must be of length 2\*\*wires."):
with pytest.raises(
ValueError,
match=r"State vector must have shape \(2\*\*wires,\) or \(batch_size, 2\*\*wires\).",
):
p = np.array([1, 0, 1, 1, 0]) / np.sqrt(3)
qubit_device_2_wires.apply([qml.QubitStateVector(p, wires=[0, 1])])

Expand Down