Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Function to group qubit operators into tensor product basis sets #494
Hi OpenFermion developers,
I've added a function that groups the terms in a QubitOperator into tensor product basis (TPB) sets, such that all the terms in each TPB set can be measured simultaneously in VQE with the same post rotations. This was shown to improve efficiency for some Hamiltonians in https://arxiv.org/pdf/1704.05018v2.pdf (SI section V(A)), with the improvement depending on the covariance between terms in a set on the specific state prepared (also discussed in https://arxiv.org/pdf/1509.04279v1.pdf section IV B 2 for commuting groups in general). I hope you find it useful and might like to include it - let me know if there's anything I should change.
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).
Once you've signed (or fixed any issues), please reply here (e.g.
What to do if you already signed the CLA
Hi @kevinsung thanks for the suggestions - I've made the changes in commit 1021918. I also removed the