Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add equality comparisons for manual variables to DAGCircuit.__eq__ #10927

Closed
Tracked by #10922
jakelishman opened this issue Oct 2, 2023 · 0 comments · Fixed by #12204
Closed
Tracked by #10922

Add equality comparisons for manual variables to DAGCircuit.__eq__ #10927

jakelishman opened this issue Oct 2, 2023 · 0 comments · Fixed by #12204
Assignees
Milestone

Comments

@jakelishman
Copy link
Member

jakelishman commented Oct 2, 2023

Ensure that DAGCircuit.__eq__ (and by extension QuantumCircuit.__eq__) works in the presence of manual variables. It is not immediately clear whether any sort of variable equivalence should be checked by default, but for the sake of conservatism in the initial implementation, we can say that only Var instances that directly compare equal will be considered equal (despite the expr.structurally_equivalent checker giving us the option to expand this). With expr.Var expected to contain a UUID field to facilitate comparisons between differently serialised variables (#10923), the main reason to allow a more semantic-equality checker is far less prominent.

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 a pull request may close this issue.

2 participants