Skip to content
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

Add Clifford.from_operation to shortcut checking matrix representation #9576

Open
kdk opened this issue Feb 13, 2023 · 4 comments
Open

Add Clifford.from_operation to shortcut checking matrix representation #9576

kdk opened this issue Feb 13, 2023 · 4 comments
Labels
mod: quantum info Related to the Quantum Info module (States & Operators) synthesis

Comments

@kdk
Copy link
Member

kdk commented Feb 13, 2023

From #9475:

@ShellyGarion 's comment is hinting that another thing that would be nice to have is something like Clifford.from_operation or similar, that could rely on methods that might be quicker than generating and checking the unitary matrix representation.

For example, checking if the name is in the list of hard coded names in _BASIS_1Q/_BASIS_2Q to know if an Instruction is Clifford, or utilizing the equivalence library to see if a Gate has an all Clifford decomposition, or for cases like the parameterized rotations where there may be a simple arithmetic check on the params to know if it is Clifford.

Additionally, the same methods could be available to know quickly if an unknown operation is_clifford.

Opening this issue to discuss how and where we can include such checks for Clifford, and for the other Operation subclasses more generally.

@kdk kdk added the synthesis label Feb 13, 2023
@ShellyGarion ShellyGarion added the mod: quantum info Related to the Quantum Info module (States & Operators) label Feb 14, 2023
@ShellyGarion
Copy link
Member

See more details here: #9475 (comment)

@alexanderivrii
Copy link
Contributor

It would be also good to directly create Cliffords from LinearFunctions or from quantum circuits containing LinearFunctions. We can actually create Cliffords from linear functions already, however this requires first building the the definition of a linear function and then constructing Clifford out of that, while the much simpler direct method is also possible (if the linear function has matrix A, then the Clifford's stabilizer tableau will be something like [A^T, 0; 0, A]).

Additionally, it would be nice to create Cliffords from new PermutationGates (and because PermutationGates do not have definitions, we currently are not able to do it at all).

@ShellyGarion
Copy link
Member

ShellyGarion commented Feb 16, 2023

The main question is whether Clifford.from_operation is needed or is it enough to use the existing Clifford.from_circuit, where the circuit could contain any Operations that are Clifford (including: LinearFunction, Permutation, Rz(pi) etc.)

@ShellyGarion
Copy link
Member

See the discussion in #9582

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
mod: quantum info Related to the Quantum Info module (States & Operators) synthesis
Projects
None yet
Development

No branches or pull requests

3 participants