-
Notifications
You must be signed in to change notification settings - Fork 977
/
__init__.py
288 lines (242 loc) · 4.86 KB
/
__init__.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
# Copyright 2018 The Cirq Developers
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Types for representing and methods for manipulating circuit operation trees.
"""
from cirq.ops.arithmetic_operation import (
ArithmeticOperation,
)
from cirq.ops.clifford_gate import (
PauliTransform,
SingleQubitCliffordGate,
)
from cirq.ops.dense_pauli_string import (
BaseDensePauliString,
DensePauliString,
MutableDensePauliString,
)
from cirq.ops.common_channels import (
amplitude_damp,
AmplitudeDampingChannel,
asymmetric_depolarize,
AsymmetricDepolarizingChannel,
bit_flip,
BitFlipChannel,
depolarize,
DepolarizingChannel,
generalized_amplitude_damp,
GeneralizedAmplitudeDampingChannel,
phase_damp,
phase_flip,
PhaseDampingChannel,
PhaseFlipChannel,
reset,
reset_each,
ResetChannel,
)
from cirq.ops.common_gates import (
CNOT,
CNotPowGate,
cphase,
CX,
CXPowGate,
CZ,
CZPowGate,
H,
HPowGate,
Rx,
Ry,
Rz,
rx,
ry,
rz,
S,
T,
XPowGate,
YPowGate,
ZPowGate,
)
from cirq.ops.controlled_gate import (
ControlledGate,
)
from cirq.ops.diagonal_gate import (
DiagonalGate,
)
from cirq.ops.eigen_gate import (
EigenGate,
)
from cirq.ops.fourier_transform import (
PhaseGradientGate,
qft,
QuantumFourierTransformGate,
)
from cirq.ops.fsim_gate import (
FSimGate,
PhasedFSimGate,
)
from cirq.ops.gate_features import (
InterchangeableQubitsGate,
SingleQubitGate,
ThreeQubitGate,
TwoQubitGate,
)
from cirq.ops.gate_operation import (
GateOperation,
)
from cirq.ops.identity import (
I,
identity_each,
IdentityGate,
)
from cirq.ops.global_phase_op import (
GlobalPhaseOperation,
)
from cirq.ops.kraus_channel import (
KrausChannel,
)
from cirq.ops.linear_combinations import (
LinearCombinationOfGates,
LinearCombinationOfOperations,
PauliSum,
PauliSumLike,
)
from cirq.ops.mixed_unitary_channel import (
MixedUnitaryChannel,
)
from cirq.ops.pauli_sum_exponential import (
PauliSumExponential,
)
from cirq.ops.parallel_gate_operation import (
ParallelGateOperation,
)
from cirq.ops.projector import (
ProjectorString,
)
from cirq.ops.controlled_operation import (
ControlledOperation,
)
from cirq.ops.qubit_order import (
QubitOrder,
)
from cirq.ops.qubit_order_or_list import (
QubitOrderOrList,
)
from cirq.ops.matrix_gates import (
MatrixGate,
)
from cirq.ops.measure_util import (
measure,
measure_each,
)
from cirq.ops.measurement_gate import (
MeasurementGate,
)
from cirq.ops.moment import (
Moment,
)
from cirq.ops.named_qubit import (
NamedQubit,
NamedQid,
)
from cirq.ops.op_tree import (
flatten_op_tree,
freeze_op_tree,
flatten_to_ops,
flatten_to_ops_or_moments,
OP_TREE,
transform_op_tree,
)
from cirq.ops.parity_gates import (
XX,
XXPowGate,
YY,
YYPowGate,
ZZ,
ZZPowGate,
)
from cirq.ops.pauli_gates import (
Pauli,
X,
Y,
Z,
)
from cirq.ops.pauli_interaction_gate import (
PauliInteractionGate,
)
from cirq.ops.pauli_string import (
MutablePauliString,
PAULI_GATE_LIKE,
PAULI_STRING_LIKE,
PauliString,
SingleQubitPauliStringGateOperation,
)
from cirq.ops.pauli_string_phasor import (
PauliStringPhasor,
)
from cirq.ops.pauli_string_raw_types import (
PauliStringGateOperation,
)
from cirq.ops.permutation_gate import (
QubitPermutationGate,
)
from cirq.ops.phased_iswap_gate import (
givens,
PhasedISwapPowGate,
)
from cirq.ops.phased_x_gate import (
PhasedXPowGate,
)
from cirq.ops.phased_x_z_gate import (
PhasedXZGate,
)
from cirq.ops.random_gate_channel import (
RandomGateChannel,
)
from cirq.ops.raw_types import (
Gate,
Operation,
Qid,
TaggedOperation,
)
from cirq.ops.swap_gates import (
ISWAP,
ISwapPowGate,
riswap,
SQRT_ISWAP,
SQRT_ISWAP_INV,
SWAP,
SwapPowGate,
)
from cirq.ops.tags import (
VirtualTag,
)
from cirq.ops.three_qubit_gates import (
CCNOT,
CCNotPowGate,
CCX,
CCXPowGate,
CCZ,
CCZPowGate,
CSWAP,
CSwapGate,
FREDKIN,
ThreeQubitDiagonalGate,
TOFFOLI,
)
from cirq.ops.two_qubit_diagonal_gate import (
TwoQubitDiagonalGate,
)
from cirq.ops.wait_gate import (
wait,
WaitGate,
)