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

Track PL new stateprep error message #1057

Merged
merged 5 commits into from
Aug 27, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
2 changes: 1 addition & 1 deletion .dep-versions
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ enzyme=v0.0.130

# For a custom PL version, update the package version here and at
# 'doc/requirements.txt
pennylane=0.38.0.dev21
pennylane=0.38.0.dev24

# For a custom LQ/LK version, update the package version here and at
# 'doc/requirements.txt'. Also, update the 'LIGHTNING_GIT_TAG' at
Expand Down
2 changes: 1 addition & 1 deletion doc/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ lxml_html_clean
--extra-index-url https://test.pypi.org/simple/
pennylane-lightning-kokkos==0.38.0-dev50
pennylane-lightning==0.38.0-dev50
pennylane==0.38.0.dev21
pennylane==0.38.0.dev24
7 changes: 3 additions & 4 deletions frontend/test/pytest/test_skip_initial_state_prep.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,11 +184,10 @@ class TestPossibleErrors:

def test_array_less_than_size_basis_state(self):
"""Test what happens when the array is less than the size required.
In PennyLane the error raised is a ValueError, but all errors
in Catalyst that happen during runtime are RuntimeErrors.
In PennyLane the error raised is a ValueError.
"""

with pytest.raises(RuntimeError, match="must be of equal length"):
with pytest.raises(ValueError, match="State must be of length 2; got length 1"):

@qml.qjit
@qml.qnode(qml.device("lightning.qubit", wires=2))
Expand All @@ -200,7 +199,7 @@ def example_circuit():

def test_different_shape_state_prep(self):
"""Test that the same error is raised"""
with pytest.raises(ValueError, match="State vector must have shape"):
with pytest.raises(ValueError, match="State must be of length 2; got length 1"):

@qml.qjit
@qml.qnode(qml.device("lightning.qubit", wires=2))
Expand Down
Loading