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
f2d4f884
Commit
f2d4f884
authored
3 months ago
by
Sander Snoo
Browse files
Options
Downloads
Patches
Plain Diff
Better rendering of ramp in hres mode for ramp of 1 sample and duration < 1 ns
parent
b870faeb
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
CHANGELOG.md
+4
-0
4 additions, 0 deletions
CHANGELOG.md
pulse_lib/qblox/pulsar_sequencers.py
+4
-4
4 additions, 4 deletions
pulse_lib/qblox/pulsar_sequencers.py
pulse_lib/tests/baseband/test_hres_conveyor.py
+88
-0
88 additions, 0 deletions
pulse_lib/tests/baseband/test_hres_conveyor.py
with
96 additions
and
4 deletions
CHANGELOG.md
+
4
−
0
View file @
f2d4f884
# Changelog
# Changelog
All notable changes to Pulselib will be documented in this file.
All notable changes to Pulselib will be documented in this file.
## \[1.7.36] - 2024-12-09
-
Better rendering of ramp in hres mode for ramp of 1 sample and duration < 1 ns.
## \[1.7.35] - 2024-12-05
## \[1.7.35] - 2024-12-05
-
Fixed rendering of ramp in hres mode for ramp of 1 sample and duration < 1 ns.
-
Fixed rendering of ramp in hres mode for ramp of 1 sample and duration < 1 ns.
...
...
This diff is collapsed.
Click to expand it.
pulse_lib/qblox/pulsar_sequencers.py
+
4
−
4
View file @
f2d4f884
...
@@ -364,15 +364,15 @@ class VoltageSequenceBuilder(SequenceBuilderBase):
...
@@ -364,15 +364,15 @@ class VoltageSequenceBuilder(SequenceBuilderBase):
if
n
==
0
:
if
n
==
0
:
return
return
dvdt
=
(
v_end
-
v_start
)
/
(
t_end
-
t_start
)
dt_start
=
t_start
-
istart
dt_end
=
iend
-
t_end
if
n
==
1
:
if
n
==
1
:
v
=
(
t_end
-
t_start
)
*
(
v_start
+
v_end
-
dvdt
)
/
2
v
=
(
t_end
-
t_start
)
*
v_start
-
dt_end
*
(
v_end
-
v_start
)
data
=
[
v
]
data
=
[
v
]
self
.
_add_waveform_data
(
istart
,
data
,
v_start
)
self
.
_add_waveform_data
(
istart
,
data
,
v_start
)
return
return
dt_start
=
t_start
-
istart
dvdt
=
(
v_end
-
v_start
)
/
(
t_end
-
t_start
)
dt_end
=
iend
-
t_end
frac_start
=
1
-
dt_start
frac_start
=
1
-
dt_start
frac_end
=
1
-
dt_end
frac_end
=
1
-
dt_end
data
=
np
.
linspace
(
v_start
-
dt_start
*
dvdt
,
v_end
+
dt_end
*
dvdt
,
n
,
endpoint
=
False
)
data
=
np
.
linspace
(
v_start
-
dt_start
*
dvdt
,
v_end
+
dt_end
*
dvdt
,
n
,
endpoint
=
False
)
...
...
This diff is collapsed.
Click to expand it.
pulse_lib/tests/baseband/test_hres_conveyor.py
0 → 100644
+
88
−
0
View file @
f2d4f884
from
pulse_lib.tests.configurations.test_configuration
import
context
#%%
import
numpy
as
np
import
matplotlib.pyplot
as
pt
from
pulse_lib.qblox.pulsar_sequencers
import
PulsarConfig
,
VoltageSequenceBuilder
VoltageSequenceBuilder
.
verbose
=
True
def
config_backend
(
pulse
):
if
pulse
.
_backend
in
[
'
Keysight
'
,
'
Keysight_QS
'
]:
context
.
station
.
AWG1
.
set_digital_filter_mode
(
3
)
if
pulse
.
_backend
==
'
Qblox
'
:
# increase resolution for fair check of algorithm
PulsarConfig
.
NS_SUB_DIVISION
=
20
def
test_shuttle
(
t0
=
5.46
,
t_ramp
=
2.0
,
t_shuttle
=
13
,
offset_1
=
200.0
,
offset_2
=
150.0
,
amplitude_1
=
400
,
amplitude_2
=
400
,
phase_1
=
1.2
,
phase_2
=
1.7
,
frequency
=-
46.1e6
,
hres
=
True
,
):
pulse
=
context
.
init_pulselib
(
n_gates
=
2
)
config_backend
(
pulse
)
phase_1
*=
np
.
pi
phase_2
*=
np
.
pi
v1_start
=
offset_1
+
amplitude_1
*
np
.
sin
(
phase_1
)
v2_start
=
offset_2
+
amplitude_2
*
np
.
sin
(
phase_2
)
v1_stop
=
offset_1
+
amplitude_1
*
np
.
sin
(
phase_1
+
2
*
frequency
*
t_shuttle
*
1e-9
*
2
*
np
.
pi
)
v2_stop
=
offset_2
+
amplitude_2
*
np
.
sin
(
phase_2
+
2
*
frequency
*
t_shuttle
*
1e-9
*
2
*
np
.
pi
)
t_offset
=
0e5
s0
=
pulse
.
mk_segment
(
hres
=
hres
)
s0
.
wait
(
0.050000002
+
t_offset
)
s
=
pulse
.
mk_segment
(
hres
=
hres
)
P1
=
s
.
P1
P2
=
s
.
P2
s
.
wait
(
t0
,
reset_time
=
True
)
P1
.
add_ramp_ss
(
0
,
t_ramp
,
0
,
v1_start
)
P2
.
add_ramp_ss
(
0
,
t_ramp
,
0
,
v2_start
)
s
.
reset_time
()
P1
.
add_block
(
0
,
t_shuttle
,
offset_1
)
P2
.
add_block
(
0
,
t_shuttle
,
offset_2
)
P1
.
add_sin
(
0
,
t_shuttle
,
amplitude_1
,
2
*
frequency
,
phase_offset
=
phase_1
)
P1
.
add_sin
(
0
,
t_shuttle
,
0.0
,
frequency
,
phase_offset
=
phase_1
)
P2
.
add_sin
(
0
,
t_shuttle
,
amplitude_2
,
2
*
frequency
,
phase_offset
=
phase_2
)
P2
.
add_sin
(
0
,
t_shuttle
,
0.0
,
frequency
,
phase_offset
=
phase_2
)
s
.
reset_time
()
P1
.
add_block
(
0
,
-
1
,
v1_stop
)
P2
.
add_block
(
0
,
-
1
,
v2_stop
)
s
.
wait
(
120
,
reset_time
=
True
)
sequence
=
pulse
.
mk_sequence
([
s0
,
s
])
sequence
.
n_rep
=
None
context
.
plot_awgs
(
sequence
,
ylim
=
(
-
1.10
,
1.10
),
xlim
=
(
0
+
t_offset
,
30
+
t_offset
),
analogue_out
=
True
,
create_figure
=
False
,
)
#%%
if
__name__
==
'
__main__
'
:
pt
.
close
(
"
all
"
)
for
t
in
[
4.0
,
4.07
,
4.33
,
4.4
,
4.5
,
4.6
,
4.7
,
4.8
,
4.9
,
#4.95, 5.0,
5.18
,
5.91
,
6.23
,
7.02
,
7.68
,
]:
pt
.
figure
()
test_shuttle
(
t0
=
t
)
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