Skip to content

Commit

Permalink
Extend supported gate sets for qiskit conversion
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonas-Jaeger authored Nov 11, 2024
1 parent 6706586 commit ee04956
Showing 1 changed file with 6 additions and 0 deletions.
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

0 comments on commit ee04956

Please sign in to comment.