Ran
|
Files
832
|
Run time
23s
|
Badge
Embed ▾
README BADGES
|
push
github
Fix `QuantumCircuit.depth` with zero-operands and `Expr` nodes (#12429) (#12528) This causes `QuantumCircuit.depth` to correctly handle cases where a circuit instruction has zero operands (such as `GlobalPhaseGate`), and to treat classical bits and real-time variables used inside `Expr` conditions as part of the depth calculations. This is in line with `DAGCircuit`. This commit still does not add the same `recurse` argument from `DAGCircuit.depth`, because the arguments for not adding it to `QuantumCircuit.depth` at the time still hold; there is no clear meaning to it for general control flow from a user's perspective, and it was only added to the `DAGCircuit` methods because there it is more of a proxy for optimising over all possible inner blocks. (cherry picked from commit d18a74cd4) Co-authored-by: Jake Lishman <jake.lishman@ibm.com>
62254 of 69462 relevant lines covered (89.62%)
232245.83 hits per line
Coverage | ∆ | File | Lines | Relevant | Covered | Missed | Hits/Line |
---|