Skip to content

Commit 01ae51e

Browse files
authored
Move optimizers/two_qubit_state_preparation.py to transformers/analytical_decompositions/two_qubit_state_preparation.py (#4762)
Part of #4722 This is safe to do without going through a deprecation cycle because `optimizers/two_qubit_state_preparation.py ` was recently introduced (#4707) in the current dev version and hasn't been released yet.
1 parent 9581e65 commit 01ae51e

File tree

6 files changed

+27
-7
lines changed

6 files changed

+27
-7
lines changed

cirq-core/cirq/__init__.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -346,8 +346,6 @@
346346
MergeInteractions,
347347
MergeInteractionsToSqrtIswap,
348348
MergeSingleQubitGates,
349-
prepare_two_qubit_state_using_cz,
350-
prepare_two_qubit_state_using_sqrt_iswap,
351349
single_qubit_matrix_to_gates,
352350
single_qubit_matrix_to_pauli_rotations,
353351
single_qubit_matrix_to_phased_x_z,
@@ -367,6 +365,8 @@
367365
map_operations_and_unroll,
368366
merge_moments,
369367
merge_operations,
368+
prepare_two_qubit_state_using_cz,
369+
prepare_two_qubit_state_using_sqrt_iswap,
370370
unroll_circuit_op,
371371
unroll_circuit_op_greedy_earliest,
372372
unroll_circuit_op_greedy_frontier,

cirq-core/cirq/optimizers/__init__.py

-5
Original file line numberDiff line numberDiff line change
@@ -72,11 +72,6 @@
7272
MergeSingleQubitGates,
7373
)
7474

75-
from cirq.optimizers.two_qubit_state_preparation import (
76-
prepare_two_qubit_state_using_cz,
77-
prepare_two_qubit_state_using_sqrt_iswap,
78-
)
79-
8075
from cirq.optimizers.decompositions import (
8176
is_negligible_turn,
8277
single_qubit_matrix_to_gates,

cirq-core/cirq/transformers/__init__.py

+5
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@
1414

1515
"""Circuit transformation utilities."""
1616

17+
from cirq.transformers.analytical_decompositions import (
18+
prepare_two_qubit_state_using_cz,
19+
prepare_two_qubit_state_using_sqrt_iswap,
20+
)
21+
1722
from cirq.transformers.transformer_primitives import (
1823
map_moments,
1924
map_operations,
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Copyright 2021 The Cirq Developers
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# https://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
"""Utilities for analytical decomposition of cirq gates."""
16+
17+
from cirq.transformers.analytical_decompositions.two_qubit_state_preparation import (
18+
prepare_two_qubit_state_using_cz,
19+
prepare_two_qubit_state_using_sqrt_iswap,
20+
)

0 commit comments

Comments
 (0)