@@ -17,7 +17,7 @@ def validator_fixture() -> NativeGateValidator:
17
17
18
18
19
19
@pytest .fixture
20
- def circuit_with_3_cnot () -> Circuit :
20
+ def circuit_with_matching_gate_set () -> Circuit :
21
21
builder = CircuitBuilder (5 )
22
22
builder .H (0 )
23
23
builder .CNOT (0 , 1 )
@@ -31,7 +31,7 @@ def circuit_with_3_cnot() -> Circuit:
31
31
32
32
33
33
@pytest .fixture
34
- def circuit_with_4_cnot () -> Circuit :
34
+ def circuit_with_unmatching_gate_set () -> Circuit :
35
35
builder = CircuitBuilder (5 )
36
36
builder .H (0 )
37
37
builder .CNOT (0 , 1 )
@@ -43,13 +43,13 @@ def circuit_with_4_cnot() -> Circuit:
43
43
return builder .to_circuit ()
44
44
45
45
46
- def test_matching_gates (validator : NativeGateValidator , circuit_with_3_cnot : Circuit ) -> None :
46
+ def test_matching_gates (validator : NativeGateValidator , circuit_with_matching_gate_set : Circuit ) -> None :
47
47
try :
48
- validator .validate (circuit_with_3_cnot .ir )
48
+ validator .validate (circuit_with_matching_gate_set .ir )
49
49
except ValueError :
50
50
pytest .fail ("check() raised ValueError unexpectedly" )
51
51
52
52
53
- def test_non_matching_gates (validator : NativeGateValidator , circuit_with_4_cnot : Circuit ) -> None :
53
+ def test_non_matching_gates (validator : NativeGateValidator , circuit_with_unmatching_gate_set : Circuit ) -> None :
54
54
with pytest .raises (ValueError , match = "The following gates are not in the native gate set:.*" ):
55
- validator .validate (circuit_with_4_cnot .ir )
55
+ validator .validate (circuit_with_unmatching_gate_set .ir )
0 commit comments