@@ -35,7 +35,9 @@ def _test_processor(processor: cg.engine.abstract_processor.AbstractProcessor):
35
35
circuit = cirq .Circuit (cirq .X (bad_qubit ), cirq .measure (bad_qubit ))
36
36
with pytest .raises (ValueError , match = 'Qubit not on device' ):
37
37
_ = processor .run (circuit , repetitions = 100 )
38
- circuit = cirq .Circuit (cirq .H (good_qubit ), cirq .measure (good_qubit ))
38
+ circuit = cirq .Circuit (
39
+ cirq .testing .DoesNotSupportSerializationGate ()(good_qubit ), cirq .measure (good_qubit )
40
+ )
39
41
with pytest .raises (ValueError , match = 'Cannot serialize op' ):
40
42
_ = processor .run (circuit , repetitions = 100 )
41
43
@@ -195,7 +197,9 @@ def test_create_default_noisy_quantum_virtual_machine():
195
197
with pytest .raises (ValueError , match = 'Qubit not on device' ):
196
198
_ = processor .run (circuit , repetitions = 100 )
197
199
good_qubit = cirq .GridQubit (5 , 4 )
198
- circuit = cirq .Circuit (cirq .H (good_qubit ), cirq .measure (good_qubit ))
200
+ circuit = cirq .Circuit (
201
+ cirq .testing .DoesNotSupportSerializationGate ()(good_qubit ), cirq .measure (good_qubit )
202
+ )
199
203
with pytest .raises (ValueError , match = '.* contains a gate which is not supported.' ):
200
204
_ = processor .run (circuit , repetitions = 100 )
201
205
device_specification = processor .get_device_specification ()
0 commit comments