unitaryfund / qrack

Comprehensive, GPU accelerated framework for developing universal virtual quantum processors
https://qrack.readthedocs.io/en/latest/
GNU Lesser General Public License v3.0
177 stars 38 forks source link

TrySeparate(a, b) refactor #781

Closed WrathfulSpatula closed 3 years ago

WrathfulSpatula commented 3 years ago

In 2 qubit TrySeparate(), successively try and revert CNOT, CY, CZ on a fixed single qubit basis for control and target, while iterating through single bit bases for each controlled gate option to check for separability. If a and b of TrySeparate(a, b) are the only 2 qubits represented in their sub-unit, only iterate through one bit's Pauli bases to check for separability.

I can't tell whether this an ideal TrySeparate() implementation for decomposing Clifford states, yet. I expect to amend around TrySeparate() more in the next few days, but this seems to be an improvement for now.