Skip to content

Generate Clifford gates in matrix form #103

Answered by Krastanov
ghost asked this question in Q&A
Discussion options

You must be logged in to vote

With the release of 0.8.12 today, this is easier.

  • stab_to_gf2 can be used to generate the binary matrix representing the gate
  • Operator from QuantumOptics.jl can be used to convert CliffordOperator into a unitary matrix

If I understand correctly, you can do what you want by writing:

julia> using QuantumClifford, QuantumOptics

julia> all_1q_clifford_unitaries = Operator.(enumerate_phases(enumerate_cliffords(1)));

julia> all_1q_clifford_unitaries[12]
Operator(dim=2x2)
  basis: Spin(1/2)
  0.5+0.0im  0.0-0.5im
 -0.5+0.0im  0.0-0.5im

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by Krastanov
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant
Converted from issue

This discussion was converted from issue #102 on April 15, 2023 03:36.