qiskit-community / qiskit-community/mapomatic

Add support for BackendV2

Open
#53 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
64
Forks
17
PR merge metrics
No merged PRs in 30d

Description

import mapomatic
from qiskit import QuantumCircuit, transpile
from qiskit.providers.fake_provider import FakeBelemV2

qc = QuantumCircuit(5)
qc.h(0)
qc.cx(0, 1)
qc.cx(0, 2)
qc.cx(0, 3)
qc.cx(0, 4)
qc.measure_all()

backend = FakeBelemV2()
trans_qc = transpile(qc, backend)

print(mapomatic.best_overall_layout(trans_qc, [backend]))
Traceback (most recent call last):
  File "/home/kevinsung/projects/scratch/mapomatic-backendv2.py", line 16, in <module>
    print(mapomatic.best_overall_layout(trans_qc, [backend]))
  File "/home/kevinsung/projects/mapomatic/mapomatic/layouts.py", line 190, in best_overall_layout
    config = backend.configuration()
AttributeError: 'FakeBelemV2' object has no attribute 'configuration'

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in mapomatic/layouts.py at best_overall_layout, then reproduce the issue with the provided FakeBelemV2 example. Done means the example no longer raises AttributeError for the missing configuration method and BackendV2 is supported.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
compilers
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.