Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
pulse_lib
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
QuTech QDLabs
pulse_lib
Commits
1757f6b7
Commit
1757f6b7
authored
1 year ago
by
Sander Snoo
Browse files
Options
Downloads
Patches
Plain Diff
Fixed Qblox uploader
parent
0cb1b861
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
CHANGELOG.md
+4
-0
4 additions, 0 deletions
CHANGELOG.md
pulse_lib/examples/example_param_sweep_qc.py
+28
-6
28 additions, 6 deletions
pulse_lib/examples/example_param_sweep_qc.py
with
32 additions
and
6 deletions
CHANGELOG.md
+
4
−
0
View file @
1757f6b7
# Changelog
All notable changes to Pulselib will be documented in this file.
## \[1.6.19] - 2023-05-04
-
Fixed Qblox uploader
## \[1.6.18] - 2023-05-03
-
Added histograms to measurement parameter
...
...
This diff is collapsed.
Click to expand it.
pulse_lib/examples/example_param_sweep_qc.py
+
28
−
6
View file @
1757f6b7
from
pulse_lib.tests.hw_schedule_mock
import
HardwareScheduleMock
import
pulse_lib.segments.utility.looping
as
lp
import
numpy
as
np
from
qcodes
import
Station
from
qcodes.data.data_set
import
DataSet
from
qcodes.data.io
import
DiskIO
...
...
@@ -10,6 +11,8 @@ from qcodes.actions import Task
from
configuration.small
import
init_hardware
,
init_pulselib
from
utils.plot
import
plot_awgs
from
projects.qc_utils.dataset_utils
import
sort_dataset
#from core_tools.HVI2.hvi2_schedule_loader import Hvi2ScheduleLoader
def
upload_play
(
seq
):
...
...
@@ -21,10 +24,12 @@ def upload_play(seq):
def
qc_run
(
name
,
seq
,
*
params
):
loop
=
None
for
sp
in
seq
.
params
:
sweep
=
sp
[
sp
.
values
]
# np.random.shuffle(sweep._values)
if
loop
is
None
:
loop
=
Loop
(
s
p
[
sp
.
values
]
)
loop
=
Loop
(
s
weep
)
else
:
loop
=
loop
.
loop
(
(
sp
[
sp
.
values
])
)
loop
=
loop
.
loop
(
sweep
)
play_task
=
Task
(
upload_play
,
seq
)
...
...
@@ -50,8 +55,12 @@ awgs,digs = init_hardware()
# create channels P1, P2
p
=
init_pulselib
(
awgs
,
digs
)
v_param
=
lp
.
linspace
(
0
,
200
,
5
,
axis
=
0
,
unit
=
"
mV
"
,
name
=
"
vPulse
"
)
t_wait
=
lp
.
linspace
(
20
,
100
,
3
,
axis
=
1
,
unit
=
"
mV
"
,
name
=
"
t_wait
"
)
#v_param = lp.linspace(0, 200, 5, axis=0, unit = "mV", name = "vPulse")
#t_wait = lp.linspace(20, 100, 3, axis=1, unit = "mV", name = "t_wait")
#v_param = lp.array([10, 30, 50, 20, 40], axis=0, unit = "mV", name = "vPulse")
#t_wait = lp.array([0, -10, 10], axis=1, unit = "ns", name = "t_wait")
v_param
=
lp
.
array
([
10
,
15
,
50
,
20
,
25
],
axis
=
0
,
unit
=
"
mV
"
,
name
=
"
vPulse
"
)
t_wait
=
lp
.
array
([
0
,
-
2
,
10
],
axis
=
1
,
unit
=
"
ns
"
,
name
=
"
t_wait
"
)
seg1
=
p
.
mk_segment
()
...
...
@@ -64,16 +73,29 @@ seg2.P2.add_block(0, 100, 200)
seg2
.
P2
.
wait
(
t_wait
)
seg2
.
reset_time
()
seg2
.
SD1
.
acquire
(
150
)
seg2
.
SD2
.
acquire
(
150
)
seg2
.
P1
.
add_block
(
0
,
300
,
v_param
)
seg2
.
P2
.
add_block
(
0
,
300
,
v_param
)
seg2
.
SD1
.
wait
(
1500
)
# create sequence
seq
=
p
.
mk_sequence
([
seg1
,
seg2
])
seq
.
n_rep
=
5
seq
.
n_rep
=
None
seq
.
set_hw_schedule
(
HardwareScheduleMock
())
#seq.set_hw_schedule(Hvi2ScheduleLoader(p, "SingleShot", digs[0]))
seq
.
set_acquisition
(
t_measure
=
100
)
param
=
seq
.
get_measurement_param
()
qc_run
(
'
SweepDemo
'
,
seq
,
param
)
qrm
=
digs
[
0
]
shape
=
(
len
(
v_param
)
*
len
(
t_wait
),
1
)
qrm
.
sequencers
[
0
].
set_acquisition_mock_data
(
np
.
arange
(
np
.
prod
(
shape
)).
reshape
(
shape
).
tolist
()
)
ds
=
qc_run
(
'
SweepDemo
'
,
seq
,
param
)
dsx
=
ds
.
to_xarray
()
#dsx.SD1_1.plot()
dsx2
=
dsx
.
sortby
([
'
vPulse_set
'
,
'
t_wait_set
'
])
dsx2
.
SD1_1
.
plot
()
#(yscale='log')
ds_n
=
sort_dataset
(
ds
,
write
=
True
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment