Closed jakelishman closed 3 weeks ago
One or more of the following people are relevant to this code:
@Cryoris
@Qiskit/terra-core
@ajavadia
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.
Files with Coverage Reduction | New Missed Lines | % | ||
---|---|---|---|---|
qiskit/transpiler/passes/synthesis/unitary_synthesis.py | 1 | 88.26% | ||
crates/qasm2/src/lex.rs | 4 | 92.23% | ||
qiskit/circuit/gate.py | 4 | 94.12% | ||
crates/circuit/src/circuit_data.rs | 32 | 91.96% | ||
qiskit/circuit/library/n_local/n_local.py | 44 | 83.85% | ||
<!-- | Total: | 85 | --> |
Totals | |
---|---|
Change from base Build 10529709209: | 0.007% |
Covered Lines: | 71644 |
Relevant Lines: | 80328 |
Summary
These gates are locally equivalence (as are all the Ising-interaction gates), and this simple additional rule lets things like QFT, which are defined by Qiskit's default constructor in terms of
cp
, get converted intorzz
orrzx
.Details and comments
I also have a complete rewrite of the equivalence library that is complete and in theory optimal (in 2q gate count) for translations at jakelishman/qiskit-terra@6654059193, but the current
BasisTranslator
algorithm does not work as well with the structuring of the rules. I have a new algorithm for translation in mind that I'm calling theBasisConstructor
, which will solve that problem, and also make basis translation for overcomplete basis sets and heterogeneous architectures more accurate, reliable and performant (hopefully!), but I haven't had chance to write it up yet.