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
fcdbd9ac
Commit
fcdbd9ac
authored
2 years ago
by
Sander de Snoo
Browse files
Options
Downloads
Patches
Plain Diff
Added retries to upload and play
parent
acde6ce7
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/sequencer.py
+35
-12
35 additions, 12 deletions
pulse_lib/sequencer.py
with
35 additions
and
12 deletions
pulse_lib/sequencer.py
+
35
−
12
View file @
fcdbd9ac
...
...
@@ -404,17 +404,27 @@ class sequencer():
if
index
is
None
:
index
=
self
.
sweep_index
[::
-
1
]
self
.
_validate_index
(
index
)
upload_job
=
self
.
uploader
.
create_job
(
self
.
sequence
,
index
,
self
.
id
,
self
.
n_rep
,
self
.
_sample_rate
,
self
.
neutralize
,
alignment
=
self
.
_alignment
)
upload_job
.
set_acquisition_conf
(
self
.
_acquisition_conf
)
if
self
.
hw_schedule
is
not
None
:
upload_job
.
add_hw_schedule
(
self
.
hw_schedule
,
self
.
_HVI_variables
.
item
(
tuple
(
index
)).
HVI_markers
)
self
.
uploader
.
add_upload_job
(
upload_job
)
return
upload_job
n_failures
=
0
while
True
:
try
:
upload_job
=
self
.
uploader
.
create_job
(
self
.
sequence
,
index
,
self
.
id
,
self
.
n_rep
,
self
.
_sample_rate
,
self
.
neutralize
,
alignment
=
self
.
_alignment
)
upload_job
.
set_acquisition_conf
(
self
.
_acquisition_conf
)
if
self
.
hw_schedule
is
not
None
:
hvi_markers
=
self
.
_HVI_variables
.
item
(
tuple
(
index
)).
HVI_markers
upload_job
.
add_hw_schedule
(
self
.
hw_schedule
,
hvi_markers
)
self
.
uploader
.
add_upload_job
(
upload_job
)
return
upload_job
except
Exception
as
e
:
n_failures
+=
1
# '-8019' is a non-recoverable Keysight error
if
'
-8019
'
in
repr
(
e
)
or
n_failures
==
3
:
raise
Exception
(
e
)
logging
.
warning
(
f
'
Sequence upload failed at index
{
index
}
; retry #
{
n_failures
}
'
)
logging
.
info
(
'
Upload exception
'
,
exc_info
=
True
)
def
play
(
self
,
index
=
None
,
release
=
True
):
'''
...
...
@@ -427,7 +437,20 @@ class sequencer():
if
index
is
None
:
index
=
self
.
sweep_index
[::
-
1
]
self
.
_validate_index
(
index
)
self
.
uploader
.
play
(
self
.
id
,
index
,
release
)
n_failures
=
0
while
True
:
try
:
self
.
uploader
.
play
(
self
.
id
,
index
,
release
)
return
except
Exception
as
e
:
n_failures
+=
1
# '-8019' is a non-recoverable Keysight error
if
'
-8019
'
in
repr
(
e
)
or
n_failures
==
3
:
raise
Exception
(
e
)
logging
.
warning
(
f
'
Sequence play failed at index
{
index
}
; retry #
{
n_failures
}
'
)
logging
.
info
(
'
Play exception
'
,
exc_info
=
True
)
self
.
upload
(
index
)
def
plot
(
self
,
index
=
None
,
segments
=
None
,
awg_output
=
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