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
3c48618a
Commit
3c48618a
authored
2 years ago
by
Sander de Snoo
Browse files
Options
Downloads
Patches
Plain Diff
Improved Keysight mocks
parent
608b4d83
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
pulse_lib/tests/__init__.py
+0
-1
0 additions, 1 deletion
pulse_lib/tests/__init__.py
pulse_lib/tests/hw_schedule_mock.py
+2
-0
2 additions, 0 deletions
pulse_lib/tests/hw_schedule_mock.py
pulse_lib/tests/mock_m3102a_qs.py
+10
-1
10 additions, 1 deletion
pulse_lib/tests/mock_m3102a_qs.py
with
12 additions
and
2 deletions
pulse_lib/tests/__init__.py
+
0
−
1
View file @
3c48618a
This diff is collapsed.
Click to expand it.
pulse_lib/tests/hw_schedule_mock.py
+
2
−
0
View file @
3c48618a
...
...
@@ -3,6 +3,7 @@ import logging
class
HardwareScheduleMock
:
def
__init__
(
self
):
self
.
loaded
=
False
self
.
sequence_params
=
None
def
compile
(
self
,
sequencer_hardware
):
pass
...
...
@@ -25,6 +26,7 @@ class HardwareScheduleMock:
logging
.
info
(
f
'
set configuration
{
args
}
{
kwargs
}
'
)
def
start
(
self
,
waveform_duration
,
n_repetitions
,
sequence_params
):
self
.
sequence_params
=
sequence_params
logging
.
info
(
f
'
start
{
n_repetitions
}
*
{
waveform_duration
}
{
sequence_params
}
'
)
def
is_running
(
self
):
...
...
This diff is collapsed.
Click to expand it.
pulse_lib/tests/mock_m3102a_qs.py
+
10
−
1
View file @
3c48618a
...
...
@@ -17,13 +17,22 @@ class InstructionBase:
# NOTE: n_cycles > 1 cannot be combined with threshold
@dataclass
class
DigitizerInstruction
(
InstructionBase
):
address
:
int
t_measure
:
Optional
[
float
]
=
None
n_cycles
:
int
=
1
threshold
:
Optional
[
float
]
=
None
pxi
:
Optional
[
int
]
=
None
measurement_id
:
Optional
[
int
]
=
None
def
__str__
(
self
):
s
=
f
'
{
self
.
address
:
2
}
:
{
str
(
self
.
t_measure
)
:
4
}
, wait_after
{
self
.
wait_after
}
'
if
self
.
n_cycles
!=
1
:
s
+=
f
'
, n_cycles
{
self
.
n_cycles
}
'
if
self
.
threshold
is
not
None
:
s
+=
f
'
, threshold
{
self
.
threshold
}
'
if
self
.
pxi
is
not
None
:
s
+=
f
'
, pxi
{
self
.
pxi
}
'
return
s
class
SequencerChannel
:
def
__init__
(
self
,
instrument
,
number
):
...
...
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