Skip to content

Commit

Permalink
Merge 25bd9c9 into c60876c
Browse files Browse the repository at this point in the history
  • Loading branch information
gribeill committed Apr 20, 2020
2 parents c60876c + 25bd9c9 commit 0abef67
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 6 deletions.
7 changes: 1 addition & 6 deletions QGL/Cliffords.py
Expand Up @@ -351,12 +351,7 @@ def XYXClifford(qubit, cliff_num):
pulse object
"""
α, β, γ = xyx_angles(C1[cliff_num])

p1 = Id(qubit) if np.isclose(γ, 0.0) else Xtheta(qubit, angle=γ)
p2 = Id(qubit) if np.isclose(β, 0.0) else Ytheta(qubit, angle=β)
p3 = Id(qubit) if np.isclose(α, 0.0) else Xtheta(qubit, angle=α)

return p1 + p2 + p3
return XYXPulse(qubit, α, β, γ)

###
### Two qubit Cliffords
Expand Down
16 changes: 16 additions & 0 deletions QGL/PulsePrimitives.py
Expand Up @@ -337,6 +337,22 @@ def arb_axis_drag(qubit,
return Pulse(kwargs["label"] if "label" in kwargs else "ArbAxis", qubit,
params, 1.0, aziAngle, frameChange)


def DiatomicPulse(qubit, a, b, c):
return (Ztheta(qubit, angle=c) + X90(qubit) +
Ztheta(qubit, angle=b) + X90(qubit) +
Ztheta(qubit, angle=a))

def ZYZPulse(qubit, a, b, c):
Ypulse = Id(qubit) if np.isclose(b, 0.0) else Ytheta(qubit, angle=b)
return Ztheta(qubit, angle=c)+Ypulse+Ztheta(qubit, angle=a)

def XYXPulse(qubit, α, β, γ):
p1 = Id(qubit) if np.isclose(γ, 0.0) else Xtheta(qubit, angle=γ)
p2 = Id(qubit) if np.isclose(β, 0.0) else Ytheta(qubit, angle=β)
p3 = Id(qubit) if np.isclose(α, 0.0) else Xtheta(qubit, angle=α)
return p1+p2+p3

## two-qubit primitivies

# helper used by echoCR
Expand Down

0 comments on commit 0abef67

Please sign in to comment.