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
5.28k stars 2.37k forks source link

Fully port `GatesInBasis` to Rust. #13034

Closed kevinhartman closed 1 month ago

kevinhartman commented 2 months ago

Summary

Ports GatesInBasis to Rust. The implementation avoids the prior conversion to DAGCircuit for each control flow block, which should help with performance.

Details and comments

Additional changes:

Includes some changes from #13056, #13013 and ~#13006~ which ought to merge first.

Resolves #12275

qiskit-bot commented 2 months ago

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

coveralls commented 2 months ago

Pull Request Test Coverage Report for Build 11058624835

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details


Changes Missing Coverage Covered Lines Changed/Added Lines %
crates/circuit/src/dag_circuit.rs 4 5 80.0%
<!-- Total: 89 90 98.89% -->
Files with Coverage Reduction New Missed Lines %
qiskit/transpiler/passes/layout/disjoint_utils.py 1 96.83%
qiskit/circuit/instruction.py 4 95.31%
crates/qasm2/src/lex.rs 5 92.73%
crates/qasm2/src/parse.rs 6 97.61%
qiskit/transpiler/passes/basis/basis_translator.py 8 97.45%
qiskit/transpiler/preset_passmanagers/builtin_plugins.py 11 96.46%
crates/circuit/src/dag_circuit.rs 17 87.84%
qiskit/circuit/equivalence.py 24 27.27%
qiskit/circuit/quantumcircuit.py 97 93.33%
<!-- Total: 173 -->
Totals Coverage Status
Change from base Build 10947873036: 0.05%
Covered Lines: 74015
Relevant Lines: 83306

💛 - Coveralls