Qiskit / qiskit

Qiskit is an open-source SDK for working with quantum computers at the level of extended quantum circuits, operators, and primitives.
https://www.ibm.com/quantum/qiskit
Apache License 2.0
4.83k stars 2.29k forks source link

GenericBackendV2 should fail when the backend cannot allocate the basis gate because its size (backport #12653) #12667

Closed mergify[bot] closed 4 days ago

mergify[bot] commented 5 days ago

Summary

GenericBackendV2 should not accept backends that are too small for certain gates. The following examples should be rejected:

GenericBackendV2(num_qubits=1, basis_gates=["cx", "id"])

GenericBackendV2(num_qubits=2, basis_gates=["ccx", "id"])

@ElePT found this!


This is an automatic backport of pull request #12653 done by Mergify.

qiskit-bot commented 5 days ago

Thank you for opening a new pull request.

Before your PR can be merged it will first need to pass continuous integration tests and be reviewed. Sometimes the review process can be slow, so please be patient.

While you're waiting, please feel free to review other open PRs. While only a subset of people are authorized to approve pull requests for merging, everyone is encouraged to review open pull requests. Doing reviews helps reduce the burden on the core team and helps make the project's code better for everyone.

One or more of the following people are relevant to this code:

coveralls commented 5 days ago

Pull Request Test Coverage Report for Build 9676645295

Details


Files with Coverage Reduction New Missed Lines %
qiskit/transpiler/passes/synthesis/unitary_synthesis.py 2 88.2%
crates/qasm2/src/lex.rs 4 92.62%
crates/qasm2/src/parse.rs 6 97.61%
<!-- Total: 12 -->
Totals Coverage Status
Change from base Build 9663344566: 0.02%
Covered Lines: 61831
Relevant Lines: 68751

💛 - Coveralls