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
bbf69b26
Commit
bbf69b26
authored
7 months ago
by
Sander de Snoo
Browse files
Options
Downloads
Patches
Plain Diff
Fixed read_channels for Keysight_QS with t_measure > 2.1 s or > 4000 samples.
parent
1d804da3
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
pulse_lib/scan/read_input.py
+23
-8
23 additions, 8 deletions
pulse_lib/scan/read_input.py
with
23 additions
and
8 deletions
pulse_lib/scan/read_input.py
+
23
−
8
View file @
bbf69b26
...
@@ -30,15 +30,30 @@ def read_channels(pulselib, t_measure, channels=None, sample_rate=None, iq_mode=
...
@@ -30,15 +30,30 @@ def read_channels(pulselib, t_measure, channels=None, sample_rate=None, iq_mode=
if
sample_rate
and
int
(
t_measure
)
<
int
(
1e9
/
sample_rate
):
if
sample_rate
and
int
(
t_measure
)
<
int
(
1e9
/
sample_rate
):
raise
Exception
(
f
'
t_measure (
{
t_measure
}
ns) < 1/sample_rate (
{
int
(
1e9
/
sample_rate
)
}
ns)
'
)
raise
Exception
(
f
'
t_measure (
{
t_measure
}
ns) < 1/sample_rate (
{
int
(
1e9
/
sample_rate
)
}
ns)
'
)
# set sample rate for Keysight upload.
if
pulselib
.
_backend
in
[
"
Keysight
"
,
"
Keysight_QS
"
,
"
M3202A
"
]:
if
t_measure
>
2_000_000
:
if
t_measure
>
42e9
:
awg_sample_rate
=
1e6
raise
Exception
(
"
Keysight backend implementation does not support t_measure > 42 s
"
)
elif
t_measure
>
200_000
:
if
(
pulselib
.
_backend
==
"
Keysight_QS
"
awg_sample_rate
=
1e7
and
sample_rate
is
not
None
elif
t_measure
>
20_000
:
and
t_measure
*
1e-9
*
sample_rate
>
2e6
):
awg_sample_rate
=
1e8
raise
Exception
(
f
"
Too many samples for Keysight_QS (
{
int
(
t_measure
*
1e-9
*
sample_rate
)
}
> 2e6)
"
)
# set sample rate for Keysight upload.
if
t_measure
>
20_000_000
:
awg_sample_rate
=
1e5
elif
t_measure
>
2_000_000
:
awg_sample_rate
=
1e6
elif
t_measure
>
200_000
:
awg_sample_rate
=
1e7
elif
t_measure
>
20_000
:
awg_sample_rate
=
1e8
else
:
awg_sample_rate
=
1e9
else
:
else
:
awg_sample_rate
=
1e9
# let the driver set the sample rate.
awg_sample_rate
=
None
if
pulselib
.
_backend
==
"
Qblox
"
:
if
t_measure
>
2.1e9
:
raise
Exception
(
"
Qblox backend implementation does not support t_measure > 2.1 s
"
)
if
channels
is
None
:
if
channels
is
None
:
channels
=
pulselib
.
digitizer_channels
.
keys
()
channels
=
pulselib
.
digitizer_channels
.
keys
()
...
...
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