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

Add clifford gates to collect_cliffords (backport #12750) #12763

Merged
merged 3 commits into from
Jul 11, 2024
Merged
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
21 changes: 6 additions & 15 deletions qiskit/transpiler/passes/optimization/collect_cliffords.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
)

from qiskit.quantum_info.operators import Clifford
from qiskit.quantum_info.operators.symplectic.clifford_circuits import _BASIS_1Q, _BASIS_2Q


class CollectCliffords(CollectAndCollapse):
Expand Down Expand Up @@ -69,21 +70,11 @@ def __init__(
)


clifford_gate_names = [
"x",
"y",
"z",
"h",
"s",
"sdg",
"cx",
"cy",
"cz",
"swap",
"clifford",
"linear_function",
"pauli",
]
clifford_gate_names = (
list(_BASIS_1Q.keys())
+ list(_BASIS_2Q.keys())
+ ["clifford", "linear_function", "pauli", "permutation"]
)


def _is_clifford_gate(node):
Expand Down
6 changes: 6 additions & 0 deletions releasenotes/notes/fix-collect-clifford-83af26d98b8c69e8.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
fixes:
- |
Add more Clifford gates to the :class:`.CollectCliffords()` transpiler pass.
In particular, we have added the gates :class:`ECRGate()`, :class:`DCXGate()`,
:class:`iSWAPGate()`, :class:`SXGate()` and :class:`SXdgGate()` to this transpiler pass.
Loading