Skip to content

Commit c175869

Browse files
committed
CZTargetGateset repr test
1 parent d3b90cb commit c175869

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

cirq-core/cirq/transformers/target_gatesets/cz_gateset_test.py

+21
Original file line numberDiff line numberDiff line change
@@ -300,3 +300,24 @@ class UnsupportedDummy(cirq.testing.TwoQubitGate):
300300
_ = cirq.optimize_for_target_gateset(
301301
circuit, gateset=cirq.CZTargetGateset(), ignore_failures=False
302302
)
303+
304+
305+
@pytest.mark.parametrize(
306+
'gateset',
307+
[
308+
cirq.CZTargetGateset(),
309+
cirq.CZTargetGateset(
310+
atol=1e-6,
311+
allow_partial_czs=True,
312+
additional_gates=[
313+
cirq.SQRT_ISWAP,
314+
cirq.XPowGate,
315+
cirq.YPowGate,
316+
cirq.GateFamily(cirq.ZPowGate, tags_to_accept=['test_tag']),
317+
],
318+
),
319+
cirq.CZTargetGateset(additional_gates=()),
320+
],
321+
)
322+
def test_repr(gateset):
323+
cirq.testing.assert_equivalent_repr(gateset)

0 commit comments

Comments
 (0)