Skip to content

Upgrade backend to BackendV2 #44

@jselig-rigetti

Description

@jselig-rigetti

Without this change, the following error occurs when using a live backend with the example from the README:

qiskit.transpiler.exceptions.TranspilerError: 'Number of qubits greater than device.'

This is due to https://github.com/Qiskit/qiskit/blob/main/qiskit/compiler/transpiler.py#L485 not using the direct backend.coupling_map as it would if RigettiQCSBackend were based on BackendV2

A workaround for now is to call execute explicitly with the coupling_map argument like the following, as described in #43

job = execute(circuit, backend, shots=10, coupling_map=backend.coupling_map)

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