Skip to content

馃悰 [NA] Dropped Global Hadamard Gate#876

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
from mqt.qmap.na.zoned import RoutingAgnosticCompiler, RoutingAwareCompiler
from mqt.qmap.na.zoned import ZonedNeutralAtomArchitecture

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))

circ = load(qc)

arch = ZonedNeutralAtomArchitecture.from_json_string("""{
   "name": "Architecture with one entanglement and one storage zone",
   "operation_duration": {"rydberg_gate": 0.36, "single_qubit_gate": 52, "atom_transfer": 15},
   "operation_fidelity": {"rydberg_gate": 0.995, "single_qubit_gate": 0.9997, "atom_transfer": 0.999},
   "qubit_spec": {"T": 1.5e6},
   "storage_zones": [{
     "zone_id": 0,
     "slms": [{"id": 0, "site_separation": [3, 3], "r": 20, "c": 100, "location": [0, 0]}],
     "offset": [0, 0],
     "dimension": [297, 57]
   }],
   "entanglement_zones": [{
     "zone_id": 0,
     "slms": [
       {"id": 1, "site_separation": [12, 10], "r": 7, "c": 20, "location": [35, 67]},
       {"id": 2, "site_separation": [12, 10], "r": 7, "c": 20, "location": [37, 67]}
     ],
     "offset": [35, 67],
     "dimension": [230, 60]
   }],
   "aods": [{"id": 0, "site_separation": 2, "r": 100, "c": 100}],
   "rydberg_range": [[[30, 62], [270, 132]]]
 }""")

compiler = RoutingAwareCompiler(arch)

code = compiler.compile(circ)
print(code)

Got naviz:

atom (0.000, 57.000) atom0
atom (3.000, 57.000) atom1
atom (6.000, 57.000) atom2
atom (9.000, 57.000) atom3
atom (12.000, 57.000) atom4

Activity

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

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