Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
artiq_experiments
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Nicolas Nunez Barreto
artiq_experiments
Commits
6eeb6608
Commit
6eeb6608
authored
Jun 04, 2021
by
Lucas Giardino
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
inicio de experimento transicion S-P
parent
a0d55a8e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
128 additions
and
0 deletions
+128
-0
single_transition.py
artiq_master/repository/Experiments/single_transition.py
+83
-0
urukul_drivers.py
artiq_master/repository/Experiments/urukul_drivers.py
+45
-0
No files found.
artiq_master/repository/Experiments/single_transition.py
0 → 100644
View file @
6eeb6608
from
artiq.experiment
import
*
from
urukul_drivers
import
UrukulCh
import
time
import
numpy
as
np
def
SingleLine
(
EnvExperiment
):
"""S-P Transition Emission Experiment"""
def
build
(
self
):
self
.
setattr_device
(
"core"
)
self
.
pmt
=
self
.
get_device
(
"ttl0"
)
self
.
laserUV
=
UrukulCh
(
self
,
ch
=
0
,
freq
=
100.0
,
amp
=
1.0
)
self
.
laserIR
=
UrukulCh
(
self
,
ch
=
1
,
freq
=
100.0
,
amp
=
1.0
)
self
.
setattr_argument
(
"no_measures"
,
NumberValue
(
100
,
min
=
1
,
ndecimals
=
0
,
step
=
1
),
"Experiment params"
)
self
.
setattr_argument
(
f
"t_prepS"
,
NumberValue
(
1
*
us
,
unit
=
'us'
,
scale
=
us
,
min
=
1
*
us
),
"Experiment params"
)
self
.
setattr_argument
(
f
"t_ion"
,
NumberValue
(
1
*
us
,
unit
=
'us'
,
scale
=
us
,
min
=
1
*
us
),
"Experiment params"
)
self
.
setattr_argument
(
f
"t_readout"
,
NumberValue
(
1
*
us
,
unit
=
'us'
,
scale
=
us
,
min
=
1
*
us
),
"Experiment params"
)
@
rpc
def
create_datasets
(
self
):
self
.
set_dataset
(
"counts"
,
np
.
full
(
self
.
no_measures
,
np
.
nan
),
broadcast
=
True
,
archive
=
True
)
self
.
set_dataset
(
"t_readout"
,
self
.
t_readout
,
broadcast
=
False
archive
=
True
)
self
.
set_dataset
(
"t_prep_S"
,
self
.
t_prepS
,
broadcast
=
False
archive
=
True
)
self
.
set_dataset
(
"t_prep_ion"
,
self
.
t_ion
,
broadcast
=
False
archive
=
True
)
self
.
set_dataset
(
"no_measures"
,
self
.
no_measures
,
broadcast
=
False
archive
=
True
)
# TODO: Agregar forma de guardar los datos de los canales del Urukul.
# o bien guardando todos aca, o armando un metodo apropiado en su controlador
@
kernel
def
run
(
self
):
self
.
create_datasets
()
self
.
init_kernel
()
for
runN
in
range
(
self
.
no_measures
):
self
.
prep_ion
()
self
.
prep_S
()
counts
=
self
.
readout
()
self
.
mutate_dataset
(
"counts"
,
runN
,
counts
)
delay_mu
(
8
)
@
kernel
def
init_kernel
(
self
):
self
.
core
.
reset
()
self
.
pmt
.
input
()
self
.
laserIR
.
initialize_channel
()
self
.
laserUV
.
initialize_channel
()
self
.
core
.
wait_until_mu
(
now_mu
())
@
kernel
def
prep_ion
(
self
):
"""Preparo el ion prendiendo ambos laseres"""
self
.
laserIR
.
on
()
self
.
laserUV
.
on
()
delay
(
self
.
t_ion
)
@
kernel
def
prep_S
(
self
):
"""Preparo el estado S prendiendo solamente el laser IR"""
self
.
laserIR
.
on
()
self
.
laserUV
.
off
()
delay
(
self
.
t_prepS
)
@
kernel
def
readout
(
self
):
"""Registro cuentas emitidas con el laser UV prendido"""
self
.
laserIR
.
off
()
self
.
laserUV
.
on
()
return
self
.
pmt
.
count
(
self
.
t_readout
)
artiq_master/repository/Experiments/urukul_drivers.py
0 → 100644
View file @
6eeb6608
from
artiq.experiment
import
*
class
UrukulCh
(
HasEnvironment
):
"""Urukul single freq class
Set the frecuencies/amplitudes of each Urukul channel
"""
def
build
(
self
,
ch
=
0
,
freq
=
100.0
,
amp
=
1.0
):
# super().build() ch, amp, freq
self
.
ch
=
ch
self
.
amp
=
amp
self
.
freq
=
freq
# sets core device drivers as attributes
self
.
setattr_device
(
"core"
)
self
.
channel
=
self
.
get_device
(
f
"urukul0_ch{self.ch}"
)
### This two attributes will be shown in the GUI grouped by channel
# use/don't use each channel
self
.
state
=
self
.
get_argument
(
f
"state_ch{self.ch}"
,
BooleanValue
(
1
==
0
),
f
"canal_{self.ch}"
)
# each channel's frequency
self
.
frequency
=
self
.
get_argument
(
f
"freq_ch{self.ch}"
,
NumberValue
(
self
.
freq
*
MHz
,
unit
=
'MHz'
,
scale
=
MHz
,
min
=
1
*
MHz
,
max
=
400
*
MHz
),
f
"canal_{self.ch}"
)
# each channel's amplitude
self
.
amplitude
=
self
.
get_argument
(
f
"amp_ch{self.ch}"
,
NumberValue
(
self
.
amp
,
min
=
0.
,
max
=
1.
),
f
"canal_{self.ch}"
)
@
kernel
def
initialize_channel
(
self
):
# initialises CPLD the selected channel
self
.
channel
.
cpld
.
init
()
self
.
channel
.
init
()
@
kernel
def
set_channel
(
self
):
self
.
channel
.
set
(
self
.
frequency
,
amplitude
=
self
.
amplitude
)
if
self
.
state
==
True
:
self
.
channel
.
sw
.
on
()
else
:
self
.
channel
.
sw
.
off
()
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment