Skip to content

Commit

Permalink
Seq for CR ampl. calibration
Browse files Browse the repository at this point in the history
--DR
  • Loading branch information
CoherenceController committed Apr 4, 2016
1 parent 7737e1c commit 69226c8
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 5 deletions.
33 changes: 29 additions & 4 deletions QGL/BasicSequences/CR.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ def EchoCRLen(controlQ, targetQ, lengths, riseFall=40e-9, amp=1, phase=0, calRep
-------
plotHandle : handle to plot window to prevent destruction
"""
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)]\
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)]\
for l in lengths] + create_cal_seqs((targetQ,controlQ), calRepeats, measChans=(targetQ,controlQ))

fileNames = compile_to_hardware(seqs, 'EchoCR/EchoCR')
Expand All @@ -78,12 +78,37 @@ def EchoCRPhase(controlQ, targetQ, phases, riseFall=40e-9, amp=1, length=100e-9,
-------
plotHandle : handle to plot window to prevent destruction
"""
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)]\
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)]\
for ph in phases]+create_cal_seqs((targetQ,controlQ), calRepeats, measChans=(targetQ,controlQ))

fileNames = compile_to_hardware(seqs, 'EchoCR/EchoCR')
print(fileNames)

if showPlot:
plot_pulse_files(fileNames)

def EchoCRAmp(controlQ, targetQ, amps, riseFall=20e-9, length=50e-9, phase=0, calRepeats=2, showPlot=False):
"""
Variable amplitude CX experiment, with echo pulse sandwiched between two CR opposite-phase pulses.
Parameters
----------
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)
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)]\
for a in amps] + create_cal_seqs((targetQ,controlQ), calRepeats, measChans=(targetQ,controlQ))

fileNames = compile_to_hardware(seqs, 'EchoCR/EchoCR')
print(fileNames)

if showPlot:
plot_pulse_files(fileNames)
2 changes: 1 addition & 1 deletion QGL/BasicSequences/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
from .RB import create_RB_seqs, SingleQubitRB, SingleQubitRB_AC, SingleQubitIRB_AC, SimultaneousRB_AC, SingleQubitRBT, TwoQubitRB
from .Decoupling import HahnEcho, CPMG
from .helpers import create_cal_seqs
from .CR import EchoCRPhase, EchoCRLen, PiRabi
from .CR import EchoCRPhase, EchoCRLen, EchoCRAmp, PiRabi
from .AllXY import AllXY
from .Feedback import Reset

0 comments on commit 69226c8

Please sign in to comment.