Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove CXCancellation (deprecated in 1.1) #13426

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions qiskit/transpiler/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,11 +107,10 @@

import numpy as np
from qiskit.providers.fake_provider import GenericBackendV2
from qiskit.circuit.library import HGate, PhaseGate, RXGate, TdgGate, TGate, XGate
from qiskit.circuit.library import HGate, PhaseGate, RXGate, TdgGate, TGate, XGate, CXGate
from qiskit.transpiler import PassManager, generate_preset_pass_manager
from qiskit.transpiler.passes import (
ALAPScheduleAnalysis,
CXCancellation,
InverseCancellation,
PadDynamicalDecoupling,
)
Expand All @@ -132,7 +131,7 @@
]
logical_opt = PassManager(
[
CXCancellation(),
InverseCancellation([CXGate()]),
InverseCancellation(inverse_gate_list),
]
)
Expand Down
2 changes: 0 additions & 2 deletions qiskit/transpiler/passes/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@
CollectLinearFunctions
CollectCliffords
ConsolidateBlocks
CXCancellation
InverseCancellation
CommutationAnalysis
CommutativeCancellation
Expand Down Expand Up @@ -230,7 +229,6 @@
from .optimization import CommutationAnalysis
from .optimization import CommutativeCancellation
from .optimization import CommutativeInverseCancellation
from .optimization import CXCancellation
from .optimization import Optimize1qGatesSimpleCommutation
from .optimization import OptimizeSwapBeforeMeasure
from .optimization import RemoveResetInZeroState
Expand Down
1 change: 0 additions & 1 deletion qiskit/transpiler/passes/optimization/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
from .commutation_analysis import CommutationAnalysis
from .commutative_cancellation import CommutativeCancellation
from .commutative_inverse_cancellation import CommutativeInverseCancellation
from .cx_cancellation import CXCancellation
from .optimize_1q_commutation import Optimize1qGatesSimpleCommutation
from .optimize_swap_before_measure import OptimizeSwapBeforeMeasure
from .remove_reset_in_zero_state import RemoveResetInZeroState
Expand Down
65 changes: 0 additions & 65 deletions qiskit/transpiler/passes/optimization/cx_cancellation.py

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
upgrade_transpiler:
- |
The pass ``qiskit.transpiler.passes.CXCancellation`` was removed. It was deprecated in favor of
class:`.InverseCancellation`, which is more generic.
``CXCancellation`` is fully semantically equivalent to ``InverseCancellation([CXGate()])``.
199 changes: 0 additions & 199 deletions test/python/transpiler/test_cx_cancellation.py

This file was deleted.

Loading
Loading