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
86d97a38
Commit
86d97a38
authored
7 years ago
by
Stephan Philips
Browse files
Options
Downloads
Patches
Plain Diff
braintoughts
parents
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
base_pulse.py
+81
-0
81 additions, 0 deletions
base_pulse.py
toughts.txt
+13
-0
13 additions, 0 deletions
toughts.txt
with
94 additions
and
0 deletions
base_pulse.py
0 → 100644
+
81
−
0
View file @
86d97a38
import
numpy
as
np
class
pulselib
:
self
.
backend
=
'
keysight
'
def
__init__
(
self
):
self
.
awg_channels
=
[
'
names
'
]
self
.
awg_channels_to_physical_locations
=
[
'
here_dict
'
]
self
.
marker_channels
=
[
'
names
'
]
self
.
marger_channels_to_location
=
[]
self
.
delays
=
[]
self
.
convertion_matrix
=
[]
self
.
segments
=
segment_container
(
channels
)
def
mk_segment
(
self
,
name
):
self
.
segement
.
append
()
def
upload_data
()
def
play
()
class
my_segment
():
self
.
name
=
''
self
.
channels
=
[]
self
.
def
__init__
(
self
,
channels
):
self
.
channels
=
channels
def
add_pulse
(
array
,
channel
):
def
reset_time
():
# aligns all time together -- the channel with the longest time will be chosen
class
segment_container
:
self
.
segment
=
[]
def
__init__
(
self
):
return
def
add_seggment
(
name
,
channels
):
if
exists
(
name
):
raise
ValueError
(
"
sement with the name : %
\n
alreadt exists
"
%
name
)
self
.
segment
.
append
(
my_segment
(
channels
))
return
self
.
get_segment
(
name
)
def
get_segment
(
name
):
for
i
in
self
.
segment
:
if
i
.
name
==
name
:
return
i
raise
ValueError
(
"
segment not found :(
"
)
class
channel_data_obj
():
#object containing the data for a specific channels
#the idea is that all the data is parmeterised and will be constuceted whenever the function is called.
self
.
my_data_array
=
np
.
empty
()
add_data
class
block_pulses
:
# class to make block pulses
how
to
do
pulses
->
sin
?
->
pulses
?
->
step_pulses
p
=
pulselin
()
seg
=
pulselib
.
mk_segment
(
'
manip
'
)
seg
.
p1
.
add_pulse
(
10
,
50
,
20
,
prescaler
=
'
1
'
)
seg
.
p3
.
add_pulse
(
12
,
34
,
40
,)
seg
.
k2
.
add_pulse_advanced
([
pulse
sequence
])
seg
.
add_np
(
array
,
tstart_t_stop
seg
.
p5
.
add_sin
(
14
,
89
,
freq
,
phase
,
amp
)
pulse
This diff is collapsed.
Click to expand it.
toughts.txt
0 → 100644
+
13
−
0
View file @
86d97a38
These are the initial thoughs for a general pulse lirary that should be maily used for keysight systems.
Note that the intend is to support also other systems
Library functions needed
-> general object: conatains AWG info
-> channels
-> makers
-> segment object
-> add function
-> add time based relative based
-> sequence object
-> option for virtual AWG
-
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