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
122639a1
Commit
122639a1
authored
2 years ago
by
Sander Snoo
Browse files
Options
Downloads
Patches
Plain Diff
Fixed digitizer configuring and get_channel_data after testing with mock
parent
42671083
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
pulse_lib/keysight/M3202A_uploader.py
+12
-4
12 additions, 4 deletions
pulse_lib/keysight/M3202A_uploader.py
pulse_lib/tests/mock_m3102a.py
+3
-3
3 additions, 3 deletions
pulse_lib/tests/mock_m3102a.py
with
15 additions
and
7 deletions
pulse_lib/keysight/M3202A_uploader.py
+
12
−
4
View file @
122639a1
...
...
@@ -76,7 +76,7 @@ class M3202A_Uploader:
def
get_num_samples
(
self
,
acquisition_channel
,
t_measure
,
sample_rate
):
dig_ch
=
self
.
digitizer_channels
[
acquisition_channel
]
digitizer
=
self
.
digitizers
[
dig_ch
.
module_name
]
return
digitizer
.
get_
points_per_cycle
(
t_measure
,
sample_rate
)
return
digitizer
.
get_
samples_per_measurement
(
t_measure
,
sample_rate
)
def
create_job
(
self
,
sequence
,
index
,
seq_id
,
n_rep
,
sample_rate
,
neutralize
=
True
,
alignment
=
None
):
# TODO @@@ implement alignment
...
...
@@ -174,7 +174,9 @@ class M3202A_Uploader:
dig
.
set_active_channels
(
channel_nums
)
self
.
acq_description
=
AcqDescription
(
job
.
seq_id
,
job
.
index
,
channels
,
job
.
acquisitions
,
enabled_channels
)
job
.
acquisitions
,
enabled_channels
,
job
.
n_rep
,
job
.
acquisition_conf
.
average_repetitions
)
def
__get_job
(
self
,
seq_id
,
index
):
...
...
@@ -293,13 +295,17 @@ class M3202A_Uploader:
raw_ch
=
(
raw_I
+
1j
*
raw_Q
)
*
np
.
exp
(
1j
*
channel
.
phase
)
else
:
# this can be complex valued output with LO modulation or phase shift in digitizer (FPGA)
raw_ch
=
dig_data
[
dig_name
][
channel
.
in_ch
[
0
]]
raw_ch
=
dig_data
[
dig_name
][
in_ch
[
0
]]
if
not
channel
.
iq_out
:
raw_ch
=
raw_ch
.
real
result
[
channel_name
]
=
raw_ch
if
not
acq_desc
.
average_repetitions
:
for
key
,
value
in
result
.
items
():
result
[
key
]
=
value
.
reshape
((
acq_desc
.
n_rep
,
-
1
))
return
result
def
release_memory
(
self
,
seq_id
=
None
,
index
=
None
):
...
...
@@ -344,7 +350,9 @@ class AcqDescription:
index
:
List
[
int
]
channels
:
List
[
str
]
acquisitions
:
Dict
[
str
,
List
[
str
]]
enabled_channels
:
Dict
[
str
,
List
[
int
]]
enabled_channels
:
Dict
[
str
,
List
[
int
]]
n_rep
:
int
average_repetitions
:
bool
@dataclass
class
AwgQueueItem
:
...
...
This diff is collapsed.
Click to expand it.
pulse_lib/tests/mock_m3102a.py
+
3
−
3
View file @
122639a1
...
...
@@ -18,11 +18,11 @@ class MockM3102A(Instrument):
def
slot_number
(
self
):
return
self
.
_slot_number
def
set_operati
o
n_mode
(
self
,
value
):
def
set_operatin
g
_mode
(
self
,
value
):
pass
def
set_active_channels
(
self
,
channel_list
):
self
.
measure
.
_active_channels
=
channel_list
self
.
measure
.
_active_channels
=
set
(
channel_list
)
@property
def
active_channels
(
self
):
...
...
@@ -58,7 +58,7 @@ class ChannelProperties:
class
ChannelData
:
def
__init__
(
self
):
self
.
_active_channels
=
set
([
1
,
2
,
3
,
4
])
self
.
_data
=
{
i
:
[]
for
i
in
self
.
_active_channels
}
self
.
_data
=
{
i
:
None
for
i
in
self
.
_active_channels
}
self
.
_ch_properties
=
{
i
:
ChannelProperties
()
for
i
in
self
.
_active_channels
}
def
get_data
(
self
):
...
...
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