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.
In 2 qubit
TrySeparate()
, successively try and revertCNOT, 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. Ifa
andb
ofTrySeparate(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 aroundTrySeparate()
more in the next few days, but this seems to be an improvement for now.