-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Improve coverage of _decompose_into_clifford_with_qubits_
and has_stabilizer_effect
protocols
#5906
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@NoureldinYosri Do you want to take a stab at this issue? |
@tanujkhattar sure, can you assign it to me? |
there are two ways to do this
The second option is more scalable and should be fast enough since we will only apply it when the unitary is relatively small. |
Should we do both? We can make quick improvements to I think there is value in getting a quick fix for this this one; unless we think the general algorithm can be implemented within a week or two. What do you think? |
I have a prototype for the algorithm so it shouldn't take long to get it in a decent shape and create a PR. A minor issue of the algorithm is that it is a numerical algorithm so what we get in the end is a check that depends on the tolerance we use (yes means definatly a clifford, no means maybe a larger tolerance could turn it to yes). so the algorithm is would be a quick fix.. but adding the |
- This is the first step to implementing the algorithm in #5906 (comment) - Based on https://quantumcomputing.stackexchange.com/questions/13157/how-do-i-check-if-a-gate-represented-by-unitary-u-is-a-clifford-gate#comment17495_13158 - The complexity of this algorithm is $\mathcal{O}(n 4^n)$ where $n$ is the number of qubits it acts on or alternatively $\mathcal{O}(S \log_4{S})$ where $S$ is the size of the unitary.
I compiled a list of classes that I think should be covered by the protocols inorder to achieve the goal of this issue:
Most of these gates have |
- This is the first step to implementing the algorithm in quantumlib#5906 (comment) - Based on https://quantumcomputing.stackexchange.com/questions/13157/how-do-i-check-if-a-gate-represented-by-unitary-u-is-a-clifford-gate#comment17495_13158 - The complexity of this algorithm is $\mathcal{O}(n 4^n)$ where $n$ is the number of qubits it acts on or alternatively $\mathcal{O}(S \log_4{S})$ where $S$ is the size of the unitary.
Is your feature request related to a use case or problem? Please describe.
The two protocols were added to Cirq to support fast stabilizer simulations for (mostly) Clifford operations. See #2600 (review) and #2423 for historical context.
However, the coverage of these two protocols across Cirq gates is not great. For example;
Describe the solution you'd like
This feature request is to improve the coverage of
has_stabilizer_effect
and_decompose_into_clifford_with_qubits_
protocols so that:cirq.is_clifford
protocol which fallbacks tocirq.decompose
to figure out if the current gate is a clifford or not by recursively checking whether all gates that the current gate decomposes into are cliffords or not.assert_implements_consistent_protocols
What is the urgency from your perspective for this issue? Is it blocking important work?
P1 - I need this no later than the next release (end of quarter)
The text was updated successfully, but these errors were encountered: