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

Boolean Hamiltonian gate yields fewer gates #4386

Merged

Conversation

tonybruguier
Copy link
Contributor

This is a follow-up on #4309. The intent is to have the output of he gate unchanged by doing the same operation using fewer CNOTs.

@google-cla google-cla bot added the cla: yes Makes googlebot stop complaining. label Aug 6, 2021
@tonybruguier tonybruguier marked this pull request as ready for review August 6, 2021 04:01
@tonybruguier tonybruguier requested review from cduck, vtomole and a team as code owners August 6, 2021 04:01
@tonybruguier
Copy link
Contributor Author

This is code extracted from #3989 into the present stand-alone, smaller PR. There has already been some review there, but more comments are of course welcome.

@CirqBot CirqBot added size: XL lines changed >1000 size: L 250< lines changed <1000 and removed size: XL lines changed >1000 labels Aug 12, 2021
@tonybruguier
Copy link
Contributor Author

@95-martin-orion
Would you be interested in taking this over from Balint?

@95-martin-orion
Copy link
Collaborator

@95-martin-orion
Would you be interested in taking this over from Balint?

Happy to take on review of this PR, but I'll be out for the next couple of weeks. If it's urgent, please find another reviewer.

@tonybruguier
Copy link
Contributor Author

Oh, it is not urgent, but I also want you to have a relaxing coming back from vacation.

Maybe @cduck could take a look? My main concerns are not letting garbage code in and not overloading reviewers.

@tonybruguier
Copy link
Contributor Author

Thanks. I am sorry for having forgotten the reference. The code must have been quite cryptic. I tried to address all the comments, but I left one unresolved. PTAL.

@tonybruguier
Copy link
Contributor Author

Thanks. PTAL

@tonybruguier
Copy link
Contributor Author

Sorry for the delay. I hadn't forgotten, I was just needing a little time to understand things. @95-martin-orion PTAL when you can.

Copy link
Collaborator

@95-martin-orion 95-martin-orion left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Couple of minor cleanups left, but otherwise I think this is ready. Thanks for bearing with me!

cirq-core/cirq/ops/boolean_hamiltonian.py Outdated Show resolved Hide resolved
cirq-core/cirq/ops/boolean_hamiltonian_test.py Outdated Show resolved Hide resolved
@tonybruguier
Copy link
Contributor Author

@95-martin-orion PTAL when you have the time

@95-martin-orion 95-martin-orion merged commit bd2e63c into quantumlib:master Oct 12, 2021
@tonybruguier tonybruguier deleted the simplify_bool_hamiltonian branch October 12, 2021 14:28
rht pushed a commit to rht/Cirq that referenced this pull request May 1, 2023
* Boolean Hamiltonian gate yields fewer gates

* Address some of the comments

* Address some of the comments

* Add unit test

* Expand unit test

* Fix unit test

* Add test that is failing but should pass

* More comprehensive tests

* Fix code and make unit tests pass

* Address comments
harry-phasecraft pushed a commit to PhaseCraft/Cirq that referenced this pull request Oct 31, 2024
* Boolean Hamiltonian gate yields fewer gates

* Address some of the comments

* Address some of the comments

* Add unit test

* Expand unit test

* Fix unit test

* Add test that is failing but should pass

* More comprehensive tests

* Fix code and make unit tests pass

* Address comments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes Makes googlebot stop complaining. size: L 250< lines changed <1000
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants