From 1c747fa4171491c112ca0a773c37ba910c01d8bf Mon Sep 17 00:00:00 2001 From: Astral Cai Date: Mon, 26 Aug 2024 14:14:43 -0400 Subject: [PATCH] fix failing test --- tests/test_apply.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_apply.py b/tests/test_apply.py index 1b9b02a..e8debff 100755 --- a/tests/test_apply.py +++ b/tests/test_apply.py @@ -294,12 +294,12 @@ def test_apply_errors_basis_state(self): dev = QulacsDevice(1) with pytest.raises( - ValueError, match="BasisState parameter must consist of 0 or 1 integers." + ValueError, match="Basis state must only consist of 0s and 1s" ): dev.apply([qml.BasisState(np.array([-0.2, 4.2]), wires=[0, 1])]) with pytest.raises( - ValueError, match="BasisState parameter and wires must be of equal length." + ValueError, match="State must be of length 1; got length 2" ): dev.apply([qml.BasisState(np.array([0, 1]), wires=[0])])