Closed WrathfulSpatula closed 3 years ago
I think that the bug is in page-wise QPager::Compose()
. Following another cup of coffee, I'll hopefully be able to remember how we form these Kronecker product states, extended to separate pages.
I think my paged algorithm could be fixed with a quantum arithmetic shift. Thinking about it.
Similarly, there were bugs in basically all of the Compose()
and Decompose()
variants of QPager
, systemically. However, I've found a fix for Compose()
, and Dispose()
seems fine. Decompose()
was kludged into low-performance but working state, but QUnit
relies on Compose()
and Dispose()
without Decompose()
, so I think we're in a tenable state.
QPager -> QHybrid
stack, for example, fails thetest_qunit_paging
test. This is likely a significant inaccurate edge case, for stacks involvingQPager
. Within theQPager
implementation, I have determined that the bug is likely withinApplyEitherControlledSingleBit()
, or aQPager
distributed gate logic method called within it, or elseCompose()
, or elseProb()
or a probability check variant.I can address this tomorrow.