From 8b6e79188e4fcc79f139be717833ed11d46d9e94 Mon Sep 17 00:00:00 2001 From: "Lee J. O'Riordan" Date: Wed, 27 Jul 2022 09:43:24 -0400 Subject: [PATCH 1/6] Fix regex pattern for exception thrown --- tests/test_apply.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_apply.py b/tests/test_apply.py index e4f075348d..7d0ea112a4 100644 --- a/tests/test_apply.py +++ b/tests/test_apply.py @@ -506,7 +506,7 @@ 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])]) From 9fe7f6b49655b106f488dadcb6cf321dc7b858a0 Mon Sep 17 00:00:00 2001 From: Dev version update bot Date: Wed, 27 Jul 2022 13:44:36 +0000 Subject: [PATCH 2/6] Auto update version --- pennylane_lightning/_version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pennylane_lightning/_version.py b/pennylane_lightning/_version.py index 9fc7d267e8..2061c816d4 100644 --- a/pennylane_lightning/_version.py +++ b/pennylane_lightning/_version.py @@ -16,4 +16,4 @@ Version number (major.minor.patch[-label]) """ -__version__ = "0.25.0-dev3" +__version__ = "0.25.0-dev4" From 4a6f2f3ac79c323fec6e2fae32739527f683a4a4 Mon Sep 17 00:00:00 2001 From: "Lee J. O'Riordan" Date: Wed, 27 Jul 2022 09:45:25 -0400 Subject: [PATCH 3/6] Add changelog --- .github/CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/CHANGELOG.md b/.github/CHANGELOG.md index b12135199a..200fb0b7f8 100644 --- a/.github/CHANGELOG.md +++ b/.github/CHANGELOG.md @@ -16,6 +16,9 @@ ### 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): From 9fc343e7178dc8c4250cc2019a3035797709840f Mon Sep 17 00:00:00 2001 From: "Lee J. O'Riordan" Date: Wed, 27 Jul 2022 09:47:07 -0400 Subject: [PATCH 4/6] Change black version and update --- tests/test_apply.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/test_apply.py b/tests/test_apply.py index 7d0ea112a4..abe408ebc3 100644 --- a/tests/test_apply.py +++ b/tests/test_apply.py @@ -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 have shape \(2\*\*wires,\) or \(batch_size, 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])]) From e08c65f6e192dee4c6315795e9b2ce18edfc4753 Mon Sep 17 00:00:00 2001 From: Lee James O'Riordan Date: Thu, 28 Jul 2022 14:03:06 -0400 Subject: [PATCH 5/6] Update .github/CHANGELOG.md Co-authored-by: Chae-Yeun Park --- .github/CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/CHANGELOG.md b/.github/CHANGELOG.md index 200fb0b7f8..2c9dee4f52 100644 --- a/.github/CHANGELOG.md +++ b/.github/CHANGELOG.md @@ -22,6 +22,7 @@ ### Contributors This release contains contributions from (in alphabetical order): +Lee James O'Riordan Amintor Dusko, Lee James O'Riordan From e895e923bb244a72f304ae32e47e51a56fd5f1c9 Mon Sep 17 00:00:00 2001 From: Lee James O'Riordan Date: Thu, 28 Jul 2022 14:04:03 -0400 Subject: [PATCH 6/6] Undo double name addition --- .github/CHANGELOG.md | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/CHANGELOG.md b/.github/CHANGELOG.md index 2c9dee4f52..200fb0b7f8 100644 --- a/.github/CHANGELOG.md +++ b/.github/CHANGELOG.md @@ -22,7 +22,6 @@ ### Contributors This release contains contributions from (in alphabetical order): -Lee James O'Riordan Amintor Dusko, Lee James O'Riordan