Qiskit 2.0 incompability in layouts.py
Hi,
With the new qiskit 2.0 release, an error is thrown when importing this repo. I noticed that the error comes from an old import of BackendV1 from qiskit.providers.backend, which is no longer supported. Here is the error thrown, as well as a potential fix (remove dependencies on BackendV1).
Error in /mapomatic/layouts.py:35:
` 35 from qiskit.providers.backend import BackendV1, BackendV2
38 def matching_layouts(circ, cmap, strict_direction=True, call_limit=int(3e7)):
39 """Matching for a circuit onto a given topology (coupling map)
40
41 Parameters:
(...)
51 TypeError: Invalid type passed to cmap
52 """
ImportError: cannot import name 'BackendV1' from 'qiskit.providers.backend' (/Users/mlozano/Desktop/notebooks/venv/lib/python3.11/site-packages/qiskit/providers/backend.py)`
Potential fix (remove any dependencies on BackendV1):
from qiskit.providers.backend import BackendV2
Hope this helps, thanks!
Many thanks for highlighting this. It should be fixed when #77 is merged.