Skip to content

🐛 MQT→Qiskit exporter has no dispatch entry for OpType.v/OpType.vdg #2432

Description

@JMuff22

System and Environment Information

mqt.core 3.9.2

Bug Description

mqt.core.ir.QuantumComputation exposes v/vdg as gate methods (V = RX(π/2), V† = RX(-π/2)) and
MQT QMAP's router emits exactly this gate type when producing mapped circuits. However, mqt.core.plugins.qiskit.mqt_to_qiskit's internal _add_standard_operation dispatch has no case for OpType.v/OpType.vdg it falls through to an explicit raise TypeError(...) for any operation type
it doesn't recognize.

Steps to Reproduce

from mqt.core.ir import QuantumComputation
from mqt.core.plugins.qiskit import mqt_to_qiskit

qc = QuantumComputation(1)
qc.v(0)  # V = RX(pi/2)

print(mqt_to_qiskit(qc))

Output

Traceback (most recent call last):
  ...
  File ".../mqt/core/plugins/qiskit/mqt_to_qiskit.py", line 331, in _add_operation
    _add_standard_operation(circ, op, qubit_map)
  File ".../mqt/core/plugins/qiskit/mqt_to_qiskit.py", line 217, in _add_standard_operation
    raise TypeError(msg)
TypeError: Unsupported operation type: OpType.v

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

CoreAnything related to the Core library and IRfixFix for something that isn't workingpythonAnything related to Python code

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions