@@ -89,11 +89,9 @@ def make_transformer_func(add_support_for_deep: bool = False) -> cirq.TRANSFORME
89
89
def mock_tranformer_func (
90
90
circuit : cirq .AbstractCircuit , * , context : Optional [cirq .TransformerContext ] = None
91
91
) -> cirq .Circuit :
92
- print ("CALLED:" , circuit , context , sep = "\n \n ----------\n \n " )
93
92
my_mock (circuit , context )
94
93
return circuit .unfreeze ()
95
94
96
- # mock_transformer = mock_tranformer_func(add_support_for_deep)
97
95
mock_tranformer_func .mock = my_mock # type: ignore
98
96
return mock_tranformer_func
99
97
@@ -141,9 +139,6 @@ def test_transformer_decorator_with_defaults(transformer):
141
139
transformer .mock .assert_called_with (circuit , context , 1e-2 , CustomArg (12 ))
142
140
143
141
144
- # from unittest.mock import patch, call
145
-
146
-
147
142
@pytest .mark .parametrize (
148
143
'transformer, supports_deep' ,
149
144
[
@@ -154,9 +149,9 @@ def test_transformer_decorator_with_defaults(transformer):
154
149
],
155
150
)
156
151
def test_transformer_decorator_adds_support_for_deep (transformer , supports_deep ):
157
- q1 , q2 = cirq .LineQubit . range ( 2 )
158
- c_nested_x = cirq .FrozenCircuit (cirq .X (q1 ))
159
- c_nested_y = cirq .FrozenCircuit (cirq .Y (q1 ))
152
+ q = cirq .NamedQubit ( "q" )
153
+ c_nested_x = cirq .FrozenCircuit (cirq .X (q ))
154
+ c_nested_y = cirq .FrozenCircuit (cirq .Y (q ))
160
155
c_nested_xy = cirq .FrozenCircuit (
161
156
cirq .CircuitOperation (c_nested_x ).repeat (5 ).with_tags ("ignore" ),
162
157
cirq .CircuitOperation (c_nested_y ).repeat (7 ).with_tags ("preserve_tag" ),
0 commit comments