Skip to content

Commit 1898f78

Browse files
committed
more fixes
1 parent e178641 commit 1898f78

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

tests/test_pauli_string.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,20 @@
1-
import numpy as np
21
import pytest
32

43
import pauliengine as pe
54

65

76
@pytest.mark.parametrize(("pauli_string", "coeff", "expected_x", "expected_z"), [
8-
({0:"I", 1:"Z", 2:"X"}, 5.0, [3], [2]), # using dict input
9-
({10: 'Z', 2: 'X'}, 6.0, [2**10 + 2**3] , [2**10]), # using dict input with non-consecutive qubits
7+
({0:"I", 1:"Z", 2:"X"}, 5.0, [6], [2]), # using dict input
8+
({10: 'Z', 2: 'X'}, 6.0, [2**10 + 2**2] , [2**10]), # using dict input with non-consecutive qubits
109
])
1110
def test_pauli_string_valid_pauli_string_input(pauli_string, coeff, expected_x, expected_z):
1211
ps = pe.PauliString(pauli_string, coeff)
1312
# TODO: coeff is an Expression object, need to be exposed to Python somehow.
1413
# assert ps.coeff == coeff
1514
assert ps.x == expected_x
16-
assert ps.z == expected_z
15+
assert ps.y == expected_z
1716

18-
@pytest.xfail(reason="Currently, the PauliString constructor does not validate the input, but it should.")
17+
@pytest.mark.xfail
1918
@pytest.mark.parametrize("invalid_pauli_string", [
2019
{0: "A", 2: "B", 3: "Z"}, # invalid character
2120
{0: "i", 2: "z", 3: "y"}, # lowercase character

0 commit comments

Comments
 (0)