This is closely related to issue #226. The idea is to implement the swap network algorithm for the 2D Hubbard model from Kivlichan et al. (arXiv:1711.04789), Appx. A. Essentially, this algorithm would would have a depth of O(sqrt(N)) instead of the LinearSwapNetworkTrotterAlgorithm that is currently implemented for DiagonalCoulombHamiltonian objects, which has a depth O(N), if the DiagonalCoulombHamiltonian is a 2D Hubbard model.
I have implemented a version of this algorithm already in a software stack, with some improvements. This stack is however not based on openfermion or cirq. I would however offer to contribute a version to openfermioncirq, but some implementation details would need to be sorted out first.
I have created an RFC Google Doc with a more detailed description of the implementation and what, in my opinion, needs to be discussed. Particularly, I also explained in more detail the improvements I made to the algorithm, which is something I wanted to share regardless of whether or this will find it's way into openfermioncirq.
The questions and discussion topics are listed at the end of the Google Doc, but I'll quickly list them here again:
- How should one identify that a
DiagonalCoulombHamiltonian is in fact a Hubbard model. Alternatively, are Hubbard-like models that are suitable for the algorithm in question important enough to derive a HubbardModel class from DiagonalCoulombHamiltonian?
- Is the overhead of swapping back to the initial qubit sorting ok? (Otherwise, I guess this would lead to a lot more work.)
- Should one investigate more if the approach of Cade et al. (arXiv:1912.06007) is compatible with my improvements?
I'm looking forward to the discussion.