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
147c9107
Commit
147c9107
authored
1 year ago
by
Sander Snoo
Browse files
Options
Downloads
Patches
Plain Diff
Improved alignment of phase shifts on Qblox
parent
b543dda2
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
pulse_lib/qblox/pulsar_sequencers.py
+8
-3
8 additions, 3 deletions
pulse_lib/qblox/pulsar_sequencers.py
pulse_lib/tests/test_iq/test_phase.py
+31
-2
31 additions, 2 deletions
pulse_lib/tests/test_iq/test_phase.py
with
39 additions
and
5 deletions
pulse_lib/qblox/pulsar_sequencers.py
+
8
−
3
View file @
147c9107
...
...
@@ -535,11 +535,16 @@ class IQSequenceBuilder(SequenceBuilderBase):
Arguments:
phase (float): phase in rad.
'''
t
=
PulsarConfig
.
floor
(
t
+
self
.
offset_ns
)
self
.
_update_time_and_markers
(
t
,
0.0
)
# The phase shift can be before or after MW pulse.
# First try to align towards lower t
t_phase
=
PulsarConfig
.
floor
(
t
+
self
.
offset_ns
)
if
t_phase
<
self
.
t_end
:
# Align towards higher t.
t_phase
=
PulsarConfig
.
ceil
(
t
+
self
.
offset_ns
)
self
.
_update_time_and_markers
(
t_phase
,
0.0
)
# normalize phase to -1.0 .. + 1.0 for Q1Pulse sequencer
norm_phase
=
(
phase
/
np
.
pi
+
1
)
%
2
-
1
self
.
seq
.
shift_phase
(
norm_phase
,
t_offset
=
t
)
self
.
seq
.
shift_phase
(
norm_phase
,
t_offset
=
t
_phase
)
def
chirp
(
self
,
t_start
,
t_end
,
amplitude
,
start_frequency
,
stop_frequency
):
# set NCO frequency if valid. Otherwise set 0.0 to enable modulation
...
...
This diff is collapsed.
Click to expand it.
pulse_lib/tests/test_iq/test_phase.py
+
31
−
2
View file @
147c9107
...
...
@@ -4,7 +4,7 @@ from pulse_lib.tests.configurations.test_configuration import context
#%%
from
numpy
import
pi
def
test
():
def
test
1
():
pulse
=
context
.
init_pulselib
(
n_qubits
=
1
)
s
=
pulse
.
mk_segment
()
...
...
@@ -29,5 +29,34 @@ def test():
return
None
def
test2
():
# not aligned pulses
pulse
=
context
.
init_pulselib
(
n_qubits
=
1
)
s
=
pulse
.
mk_segment
()
s
.
q1
.
add_MW_pulse
(
0
,
10
,
100
,
2.450e9
)
s
.
q1
.
add_phase_shift
(
10
,
pi
/
2
)
s
.
q1
.
add_phase_shift
(
10
,
pi
/
2
)
s
.
q1
.
add_MW_pulse
(
12
,
30
,
100
,
2.450e9
)
s
.
q1
.
add_phase_shift
(
40
,
pi
)
s
.
reset_time
()
s
.
q1
.
add_phase_shift
(
0
,
-
pi
/
2
)
s
.
q1
.
add_MW_pulse
(
2
,
10
,
100
,
2.450e9
)
s
.
q1
.
add_phase_shift
(
18
,
pi
/
2
)
s
.
q1
.
add_MW_pulse
(
20
,
40
,
100
,
2.450e9
)
context
.
plot_segments
([
s
])
sequence
=
pulse
.
mk_sequence
([
s
])
sequence
.
n_rep
=
1
context
.
add_hw_schedule
(
sequence
)
context
.
plot_awgs
(
sequence
)
return
None
#%%
if
__name__
==
'
__main__
'
:
ds
=
test
()
ds1
=
test1
()
ds2
=
test2
()
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