Open ElePT opened 6 days ago
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.
Changes Missing Coverage | Covered Lines | Changed/Added Lines | % | ||
---|---|---|---|---|---|
qiskit/circuit/quantumcircuit.py | 4 | 8 | 50.0% | ||
crates/circuit/src/operations.rs | 260 | 291 | 89.35% | ||
<!-- | Total: | 318 | 353 | 90.08% | --> |
Files with Coverage Reduction | New Missed Lines | % | ||
---|---|---|---|---|
crates/qasm2/src/expr.rs | 1 | 94.02% | ||
crates/qasm2/src/lex.rs | 4 | 92.37% | ||
<!-- | Total: | 5 | --> |
Totals | |
---|---|
Change from base Build 9661630219: | 0.02% |
Covered Lines: | 64048 |
Relevant Lines: | 71373 |
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.
Changes Missing Coverage | Covered Lines | Changed/Added Lines | % | ||
---|---|---|---|---|---|
crates/circuit/src/circuit_instruction.rs | 8 | 10 | 80.0% | ||
qiskit/circuit/quantumcircuit.py | 4 | 8 | 50.0% | ||
crates/circuit/src/operations.rs | 262 | 292 | 89.73% | ||
<!-- | Total: | 380 | 416 | 91.35% | --> |
Files with Coverage Reduction | New Missed Lines | % | ||
---|---|---|---|---|
qiskit/dagcircuit/dagcircuit.py | 4 | 92.08% | ||
crates/qasm2/src/lex.rs | 6 | 91.6% | ||
crates/qasm2/src/parse.rs | 12 | 97.15% | ||
crates/accelerate/src/euler_one_qubit_decomposer.rs | 28 | 92.06% | ||
crates/circuit/src/circuit_data.rs | 31 | 90.85% | ||
crates/accelerate/src/two_qubit_decompose.rs | 80 | 89.5% | ||
<!-- | Total: | 161 | --> |
Totals | |
---|---|
Change from base Build 9745133547: | 0.02% |
Covered Lines: | 64681 |
Relevant Lines: | 72006 |
Summary
This PR adds Rust implementations for most controlled gates left in https://github.com/Qiskit/qiskit/issues/12566.
CUGate
CU1Gate
CU3Gate
C3XGate
C3SXGate
CCZGate
This is done through a newly implemented
make_n_controlled_gate
macro (which is currently limited to adding controls to a 2-qubit gate).Details and comments
I attempted to implement C4XGate but got some issues with the implementation of the FixedIntializer traits for arrays of more than 16 elements. There are workarounds, but given its low priority the implementation has been left for a follow-up.