Skip to content

Commit

Permalink
Remove deprecated merge_single_qubit optimizer (quantumlib#5725)
Browse files Browse the repository at this point in the history
- This optimizer has moved to transformers.
  • Loading branch information
dstrain115 authored and rht committed May 1, 2023
1 parent e725409 commit 507057b
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 336 deletions.
3 changes: 0 additions & 3 deletions cirq-core/cirq/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -336,11 +336,8 @@
EjectPhasedPaulis,
EjectZ,
ExpandComposite,
merge_single_qubit_gates_into_phased_x_z,
merge_single_qubit_gates_into_phxz,
MergeInteractions,
MergeInteractionsToSqrtIswap,
MergeSingleQubitGates,
SynchronizeTerminalMeasurements,
)

Expand Down
6 changes: 0 additions & 6 deletions cirq-core/cirq/optimizers/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,6 @@

from cirq.optimizers.merge_interactions_to_sqrt_iswap import MergeInteractionsToSqrtIswap

from cirq.optimizers.merge_single_qubit_gates import (
merge_single_qubit_gates_into_phased_x_z,
merge_single_qubit_gates_into_phxz,
MergeSingleQubitGates,
)

from cirq.optimizers.synchronize_terminal_measurements import SynchronizeTerminalMeasurements

from cirq.transformers.analytical_decompositions import (
Expand Down
136 changes: 0 additions & 136 deletions cirq-core/cirq/optimizers/merge_single_qubit_gates.py

This file was deleted.

186 changes: 0 additions & 186 deletions cirq-core/cirq/optimizers/merge_single_qubit_gates_test.py

This file was deleted.

1 change: 0 additions & 1 deletion cirq-core/cirq/protocols/json_test_data/spec.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@
'MEASUREMENT_KEY_SEPARATOR',
'MergeInteractions',
'MergeInteractionsToSqrtIswap',
'MergeSingleQubitGates',
'PointOptimizer',
'SynchronizeTerminalMeasurements',
# Transformers
Expand Down
8 changes: 4 additions & 4 deletions cirq-core/cirq/transformers/merge_single_qubit_gates_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def assert_optimizes(optimized: cirq.AbstractCircuit, expected: cirq.AbstractCir
cirq.testing.assert_same_circuits(optimized, expected)


def test_merge_single_qubit_gates_into_phased_x_z():
def test_merge_single_qubit_gates_to_phased_x_and_z():
a, b = cirq.LineQubit.range(2)
c = cirq.Circuit(
cirq.X(a),
Expand All @@ -54,7 +54,7 @@ def test_merge_single_qubit_gates_into_phased_x_z():
)


def test_merge_single_qubit_gates_into_phased_x_z_deep():
def test_merge_single_qubit_gates_to_phased_x_and_z_deep():
a = cirq.NamedQubit("a")
c_nested = cirq.FrozenCircuit(cirq.H(a), cirq.Z(a), cirq.H(a).with_tags("ignore"))
c_nested_merged = cirq.FrozenCircuit(
Expand Down Expand Up @@ -85,7 +85,7 @@ def _phxz(a: float, x: float, z: float):
return cirq.PhasedXZGate(axis_phase_exponent=a, x_exponent=x, z_exponent=z)


def test_merge_single_qubit_gates_into_phxz():
def test_merge_single_qubit_gates_to_phxz():
a, b = cirq.LineQubit.range(2)
c = cirq.Circuit(
cirq.X(a),
Expand All @@ -109,7 +109,7 @@ def test_merge_single_qubit_gates_into_phxz():
)


def test_merge_single_qubit_gates_into_phxz_deep():
def test_merge_single_qubit_gates_to_phxz_deep():
a = cirq.NamedQubit("a")
c_nested = cirq.FrozenCircuit(cirq.H(a), cirq.Z(a), cirq.H(a).with_tags("ignore"))
c_nested_merged = cirq.FrozenCircuit(_phxz(-0.5, 0.5, 0).on(a), cirq.H(a).with_tags("ignore"))
Expand Down

0 comments on commit 507057b

Please sign in to comment.