Skip to content

Node equality should be based on the internal id#2006

Merged
kdk merged 19 commits into
Qiskit:masterfrom
1ucian0:1994
Mar 25, 2019
Merged

Node equality should be based on the internal id#2006
kdk merged 19 commits into
Qiskit:masterfrom
1ucian0:1994

Conversation

@1ucian0
Copy link
Copy Markdown
Member

@1ucian0 1ucian0 commented Mar 21, 2019

Fixes #1994

The function depth checks equality between nodes which is not strict enough. The relaxed version of equality should be in _match_dag_nodes to check isomorphism.

kdk
kdk previously approved these changes Mar 25, 2019
@kdk kdk merged commit 1037501 into Qiskit:master Mar 25, 2019
@1ucian0 1ucian0 deleted the 1994 branch March 25, 2019 17:08
lia-approves pushed a commit to edasgupta/qiskit-terra that referenced this pull request Jul 30, 2019
* back to _match_dag_nodes

* simpler

* barrier comparison

* test

* _match_dag_nodes from DAGCircuit to DAGNode

* _match_dag_nodes -> semantic_eq

* semantic_eq less dependant on networkx

* TestCommutationAnalysis compare node names instead of ids

* back to compare node ids

* compare names instead of ides in test.python.test_dagcircuit.TestDagOperations.test_dag_ops_on_wire

* compare ids

* compare ids

* test.python.transpiler.test_commutation_analysis maxdiff
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants