QuTech-Delft / OpenQL

OpenQL: A Portable Quantum Programming Framework for Quantum Accelerators. https://dl.acm.org/doi/10.1145/3474222
https://openql.readthedocs.io
Other
97 stars 44 forks source link

IR representation of virtual and real qubits is unnecessarily different and complicated #480

Open jvansomeren opened 1 year ago

jvansomeren commented 1 year ago

Virtual qubits represent qubits in the program, with arbitrary names and a structure matching their use in the program. Real qubits represent qubits in the target, with names matching the naming conventions of the target and a structure conforming to the topology of those qubits in the target. The mapper translates from the former ones to the latter ones. Other passes are not interested in their difference. A decomposer doesn't care about the qubit arguments to a gate to be virtual or real. For an optimizer such a difference is also a burden. So it is proposed to update the IR so that there is one kind of qubit and that differences between virtual and real qubits only appear in detailed attributes of this single kind of qubit. We could also revise that qubits could be structured in more-than-1 dimensional arrays at the virtual side and in general.