Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove useless catch in circuit visualisation intersection check
The intersection logic in here previously included a catch statement that was attempting to avoid to count the span of a `DAGOpNode` if it was already in the layer being examined. If the node to be inserted is already in the layer being examined, the drawer should not be attempting to re-insert it at all - it's already been accounted for. The previous catch should always have failed, because `DAGOpNode` equality would have decayed to `object.__eq__`, which is just `is` logic. On this new branch, `DAGOpNode` has an actual equality check, which can allow two non-referentially equal nodes (as might be created by `DAGCircuit.layers`) to compare logically equal.
- Loading branch information