Skip to content

Commit

Permalink
Update CR doc strings
Browse files Browse the repository at this point in the history
  • Loading branch information
dieris committed May 16, 2016
1 parent 69226c8 commit 5fbc804
Showing 1 changed file with 20 additions and 21 deletions.
41 changes: 20 additions & 21 deletions QGL/BasicSequences/CR.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,10 @@ def PiRabi(controlQ, targetQ, lengths, riseFall=40e-9, amp=1, phase=0, calRepeat
controlQ : logical channel for the control qubit (LogicalChannel)
targetQ: logical channel for the target qubit (LogicalChannel)
lengths : pulse lengths of the CR pulse to sweep over (iterable)
riseFall : rise/fall time of the CR pulse (s)
amp : amplitude of the CR pulse
phase : phase of the CR pulse (rad)
showPlot : whether to plot (boolean)
Returns
-------
plotHandle : handle to plot window to prevent destruction
"""

CRchan = EdgeFactory(controlQ, targetQ)
Expand Down Expand Up @@ -46,14 +45,14 @@ def EchoCRLen(controlQ, targetQ, lengths, riseFall=40e-9, amp=1, phase=0, calRep
controlQ : logical channel for the control qubit (LogicalChannel)
targetQ: logical channel for the target qubit (LogicalChannel)
lengths : pulse lengths of the CR pulse to sweep over (iterable)
riseFall : rise/fall time of the CR pulse (s)
amp : amplitude of the CR pulse
phase : phase of the CR pulse (rad)
calRepeats : number of repetitions of readout calibrations for each 2-qubit state
showPlot : whether to plot (boolean)
Returns
-------
plotHandle : handle to plot window to prevent destruction
"""
seqs = [[Id(controlQ)] + echoCR(controlQ, targetQ, length=l, phase=phase, riseFall=riseFall, amp=amp) + [Id(controlQ), MEAS(targetQ)*MEAS(controlQ)]\
for l in lengths]+ [[X(controlQ)] + echoCR(controlQ, targetQ, length=l, phase= phase, riseFall=riseFall, amp=amp) + [X(controlQ), MEAS(targetQ)*MEAS(controlQ)]\
seqs = [[Id(controlQ)] + echoCR(controlQ, targetQ, length=l, phase=phase, riseFall=riseFall) + [Id(controlQ), MEAS(targetQ)*MEAS(controlQ)]\
for l in lengths]+ [[X(controlQ)] + echoCR(controlQ, targetQ, length=l, phase= phase, riseFall=riseFall) + [X(controlQ), MEAS(targetQ)*MEAS(controlQ)]\
for l in lengths] + create_cal_seqs((targetQ,controlQ), calRepeats, measChans=(targetQ,controlQ))

fileNames = compile_to_hardware(seqs, 'EchoCR/EchoCR')
Expand All @@ -72,14 +71,14 @@ def EchoCRPhase(controlQ, targetQ, phases, riseFall=40e-9, amp=1, length=100e-9,
controlQ : logical channel for the control qubit (LogicalChannel)
CRchan: logical channel for the cross-resonance pulse (LogicalChannel)
phases : pulse phases of the CR pulse to sweep over (iterable)
riseFall : rise/fall time of the CR pulse (s)
amp : amplitude of the CR pulse
length : duration of each of the two flat parts of the CR pulse (s)
calRepeats : number of repetitions of readout calibrations for each 2-qubit state
showPlot : whether to plot (boolean)
Returns
-------
plotHandle : handle to plot window to prevent destruction
"""
seqs = [[Id(controlQ)] + echoCR(controlQ, targetQ, length=length, phase=ph, riseFall=riseFall, amp=amp) + [X90(targetQ)*Id(controlQ), MEAS(targetQ)*MEAS(controlQ)] \
for ph in phases]+[[X(controlQ)] + echoCR(controlQ, targetQ, length=length, phase= ph, riseFall = riseFall, amp=amp) + [X90(targetQ)*X(controlQ), MEAS(targetQ)*MEAS(controlQ)]\
seqs = [[Id(controlQ)] + echoCR(controlQ, targetQ, length=length, phase=ph, riseFall=riseFall) + [X90(targetQ)*Id(controlQ), MEAS(targetQ)*MEAS(controlQ)] \
for ph in phases]+[[X(controlQ)] + echoCR(controlQ, targetQ, length=length, phase= ph, riseFall = riseFall) + [X90(targetQ)*X(controlQ), MEAS(targetQ)*MEAS(controlQ)]\
for ph in phases]+create_cal_seqs((targetQ,controlQ), calRepeats, measChans=(targetQ,controlQ))

fileNames = compile_to_hardware(seqs, 'EchoCR/EchoCR')
Expand All @@ -88,7 +87,7 @@ def EchoCRPhase(controlQ, targetQ, phases, riseFall=40e-9, amp=1, length=100e-9,
if showPlot:
plot_pulse_files(fileNames)

def EchoCRAmp(controlQ, targetQ, amps, riseFall=20e-9, length=50e-9, phase=0, calRepeats=2, showPlot=False):
def EchoCRAmp(controlQ, targetQ, amps, riseFall=40e-9, length=50e-9, phase=0, calRepeats=2, showPlot=False):
"""
Variable amplitude CX experiment, with echo pulse sandwiched between two CR opposite-phase pulses.
Expand All @@ -97,11 +96,11 @@ def EchoCRAmp(controlQ, targetQ, amps, riseFall=20e-9, length=50e-9, phase=0, ca
controlQ : logical channel for the control qubit (LogicalChannel)
targetQ: logical channel for the target qubit (LogicalChannel)
amps : pulse amplitudes of the CR pulse to sweep over (iterable)
riseFall : rise/fall time of the CR pulse (s)
length : duration of each of the two flat parts of the CR pulse (s)
phase : phase of the CR pulse (rad)
calRepeats : number of repetitions of readout calibrations for each 2-qubit state
showPlot : whether to plot (boolean)
Returns
-------
plotHandle : handle to plot window to prevent destruction
"""
seqs = [[Id(controlQ)] + echoCR(controlQ, targetQ, length=length, phase=phase, riseFall=riseFall,amp=a) + [Id(controlQ), MEAS(targetQ)*MEAS(controlQ)]\
for a in amps]+ [[X(controlQ)] + echoCR(controlQ, targetQ, length=length, phase= phase, riseFall=riseFall,amp=a) + [X(controlQ), MEAS(targetQ)*MEAS(controlQ)]\
Expand Down

0 comments on commit 5fbc804

Please sign in to comment.