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

Extend supported gate sets for qiskit conversion #303

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
6 changes: 6 additions & 0 deletions bqskit/ext/qiskit/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
from bqskit.ir.gates.constant.cz import CZGate
from bqskit.ir.gates.constant.sx import SXGate
from bqskit.ir.gates.constant.x import XGate
from bqskit.ir.gates.constant import IdentityGate
from bqskit.ir.gates.constant import ECRGate
from bqskit.ir.gates.parameterized import RZGate
from bqskit.ir.gates.parameterized.u1 import U1Gate
from bqskit.ir.gates.parameterized.u2 import U2Gate
Expand All @@ -35,6 +37,8 @@ def _basis_gate_str_to_bqskit_gate(basis_gates: list[str]) -> set[Gate]:
gate_set.add(CNOTGate())
elif basis_gate == 'cz':
gate_set.add(CZGate())
elif basis_gate == 'ecr':
gate_set.add(ECRGate())
elif basis_gate == 'u3':
gate_set.add(U3Gate())
elif basis_gate == 'u2':
Expand All @@ -49,4 +53,6 @@ def _basis_gate_str_to_bqskit_gate(basis_gates: list[str]) -> set[Gate]:
gate_set.add(SXGate())
elif basis_gate == 'p':
gate_set.add(RZGate())
elif basis_gate == 'id':
gate_set.add(IdentityGate())
return gate_set
Loading