Skip to content

Commit

Permalink
Move optimizers/two_qubit_state_preparation.py to `transformers/ana…
Browse files Browse the repository at this point in the history
…lytical_decompositions/two_qubit_state_preparation.py` (quantumlib#4762)

Part of quantumlib#4722

This is safe to do without going through a deprecation cycle because `optimizers/two_qubit_state_preparation.py ` was recently introduced (quantumlib#4707) in the current dev version and hasn't been released yet.
  • Loading branch information
tanujkhattar authored and MichaelBroughton committed Jan 22, 2022
1 parent b43435e commit 67edecc
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 7 deletions.
4 changes: 2 additions & 2 deletions cirq-core/cirq/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -345,8 +345,6 @@
MergeInteractions,
MergeInteractionsToSqrtIswap,
MergeSingleQubitGates,
prepare_two_qubit_state_using_cz,
prepare_two_qubit_state_using_sqrt_iswap,
single_qubit_matrix_to_gates,
single_qubit_matrix_to_pauli_rotations,
single_qubit_matrix_to_phased_x_z,
Expand All @@ -366,6 +364,8 @@
map_operations_and_unroll,
merge_moments,
merge_operations,
prepare_two_qubit_state_using_cz,
prepare_two_qubit_state_using_sqrt_iswap,
unroll_circuit_op,
unroll_circuit_op_greedy_earliest,
unroll_circuit_op_greedy_frontier,
Expand Down
5 changes: 0 additions & 5 deletions cirq-core/cirq/optimizers/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,6 @@
MergeSingleQubitGates,
)

from cirq.optimizers.two_qubit_state_preparation import (
prepare_two_qubit_state_using_cz,
prepare_two_qubit_state_using_sqrt_iswap,
)

from cirq.optimizers.decompositions import (
is_negligible_turn,
single_qubit_matrix_to_gates,
Expand Down
5 changes: 5 additions & 0 deletions cirq-core/cirq/transformers/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@

"""Circuit transformation utilities."""

from cirq.transformers.analytical_decompositions import (
prepare_two_qubit_state_using_cz,
prepare_two_qubit_state_using_sqrt_iswap,
)

from cirq.transformers.transformer_primitives import (
map_moments,
map_operations,
Expand Down
20 changes: 20 additions & 0 deletions cirq-core/cirq/transformers/analytical_decompositions/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Copyright 2021 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.

"""Utilities for analytical decomposition of cirq gates."""

from cirq.transformers.analytical_decompositions.two_qubit_state_preparation import (
prepare_two_qubit_state_using_cz,
prepare_two_qubit_state_using_sqrt_iswap,
)

0 comments on commit 67edecc

Please sign in to comment.