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

[verifier] [bug] Fix a bug when removing common prefix gates and do not generate hashing distribution in test_optimization_steps.h #208

Merged
merged 1 commit into from
Feb 8, 2025

Conversation

xumingkuan
Copy link
Collaborator

@xumingkuan xumingkuan commented Feb 8, 2025

This PR fixes a bug in Verifier::equivalent when removing common prefix gates, that if the first circuit is a prefix of the second circuit, this function would also remove the entire second circuit before this PR. After this PR, this function will correctly keep the remaining part of the second circuit.

This PR also avoids generating the hashing distribution in test_optimization_steps.h. The hashing distribution is only for CircuitSeq::hash(), and it takes up space of Theta(2^num_qubits). This size is huge when the number of qubits is greater than 30. We can test circuits with more than 30 qubits after this PR.

Also adds some debugging output when verbose is true.

…ot generate hashing distribution in test_optimization_steps.h
@xumingkuan xumingkuan merged commit ce5f79d into master Feb 8, 2025
2 checks passed
@xumingkuan xumingkuan deleted the opt-step1 branch February 8, 2025 21:57
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.

1 participant