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
14dcb715
Commit
14dcb715
authored
1 year ago
by
Sander de Snoo
Browse files
Options
Downloads
Patches
Plain Diff
Added test for hres sine on Keysight
parent
60c3ae81
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
pulse_lib/tests/baseband/test_hres_sine.py
+152
-0
152 additions, 0 deletions
pulse_lib/tests/baseband/test_hres_sine.py
with
152 additions
and
0 deletions
pulse_lib/tests/baseband/test_hres_sine.py
0 → 100644
+
152
−
0
View file @
14dcb715
from
pulse_lib.tests.configurations.test_configuration
import
context
#%%
import
numpy
as
np
import
matplotlib.pyplot
as
pt
def
test1
(
t1
,
t2
=
10
,
hres
=
True
):
pulse
=
context
.
init_pulselib
(
n_gates
=
2
)
context
.
station
.
AWG1
.
set_digital_filter_mode
(
3
)
s
=
pulse
.
mk_segment
(
hres
=
hres
)
P1
=
s
.
P1
P2
=
s
.
P2
P1
.
add_ramp_ss
(
0
,
5
,
0
,
100
)
P1
.
reset_time
()
P1
.
add_block
(
0
,
t1
,
100
)
P1
.
reset_time
()
P1
.
add_sin
(
0
,
t2
,
100
,
50e6
,
phase_offset
=
np
.
pi
/
2
)
P1
.
reset_time
()
P1
.
add_block
(
0
,
t1
,
-
100
)
P1
.
reset_time
()
P1
.
add_ramp_ss
(
0
,
5
,
-
100
,
0
)
P1
.
reset_time
()
P2
.
add_ramp_ss
(
0
,
5
,
0
,
100
)
P2
.
reset_time
()
P2
.
add_block
(
0
,
round
(
t1
),
100
)
P2
.
reset_time
()
P2
.
add_sin
(
0
,
round
(
t2
),
100
,
50e6
,
phase_offset
=
np
.
pi
/
2
)
P2
.
reset_time
()
P2
.
add_block
(
0
,
round
(
2
*
t1
)
-
round
(
t1
),
-
100
)
P2
.
reset_time
()
P2
.
add_ramp_ss
(
0
,
5
,
-
100
,
0
)
P2
.
reset_time
()
s
.
wait
(
10
)
sequence
=
pulse
.
mk_sequence
([
s
])
sequence
.
n_rep
=
None
context
.
add_hw_schedule
(
sequence
)
context
.
plot_awgs
(
sequence
,
ylim
=
(
-
0.110
,
0.110
),
xlim
=
(
5
,
30
),
analogue_out
=
True
)
pt
.
title
(
f
'
t1:
{
t1
}
t2:
{
t2
}
'
)
def
test2
(
t1
,
hres
=
True
):
pulse
=
context
.
init_pulselib
(
n_gates
=
2
)
context
.
station
.
AWG1
.
set_digital_filter_mode
(
3
)
s
=
pulse
.
mk_segment
(
hres
=
hres
)
P1
=
s
.
P1
P2
=
s
.
P2
t2
=
10
P1
.
add_ramp_ss
(
0
,
5
,
0
,
100
)
P1
.
reset_time
()
P1
.
add_block
(
0
,
t1
,
100
)
P1
.
reset_time
()
P1
.
add_block
(
0
,
t2
,
100
)
P1
.
add_sin
(
0
,
t2
,
100
,
50e6
,
phase_offset
=
np
.
pi
)
P1
.
reset_time
()
P1
.
add_block
(
0
,
t1
,
100
)
P1
.
reset_time
()
P1
.
add_ramp_ss
(
0
,
5
,
100
,
0
)
P1
.
reset_time
()
P2
.
add_ramp_ss
(
0
,
5
,
0
,
100
)
P2
.
reset_time
()
P2
.
add_block
(
0
,
round
(
t1
),
100
)
P2
.
reset_time
()
P2
.
add_block
(
0
,
t2
,
100
)
P2
.
add_sin
(
0
,
round
(
t2
),
100
,
50e6
,
phase_offset
=
np
.
pi
)
P2
.
reset_time
()
P2
.
add_block
(
0
,
round
(
2
*
t1
)
-
round
(
t1
),
100
)
P2
.
reset_time
()
P2
.
add_ramp_ss
(
0
,
5
,
100
,
0
)
P2
.
reset_time
()
s
.
wait
(
10
)
sequence
=
pulse
.
mk_sequence
([
s
])
sequence
.
n_rep
=
None
context
.
add_hw_schedule
(
sequence
)
context
.
plot_awgs
(
sequence
,
ylim
=
(
-
0.110
,
0.110
),
xlim
=
(
5
,
30
),
analogue_out
=
True
)
pt
.
title
(
f
'
t1:
{
t1
}
t2:
{
t2
}
'
)
def
test3
(
t1
,
hres
=
True
):
pulse
=
context
.
init_pulselib
(
n_gates
=
2
)
context
.
station
.
AWG1
.
set_digital_filter_mode
(
3
)
s
=
pulse
.
mk_segment
(
hres
=
hres
)
P1
=
s
.
P1
P2
=
s
.
P2
t2
=
10
P1
.
add_ramp_ss
(
0
,
5
,
0
,
100
)
P1
.
reset_time
()
P1
.
add_block
(
0
,
t1
,
100
)
P1
.
reset_time
()
P1
.
add_ramp_ss
(
0
,
3
,
100
,
0
)
P1
.
reset_time
()
P1
.
add_sin
(
0
,
t2
,
100
,
50e6
,
phase_offset
=
np
.
pi
)
P1
.
reset_time
()
P1
.
add_ramp_ss
(
0
,
3
,
0
,
100
)
P1
.
reset_time
()
P1
.
add_block
(
0
,
t1
,
100
)
P1
.
reset_time
()
P1
.
add_ramp_ss
(
0
,
5
,
100
,
0
)
P1
.
reset_time
()
P2
.
add_ramp_ss
(
0
,
5
,
0
,
100
)
P2
.
reset_time
()
P2
.
add_block
(
0
,
round
(
t1
),
100
)
P2
.
reset_time
()
P2
.
add_ramp_ss
(
0
,
3
,
100
,
0
)
P2
.
reset_time
()
P2
.
add_sin
(
0
,
round
(
t2
),
100
,
50e6
,
phase_offset
=
np
.
pi
)
P2
.
reset_time
()
P2
.
add_ramp_ss
(
0
,
3
,
0
,
100
)
P2
.
reset_time
()
P2
.
add_block
(
0
,
round
(
2
*
t1
)
-
round
(
t1
),
100
)
P2
.
reset_time
()
P2
.
add_ramp_ss
(
0
,
5
,
100
,
0
)
P2
.
reset_time
()
s
.
wait
(
10
)
sequence
=
pulse
.
mk_sequence
([
s
])
sequence
.
n_rep
=
None
context
.
add_hw_schedule
(
sequence
)
context
.
plot_awgs
(
sequence
,
ylim
=
(
-
0.110
,
0.110
),
xlim
=
(
5
,
30
))
#, analogue_out=True)
pt
.
title
(
f
'
t1:
{
t1
}
t2:
{
t2
}
'
)
#%%
if
__name__
==
'
__main__
'
:
for
t1
in
[
4.3
,
4.49
,
4.51
,
4.8
]:
test1
(
t1
,
hres
=
False
)
test1
(
t1
)
for
t1
in
[
4.3
,
4.49
,
4.51
,
4.8
]:
test2
(
t1
,
hres
=
False
)
test2
(
t1
)
for
t1
in
[
4.0
,
4.3
,
4.49
,
4.51
,
4.8
]:
test3
(
t1
,
hres
=
False
)
test3
(
t1
)
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