Skip to content

πŸ› [NA] Dropped Global Hadamard GateΒ #876

@ystade

Description

@ystade

System and Environment Information

MAC OS 15.6.1
MQT QMAP 3.4.0dev@9c84575

Bug Description

When compiling a circuit with a global Hadamard Gate, this is dropped and does not exist in the resulting output.

Steps to Reproduce

Run the following contract:

from qiskit import QuantumCircuit
from mqt.core import load

def global_h(num_qubits):
    """:returns: a global ry gate"""
    qc = QuantumCircuit(num_qubits)
    qc.h(range(num_qubits))
    return qc.to_gate(label="H")

qc = QuantumCircuit(5)
qc.append(global_h(5), range(5))
qc.draw(output="mpl")

circ = load(qc)
print(circ)

Got naviz:

atom (20.000, 9.000) atom0
atom (25.000, 9.000) atom1
atom (30.000, 9.000) atom2
atom (35.000, 9.000) atom3
atom (40.000, 9.000) atom4

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions