Skip to content
Snippets Groups Projects
Commit 0ed1b0c6 authored by Yb Tweezer's avatar Yb Tweezer
Browse files

update for bipolar shim control, add axial and kill beams with pump and kill blocks

parent 937e59f6
No related branches found
No related tags found
No related merge requests found
...@@ -11,8 +11,8 @@ import pathlib ...@@ -11,8 +11,8 @@ import pathlib
import toml import toml
_save = True _save = True
_label = "stroboscopic" _label = "zeeman-map"
_counter = 0 _counter = 10
date = get_timestamp().split("_")[0].replace("-", "") date = get_timestamp().split("_")[0].replace("-", "")
datadir = DATADIRS.tweezer_atoms.joinpath(date) datadir = DATADIRS.tweezer_atoms.joinpath(date)
...@@ -48,6 +48,14 @@ comments = """ ...@@ -48,6 +48,14 @@ comments = """
# | | | # | | |
# -------------------------- | # -------------------------- |
# | | | # | | |
# | [pump] | tau_pump |
# | | |
# -------------------------- |
# | | |
# | [kill] | tau_kill |
# | | |
# -------------------------- |
# | | |
# | [test] | tau_test | # | [test] | tau_test |
# | | | # | | |
# -------------------------- | # -------------------------- |
...@@ -141,12 +149,16 @@ probe_warn: bool = True ...@@ -141,12 +149,16 @@ probe_warn: bool = True
## MAIN SEQUENCE PARAMETERS #################################################### ## MAIN SEQUENCE PARAMETERS ####################################################
# repeat shots for statistics # repeat shots for statistics
reps: int = 30 reps: int = 20
# trigger the Andor for the CMOT and truncate the sequence to check alignment # trigger the Andor for the CMOT and truncate the sequence to check alignment
# to the tweezer # to the tweezer
check_tweezer_alignment: bool = False check_tweezer_alignment: bool = False
# turn on the axial cooling beam simultaneously with the RIGOL CMOT cooling
# beams
axial_cooling_on: bool = False
# turn on the CMOT beams for the test block # turn on the CMOT beams for the test block
# 0 => use mot3_green_aom # 0 => use mot3_green_aom
# 1 => use mot3_green_aom_alt1 # 1 => use mot3_green_aom_alt1
...@@ -158,7 +170,7 @@ test_cmot_beams: int = -1 ...@@ -158,7 +170,7 @@ test_cmot_beams: int = -1
test_probes: bool = False test_probes: bool = False
# ramp the tweezer and hold for some time # ramp the tweezer and hold for some time
tweezer_rampdown: bool = True tweezer_rampdown: bool = False
# ramp the tweezer depth down before release and recapture # ramp the tweezer depth down before release and recapture
tweezer_ramp_release: bool = False tweezer_ramp_release: bool = False
...@@ -184,9 +196,9 @@ N_compression = 125 # number of steps in CMOT gradient ramp ...@@ -184,9 +196,9 @@ N_compression = 125 # number of steps in CMOT gradient ramp
N_fpramp = 1000 # number of CMOT frequency/power ramp steps N_fpramp = 1000 # number of CMOT frequency/power ramp steps
B_green = int(44182 * 1.30) # broadband green gradient; 174: 1.25 -> 1.1 B_green = int(44182 * 1.30) # broadband green gradient; 174: 1.25 -> 1.1
B_cmot = int(B_green * 1.80) # CMOT gradient B_cmot = int(B_green * 1.80) # CMOT gradient
SHIMS_CMOT_FB = np.array([+1.125]) # +1.2 for 174; V SHIMS_CMOT_FB = np.array([+1.050]) # +1.2 for 174; V
SHIMS_CMOT_LR = np.array([+0.840]) # -0.2 for 174; V SHIMS_CMOT_LR = np.array([+0.845]) # -0.2 for 174; V
SHIMS_CMOT_UD = np.array([-0.650]) # +0.4 for 174; V SHIMS_CMOT_UD = np.array([-0.345]) # +0.4 for 174; V
tau_cmot = 130e-3 # narrow cooling/compression time; s tau_cmot = 130e-3 # narrow cooling/compression time; s
tau_fpramp = 50e-3 # start of frequency/power ramp after t0; s tau_fpramp = 50e-3 # start of frequency/power ramp after t0; s
tau_gap = 4e-3 # gap between start of narrow cooling and end of ramp stage; s tau_gap = 4e-3 # gap between start of narrow cooling and end of ramp stage; s
...@@ -217,9 +229,29 @@ SHIMS_COOL_FB = np.array([+0.000]) # G ...@@ -217,9 +229,29 @@ SHIMS_COOL_FB = np.array([+0.000]) # G
SHIMS_COOL_LR = np.array([+0.000]) # G SHIMS_COOL_LR = np.array([+0.000]) # G
SHIMS_COOL_UD = np.array([+1.000]) # G SHIMS_COOL_UD = np.array([+1.000]) # G
TAU_COOL = np.array([30.0]) * 1e-3 # initial tweezer cooling block; s TAU_COOL = np.array([30.0]) * 1e-3 # initial tweezer cooling block; s
P_COOL = np.array([2.0]) # [I/I_sat] P_COOL = np.array([0.0]) # [I/I_sat]
DET_COOL = np.array([94.7]) # MHz DET_COOL = np.array([94.5]) # MHz
# DET_COOL = 90.0 + np.linspace(3.5, 5.0, 16) # DET_COOL = 90.0 + np.linspace(4.0, 5.2, 13) # MHz
# P_COOL_AXIAL = np.array([7.0]) # power in beam right before the objective; nW
# P_COOL_AXIAL = np.linspace(14.0, 21.0, 5)
# DET_COOL_AXIAL = np.array([94.5]) # MHz
# DET_COOL_AXIAL = 90.0 + np.linspace(4.0, 5.2, 13) # MHz
# pump
SHIMS_PUMP_FB = np.array([+0.000]) # G
SHIMS_PUMP_LR = np.array([+0.000]) # G
SHIMS_PUMP_UD = np.array([+2.000]) # G
TAU_PUMP = np.array([0.0]) * 1e-3 # pumping pulse duration; s
P_PUMP = np.array([4.5]) # nW
DET_PUMP = np.array([95.7]) # MHz
# kill
SHIMS_KILL_FB = np.array([+0.000]) # G
SHIMS_KILL_LR = np.array([+0.000]) # G
SHIMS_KILL_UD = np.array([+4.000]) # G
TAU_KILL = np.array([0.0]) * 1e-3 # kill pulse duration; s
P_KILL = np.array([30.0]) # dBm
DET_KILL = np.array([96.0]) # MHz
# test # test
N_test_ramp = 1000 N_test_ramp = 1000
...@@ -235,9 +267,10 @@ DET_TEST_CMOT_END = 90.0 + np.array([3.55]) # CMOT beam final frequency; MHz ...@@ -235,9 +267,10 @@ DET_TEST_CMOT_END = 90.0 + np.array([3.55]) # CMOT beam final frequency; MHz
# ramp-down # ramp-down
N_Uramp = 1000 # number of steps for tweezer depth ramps N_Uramp = 1000 # number of steps for tweezer depth ramps
# U_RAMPDOWN = U_mul * np.array([U_nominal / 100]) # ramp-down depth; uK U_RAMPDOWN = U_mul * np.array([U_nominal]) # ramp-down depth; uK
U_RAMPDOWN = U_mul * np.array([10.0, 20.0, 50.0, 100.0, 200.0, 300.0, 400.0, 700.0, 1000.0]) # ramp-down depth; uK # U_RAMPDOWN = U_mul * np.array([10.0, 20.0, 50.0, 100.0, 200.0, 300.0, 400.0, 700.0, 1000.0]) # ramp-down depth; uK
tau_Uramp = 2e-3 # tweezer ramping time; s # U_RAMPDOWN = U_mul * np.array([50.0, 1000.0])
tau_Uramp = 15e-3 # tweezer ramping time; s
TAU_RAMPDOWN = np.array([20.0]) * 1e-3 # hold time for tweezer ramp; s TAU_RAMPDOWN = np.array([20.0]) * 1e-3 # hold time for tweezer ramp; s
tau_Upause = 2e-3 # pause time for tweezer; s tau_Upause = 2e-3 # pause time for tweezer; s
...@@ -253,15 +286,21 @@ U_image = U_mul * 1000.0 # imaging tweezer depth; uK ...@@ -253,15 +286,21 @@ U_image = U_mul * 1000.0 # imaging tweezer depth; uK
SHIMS_PROBE_FB = np.array([+0.000]) # G SHIMS_PROBE_FB = np.array([+0.000]) # G
SHIMS_PROBE_LR = np.array([+0.000]) # G SHIMS_PROBE_LR = np.array([+0.000]) # G
SHIMS_PROBE_UD = np.array([+1.000]) # G SHIMS_PROBE_UD = np.array([+1.000]) # G
# SHIMS_PROBE_UD = np.linspace(0.0, 5.0, 6) # G
# SHIMS_PROBE_FB = np.linspace(-0.5, 1.5, 5)
tau_dark_open = 27e-3 # shutter opening time for EMCCD; s tau_dark_open = 27e-3 # shutter opening time for EMCCD; s
TAU_PROBE = np.array([100e-3]) # probe beam time; s TAU_PROBE = np.array([100.0]) * 1e-3 # probe beam time; s
tau_image = TAU_PROBE.max() # EMCCD exposure time; s tau_image = TAU_PROBE.max() # EMCCD exposure time; s
tau_andor = 0.0e-3 # EMCCD camera time relative to end of dark period; s tau_andor = 0.0e-3 # EMCCD camera time relative to end of dark period; s
tau_dark_close = 40e-3 # shutter closing time for EMCCD; s tau_dark_close = 40e-3 # shutter closing time for EMCCD; s
p_probe_am = 2.5 # AM channel setting; [I/I_sat] p_probe_am = 2.5 # AM channel setting; [I/I_sat]
det_probe_am = 94.5 # FM (for AM) channel setting; MHz det_probe_am = 94.5 # FM (for AM) channel setting; MHz
P_PROBE = np.array([27.0]) # dBm P_PROBE = np.array([27.0]) # dBm
DET_PROBE = np.array([94.6]) # MHz # DET_PROBE = np.array([94.7]) # MHz
# DET_PROBE = 90.0 + np.linspace(4.2, 5.2, 51) # MHz
DET_PROBE = 90.0 + np.arange(4.2, 5.2, 50e-3)
# DET_PROBE = 90.0 + np.arange(1.0, 8.0, 0.2) # MHz
# DET_PROBE = 90.0 + np.arange(1.0, 7.0, 0.3)
# reset # reset
tau_end_pad = 30.0e-3 tau_end_pad = 30.0e-3
...@@ -292,6 +331,20 @@ if check_tweezer_alignment: ...@@ -292,6 +331,20 @@ if check_tweezer_alignment:
P_COOL = np.array([0.0]) P_COOL = np.array([0.0])
DET_COOL = np.array([94.5]) DET_COOL = np.array([94.5])
SHIMS_PUMP_FB = np.array([+0.000])
SHIMS_PUMP_LR = np.array([+0.000])
SHIMS_PUMP_UD = np.array([+0.000])
TAU_PUMP = np.array([0.0])
P_PUMP = np.array([4.5])
DET_PUMP = np.array([94.5])
SHIMS_KILL_FB = np.array([+0.000])
SHIMS_KILL_LR = np.array([+0.000])
SHIMS_KILL_UD = np.array([+0.000])
TAU_KILL = np.array([0.0])
P_KILL = np.array([20.0])
DET_KILL = np.array([96.0])
U_TEST = np.array([1000.0]) U_TEST = np.array([1000.0])
SHIMS_TEST_FB = np.array([+0.000]) SHIMS_TEST_FB = np.array([+0.000])
SHIMS_TEST_LR = np.array([+0.000]) SHIMS_TEST_LR = np.array([+0.000])
...@@ -313,7 +366,7 @@ if check_tweezer_alignment: ...@@ -313,7 +366,7 @@ if check_tweezer_alignment:
SHIMS_PROBE_UD = np.array([+0.000]) SHIMS_PROBE_UD = np.array([+0.000])
tau_dark_open = 0.0 tau_dark_open = 0.0
TAU_PROBE = np.array([0.0]) TAU_PROBE = np.array([0.0])
tau_image = 0.0 tau_image = 100.0e-3
tau_andor = -10.0e-3 tau_andor = -10.0e-3
tau_dark_close = 0.0 tau_dark_close = 0.0
P_PROBE = np.array([27.0]) P_PROBE = np.array([27.0])
...@@ -321,6 +374,10 @@ if check_tweezer_alignment: ...@@ -321,6 +374,10 @@ if check_tweezer_alignment:
tau_end_pad = 100.0e-3 tau_end_pad = 100.0e-3
if not axial_cooling_on:
P_COOL_AXIAL = np.array([5.0])
DET_COOL_AXIAL = np.array([95.0])
# book-keeping info # book-keeping info
_bookkeep_types = ( _bookkeep_types = (
str, str,
...@@ -343,6 +400,10 @@ params = { ...@@ -343,6 +400,10 @@ params = {
cool_arrs = [ P_COOL, DET_COOL, ] cool_arrs = [ P_COOL, DET_COOL, ]
pump_arrs = [ P_PUMP, DET_PUMP, ]
kill_arrs = [ P_KILL, DET_KILL, ]
probe_arrs = [ P_PROBE, DET_PROBE, ] probe_arrs = [ P_PROBE, DET_PROBE, ]
entangleware_arrs = [ entangleware_arrs = [
...@@ -357,6 +418,14 @@ entangleware_arrs = [ ...@@ -357,6 +418,14 @@ entangleware_arrs = [
SHIMS_COOL_FB, SHIMS_COOL_LR, SHIMS_COOL_UD, SHIMS_COOL_FB, SHIMS_COOL_LR, SHIMS_COOL_UD,
TAU_COOL, TAU_COOL,
# pump block
SHIMS_PUMP_FB, SHIMS_PUMP_LR, SHIMS_PUMP_UD,
TAU_PUMP,
# kill block
SHIMS_KILL_FB, SHIMS_KILL_LR, SHIMS_KILL_UD,
TAU_KILL,
# test block # test block
U_TEST, U_TEST,
SHIMS_TEST_FB, SHIMS_TEST_LR, SHIMS_TEST_UD, SHIMS_TEST_FB, SHIMS_TEST_LR, SHIMS_TEST_UD,
...@@ -405,7 +474,6 @@ def init_blue_mot( ...@@ -405,7 +474,6 @@ def init_blue_mot(
fb=C.shim_coils_fb.default, fb=C.shim_coils_fb.default,
lr=C.shim_coils_lr.default, lr=C.shim_coils_lr.default,
ud=C.shim_coils_ud.default, ud=C.shim_coils_ud.default,
polarity_check_level=2
) )
seq += Sequence([ # turn on 2D MOT seq += Sequence([ # turn on 2D MOT
Event.digitalc(C.mot2_blue_sh, 1, t_start, with_delay=False), Event.digitalc(C.mot2_blue_sh, 1, t_start, with_delay=False),
...@@ -479,12 +547,11 @@ def cmot( ...@@ -479,12 +547,11 @@ def cmot(
C.mot3_coils_clk, C.mot3_coils_sync, C.mot3_coils_clk, C.mot3_coils_sync,
clk_freq clk_freq
) )
seq += set_shims( # set shims (with careful polarity switching) seq += set_shims(
t_start, t_start,
fb=shims_cmot_fb, fb=shims_cmot_fb,
lr=shims_cmot_lr, lr=shims_cmot_lr,
ud=shims_cmot_ud, ud=shims_cmot_ud,
polarity_check_level=2
) )
seq += Sequence([ # turn on the beams seq += Sequence([ # turn on the beams
Event.digitalc(C.mot3_green_sh, 1, t_start), Event.digitalc(C.mot3_green_sh, 1, t_start),
...@@ -561,22 +628,12 @@ def load( ...@@ -561,22 +628,12 @@ def load(
shims_cmot_ud, shims_cmot_ud + shims_smear_ud, shims_smear_N) shims_cmot_ud, shims_cmot_ud + shims_smear_ud, shims_smear_N)
if abs(shims_smear_ud) > 0.0 else shims_smear_N * [None] if abs(shims_smear_ud) > 0.0 else shims_smear_N * [None]
) )
if any(
(max(X) * min(X)) < 0.0
for X in [SHIMS_SMEAR_FB, SHIMS_SMEAR_LR, SHIMS_SMEAR_UD]
if len(X) > 0
):
print(
"WARNING: detected shim smear ramp that crosses zero;"
" mid-loading polarity flips are not currently supported"
)
seq += Sequence.joinall(*[ # "smear" CMOT onto the array seq += Sequence.joinall(*[ # "smear" CMOT onto the array
set_shims( set_shims(
t_start + t, t_start + t,
fb=fb, fb=fb,
lr=lr, lr=lr,
ud=ud, ud=ud,
polarity_check_level=0
) )
for t, fb, lr, ud in zip( for t, fb, lr, ud in zip(
T_SMEAR, T_SMEAR,
...@@ -636,11 +693,10 @@ def disperse( ...@@ -636,11 +693,10 @@ def disperse(
t_start + 20e-3, t_start + 20e-3,
fb=SHIM_COILS_FB_MAG(shims_cool_fb), fb=SHIM_COILS_FB_MAG(shims_cool_fb),
lr=SHIM_COILS_LR_MAG(shims_cool_lr), lr=SHIM_COILS_LR_MAG(shims_cool_lr),
ud=SHIM_COILS_UD_MAG(-shims_cool_ud), ud=SHIM_COILS_UD_MAG(shims_cool_ud),
polarity_check_level=2
) )
seq += Sequence([ seq += Sequence([
Event.digitalc(C.mot3_green_sh, 0, t_start), # Event.digitalc(C.mot3_green_sh, 0, t_start),
Event.digitalc(C.mot3_green_aom, 1, t_start), Event.digitalc(C.mot3_green_aom, 1, t_start),
Event.digitalc(C.mot3_green_aom_alt1, 0, t_start), Event.digitalc(C.mot3_green_aom_alt1, 0, t_start),
]) ])
...@@ -670,7 +726,6 @@ def cool( ...@@ -670,7 +726,6 @@ def cool(
# fb=SHIM_COILS_FB_MAG(shims_cool_fb), # fb=SHIM_COILS_FB_MAG(shims_cool_fb),
# lr=SHIM_COILS_LR_MAG(shims_cool_lr), # lr=SHIM_COILS_LR_MAG(shims_cool_lr),
# ud=SHIM_COILS_UD_MAG(shims_cool_ud), # ud=SHIM_COILS_UD_MAG(shims_cool_ud),
# polarity_check_level=0
# ) # )
seq += Sequence([ # turn off the CMOT hold seq += Sequence([ # turn off the CMOT hold
Event.digitalc(C.mot3_green_aom, 1, t_start), Event.digitalc(C.mot3_green_aom, 1, t_start),
...@@ -679,17 +734,74 @@ def cool( ...@@ -679,17 +734,74 @@ def cool(
seq += Sequence([ # pulse the cooling beams seq += Sequence([ # pulse the cooling beams
Event.digitalc(C.mot3_green_sh, 1, t_start - 15e-3), # on Event.digitalc(C.mot3_green_sh, 1, t_start - 15e-3), # on
Event.digitalc(C.mot3_green_aom_alt2, 1, t_start), Event.digitalc(C.mot3_green_aom_alt2, 1, t_start),
Event.digitalc(C.axial_green_sh, 1, t_start),
Event.digitalc(C.axial_green_aom, 0, t_start),
Event.digitalc(C.mot3_green_sh, 0, t_start + tau_cool + 5e-3), # off Event.digitalc(C.mot3_green_sh, 0, t_start + tau_cool + 5e-3), # off
Event.digitalc(C.mot3_green_aom_alt2, 0, t_start + tau_cool), Event.digitalc(C.mot3_green_aom_alt2, 0, t_start + tau_cool),
Event.digitalc(C.axial_green_sh, 0, t_start + tau_cool + C.axial_green_sh.delay_down),
Event.digitalc(C.axial_green_aom, 1, t_start + tau_cool),
]) ])
if axial_cooling_on:
seq += Sequence([ # pulse the axial cooling beam
Event.digitalc(C.axial_green_sh, 1, t_start), # on
Event.digitalc(C.axial_green_aom, 0, t_start),
Event.digitalc(C.axial_green_sh, 0, t_start + tau_cool + C.axial_green_sh.delay_down), # off
Event.digitalc(C.axial_green_aom, 1, t_start + tau_cool),
])
t_next = t_start + tau_cool t_next = t_start + tau_cool
return seq, t_next return seq, t_next
def pump(
t_start: float,
shims_pump_fb: float,
shims_pump_lr: float,
shims_pump_ud: float,
tau_pump: float,
) -> (Sequence, float):
seq = Sequence()
if abs(TAU_PUMP).sum() == 0.0:
return seq, t_start
seq += set_shims(
t_start,
fb=SHIM_COILS_FB_MAG(shims_pump_fb),
lr=SHIM_COILS_LR_MAG(shims_pump_lr),
ud=SHIM_COILS_UD_MAG(shims_pump_ud),
)
seq += Sequence([ # pulse the axial beam
Event.digitalc(C.axial_green_sh, 1, t_start), # on
Event.digitalc(C.axial_green_aom, 0, t_start),
Event.digitalc(C.axial_green_sh, 0, t_start + tau_pump + C.axial_green_sh.delay_down), # off
Event.digitalc(C.axial_green_aom, 1, t_start + tau_pump),
])
t_next = t_start + tau_pump
return seq, t_next
def kill(
t_start: float,
shims_kill_fb: float,
shims_kill_lr: float,
shims_kill_ud: float,
tau_kill: float,
) -> (Sequence, float):
seq = Sequence()
if abs(TAU_KILL).sum() == 0.0:
return seq, t_start
seq += set_shims(
t_start,
fb=SHIM_COILS_FB_MAG(shims_kill_fb),
lr=SHIM_COILS_LR_MAG(shims_kill_lr),
ud=SHIM_COILS_UD_MAG(shims_kill_ud),
)
seq += Sequence([ # pulse the kill beam
Event.digitalc(C.kill_beam_sh, 1, t_start), # on
Event.digitalc(C.kill_beam_aom, 1, t_start),
Event.digitalc(C.kill_beam_sh, 0, t_start + tau_kill), # off
Event.digitalc(C.kill_beam_aom, 0, t_start + tau_kill),
])
t_next = t_start + tau_kill
return seq, t_next
def test( def test(
t_start: float, t_start: float,
U_test: float, U_test: float,
...@@ -722,7 +834,6 @@ def test( ...@@ -722,7 +834,6 @@ def test(
fb=SHIM_COILS_FB_MAG(shims_test_fb), fb=SHIM_COILS_FB_MAG(shims_test_fb),
lr=SHIM_COILS_LR_MAG(shims_test_lr), lr=SHIM_COILS_LR_MAG(shims_test_lr),
ud=SHIM_COILS_UD_MAG(shims_test_ud), ud=SHIM_COILS_UD_MAG(shims_test_ud),
polarity_check_level=0
) )
if test_cmot_beams in {0, 1, 2}: if test_cmot_beams in {0, 1, 2}:
...@@ -885,7 +996,7 @@ def image( ...@@ -885,7 +996,7 @@ def image(
seq += Sequence.digital_pulse_c( seq += Sequence.digital_pulse_c(
C.andor_trig, C.andor_trig,
t_start + tau_andor, t_start + tau_andor,
tau_dark_open, tau_image + tau_dark_close,
) )
return seq, t_start return seq, t_start
...@@ -907,7 +1018,6 @@ def image( ...@@ -907,7 +1018,6 @@ def image(
fb=SHIM_COILS_FB_MAG(shims_probe_fb), fb=SHIM_COILS_FB_MAG(shims_probe_fb),
lr=SHIM_COILS_LR_MAG(shims_probe_lr), lr=SHIM_COILS_LR_MAG(shims_probe_lr),
ud=SHIM_COILS_UD_MAG(shims_probe_ud), ud=SHIM_COILS_UD_MAG(shims_probe_ud),
polarity_check_level=0
) )
seq += Sequence([ seq += Sequence([
Event.digitalc( Event.digitalc(
...@@ -918,7 +1028,7 @@ def image( ...@@ -918,7 +1028,7 @@ def image(
seq += Sequence.digital_pulse_c( seq += Sequence.digital_pulse_c(
C.andor_trig, C.andor_trig,
t_start + tau_andor + tau_dark_open, t_start + tau_andor + tau_dark_open,
tau_image + tau_dark_open tau_image + tau_dark_close
) )
t_next = t_start + tau_dark_open + tau_image + tau_dark_close t_next = t_start + tau_dark_open + tau_image + tau_dark_close
...@@ -942,7 +1052,6 @@ def reset( ...@@ -942,7 +1052,6 @@ def reset(
fb=C.shim_coils_fb.default, fb=C.shim_coils_fb.default,
lr=C.shim_coils_lr.default, lr=C.shim_coils_lr.default,
ud=C.shim_coils_ud.default, ud=C.shim_coils_ud.default,
polarity_check_level=2
) )
t_next = t_start + tau_end_pad t_next = t_start + tau_end_pad
...@@ -963,6 +1072,16 @@ def make_sequence( ...@@ -963,6 +1072,16 @@ def make_sequence(
shims_cool_ud: float, shims_cool_ud: float,
tau_cool: float, tau_cool: float,
shims_pump_fb: float,
shims_pump_lr: float,
shims_pump_ud: float,
tau_pump: float,
shims_kill_fb: float,
shims_kill_lr: float,
shims_kill_ud: float,
tau_kill: float,
U_test: float, U_test: float,
shims_test_fb: float, shims_test_fb: float,
shims_test_lr: float, shims_test_lr: float,
...@@ -1046,6 +1165,28 @@ def make_sequence( ...@@ -1046,6 +1165,28 @@ def make_sequence(
times.append(t_next) times.append(t_next)
SEQ["cool"].set_color("C6") SEQ["cool"].set_color("C6")
SEQ["pump"], t_next \
= pump(
t_next,
shims_pump_fb,
shims_pump_lr,
shims_pump_ud,
tau_pump,
)
times.append(t_next)
SEQ["pump"].set_color("C3")
SEQ["kill"], t_next \
= kill(
t_next,
shims_kill_fb,
shims_kill_lr,
shims_kill_ud,
tau_kill,
)
times.append(t_next)
SEQ["kill"].set_color("k")
SEQ["test"], t_next \ SEQ["test"], t_next \
= test( = test(
t_next, t_next,
...@@ -1136,11 +1277,31 @@ class TweezerOptim(Controller): ...@@ -1136,11 +1277,31 @@ class TweezerOptim(Controller):
.set_amplitude(27.0) .set_amplitude(27.0)
) )
self.timebase_axial = (TIMEBASE_AXIAL.connect()
.set_frequency(DET_COOL_AXIAL[0])
.set_frequency_mod(False)
.set_amplitude(AXIAL_GREEN_AOM_AMP(P_COOL_AXIAL[0], DET_COOL_AXIAL[0]))
)
self.mogrf = (MOGRF.connect()
.set_frequency(4, DET_KILL[0])
.set_power(4, P_KILL[0])
)
self.N_cool = np.prod([len(X) for X in cool_arrs]) self.N_cool = np.prod([len(X) for X in cool_arrs])
self.N_pump = np.prod([len(X) for X in pump_arrs])
self.N_kill = np.prod([len(X) for X in kill_arrs])
self.N_probe = np.prod([len(X) for X in probe_arrs]) self.N_probe = np.prod([len(X) for X in probe_arrs])
self.N_entangleware = np.prod([len(X) for X in entangleware_arrs]) self.N_entangleware = np.prod([len(X) for X in entangleware_arrs])
self.N = [reps, self.N_cool, self.N_probe, self.N_entangleware] self.N = [
reps,
self.N_cool,
self.N_pump,
self.N_kill,
self.N_probe,
self.N_entangleware,
]
self.NN = [np.prod(self.N[-k:]) for k in range(1, len(self.N))][::-1] + [1] self.NN = [np.prod(self.N[-k:]) for k in range(1, len(self.N))][::-1] + [1]
self.TOT = np.prod(self.N) self.TOT = np.prod(self.N)
...@@ -1173,29 +1334,39 @@ class TweezerOptim(Controller): ...@@ -1173,29 +1334,39 @@ class TweezerOptim(Controller):
print(f"[sequence] running {self.TOT:.0f} sequences:") print(f"[sequence] running {self.TOT:.0f} sequences:")
T0 = timeit.default_timer() T0 = timeit.default_timer()
for rep in range(reps): for rep in range(reps):
for i, (p_cool, det_cool) in enumerate(product(*cool_arrs)): for a, (p_cool, det_cool) in enumerate(product(*cool_arrs)):
(self.rigol (self.rigol
.set_amplitude(2, MOT3_GREEN_ALT_AM(p_cool, det_cool)) .set_amplitude(2, MOT3_GREEN_ALT_AM(p_cool, det_cool))
.set_frequency(2, det_cool) .set_frequency(2, det_cool)
) )
for j, (p_probe, det_probe) in enumerate(product(*probe_arrs)): for b, (p_pump, det_pump) in enumerate(product(*pump_arrs)):
(self.timebase (self.timebase_axial
.set_amplitude(p_probe) .set_amplitude(AXIAL_GREEN_AOM_AMP(p_pump, det_pump))
.set_frequency(det_probe) .set_frequency(det_pump)
) )
for k, sseq in enumerate(self.ssequences()): for c, (p_kill, det_kill) in enumerate(product(*kill_arrs)):
print(self.fmt.format( (self.mogrf
rep + 1, i + 1, j + 1, k + 1, .set_power(4, p_kill)
100.0 * sum( .set_frequency(4, det_kill)
q * nnq
for q, nnq in zip([rep, i, j, k], self.NN)
) / self.TOT
), end="", flush=True)
(self.comp
.enqueue(sseq.to_sequence())
.run(printflag=False)
.clear()
) )
for d, (p_probe, det_probe) in enumerate(product(*probe_arrs)):
(self.timebase
.set_amplitude(p_probe)
.set_frequency(det_probe)
)
for e, sseq in enumerate(self.ssequences()):
print(self.fmt.format(
rep + 1, a + 1, b + 1, c + 1, d + 1, e + 1,
100.0 * sum(
q * nnq
for q, nnq in zip([rep, a, b, c, d, e], self.NN)
) / self.TOT
), end="", flush=True)
(self.comp
.enqueue(sseq.to_sequence())
.run(printflag=False)
.clear()
)
print(self.fmt.format(*self.N, 100.0), end="\n", flush=True) print(self.fmt.format(*self.N, 100.0), end="\n", flush=True)
T = timeit.default_timer() - T0 T = timeit.default_timer() - T0
print( print(
...@@ -1207,17 +1378,25 @@ class TweezerOptim(Controller): ...@@ -1207,17 +1378,25 @@ class TweezerOptim(Controller):
self.rigol.set_amplitude(2, 54.0e-3).set_frequency(2, 94.5) self.rigol.set_amplitude(2, 54.0e-3).set_frequency(2, 94.5)
self.timebase.set_amplitude(27.0).set_frequency(PROBE_GREEN_TB_FM_CENTER) self.timebase.set_amplitude(27.0).set_frequency(PROBE_GREEN_TB_FM_CENTER)
self.timebase_axial.set_amplitude(14.0).set_frequency(95.0)
self.mogrf.set_power(4, 20.0).set_frequency(4, 96.0)
self.comp.clear().set_defaults().disconnect() self.comp.set_defaults().disconnect()
self.rigol.disconnect() self.rigol.disconnect()
self.timebase.disconnect() self.timebase.disconnect()
self.timebase_axial.disconnect()
self.mogrf.disconnect()
if _save: if _save:
print("[sequence] saving entangleware sequences") print("[sequence] saving entangleware sequences")
for k, sseq in enumerate(self.ssequences()): for k, sseq in enumerate(self.ssequences()):
print(f"\r {k + 1} / {self.N_entangleware}", end="", flush=True) print(
f"\r {k + 1}/{self.N_entangleware}"
f" ({100.0 * k / self.N_entangleware:6.2f})",
end="", flush=True
)
sseq.save(printflag=False) sseq.save(printflag=False)
print("") print(f"\r {self.N_entangleware}/{self.N_entangleware} (100.0%)", flush=True)
def cmd_reset(self, *args): def cmd_reset(self, *args):
(MAIN.connect() (MAIN.connect()
...@@ -1247,23 +1426,34 @@ class TweezerOptim(Controller): ...@@ -1247,23 +1426,34 @@ class TweezerOptim(Controller):
" unique sequences:" " unique sequences:"
) )
T0 = timeit.default_timer() T0 = timeit.default_timer()
for i, (p_cool, det_cool) in enumerate(product(*cool_arrs)): for a, (p_cool, det_cool) in enumerate(product(*cool_arrs)):
(self.rigol (self.rigol
.set_amplitude(2, MOT3_GREEN_ALT_AM(p_cool, det_cool)) .set_amplitude(2, MOT3_GREEN_ALT_AM(p_cool, det_cool))
.set_frequency(2, det_cool) .set_frequency(2, det_cool)
) )
for j, (p_probe, det_probe) in enumerate(product(*probe_arrs)): for b, (p_pump, det_pump) in enumerate(product(*pump_arrs)):
(self.timebase (self.timebase_axial
.set_amplitude(p_probe) .set_frequency(det_pump)
.set_frequency(det_probe) .set_amplitude(AXIAL_GREEN_AOM_AMP(p_pump, det_pump))
) )
for k, sseq in enumerate(self.ssequences()): for c, (p_kill, det_kill) in enumerate(product(*kill_arrs)):
print(self.fmt.format( (self.mogrf
reps, i + 1, j + 1, k + 1, .set_frequency(4, det_kill)
100.0 * reps * sum( .set_power(4, p_kill)
q * nnq for q, nnq in zip([i, j, k], self.NN[1:]) )
) / self.TOT for d, (p_probe, det_probe) in enumerate(product(*probe_arrs)):
), end="", flush=True) (self.timebase
.set_amplitude(p_probe)
.set_frequency(det_probe)
)
for e, sseq in enumerate(self.ssequences()):
print(self.fmt.format(
reps, a + 1, b + 1, c + 1, d + 1, e + 1,
100.0 * reps * sum(
q * nnq
for q, nnq in zip([a, b, c, d, e], self.NN[1:])
) / self.TOT
), end="", flush=True)
print(self.fmt.format(*self.N, 100.0), end="\n", flush=True) print(self.fmt.format(*self.N, 100.0), end="\n", flush=True)
T = timeit.default_timer() - T0 T = timeit.default_timer() - T0
print( print(
...@@ -1275,10 +1465,14 @@ class TweezerOptim(Controller): ...@@ -1275,10 +1465,14 @@ class TweezerOptim(Controller):
self.rigol.set_amplitude(2, 54.0e-3).set_frequency(2, 94.5) self.rigol.set_amplitude(2, 54.0e-3).set_frequency(2, 94.5)
self.timebase.set_amplitude(27.0).set_frequency(PROBE_GREEN_TB_FM_CENTER) self.timebase.set_amplitude(27.0).set_frequency(PROBE_GREEN_TB_FM_CENTER)
self.timebase_axial.set_amplitude(14.0).set_frequency(95.0)
self.mogrf.set_power(4, 20.0).set_frequency(4, 96.0)
self.comp.set_defaults().disconnect() self.comp.set_defaults().disconnect()
self.rigol.disconnect() self.rigol.disconnect()
self.timebase.disconnect() self.timebase.disconnect()
self.timebase_axial.disconnect()
self.mogrf.disconnect()
if _save: if _save:
print("[dryrun] saving sequences") print("[dryrun] saving sequences")
...@@ -1313,6 +1507,20 @@ class TweezerOptim(Controller): ...@@ -1313,6 +1507,20 @@ class TweezerOptim(Controller):
f"couldn't disconnect from timebase" f"couldn't disconnect from timebase"
f"\n{type(err).__name__}: {err}" f"\n{type(err).__name__}: {err}"
) )
try:
self.timebase_axial.disconnect()
except BaseException as err:
print(
f"couldn't disconnect from axial timebase"
f"\n{type(err).__name__}: {err}"
)
try:
self.mogrf.disconnect()
except BaseException as err:
print(
f"couldn't disconnect from mogrf"
f"\n{type(err).__name__}: {err}"
)
def postcmd(self, *args): def postcmd(self, *args):
pass pass
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment