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
6b691922
Commit
6b691922
authored
1 year ago
by
Sander de Snoo
Browse files
Options
Downloads
Patches
Plain Diff
Fixed test
parent
41203a6e
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_custom.py
+14
-10
14 additions, 10 deletions
pulse_lib/tests/baseband/test_custom.py
with
14 additions
and
10 deletions
pulse_lib/tests/baseband/test_custom.py
+
14
−
10
View file @
6b691922
from
pulse_lib.tests.configurations.test_configuration
import
context
#%%
#
%%
from
scipy
import
signal
...
...
@@ -21,7 +21,8 @@ def tukey_pulse(duration, sample_rate, amplitude, alpha):
n_points
=
int
(
round
(
duration
/
sample_rate
*
1e9
))
return
signal
.
windows
.
tukey
(
n_points
,
alpha
)
*
amplitude
#%%
# %%
def
test1
():
pulse
=
context
.
init_pulselib
(
n_gates
=
1
,
n_markers
=
1
)
...
...
@@ -40,9 +41,10 @@ def test1():
sequence
=
pulse
.
mk_sequence
(
segments
)
sequence
.
n_rep
=
2
context
.
add_hw_schedule
(
sequence
)
context
.
plot_awgs
(
sequence
,
ylim
=
(
-
0.2
,
0.2
))
def
test2
():
pulse
=
context
.
init_pulselib
(
n_gates
=
1
,
n_markers
=
1
)
...
...
@@ -61,7 +63,7 @@ def test2():
sequence
=
pulse
.
mk_sequence
(
segments
)
sequence
.
n_rep
=
2
context
.
add_hw_schedule
(
sequence
)
context
.
plot_awgs
(
sequence
,
ylim
=
(
-
0.2
,
0.2
))
...
...
@@ -83,7 +85,7 @@ def test3():
sequence
=
pulse
.
mk_sequence
(
segments
)
sequence
.
n_rep
=
2
context
.
add_hw_schedule
(
sequence
)
context
.
plot_awgs
(
sequence
,
ylim
=
(
-
0.2
,
0.2
))
...
...
@@ -106,9 +108,10 @@ def test4():
sequence
=
pulse
.
mk_sequence
(
segments
)
sequence
.
n_rep
=
2
context
.
add_hw_schedule
(
sequence
)
context
.
plot_awgs
(
sequence
,
ylim
=
(
-
0.2
,
0.2
))
def
test5
():
pulse
=
context
.
init_pulselib
(
n_gates
=
1
,
n_markers
=
1
)
...
...
@@ -129,10 +132,11 @@ def test5():
sequence
=
pulse
.
mk_sequence
(
segments
)
sequence
.
n_rep
=
2
context
.
add_hw_schedule
(
sequence
)
context
.
plot_awgs
(
sequence
,
ylim
=
(
-
0.2
,
0.2
))
#%%
# %%
if
__name__
==
'
__main__
'
:
ds1
=
test1
()
ds2
=
test2
()
...
...
@@ -140,8 +144,8 @@ if __name__ == '__main__':
ds4
=
test4
()
ds5
=
test5
()
#%%
#
%%
if
False
:
from
pulse_lib.tests.utils.last_upload
import
get_last_upload
lu
=
get_last_upload
(
context
.
pulse
)
\ No newline at end of file
lu
=
get_last_upload
(
context
.
pulse
)
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