Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
core_tools
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
core_tools
Commits
f039a242
Commit
f039a242
authored
4 years ago
by
Pieter Eendebak
Browse files
Options
Downloads
Patches
Plain Diff
update type annotations and documentation
parent
07cc610b
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!1
Cleanup of param_viewer
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
core_tools/GUI/param_viewer/param_viewer_GUI_main.py
+8
-7
8 additions, 7 deletions
core_tools/GUI/param_viewer/param_viewer_GUI_main.py
with
8 additions
and
7 deletions
core_tools/GUI/param_viewer/param_viewer_GUI_main.py
+
8
−
7
View file @
f039a242
# -*- coding: utf-8 -*-
from
typing
import
Optional
from
core_tools.GUI.param_viewer.param_viewer_GUI_window
import
Ui_MainWindow
from
PyQt5
import
QtCore
,
QtGui
,
QtWidgets
from
functools
import
partial
import
qcodes
as
qc
from
qcodes
import
Station
import
numpy
as
np
from
dataclasses
import
dataclass
...
...
@@ -15,7 +17,7 @@ class param_data_obj:
class
param_viewer
(
QtWidgets
.
QMainWindow
,
Ui_MainWindow
):
"""
docstring for virt_gate_matrix_GUI
"""
def
__init__
(
self
,
station
,
gates_object
=
None
):
def
__init__
(
self
,
station
:
Station
,
gates_object
:
Optional
[
object
]
=
None
):
if
type
(
station
)
is
not
Station
:
raise
Exception
(
'
Syntax changed, to support RF_settings now supply station
'
)
self
.
real_gates
=
list
()
...
...
@@ -73,7 +75,8 @@ class param_viewer(QtWidgets.QMainWindow, Ui_MainWindow):
def
_update_step
(
self
,
value
):
self
.
update_step
(
value
())
def
update_step
(
self
,
value
):
def
update_step
(
self
,
value
:
float
):
"""
Update step size of the parameter GUI elements with the specified value
"""
self
.
_step_size
=
value
for
gate
in
self
.
real_gates
:
gate
.
gui_input_param
.
setSingleStep
(
value
)
...
...
@@ -82,13 +85,11 @@ class param_viewer(QtWidgets.QMainWindow, Ui_MainWindow):
self
.
step_size
.
setValue
(
value
)
def
_add_RFset
(
self
,
parameter
):
'''
add a new gate.
def
_add_RFset
(
self
,
parameter
:
qc
.
Parameter
):
'''
Add a new RF.
Args:
parameter (QCoDeS parameter object) : parameter to add.
virtual (bool) : True in case this is a virtual gate.
'''
i
=
len
(
self
.
rf_settings
)
...
...
@@ -130,7 +131,7 @@ class param_viewer(QtWidgets.QMainWindow, Ui_MainWindow):
layout
.
addWidget
(
set_unit
,
i
,
2
,
1
,
1
)
self
.
rf_settings
.
append
(
param_data_obj
(
parameter
,
set_input
,
division
))
def
_add_gate
(
self
,
parameter
,
virtual
):
def
_add_gate
(
self
,
parameter
:
qc
.
Parameter
,
virtual
:
bool
):
'''
add a new gate.
...
...
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