Skip to content

mqt-bench==2.2.3 introduces circuits with control flow operations #2

Description

@thierry-martinez

New release mqt-bench==2.2.3 introduces circuits with control flow operations (DYNAMIC_QFT and IQPE) that make tests fail.

Backtrace:

tests/test_benchmark.py:25: in verify_benchmark
    qiskit_data = Statevector_qiskit(qc_clean).data  # numpy array of complex amplitudes
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.venv/lib/python3.13/site-packages/qiskit/quantum_info/states/statevector.py:101: in __init__
    self._data = Statevector.from_instruction(data).data
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.venv/lib/python3.13/site-packages/qiskit/quantum_info/states/statevector.py:841: in from_instruction
    instruction = instruction.to_instruction()
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.venv/lib/python3.13/site-packages/qiskit/circuit/quantumcircuit.py:3795: in to_instruction
    return circuit_to_instruction(self, parameter_map, label=label)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
circuit = <qiskit.circuit.quantumcircuit.QuantumCircuit object at 0x7c5997cc26d0>, parameter_map = None, equivalence_library = None, label = None

    def circuit_to_instruction(circuit, parameter_map=None, equivalence_library=None, label=None):
[...]
E           qiskit.exceptions.QiskitError: 'Circuits with control flow operations cannot be converted to an instruction.'

.venv/lib/python3.13/site-packages/qiskit/converters/circuit_to_instruction.py:88: QiskitError

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions