Skip to content

Commit

Permalink
Update 2q Cliffords to CompoundGates
Browse files Browse the repository at this point in the history
  • Loading branch information
Diego Ristè committed Apr 27, 2018
1 parent f0834ea commit 32397c2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions QGL/Cliffords.py
Expand Up @@ -180,10 +180,10 @@ def entangling_seq(gate, q1, q2):
if gate == "CNOT":
return ZX90_CR(q2, q1)
elif gate == "iSWAP":
return ZX90_CR(q2, q1) + [Y90m(q1) * Y90m(q2)] + ZX90_CR(q2, q1)
return [ZX90_CR(q2, q1) , Y90m(q1) * Y90m(q2), ZX90_CR(q2, q1)]
elif gate == "SWAP":
return ZX90_CR(q2, q1) + [Y90m(q1) * Y90m(q2)] + ZX90_CR(
q2, q1) + [(X90(q1) + Y90m(q1)) * X90(q2)] + ZX90_CR(q2, q1)
return [ZX90_CR(q2, q1), Y90m(q1) * Y90m(q2), ZX90_CR(
q2, q1), (X90(q1) + Y90m(q1)) * X90(q2), ZX90_CR(q2, q1)]


def entangling_mat(gate):
Expand Down

0 comments on commit 32397c2

Please sign in to comment.