Skip to content

Commit

Permalink
Remove RandomClifford name collison
Browse files Browse the repository at this point in the history
  • Loading branch information
gribeill committed Jul 24, 2019
1 parent e445592 commit 86566f4
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions QGL/Compiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
from . import BlockLabel
from . import TdmInstructions # only for APS2-TDM
from . import APS2CustomInstructions
from .RandomCliffordTools import default_clifford_options
from .RandomCliffordTools import default_clifford_options, VALID_CLIFFORD_TYPES
from . import RandomCliffordTools
import gc

Expand Down Expand Up @@ -236,7 +236,7 @@ def generate_waveforms(physicalWires):
wfs[ch][pulse.hashshape()] = pulse.shape
return wfs

def get_clifford_type(wire, allowed_types=("RandomAC", "RandomClifford")):
def get_clifford_type(wire, allowed_types=VALID_CLIFFORD_TYPES):
rt_pulses = []
for pulse in flatten(wire):
if isinstance(pulse, Pulse) and pulse.isRunTime:
Expand Down
4 changes: 2 additions & 2 deletions QGL/PulsePrimitives.py
Original file line number Diff line number Diff line change
Expand Up @@ -339,9 +339,9 @@ def arb_axis_drag(qubit,
return Pulse(kwargs["label"] if "label" in kwargs else "ArbAxis", qubit,
params, 1.0, aziAngle, frameChange)

def RandomClifford(qubit):
def RandomCliff(qubit):
params = overrideDefaults(qubit, {})
return Pulse("RandomClifford", qubit, params, isRunTime=True)
return Pulse("RandomCliff", qubit, params, isRunTime=True)

def RandomAC(qubit):
params = overrideDefaults(qubit, {})
Expand Down
2 changes: 1 addition & 1 deletion QGL/RandomCliffordTools.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@

default_clifford_options = {"offset": 0x0, "spacing": 0x1, "seed": 0x31}

VALID_CLIFFORD_TYPES = ('RandomAC', 'RandomClifford')
VALID_CLIFFORD_TYPES = ('RandomAC', 'RandomCliff')

def generate_clifford_jump_table(cliff_wires, jt_label = None):
"""Generate the jump table that will be used to call into the clifford set"""
Expand Down

0 comments on commit 86566f4

Please sign in to comment.