Separable CH-form #4828
Labels
area/clifford-simulator
area/simulation
kind/feature-request
Describes new functionality
triage/discuss
Needs decision / discussion, bring these up during Cirq Cynque
Is your feature request related to a use case or problem? Please describe.
State vector and density matrix both can run separable states independently, allowing for exponential speedup when the state is not fully entangled. This can be done in CH-form as well, though it would be linear speedup.
Describe the solution you'd like
CH-form is represented with a couple of n*n matrices, some n-length vectors, and a phase. I believe that kronning two of these is as follows: for the matrices you kron a m*m matrix with an n*n matrix you create a (m+n)*(m+n) matrix, place the m*m values in the top-left, and the n*n values in the bottom right. To kron the vectors, you just concat them, and then you multiply the two phases. I'm fairly sure that's all there is to it, though obviously this needs tested thoroughly (even better, confirm mathematically).
There's no easy way to factor a CH-form that I can see. Reversing the above doesn't work because the matrices don't necessarily zero-out the top-right and bottom-left after measurement. Maybe there's some way of doing this though. But in absence of that we can add an
ActOnArgs.can_factor
that returns False by default, override that in SV and DM simulators to return True, and then check that value in ActOnArgsContainer.act_on_fallback before attempting to factor the result.There's always the potential that the overhead of these operations could slow simulation down more than they speed them up, in the nominal fully-entangled cases. I'd not particularly expect any of this to add noticeable overhead, but obviously that should be tested.
Could be a good first/second issue for the adventurous.
What is the urgency from your perspective for this issue? Is it blocking important work?
P3 - I'm not really blocked by it, it is an idea I'd like to discuss / suggestion based on principle
The text was updated successfully, but these errors were encountered: