Skip to content

Commit

Permalink
Added RB axis descriptor
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewware committed Jun 15, 2018
1 parent ebcb7fa commit 593dc0c
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
11 changes: 11 additions & 0 deletions QGL/BasicSequences/RB.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@
from ..Compiler import compile_to_hardware
from ..PulseSequencePlotter import plot_pulse_files
from ..Cliffords import clifford_seq, clifford_mat, inverse_clifford
<<<<<<< Updated upstream
from .helpers import create_cal_seqs, cal_descriptor
=======
from .helpers import create_cal_seqs, basic_RB_descriptor, cal_descriptor
>>>>>>> Stashed changes

import os
from csv import reader
Expand Down Expand Up @@ -80,7 +84,14 @@ def SingleQubitRB(qubit, seqs, purity=False, showPlot=False, add_cals=True):
seqsBis += create_cal_seqs((qubit, ), 2)
axis_descriptor.append(cal_descriptor((qubit,), 2))

<<<<<<< Updated upstream
metafile = compile_to_hardware(seqsBis, 'RB/RB', axis_descriptor = axis_descriptor, extra_meta = {'sequences':seqs})
=======
metafile = compile_to_hardware(seqsBis, 'RB/RB', axis_descriptor=[
basic_RB_descriptor(len(seqs)),
cal_descriptor((qubit,), 2)
])
>>>>>>> Stashed changes

if showPlot:
plot_pulse_files(metafile)
Expand Down
9 changes: 9 additions & 0 deletions QGL/BasicSequences/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,3 +64,12 @@ def delay_descriptor(delays, desired_units="us"):
'partition': 1
}
return axis_descriptor

def basic_RB_descriptor(num_seqs, desired_units="number"):
axis_descriptor = {
'name': 'sequence',
'unit': desired_units,
'points': list(range(num_seqs)),
'partition': 1
}
return axis_descriptor

0 comments on commit 593dc0c

Please sign in to comment.