This release brings improved and tighter integration with Qiskit.
First of all, QMAP now natively supports mapping to Qiskit `Backend`s (such as `FakeLondon`, etc.).
In addition, QMAP now returns a Qiskit `QuantumCircuit` that explicitly contains layout information (how the original circuit's logical qubits are initially assigned to the device's physical ones) and measurements (indicating the output permutation of logical qubits).
python
from mqt import qmap
from qiskit import QuantumCircuit
from qiskit.providers.fake_provider import FakeLondon
qc = QuantumCircuit(3)
qc.h(0)
qc.cx(0, 1)
qc.cx(0, 2)
qc.measure_all()
qc_mapped, results = qmap.compile(qc, arch=FakeLondon())
This allows to conveniently verify the correctness of the resulting circuits using our [`mqt.qcec`](https://github.com/cda-tum/qcec) tool.
python
from mqt import qcec
result = qcec.verify(qc, qc_mapped)
print(result.equivalence())
Finally, QMAP is now also capable of parsing calibration data/properties from Qiskit `Backend`s or from Qiskit `BackendProperties`/`Target` objects themselves. While this information is currently not used in the mapping itself, it serves as a preparation for future developments.
When providing such properties, an architecture need not be defined necessarily as it is deduced from the calibration data.
python
from mqt import qmap
from qiskit import QuantumCircuit
from qiskit.providers.fake_provider import FakeLondon
qc = QuantumCircuit(3)
qc.h(0)
qc.cx(0, 1)
qc.cx(0, 2)
qc.measure_all()
props = FakeLondon().properties()
qc_mapped, results = qmap.compile(qc, arch=None, calibration=props)
What's Changed
* Architecture extensions by IsFairy in https://github.com/cda-tum/qmap/pull/62
* 🔧 Small Infrastructure Update by burgholzer in https://github.com/cda-tum/qmap/pull/74
* ✨ Native Support for Qiskit Backends by burgholzer in https://github.com/cda-tum/qmap/pull/75
* ✨ Portable Layout Information by burgholzer in https://github.com/cda-tum/qmap/pull/76
* 🐛 Fixed a bug in the Qiskit `Layout` import (cda-tum/qfr133)
* 🐛 Fixed a bug in the CNOT cancellation optimization pass (cda-tum/qfr134)
* 🐛 Fixed a bug where measurements in the heuristic mapper were not appended correctly (76)
**Full Changelog**: https://github.com/cda-tum/qmap/compare/v1.8.2...v1.9.0