quantify 0.0.0a0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (117) hide show
  1. quantify-0.0.0a0/LICENSE +29 -0
  2. quantify-0.0.0a0/PKG-INFO +91 -0
  3. quantify-0.0.0a0/README.md +35 -0
  4. quantify-0.0.0a0/pyproject.toml +170 -0
  5. quantify-0.0.0a0/quantify/__init__.py +78 -0
  6. quantify-0.0.0a0/quantify/_static_version.py +2 -0
  7. quantify-0.0.0a0/quantify/_version.py +195 -0
  8. quantify-0.0.0a0/quantify/analysis/__init__.py +30 -0
  9. quantify-0.0.0a0/quantify/analysis/base_analysis.py +1094 -0
  10. quantify-0.0.0a0/quantify/analysis/calibration.py +141 -0
  11. quantify-0.0.0a0/quantify/analysis/conditional_oscillation_analysis.py +279 -0
  12. quantify-0.0.0a0/quantify/analysis/cosine_analysis.py +97 -0
  13. quantify-0.0.0a0/quantify/analysis/fitting_models.py +741 -0
  14. quantify-0.0.0a0/quantify/analysis/interpolation_analysis.py +82 -0
  15. quantify-0.0.0a0/quantify/analysis/optimization_analysis.py +135 -0
  16. quantify-0.0.0a0/quantify/analysis/readout_calibration_analysis.py +286 -0
  17. quantify-0.0.0a0/quantify/analysis/schemas/__init__.py +3 -0
  18. quantify-0.0.0a0/quantify/analysis/single_qubit_timedomain.py +756 -0
  19. quantify-0.0.0a0/quantify/analysis/spectroscopy_analysis.py +769 -0
  20. quantify-0.0.0a0/quantify/analysis/time_of_flight_analysis.py +160 -0
  21. quantify-0.0.0a0/quantify/analysis/types.py +37 -0
  22. quantify-0.0.0a0/quantify/backends/__init__.py +12 -0
  23. quantify-0.0.0a0/quantify/backends/circuit_to_device.py +832 -0
  24. quantify-0.0.0a0/quantify/backends/graph_compilation.py +613 -0
  25. quantify-0.0.0a0/quantify/backends/mock/__init__.py +3 -0
  26. quantify-0.0.0a0/quantify/backends/mock/mock_rom.py +118 -0
  27. quantify-0.0.0a0/quantify/backends/types/__init__.py +3 -0
  28. quantify-0.0.0a0/quantify/backends/types/common.py +352 -0
  29. quantify-0.0.0a0/quantify/compilation.py +277 -0
  30. quantify-0.0.0a0/quantify/data/__init__.py +3 -0
  31. quantify-0.0.0a0/quantify/data/dataset_adapters.py +193 -0
  32. quantify-0.0.0a0/quantify/data/dataset_attrs.py +382 -0
  33. quantify-0.0.0a0/quantify/data/experiment.py +252 -0
  34. quantify-0.0.0a0/quantify/data/handling.py +1472 -0
  35. quantify-0.0.0a0/quantify/data/types.py +103 -0
  36. quantify-0.0.0a0/quantify/device_under_test/__init__.py +15 -0
  37. quantify-0.0.0a0/quantify/device_under_test/composite_square_edge.py +128 -0
  38. quantify-0.0.0a0/quantify/device_under_test/device_element.py +54 -0
  39. quantify-0.0.0a0/quantify/device_under_test/edge.py +90 -0
  40. quantify-0.0.0a0/quantify/device_under_test/mock_setup.py +154 -0
  41. quantify-0.0.0a0/quantify/device_under_test/quantum_device.py +436 -0
  42. quantify-0.0.0a0/quantify/device_under_test/transmon_element.py +653 -0
  43. quantify-0.0.0a0/quantify/enums.py +74 -0
  44. quantify-0.0.0a0/quantify/helpers/__init__.py +3 -0
  45. quantify-0.0.0a0/quantify/helpers/collections.py +70 -0
  46. quantify-0.0.0a0/quantify/helpers/deprecation.py +74 -0
  47. quantify-0.0.0a0/quantify/helpers/importers.py +45 -0
  48. quantify-0.0.0a0/quantify/helpers/inspect.py +156 -0
  49. quantify-0.0.0a0/quantify/helpers/schedule.py +253 -0
  50. quantify-0.0.0a0/quantify/helpers/validators.py +139 -0
  51. quantify-0.0.0a0/quantify/helpers/waveforms.py +561 -0
  52. quantify-0.0.0a0/quantify/instrument_coordinator/__init__.py +7 -0
  53. quantify-0.0.0a0/quantify/instrument_coordinator/components/__init__.py +16 -0
  54. quantify-0.0.0a0/quantify/instrument_coordinator/components/base.py +154 -0
  55. quantify-0.0.0a0/quantify/instrument_coordinator/components/generic.py +139 -0
  56. quantify-0.0.0a0/quantify/instrument_coordinator/instrument_coordinator.py +406 -0
  57. quantify-0.0.0a0/quantify/instrument_coordinator/utility.py +181 -0
  58. quantify-0.0.0a0/quantify/json_utils.py +466 -0
  59. quantify-0.0.0a0/quantify/math.py +36 -0
  60. quantify-0.0.0a0/quantify/measurement/__init__.py +3 -0
  61. quantify-0.0.0a0/quantify/measurement/control.py +1295 -0
  62. quantify-0.0.0a0/quantify/measurement/schemas/__init__.py +3 -0
  63. quantify-0.0.0a0/quantify/measurement/types.py +91 -0
  64. quantify-0.0.0a0/quantify/operations/__init__.py +138 -0
  65. quantify-0.0.0a0/quantify/operations/acquisition_library.py +936 -0
  66. quantify-0.0.0a0/quantify/operations/composite_factories.py +62 -0
  67. quantify-0.0.0a0/quantify/operations/control_flow_library.py +273 -0
  68. quantify-0.0.0a0/quantify/operations/gate_library.py +802 -0
  69. quantify-0.0.0a0/quantify/operations/measurement_factories.py +824 -0
  70. quantify-0.0.0a0/quantify/operations/operation.py +338 -0
  71. quantify-0.0.0a0/quantify/operations/pulse_compensation_library.py +120 -0
  72. quantify-0.0.0a0/quantify/operations/pulse_factories.py +333 -0
  73. quantify-0.0.0a0/quantify/operations/pulse_library.py +1187 -0
  74. quantify-0.0.0a0/quantify/pulse_compensation.py +317 -0
  75. quantify-0.0.0a0/quantify/resources.py +169 -0
  76. quantify-0.0.0a0/quantify/schedules/__init__.py +57 -0
  77. quantify-0.0.0a0/quantify/schedules/_visualization/__init__.py +13 -0
  78. quantify-0.0.0a0/quantify/schedules/_visualization/circuit_diagram.py +787 -0
  79. quantify-0.0.0a0/quantify/schedules/_visualization/constants.py +22 -0
  80. quantify-0.0.0a0/quantify/schedules/_visualization/pulse_diagram.py +989 -0
  81. quantify-0.0.0a0/quantify/schedules/_visualization/pulse_scheme.py +506 -0
  82. quantify-0.0.0a0/quantify/schedules/schedule.py +1143 -0
  83. quantify-0.0.0a0/quantify/schedules/spectroscopy_schedules.py +514 -0
  84. quantify-0.0.0a0/quantify/schedules/timedomain_schedules.py +638 -0
  85. quantify-0.0.0a0/quantify/schedules/trace_schedules.py +394 -0
  86. quantify-0.0.0a0/quantify/schedules/two_qubit_transmon_schedules.py +117 -0
  87. quantify-0.0.0a0/quantify/schedules/verification.py +327 -0
  88. quantify-0.0.0a0/quantify/schemas/__init__.py +3 -0
  89. quantify-0.0.0a0/quantify/structure/__init__.py +14 -0
  90. quantify-0.0.0a0/quantify/structure/model.py +98 -0
  91. quantify-0.0.0a0/quantify/structure/types.py +128 -0
  92. quantify-0.0.0a0/quantify/utilities/__init__.py +10 -0
  93. quantify-0.0.0a0/quantify/utilities/_tests_helpers.py +54 -0
  94. quantify-0.0.0a0/quantify/utilities/experiment_helpers.py +283 -0
  95. quantify-0.0.0a0/quantify/utilities/general.py +239 -0
  96. quantify-0.0.0a0/quantify/utilities/inspect_utils.py +116 -0
  97. quantify-0.0.0a0/quantify/visualization/SI_utilities.py +560 -0
  98. quantify-0.0.0a0/quantify/visualization/__init__.py +23 -0
  99. quantify-0.0.0a0/quantify/visualization/_appnope.py +30 -0
  100. quantify-0.0.0a0/quantify/visualization/color_utilities.py +86 -0
  101. quantify-0.0.0a0/quantify/visualization/ins_mon_widget/__init__.py +3 -0
  102. quantify-0.0.0a0/quantify/visualization/ins_mon_widget/qc_snapshot_widget.py +233 -0
  103. quantify-0.0.0a0/quantify/visualization/instrument_monitor.py +250 -0
  104. quantify-0.0.0a0/quantify/visualization/mpl_plotting.py +713 -0
  105. quantify-0.0.0a0/quantify/visualization/plot_interpolation.py +134 -0
  106. quantify-0.0.0a0/quantify/visualization/pyqt_plotmon.py +291 -0
  107. quantify-0.0.0a0/quantify/visualization/pyqt_plotmon_remote.py +778 -0
  108. quantify-0.0.0a0/quantify/waveforms.py +525 -0
  109. quantify-0.0.0a0/quantify.egg-info/PKG-INFO +91 -0
  110. quantify-0.0.0a0/quantify.egg-info/SOURCES.txt +115 -0
  111. quantify-0.0.0a0/quantify.egg-info/dependency_links.txt +1 -0
  112. quantify-0.0.0a0/quantify.egg-info/requires.txt +34 -0
  113. quantify-0.0.0a0/quantify.egg-info/top_level.txt +1 -0
  114. quantify-0.0.0a0/setup.cfg +4 -0
  115. quantify-0.0.0a0/setup.py +27 -0
  116. quantify-0.0.0a0/tests/test_headers_and_copyright.py +71 -0
  117. quantify-0.0.0a0/tests/test_init_imports.py +106 -0
@@ -0,0 +1,29 @@
1
+ BSD 3-Clause License
2
+
3
+ Copyright (c) 2020-2023, The Quantify consortium.
4
+ All rights reserved.
5
+
6
+ Redistribution and use in source and binary forms, with or without
7
+ modification, are permitted provided that the following conditions are met:
8
+
9
+ 1. Redistributions of source code must retain the above copyright notice, this
10
+ list of conditions and the following disclaimer.
11
+
12
+ 2. Redistributions in binary form must reproduce the above copyright notice,
13
+ this list of conditions and the following disclaimer in the documentation
14
+ and/or other materials provided with the distribution.
15
+
16
+ 3. Neither the name of the copyright holder nor the names of its
17
+ contributors may be used to endorse or promote products derived from
18
+ this software without specific prior written permission.
19
+
20
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
23
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
24
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
26
+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
27
+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
28
+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
@@ -0,0 +1,91 @@
1
+ Metadata-Version: 2.4
2
+ Name: quantify
3
+ Version: 0.0.0a0
4
+ Summary: A framework for controlling quantum computing and solid-state physics experiments.
5
+ Maintainer-email: Robert Sokolewicz <rsokolewicz@qblox.com>, Olga Lebiga <olga@orangeqs.com>, Gabor Oszkar Denes <viacheslav@orangeqs.com>, Amirtha Varshiny Arumugam <amirthavarshiny@orangeqs.com>, Gabriel Chatelain <gabriel@orangeqs.com>
6
+ License: BSD-3-Clause
7
+ Project-URL: Website, https://quantify-os.org
8
+ Project-URL: Source, https://gitlab.com/quantify-os/quantify
9
+ Project-URL: Issue tracker, https://gitlab.com/quantify-os/quantify/-/issues
10
+ Project-URL: Slack, https://join.slack.com/t/quantify-hq/shared_invite/zt-1nd78r4e9-rbWdna53cW4DO_YbtMhVuA
11
+ Keywords: quantum,quantify
12
+ Classifier: Development Status :: 3 - Alpha
13
+ Classifier: Intended Audience :: Developers
14
+ Classifier: Intended Audience :: Science/Research
15
+ Classifier: License :: OSI Approved :: BSD License
16
+ Classifier: Natural Language :: English
17
+ Classifier: Programming Language :: Python :: 3.12
18
+ Classifier: Topic :: Scientific/Engineering
19
+ Description-Content-Type: text/markdown
20
+ License-File: LICENSE
21
+ Requires-Dist: adaptive
22
+ Requires-Dist: appnope
23
+ Requires-Dist: columnar
24
+ Requires-Dist: dataclasses-json
25
+ Requires-Dist: dill
26
+ Requires-Dist: fastjsonschema
27
+ Requires-Dist: filelock
28
+ Requires-Dist: h5netcdf
29
+ Requires-Dist: jinja2>=3.1.2
30
+ Requires-Dist: jsonschema
31
+ Requires-Dist: lmfit>=1.0.3
32
+ Requires-Dist: matplotlib!=3.5.0
33
+ Requires-Dist: methodtools
34
+ Requires-Dist: networkx
35
+ Requires-Dist: numpy!=1.19.4
36
+ Requires-Dist: pandas[output_formatting]
37
+ Requires-Dist: pathvalidate
38
+ Requires-Dist: plotly
39
+ Requires-Dist: pre-commit
40
+ Requires-Dist: pre-commit-hooks
41
+ Requires-Dist: pydantic>=2.0
42
+ Requires-Dist: pyqt5>5.15.2
43
+ Requires-Dist: pyqtgraph
44
+ Requires-Dist: pyright
45
+ Requires-Dist: qcodes>=0.37.0
46
+ Requires-Dist: qcodes-loop
47
+ Requires-Dist: rich[jupyter]
48
+ Requires-Dist: scikit-learn
49
+ Requires-Dist: scipy!=1.6.0,>=1.5.0
50
+ Requires-Dist: typing-extensions
51
+ Requires-Dist: uncertainties
52
+ Requires-Dist: xarray>=0.19.0
53
+ Requires-Dist: xxhash
54
+ Requires-Dist: lmfit>=1.3.3
55
+ Dynamic: license-file
56
+
57
+ # Quantify
58
+
59
+ ![Quantify logo](https://orangeqs.com/logos/QUANTIFY_LANDSCAPE.svg)
60
+
61
+ Quantify is a Python-based data acquisition framework focused on Quantum Computing and
62
+ solid-state physics experiments.
63
+ Currently it is a metapackage for [quantify-core](https://pypi.org/project/quantify-core/)
64
+ ([git repo](https://gitlab.com/quantify-os/quantify-core/))
65
+ and [quantify-scheduler](https://pypi.org/project/quantify-scheduler/)
66
+ ([git repo](https://gitlab.com/quantify-os/quantify-scheduler/)).
67
+ They are built on top of [QCoDeS](https://qcodes.github.io/Qcodes/) and are a spiritual
68
+ successor of [PycQED](https://github.com/DiCarloLab-Delft/PycQED_py3).
69
+
70
+ Take a look at the latest documentation for
71
+ [quantify-core](https://quantify-quantify-core.readthedocs-hosted.com/) and
72
+ [quantify-scheduler](https://quantify-quantify-scheduler.readthedocs-hosted.com/)
73
+ for the usage instructions.
74
+
75
+ ## Overview and Community
76
+
77
+ For a general overview of Quantify and connecting to its open-source community,
78
+ see [quantify-os.org](https://quantify-os.org/).
79
+ Quantify is maintained by the Quantify Consortium consisting of Qblox and
80
+ Orange Quantum Systems.
81
+
82
+ [<img src="https://cdn.sanity.io/images/ostxzp7d/production/f9ab429fc72aea1b31c4b2c7fab5e378b67d75c3-132x31.svg" alt="Qblox logo" width=200px/>](https://qblox.com)
83
+ &nbsp;
84
+ &nbsp;
85
+ &nbsp;
86
+ &nbsp;
87
+ [<img src="https://orangeqs.com/OQS_logo_with_text.svg" alt="Orange Quantum Systems logo" width=200px/>](https://orangeqs.com)
88
+
89
+ &nbsp;
90
+
91
+ The software is licensed under a [BSD 3-clause license](https://gitlab.com/quantify-os/quantify/-/raw/main/LICENSE).
@@ -0,0 +1,35 @@
1
+ # Quantify
2
+
3
+ ![Quantify logo](https://orangeqs.com/logos/QUANTIFY_LANDSCAPE.svg)
4
+
5
+ Quantify is a Python-based data acquisition framework focused on Quantum Computing and
6
+ solid-state physics experiments.
7
+ Currently it is a metapackage for [quantify-core](https://pypi.org/project/quantify-core/)
8
+ ([git repo](https://gitlab.com/quantify-os/quantify-core/))
9
+ and [quantify-scheduler](https://pypi.org/project/quantify-scheduler/)
10
+ ([git repo](https://gitlab.com/quantify-os/quantify-scheduler/)).
11
+ They are built on top of [QCoDeS](https://qcodes.github.io/Qcodes/) and are a spiritual
12
+ successor of [PycQED](https://github.com/DiCarloLab-Delft/PycQED_py3).
13
+
14
+ Take a look at the latest documentation for
15
+ [quantify-core](https://quantify-quantify-core.readthedocs-hosted.com/) and
16
+ [quantify-scheduler](https://quantify-quantify-scheduler.readthedocs-hosted.com/)
17
+ for the usage instructions.
18
+
19
+ ## Overview and Community
20
+
21
+ For a general overview of Quantify and connecting to its open-source community,
22
+ see [quantify-os.org](https://quantify-os.org/).
23
+ Quantify is maintained by the Quantify Consortium consisting of Qblox and
24
+ Orange Quantum Systems.
25
+
26
+ [<img src="https://cdn.sanity.io/images/ostxzp7d/production/f9ab429fc72aea1b31c4b2c7fab5e378b67d75c3-132x31.svg" alt="Qblox logo" width=200px/>](https://qblox.com)
27
+ &nbsp;
28
+ &nbsp;
29
+ &nbsp;
30
+ &nbsp;
31
+ [<img src="https://orangeqs.com/OQS_logo_with_text.svg" alt="Orange Quantum Systems logo" width=200px/>](https://orangeqs.com)
32
+
33
+ &nbsp;
34
+
35
+ The software is licensed under a [BSD 3-clause license](https://gitlab.com/quantify-os/quantify/-/raw/main/LICENSE).
@@ -0,0 +1,170 @@
1
+ [build-system]
2
+ requires = ["setuptools>=66.1"]
3
+ build-backend = 'setuptools.build_meta'
4
+
5
+ [project]
6
+ name = "quantify"
7
+ description="""\
8
+ A framework for controlling quantum computing and solid-state physics experiments.\
9
+ """
10
+ maintainers = [
11
+ {name = "Robert Sokolewicz", email = "rsokolewicz@qblox.com"},
12
+ {name = "Olga Lebiga", email = "olga@orangeqs.com"},
13
+ {name = "Gabor Oszkar Denes", email = "viacheslav@orangeqs.com"},
14
+ {name = "Amirtha Varshiny Arumugam", email = "amirthavarshiny@orangeqs.com"},
15
+ {name = "Gabriel Chatelain", email = "gabriel@orangeqs.com"},
16
+ ]
17
+ classifiers = [
18
+ "Development Status :: 3 - Alpha",
19
+ "Intended Audience :: Developers",
20
+ "Intended Audience :: Science/Research",
21
+ "License :: OSI Approved :: BSD License",
22
+ "Natural Language :: English",
23
+ "Programming Language :: Python :: 3.12",
24
+ "Topic :: Scientific/Engineering",
25
+ ]
26
+ keywords = [
27
+ "quantum",
28
+ "quantify",
29
+ ]
30
+ license = { text = "BSD-3-Clause" }
31
+ version = "0.0.0.a0"
32
+ dynamic = ["readme"]
33
+
34
+ dependencies = [
35
+ "adaptive",
36
+ "appnope",
37
+ "columnar",
38
+ "dataclasses-json",
39
+ "dill", # Tests fail without dill installed, likely for a good reason
40
+ "fastjsonschema",
41
+ "filelock",
42
+ "h5netcdf",
43
+ "jinja2>=3.1.2", # pandas requires version 3.1.2 or newer
44
+ "jsonschema",
45
+ "lmfit >=1.0.3", # Bugfix for lmfit (https://github.com/lmfit/lmfit-py/pull/758)
46
+ "matplotlib !=3.5.0",
47
+ "methodtools", # used in base_analysis for self-bound lru_cache
48
+ "networkx",
49
+ "numpy!=1.19.4",
50
+ "pandas[output_formatting]",
51
+ "pathvalidate",
52
+ "plotly",
53
+ "pre-commit",
54
+ "pre-commit-hooks",
55
+ "pydantic>=2.0",
56
+ "pyqt5 >5.15.2", # 5.15.2 has known bug, #170, https://bugreports.qt.io/browse/PYSIDE-1473
57
+ "pyqtgraph",
58
+ "pyright",
59
+ "qcodes >=0.37.0", # 0.37.0 replaces deprecated pyqtgraph functionality
60
+ "qcodes-loop",
61
+ "rich[jupyter]",
62
+ "scikit-learn",
63
+ "scipy >=1.5.0, !=1.6.0",
64
+ "typing-extensions", # Independency from python version for "new" typing features
65
+ "uncertainties",
66
+ "xarray >=0.19.0",
67
+ "xxhash",
68
+ "lmfit>=1.3.3"
69
+ ]
70
+
71
+
72
+ [project.urls]
73
+ "Website" = "https://quantify-os.org"
74
+ "Source" = "https://gitlab.com/quantify-os/quantify"
75
+ "Issue tracker" = "https://gitlab.com/quantify-os/quantify/-/issues"
76
+ "Slack" = "https://join.slack.com/t/quantify-hq/shared_invite/zt-1nd78r4e9-rbWdna53cW4DO_YbtMhVuA"
77
+
78
+ [tool.setuptools.packages.find]
79
+ include = ["quantify", "quantify.*"]
80
+
81
+ [tool.setuptools.dynamic]
82
+ readme = { file = ["README.md"], content-type = "text/markdown" }
83
+
84
+ [tool.ruff]
85
+ line-length = 88
86
+ lint.select = [
87
+ "F", # pyflakes
88
+ "E", # pycodestyle
89
+ "W", # pycodestyle
90
+ "D", # pydocstyle
91
+ "I", # isort
92
+ "N", # flake8-naming
93
+ "UP", # pyupgrade
94
+ "TID", # flake8-tidy-imports
95
+ "SIM", # flake8-simplify
96
+ "TCH", # flake8-type-checking
97
+ "Q", #flake8-quotes
98
+ "ARG", #flake8-unused-arguments
99
+ "ANN", # flake8-annotations
100
+ #Pylint (PLC, PLE, PLR, PLW)
101
+ "PLC",
102
+ "PLE",
103
+ "PLR",
104
+ "PLW",
105
+ ]
106
+ extend-exclude = [
107
+ "setup.py",
108
+ "quantify/_version.py",
109
+ "quantify/_static_version.py",
110
+ ]
111
+
112
+ # ignore these rules for all files:
113
+ lint.ignore = [
114
+ # 1 blank line required before class docstring
115
+ "D203",
116
+ # Multi-line docstring summary should start at the first line
117
+ "D212",
118
+ # Ambiguous variable name
119
+ "E741",
120
+ # Variable `...` in function should be lowercase
121
+ "N806",
122
+ # Too many arguments to function call (.../5)
123
+ "PLR0913",
124
+ # Class attribute `compile` is shadowing a python builtin
125
+ "A003",
126
+ # Missing type annotation for `self` in method
127
+ "ANN101",
128
+ # Magic value used in comparison, consider replacing `...` with a constant variable
129
+ "PLR2004",
130
+ # First line of docstring should be in imperative mood
131
+ "D401",
132
+ # 1 blank line required between summary line and description
133
+ "D205",
134
+ # Multi-line docstring summary should start at the second line (conflicts with black)
135
+ "D213",
136
+ # Missing type annotation for `**kwargs`
137
+ "ANN003",
138
+ # Missing type annotation for `*args`
139
+ "ANN002",
140
+ # No blank lines allowed before class docstring (conflicts with black)
141
+ "D211",
142
+ # Functions or methods that have more than 12 branches
143
+ "PLR0912"
144
+ ]
145
+
146
+ [tool.ruff.lint.isort]
147
+ known-first-party = ["quantify", "quantify_core", "quantify_scheduler"]
148
+
149
+ [tool.ruff.lint.per-file-ignores]
150
+ "tests/*" = ["D", "ANN"]
151
+
152
+ # - E402: Module level import not at top of file
153
+ "docs/conf.py" = ["E402"]
154
+
155
+ [tool.pyright]
156
+ pythonVersion = "3.12"
157
+ exclude = [
158
+ "tests",
159
+ "docs",
160
+ "build",
161
+ "conftest.py",
162
+ "quantify/_static_version.py",
163
+ "quantify/_version.py",
164
+ "quantify/__init__.py",
165
+ "quantify/visualization/mpl_plotting.py",
166
+ "quantify/visualization/SI_utilities.py",
167
+ "quantify/operations/pulse_library.py",
168
+ "quantify/measurement/control.py",
169
+
170
+ ]
@@ -0,0 +1,78 @@
1
+ # Repository: https://gitlab.com/quantify-os/quantify
2
+ # Licensed according to the LICENSE file on the main branch
3
+ """
4
+ Data acquisition framework focused on Quantum Computing and solid-state physics
5
+ experiments.
6
+
7
+ .. list-table::
8
+ :header-rows: 1
9
+ :widths: auto
10
+
11
+ * - Import alias
12
+ - Target
13
+ * - :class:`.QuantumDevice`
14
+ - :class:`!quantify.QuantumDevice`
15
+ * - :class:`.Schedule`
16
+ - :class:`!quantify.Schedule`
17
+ * - :class:`.Resource`
18
+ - :class:`!quantify.Resource`
19
+ * - :class:`.ClockResource`
20
+ - :class:`!quantify.ClockResource`
21
+ * - :class:`.BasebandClockResource`
22
+ - :class:`!quantify.BasebandClockResource`
23
+ * - :class:`.DigitalClockResource`
24
+ - :class:`!quantify.DigitalClockResource`
25
+ * - :class:`.Operation`
26
+ - :class:`!quantify.Operation`
27
+ * - :obj:`.structure`
28
+ - :obj:`!quantify.structure`
29
+ * - :class:`.BasicTransmonElement`
30
+ - :class:`!quantify.BasicTransmonElement`
31
+ * - :class:`.CompositeSquareEdge`
32
+ - :class:`!quantify.CompositeSquareEdge`
33
+ * - :class:`.InstrumentCoordinator`
34
+ - :class:`!quantify.InstrumentCoordinator`
35
+ * - :class:`.GenericInstrumentCoordinatorComponent`
36
+ - :class:`!quantify.GenericInstrumentCoordinatorComponent`
37
+ * - :class:`.SerialCompiler`
38
+ - :class:`!quantify.SerialCompiler`
39
+ * - :class:`.MockLocalOscillator`
40
+ - :class:`!quantify.MockLocalOscillator`
41
+ """
42
+
43
+ from quantify import structure, waveforms
44
+ from quantify._version import __version__
45
+ from quantify.backends import SerialCompiler
46
+ from quantify.device_under_test import (
47
+ BasicTransmonElement,
48
+ QuantumDevice,
49
+ )
50
+ from quantify.instrument_coordinator.components.generic import (
51
+ GenericInstrumentCoordinatorComponent,
52
+ )
53
+ from quantify.instrument_coordinator.instrument_coordinator import InstrumentCoordinator
54
+ from quantify.operations import Operation
55
+ from quantify.resources import (
56
+ BasebandClockResource,
57
+ ClockResource,
58
+ DigitalClockResource,
59
+ Resource,
60
+ )
61
+ from quantify.schedules import Schedule
62
+
63
+ __all__ = [
64
+ "structure",
65
+ "__version__",
66
+ "SerialCompiler",
67
+ "BasicTransmonElement",
68
+ "QuantumDevice",
69
+ "InstrumentCoordinator",
70
+ "GenericInstrumentCoordinatorComponent",
71
+ "Operation",
72
+ "BasebandClockResource",
73
+ "ClockResource",
74
+ "DigitalClockResource",
75
+ "Resource",
76
+ "Schedule",
77
+ "waveforms",
78
+ ]
@@ -0,0 +1,2 @@
1
+ # This file has been created by setup.py.
2
+ version = 'unknown+g05f5352.dirty'
@@ -0,0 +1,195 @@
1
+ # -*- coding: utf-8 -*-
2
+ # This file is part of 'miniver': https://github.com/jbweston/miniver
3
+ #
4
+ from collections import namedtuple
5
+ import os
6
+
7
+ Version = namedtuple("Version", ("release", "dev", "labels"))
8
+
9
+ # No public API
10
+ __all__ = []
11
+
12
+ package_root = os.path.dirname(os.path.realpath(__file__))
13
+ package_name = os.path.basename(package_root)
14
+
15
+ STATIC_VERSION_FILE = "_static_version.py"
16
+
17
+
18
+ def get_version(version_file=STATIC_VERSION_FILE):
19
+ version_info = get_static_version_info(version_file)
20
+ version = version_info["version"]
21
+ if version == "__use_git__":
22
+ version = get_version_from_git()
23
+ if not version:
24
+ version = get_version_from_git_archive(version_info)
25
+ if not version:
26
+ version = Version("unknown", None, None)
27
+ return pep440_format(version)
28
+ else:
29
+ return version
30
+
31
+
32
+ def get_static_version_info(version_file=STATIC_VERSION_FILE):
33
+ version_info = {}
34
+ with open(os.path.join(package_root, version_file), "rb") as f:
35
+ exec(f.read(), {}, version_info)
36
+ return version_info
37
+
38
+
39
+ def version_is_from_git(version_file=STATIC_VERSION_FILE):
40
+ return get_static_version_info(version_file)["version"] == "__use_git__"
41
+
42
+
43
+ def pep440_format(version_info):
44
+ release, dev, labels = version_info
45
+
46
+ version_parts = [release]
47
+ if dev:
48
+ if release.endswith("-dev") or release.endswith(".dev"):
49
+ version_parts.append(dev)
50
+ else: # prefer PEP440 over strict adhesion to semver
51
+ version_parts.append(".dev{}".format(dev))
52
+
53
+ if labels:
54
+ version_parts.append("+")
55
+ version_parts.append(".".join(labels))
56
+
57
+ return "".join(version_parts)
58
+
59
+
60
+ def get_version_from_git():
61
+ import subprocess
62
+
63
+ # git describe --first-parent does not take into account tags from branches
64
+ # that were merged-in. The '--long' flag gets us the 'dev' version and
65
+ # git hash, '--always' returns the git hash even if there are no tags.
66
+ for opts in [["--first-parent"], []]:
67
+ try:
68
+ p = subprocess.Popen(
69
+ ["git", "describe", "--long", "--always"] + opts,
70
+ cwd=package_root,
71
+ stdout=subprocess.PIPE,
72
+ stderr=subprocess.PIPE,
73
+ )
74
+ except OSError:
75
+ return
76
+ if p.wait() == 0:
77
+ break
78
+ else:
79
+ return
80
+
81
+ description = (
82
+ p.communicate()[0]
83
+ .decode()
84
+ .strip("v") # Tags can have a leading 'v', but the version should not
85
+ .rstrip("\n")
86
+ .rsplit("-", 2) # Split the latest tag, commits since tag, and hash
87
+ )
88
+
89
+ try:
90
+ release, dev, git = description
91
+ except ValueError: # No tags, only the git hash
92
+ # prepend 'g' to match with format returned by 'git describe'
93
+ git = "g{}".format(*description)
94
+ release = "unknown"
95
+ dev = None
96
+
97
+ labels = []
98
+ if dev == "0":
99
+ dev = None
100
+ else:
101
+ labels.append(git)
102
+
103
+ try:
104
+ p = subprocess.Popen(
105
+ ["git", "describe", "--dirty"],
106
+ cwd=package_root,
107
+ stdout=subprocess.PIPE,
108
+ stderr=subprocess.PIPE,
109
+ )
110
+ except OSError:
111
+ labels.append("confused") # This should never happen.
112
+ else:
113
+ dirty_output = p.communicate()[0].decode().strip("\n")
114
+ if dirty_output.endswith("dirty"):
115
+ labels.append("dirty")
116
+
117
+ return Version(release, dev, labels)
118
+
119
+
120
+ # TODO: change this logic when there is a git pretty-format
121
+ # that gives the same output as 'git describe'.
122
+ # Currently we can only tell the tag the current commit is
123
+ # pointing to, or its hash (with no version info)
124
+ # if it is not tagged.
125
+ def get_version_from_git_archive(version_info):
126
+ try:
127
+ refnames = version_info["refnames"]
128
+ git_hash = version_info["git_hash"]
129
+ except KeyError:
130
+ # These fields are not present if we are running from an sdist.
131
+ # Execution should never reach here, though
132
+ return None
133
+
134
+ if git_hash.startswith("$Format") or refnames.startswith("$Format"):
135
+ # variables not expanded during 'git archive'
136
+ return None
137
+
138
+ VTAG = "tag: v"
139
+ refs = set(r.strip() for r in refnames.split(","))
140
+ version_tags = set(r[len(VTAG) :] for r in refs if r.startswith(VTAG))
141
+ if version_tags:
142
+ release, *_ = sorted(version_tags) # prefer e.g. "2.0" over "2.0rc1"
143
+ return Version(release, dev=None, labels=None)
144
+ else:
145
+ return Version("unknown", dev=None, labels=["g{}".format(git_hash)])
146
+
147
+
148
+ __version__ = get_version()
149
+
150
+
151
+ # The following section defines a 'get_cmdclass' function
152
+ # that can be used from setup.py. The '__version__' module
153
+ # global is used (but not modified).
154
+
155
+
156
+ def _write_version(fname):
157
+ # This could be a hard link, so try to delete it first. Is there any way
158
+ # to do this atomically together with opening?
159
+ try:
160
+ os.remove(fname)
161
+ except OSError:
162
+ pass
163
+ with open(fname, "w") as f:
164
+ f.write(
165
+ "# This file has been created by setup.py.\n"
166
+ "version = '{}'\n".format(__version__)
167
+ )
168
+
169
+
170
+ def get_cmdclass(pkg_source_path):
171
+ from setuptools.command.build_py import build_py as build_py_orig
172
+ from setuptools.command.sdist import sdist as sdist_orig
173
+
174
+ class _build_py(build_py_orig):
175
+ def run(self):
176
+ super().run()
177
+
178
+ src_marker = "".join(["src", os.path.sep])
179
+
180
+ if pkg_source_path.startswith(src_marker):
181
+ path = pkg_source_path[len(src_marker) :]
182
+ else:
183
+ path = pkg_source_path
184
+ _write_version(
185
+ os.path.join(self.build_lib, path, STATIC_VERSION_FILE)
186
+ )
187
+
188
+ class _sdist(sdist_orig):
189
+ def make_release_tree(self, base_dir, files):
190
+ super().make_release_tree(base_dir, files)
191
+ _write_version(
192
+ os.path.join(base_dir, pkg_source_path, STATIC_VERSION_FILE)
193
+ )
194
+
195
+ return dict(sdist=_sdist, build_py=_build_py)
@@ -0,0 +1,30 @@
1
+ # Repository: https://gitlab.com/quantify-os/quantify
2
+ # Licensed according to the LICENSE file on the main branch
3
+ """Quantify's analysis module."""
4
+
5
+ from .base_analysis import Basic2DAnalysis, BasicAnalysis
6
+ from .cosine_analysis import CosineAnalysis
7
+ from .interpolation_analysis import InterpolationAnalysis2D
8
+ from .optimization_analysis import OptimizationAnalysis
9
+ from .single_qubit_timedomain import (
10
+ AllXYAnalysis,
11
+ EchoAnalysis,
12
+ RabiAnalysis,
13
+ RamseyAnalysis,
14
+ T1Analysis,
15
+ )
16
+ from .spectroscopy_analysis import ResonatorSpectroscopyAnalysis
17
+
18
+ __all__ = [
19
+ "Basic2DAnalysis",
20
+ "BasicAnalysis",
21
+ "CosineAnalysis",
22
+ "InterpolationAnalysis2D",
23
+ "OptimizationAnalysis",
24
+ "AllXYAnalysis",
25
+ "EchoAnalysis",
26
+ "RabiAnalysis",
27
+ "RamseyAnalysis",
28
+ "T1Analysis",
29
+ "ResonatorSpectroscopyAnalysis",
30
+ ]