Open tanujkhattar opened 1 year ago
I did not account for uncomputing the arithmetic (it's also ignored in the paper). What's the best way to go about this?
I shouldn't say the costs are totally ignored in the paper, but rather it seemed sort of ambiguous to me what is actually done:
Reading this there are two options:
I think I was initially confused by the final two sentences (the constant is the Trotter constant factors), but this is addressed in the follow up paragraph.
So the strategy would to just uncompute the arithmetic for each pair potential, which should be straightforward (although many of these bloqs do not have decompositions so the bloq_counts would just yield 0 right?)
The bloqs were meant to just capture the costs (as a first pass) but we (I) should definitely make it more complete.
xref #485
The
diff_ij
register stores sum ofsystem_i
andsystem_j
. We compute the register, use it to compute theSumOfSquares
in registersos
and then directly free it without uncomputing the result? A similar thing seems to be happening for a bunch of other registers likesos
etc. https://github.com/quantumlib/Qualtran/blob/00682cb3f1ba464e31c5bf1e199462ca611a9808/qualtran/bloqs/chemistry/trotter/potential.py#L89-L143Maybe this is also an issue with some of the other recently added chemistry Bloqs? cc @fdmalone