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
b60b08dd
Commit
b60b08dd
authored
1 year ago
by
Sander Snoo
Browse files
Options
Downloads
Patches
Plain Diff
Added tests
parent
2f07427b
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/tests/test_iq/test_iq_markers.py
+42
-0
42 additions, 0 deletions
pulse_lib/tests/test_iq/test_iq_markers.py
pulse_lib/tests/test_iq/test_qubit_resonance_sweep.py
+66
-0
66 additions, 0 deletions
pulse_lib/tests/test_iq/test_qubit_resonance_sweep.py
with
108 additions
and
0 deletions
pulse_lib/tests/test_iq/test_iq_markers.py
0 → 100644
+
42
−
0
View file @
b60b08dd
from
pulse_lib.tests.configurations.test_configuration
import
context
import
pulse_lib.segments.utility.looping
as
lp
#%%
def
test1
():
pulse
=
context
.
init_pulselib
(
n_qubits
=
4
,
n_sensors
=
1
)
# f LO: 2.400 and 2.800 GHz
# qubit freqs: 2.450, 2.550, 2.650, 2.750 GHz
f_q1
=
2.450e9
# IQ = +50 MHz
f_q2
=
2.550e9
# IQ = +150 MHz
f_q3
=
2.650e9
# IQ = -150 MHz
f_q4
=
2.750e9
# IQ = -50 MHz
# marker setup + hold = 120 ns.
t_wait
=
lp
.
linspace
(
110
,
150
,
9
,
name
=
'
t_wait
'
,
unit
=
'
ns
'
,
axis
=
0
)
s
=
pulse
.
mk_segment
()
s
.
q1
.
add_MW_pulse
(
0
,
100
,
200.0
,
f_q1
)
s
.
wait
(
t_wait
,
reset_time
=
True
)
s
.
q2
.
add_MW_pulse
(
0
,
100
,
200.0
,
f_q2
)
s
.
wait
(
t_wait
,
reset_time
=
True
)
s
.
q3
.
add_MW_pulse
(
0
,
100
,
200.0
,
f_q3
)
s
.
wait
(
t_wait
,
reset_time
=
True
)
s
.
q4
.
add_MW_pulse
(
0
,
100
,
200.0
,
f_q4
)
s
.
SD1
.
acquire
(
0
,
100
)
sequence
=
pulse
.
mk_sequence
([
s
])
sequence
.
n_rep
=
10
m_param
=
sequence
.
get_measurement_param
()
context
.
add_hw_schedule
(
sequence
)
for
i
in
range
(
len
(
t_wait
)):
context
.
plot_awgs
(
sequence
,
index
=
(
i
,))
return
context
.
run
(
'
iq-markers
'
,
sequence
,
m_param
)
#%%
if
__name__
==
'
__main__
'
:
ds
=
test1
()
This diff is collapsed.
Click to expand it.
pulse_lib/tests/test_iq/test_qubit_resonance_sweep.py
0 → 100644
+
66
−
0
View file @
b60b08dd
from
pulse_lib.tests.configurations.test_configuration
import
context
import
pulse_lib.segments.utility.looping
as
lp
#%%
def
test1
():
'''
Sweep both f_res and f_drive
'''
pulse
=
context
.
init_pulselib
(
n_qubits
=
1
,
n_sensors
=
1
)
# f LO: 2.400
f_q1
=
2.450e9
# IQ = +50 MHz
f_q1
=
lp
.
linspace
(
2.410e9
,
2.500e9
,
10
,
name
=
'
f_res
'
,
unit
=
'
Hz
'
,
axis
=
0
)
s
=
pulse
.
mk_segment
()
s
.
q1
.
add_MW_pulse
(
0
,
100
,
200.0
,
f_q1
)
s
.
wait
(
20
,
reset_time
=
True
)
s
.
q1
.
add_MW_pulse
(
0
,
100
,
200.0
,
f_q1
)
s
.
SD1
.
acquire
(
0
,
100
)
sequence
=
pulse
.
mk_sequence
([
s
])
sequence
.
n_rep
=
1
sequence
.
set_qubit_resonance_frequency
(
'
q1
'
,
f_q1
)
m_param
=
sequence
.
get_measurement_param
()
context
.
add_hw_schedule
(
sequence
)
for
i
in
range
(
len
(
f_q1
)):
context
.
plot_awgs
(
sequence
,
index
=
(
i
,))
return
context
.
run
(
'
iq-markers
'
,
sequence
,
m_param
)
def
test2
():
'''
Sweep only f_res. f_drive is constant.
Note: currently fails for
"
Keysight
"
'''
pulse
=
context
.
init_pulselib
(
n_qubits
=
1
,
n_sensors
=
1
)
# f LO: 2.400
f_q1_drive
=
2.450e9
# IQ = +50 MHz
f_q1
=
lp
.
linspace
(
2.410e9
,
2.500e9
,
10
,
name
=
'
f_res
'
,
unit
=
'
Hz
'
,
axis
=
0
)
s
=
pulse
.
mk_segment
()
s
.
q1
.
add_MW_pulse
(
0
,
100
,
200.0
,
f_q1_drive
)
s
.
wait
(
20
,
reset_time
=
True
)
s
.
q1
.
add_MW_pulse
(
0
,
100
,
200.0
,
f_q1_drive
)
s
.
SD1
.
acquire
(
0
,
100
)
sequence
=
pulse
.
mk_sequence
([
s
])
sequence
.
n_rep
=
1
sequence
.
set_qubit_resonance_frequency
(
'
q1
'
,
f_q1
)
m_param
=
sequence
.
get_measurement_param
()
context
.
add_hw_schedule
(
sequence
)
for
i
in
range
(
len
(
f_q1
)):
context
.
plot_awgs
(
sequence
,
index
=
(
i
,))
return
context
.
run
(
'
iq-markers
'
,
sequence
,
m_param
)
#%%
if
__name__
==
'
__main__
'
:
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