From a74e0514dff27f2ac411ce4166d940af6f606ded Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 27 Nov 2024 13:40:28 +0000 Subject: [PATCH] Deployed 466754d with MkDocs version: 1.6.1 --- .nojekyll | 0 404.html | 862 ++ .../components/basic_quam/index.html | 1035 ++ .../components/basic_quam_API/index.html | 1102 ++ API_references/components/channels/index.html | 9876 +++++++++++++++ .../components/channels_API/index.html | 10297 ++++++++++++++++ API_references/components/hardware/index.html | 1678 +++ .../components/hardware_API/index.html | 1796 +++ API_references/components/octave/index.html | 3206 +++++ .../components/octave_API/index.html | 3397 +++++ .../components/ports/analog_inputs/index.html | 914 ++ .../ports/analog_outputs/index.html | 914 ++ .../components/ports/base_ports/index.html | 914 ++ .../ports/digital_inputs/index.html | 914 ++ .../ports/digital_outputs/index.html | 914 ++ .../ports/ports_containers/index.html | 914 ++ API_references/components/pulses/index.html | 4612 +++++++ .../components/pulses_API/index.html | 4839 ++++++++ API_references/core/deprecations/index.html | 914 ++ .../core/qua_config_template/index.html | 914 ++ API_references/core/quam_classes/index.html | 5645 +++++++++ .../core/quam_classes_API/index.html | 5563 +++++++++ .../core/quam_instantiation/index.html | 2336 ++++ .../components/index.html | 1048 ++ .../generate_superconducting_quam/index.html | 1098 ++ API_references/index.html | 966 ++ API_references/serialisation/base/index.html | 989 ++ API_references/serialisation/json/index.html | 1743 +++ API_references/utils/config/index.html | 1017 ++ API_references/utils/dataclass/index.html | 1404 +++ API_references/utils/general/index.html | 1406 +++ API_references/utils/pulse/index.html | 1071 ++ .../utils/reference_class/index.html | 1209 ++ .../utils/string_reference/index.html | 1451 +++ API_references/utils/type_checking/index.html | 1043 ++ assets/_mkdocstrings.css | 143 + assets/images/favicon.png | Bin 0 -> 1870 bytes assets/javascripts/bundle.83f73b43.min.js | 16 + assets/javascripts/bundle.83f73b43.min.js.map | 7 + assets/javascripts/lunr/min/lunr.ar.min.js | 1 + assets/javascripts/lunr/min/lunr.da.min.js | 18 + assets/javascripts/lunr/min/lunr.de.min.js | 18 + assets/javascripts/lunr/min/lunr.du.min.js | 18 + assets/javascripts/lunr/min/lunr.el.min.js | 1 + assets/javascripts/lunr/min/lunr.es.min.js | 18 + assets/javascripts/lunr/min/lunr.fi.min.js | 18 + assets/javascripts/lunr/min/lunr.fr.min.js | 18 + assets/javascripts/lunr/min/lunr.he.min.js | 1 + assets/javascripts/lunr/min/lunr.hi.min.js | 1 + assets/javascripts/lunr/min/lunr.hu.min.js | 18 + assets/javascripts/lunr/min/lunr.hy.min.js | 1 + assets/javascripts/lunr/min/lunr.it.min.js | 18 + assets/javascripts/lunr/min/lunr.ja.min.js | 1 + assets/javascripts/lunr/min/lunr.jp.min.js | 1 + assets/javascripts/lunr/min/lunr.kn.min.js | 1 + assets/javascripts/lunr/min/lunr.ko.min.js | 1 + assets/javascripts/lunr/min/lunr.multi.min.js | 1 + assets/javascripts/lunr/min/lunr.nl.min.js | 18 + assets/javascripts/lunr/min/lunr.no.min.js | 18 + assets/javascripts/lunr/min/lunr.pt.min.js | 18 + assets/javascripts/lunr/min/lunr.ro.min.js | 18 + assets/javascripts/lunr/min/lunr.ru.min.js | 18 + assets/javascripts/lunr/min/lunr.sa.min.js | 1 + .../lunr/min/lunr.stemmer.support.min.js | 1 + assets/javascripts/lunr/min/lunr.sv.min.js | 18 + assets/javascripts/lunr/min/lunr.ta.min.js | 1 + assets/javascripts/lunr/min/lunr.te.min.js | 1 + assets/javascripts/lunr/min/lunr.th.min.js | 1 + assets/javascripts/lunr/min/lunr.tr.min.js | 18 + assets/javascripts/lunr/min/lunr.vi.min.js | 1 + assets/javascripts/lunr/min/lunr.zh.min.js | 1 + assets/javascripts/lunr/tinyseg.js | 206 + assets/javascripts/lunr/wordcut.js | 6708 ++++++++++ .../workers/search.6ce7567c.min.js | 42 + .../workers/search.6ce7567c.min.js.map | 7 + assets/qm_logo_white.svg | 197 + assets/stylesheets/main.6f8fc17f.min.css | 1 + assets/stylesheets/main.6f8fc17f.min.css.map | 1 + assets/stylesheets/palette.06af60db.min.css | 1 + .../stylesheets/palette.06af60db.min.css.map | 1 + components/channel-ports/index.html | 902 ++ components/channels/index.html | 1268 ++ components/custom-components/index.html | 1065 ++ components/index.html | 985 ++ components/octave/index.html | 1275 ++ components/pulses/index.html | 1124 ++ components/quam-root/index.html | 992 ++ demonstration/index.html | 1617 +++ examples/QuAM features.ipynb | 648 + examples/output/basic/qua_config.json | 232 + examples/output/basic/state.json | 115 + examples/output/referenced/qua_config.json | 232 + examples/output/referenced/state.json | 123 + .../referenced_multifile/quam/state.json | 73 + .../referenced_multifile/quam/wiring.json | 52 + features/index.html | 944 ++ features/quam-references/index.html | 1092 ++ gen_ref_pages.py | 25 + index.html | 999 ++ installation/index.html | 1071 ++ migrating-to-quam/index.html | 1355 ++ objects.inv | Bin 0 -> 4326 bytes search/search_index.json | 1 + sitemap.xml | 3 + sitemap.xml.gz | Bin 0 -> 127 bytes stylesheets/extra.css | 125 + 106 files changed, 101936 insertions(+) create mode 100644 .nojekyll create mode 100644 404.html create mode 100644 API_references/components/basic_quam/index.html create mode 100644 API_references/components/basic_quam_API/index.html create mode 100644 API_references/components/channels/index.html create mode 100644 API_references/components/channels_API/index.html create mode 100644 API_references/components/hardware/index.html create mode 100644 API_references/components/hardware_API/index.html create mode 100644 API_references/components/octave/index.html create mode 100644 API_references/components/octave_API/index.html create mode 100644 API_references/components/ports/analog_inputs/index.html create mode 100644 API_references/components/ports/analog_outputs/index.html create mode 100644 API_references/components/ports/base_ports/index.html create mode 100644 API_references/components/ports/digital_inputs/index.html create mode 100644 API_references/components/ports/digital_outputs/index.html create mode 100644 API_references/components/ports/ports_containers/index.html create mode 100644 API_references/components/pulses/index.html create mode 100644 API_references/components/pulses_API/index.html create mode 100644 API_references/core/deprecations/index.html create mode 100644 API_references/core/qua_config_template/index.html create mode 100644 API_references/core/quam_classes/index.html create mode 100644 API_references/core/quam_classes_API/index.html create mode 100644 API_references/core/quam_instantiation/index.html create mode 100644 API_references/examples/superconducting_qubits/components/index.html create mode 100644 API_references/examples/superconducting_qubits/generate_superconducting_quam/index.html create mode 100644 API_references/index.html create mode 100644 API_references/serialisation/base/index.html create mode 100644 API_references/serialisation/json/index.html create mode 100644 API_references/utils/config/index.html create mode 100644 API_references/utils/dataclass/index.html create mode 100644 API_references/utils/general/index.html create mode 100644 API_references/utils/pulse/index.html create mode 100644 API_references/utils/reference_class/index.html create mode 100644 API_references/utils/string_reference/index.html create mode 100644 API_references/utils/type_checking/index.html create mode 100644 assets/_mkdocstrings.css create mode 100644 assets/images/favicon.png create mode 100644 assets/javascripts/bundle.83f73b43.min.js create mode 100644 assets/javascripts/bundle.83f73b43.min.js.map create mode 100644 assets/javascripts/lunr/min/lunr.ar.min.js create mode 100644 assets/javascripts/lunr/min/lunr.da.min.js create mode 100644 assets/javascripts/lunr/min/lunr.de.min.js create mode 100644 assets/javascripts/lunr/min/lunr.du.min.js create mode 100644 assets/javascripts/lunr/min/lunr.el.min.js create mode 100644 assets/javascripts/lunr/min/lunr.es.min.js create mode 100644 assets/javascripts/lunr/min/lunr.fi.min.js create mode 100644 assets/javascripts/lunr/min/lunr.fr.min.js create mode 100644 assets/javascripts/lunr/min/lunr.he.min.js create mode 100644 assets/javascripts/lunr/min/lunr.hi.min.js create mode 100644 assets/javascripts/lunr/min/lunr.hu.min.js create mode 100644 assets/javascripts/lunr/min/lunr.hy.min.js create mode 100644 assets/javascripts/lunr/min/lunr.it.min.js create mode 100644 assets/javascripts/lunr/min/lunr.ja.min.js create mode 100644 assets/javascripts/lunr/min/lunr.jp.min.js create mode 100644 assets/javascripts/lunr/min/lunr.kn.min.js create mode 100644 assets/javascripts/lunr/min/lunr.ko.min.js create mode 100644 assets/javascripts/lunr/min/lunr.multi.min.js create mode 100644 assets/javascripts/lunr/min/lunr.nl.min.js create mode 100644 assets/javascripts/lunr/min/lunr.no.min.js create mode 100644 assets/javascripts/lunr/min/lunr.pt.min.js create mode 100644 assets/javascripts/lunr/min/lunr.ro.min.js create mode 100644 assets/javascripts/lunr/min/lunr.ru.min.js create mode 100644 assets/javascripts/lunr/min/lunr.sa.min.js create mode 100644 assets/javascripts/lunr/min/lunr.stemmer.support.min.js create mode 100644 assets/javascripts/lunr/min/lunr.sv.min.js create mode 100644 assets/javascripts/lunr/min/lunr.ta.min.js create mode 100644 assets/javascripts/lunr/min/lunr.te.min.js create mode 100644 assets/javascripts/lunr/min/lunr.th.min.js create mode 100644 assets/javascripts/lunr/min/lunr.tr.min.js create mode 100644 assets/javascripts/lunr/min/lunr.vi.min.js create mode 100644 assets/javascripts/lunr/min/lunr.zh.min.js create mode 100644 assets/javascripts/lunr/tinyseg.js create mode 100644 assets/javascripts/lunr/wordcut.js create mode 100644 assets/javascripts/workers/search.6ce7567c.min.js create mode 100644 assets/javascripts/workers/search.6ce7567c.min.js.map create mode 100644 assets/qm_logo_white.svg create mode 100644 assets/stylesheets/main.6f8fc17f.min.css create mode 100644 assets/stylesheets/main.6f8fc17f.min.css.map create mode 100644 assets/stylesheets/palette.06af60db.min.css create mode 100644 assets/stylesheets/palette.06af60db.min.css.map create mode 100644 components/channel-ports/index.html create mode 100644 components/channels/index.html create mode 100644 components/custom-components/index.html create mode 100644 components/index.html create mode 100644 components/octave/index.html create mode 100644 components/pulses/index.html create mode 100644 components/quam-root/index.html create mode 100644 demonstration/index.html create mode 100644 examples/QuAM features.ipynb create mode 100644 examples/output/basic/qua_config.json create mode 100644 examples/output/basic/state.json create mode 100644 examples/output/referenced/qua_config.json create mode 100644 examples/output/referenced/state.json create mode 100644 examples/output/referenced_multifile/quam/state.json create mode 100644 examples/output/referenced_multifile/quam/wiring.json create mode 100644 features/index.html create mode 100644 features/quam-references/index.html create mode 100644 gen_ref_pages.py create mode 100644 index.html create mode 100644 installation/index.html create mode 100644 migrating-to-quam/index.html create mode 100644 objects.inv create mode 100644 search/search_index.json create mode 100644 sitemap.xml create mode 100644 sitemap.xml.gz create mode 100644 stylesheets/extra.css diff --git a/.nojekyll b/.nojekyll new file mode 100644 index 00000000..e69de29b diff --git a/404.html b/404.html new file mode 100644 index 00000000..acbbfa35 --- /dev/null +++ b/404.html @@ -0,0 +1,862 @@ + + + +
+ + + + + + + + + + + + + + + + +BasicQuAM
+
+
+
+ Bases: QuamRoot
Basic top-level QuAM root component.
+If custom QuAM components are used, a custom QuAM root component should be created.
+ + +Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
+ channels
+ |
+
+ Dict[str, Channel]
+ |
+
+
+
+ A dictionary of channels. + |
+ + required + | +
+ octaves
+ |
+
+ Dict[str, Octave]
+ |
+
+
+
+ A dictionary of octaves. + |
+ + required + | +
quam/components/basic_quam.py
14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 |
|
BasicQuAM
+
+
+
+ Bases: QuamRoot
Basic top-level QuAM root component.
+If custom QuAM components are used, a custom QuAM root component should be created.
+ + +Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
+ channels
+ |
+
+ Dict[str, Channel]
+ |
+
+
+
+ A dictionary of channels. + |
+ + required + | +
+ octaves
+ |
+
+ Dict[str, Octave]
+ |
+
+
+
+ A dictionary of octaves. + |
+ + required + | +
quam/components/basic_quam.py
14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 |
|
Channel
+
+
+
+ Bases: QuamComponent
, ABC
Base QuAM component for a channel, can be output, input or both.
+ + +Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
+ operations
+ |
+
+ Dict[str, Pulse]
+ |
+
+
+
+ A dictionary of pulses to be played on this +channel. The key is the pulse label (e.g. "X90") and value is a Pulse. + |
+ + required + | +
+ id
+ |
+
+ (str, int)
+ |
+
+
+
+ The id of the channel, used to generate the name.
+Can be a string, or an integer in which case it will add
+ |
+ + required + | +
+ sticky
+ |
+
+ Sticky
+ |
+
+
+
+ Optional sticky parameters for the channel, i.e. defining +whether successive pulses are applied w.r.t the previous pulse or w.r.t 0 V. +If not specified, this channel is not sticky. + |
+ + required + | +
quam/components/channels.py
260 +261 +262 +263 +264 +265 +266 +267 +268 +269 +270 +271 +272 +273 +274 +275 +276 +277 +278 +279 +280 +281 +282 +283 +284 +285 +286 +287 +288 +289 +290 +291 +292 +293 +294 +295 +296 +297 +298 +299 +300 +301 +302 +303 +304 +305 +306 +307 +308 +309 +310 +311 +312 +313 +314 +315 +316 +317 +318 +319 +320 +321 +322 +323 +324 +325 +326 +327 +328 +329 +330 +331 +332 +333 +334 +335 +336 +337 +338 +339 +340 +341 +342 +343 +344 +345 +346 +347 +348 +349 +350 +351 +352 +353 +354 +355 +356 +357 +358 +359 +360 +361 +362 +363 +364 +365 +366 +367 +368 +369 +370 +371 +372 +373 +374 +375 +376 +377 +378 +379 +380 +381 +382 +383 +384 +385 +386 +387 +388 +389 +390 +391 +392 +393 +394 +395 +396 +397 +398 +399 +400 +401 +402 +403 +404 +405 +406 +407 +408 +409 +410 +411 +412 +413 +414 +415 +416 +417 +418 +419 +420 +421 +422 +423 +424 +425 +426 +427 +428 +429 +430 +431 +432 +433 +434 +435 +436 +437 +438 +439 +440 +441 +442 +443 +444 +445 +446 +447 +448 +449 +450 +451 +452 +453 +454 +455 +456 +457 +458 +459 +460 +461 +462 +463 +464 +465 +466 +467 +468 +469 +470 +471 +472 +473 +474 +475 +476 +477 +478 +479 +480 +481 +482 +483 +484 +485 +486 +487 +488 +489 +490 +491 +492 +493 +494 +495 +496 +497 +498 +499 +500 +501 +502 +503 +504 +505 +506 +507 +508 +509 +510 +511 +512 +513 +514 +515 +516 +517 +518 +519 +520 +521 +522 +523 +524 +525 +526 +527 +528 +529 +530 +531 +532 +533 +534 +535 +536 +537 +538 +539 +540 +541 +542 +543 +544 +545 +546 +547 +548 +549 +550 +551 +552 +553 +554 +555 +556 +557 +558 +559 +560 +561 +562 +563 +564 +565 +566 +567 +568 +569 +570 +571 +572 +573 +574 +575 +576 |
|
apply_to_config(config)
+
+Adds this Channel to the QUA configuration.
+config.elements.
Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
+ config
+ |
+
+ dict
+ |
+
+
+
+ The QUA config that's in the process of being generated. + |
+ + required + | +
Raises:
+Type | +Description | +
---|---|
+ ValueError
+ |
+
+
+
+ If the channel already exists in the config. + |
+
quam/components/channels.py
551 +552 +553 +554 +555 +556 +557 +558 +559 +560 +561 +562 +563 +564 +565 +566 +567 +568 +569 +570 +571 +572 +573 +574 +575 +576 |
|
frame_rotation(angle)
+
+Shift the phase of the channel element's oscillator by the given angle.
+This is typically used for virtual z-rotations.
+ + +The fixed point format of QUA variables of type fixed is 4.28, meaning the
+phase must be between $-8$ and $8-2^{28}$. Otherwise the phase value will be
+invalid. It is therefore better to use frame_rotation_2pi()
which avoids
+this issue.
The phase is accumulated with a resolution of 16 bit.
+Therefore, N changes to the phase can result in a phase (and amplitude)
+inaccuracy of about :math:N \cdot 2^{-16}
. To null out this accumulated
+error, it is recommended to use reset_frame(el)
from time to time.
Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
+ angle
+ |
+
+ Union[float, QUA variable of type fixed]
+ |
+
+
+
+ The angle to +add to the current phase (in radians) + |
+ + required + | +
+ *elements
+ |
+
+ str
+ |
+
+
+
+ a single element whose oscillator's phase will +be shifted. multiple elements can be given, in which case +all of their oscillators' phases will be shifted + |
+ + required + | +
quam/components/channels.py
480 +481 +482 +483 +484 +485 +486 +487 +488 +489 +490 +491 +492 +493 +494 +495 +496 +497 +498 +499 +500 +501 +502 +503 +504 +505 |
|
frame_rotation_2pi(angle)
+
+Shift the phase of the oscillator associated with an element by the given +angle in units of 2pi radians.
+This is typically used for virtual z-rotations.
+ + +Unlike the case of frame_rotation(), this method performs the 2-pi radian +wrap around of the angle automatically.
+The phase is accumulated with a resolution of 16 bit.
+Therefore, N changes to the phase can result in a phase inaccuracy of
+about :math:N \cdot 2^{-16}
. To null out this accumulated error, it is
+recommended to use reset_frame(el)
from time to time.
Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
+ angle
+ |
+
+ Union[float,QUA variable of type real]
+ |
+
+
+
+ The angle to add +to the current phase (in $2\pi$ radians) + |
+ + required + | +
quam/components/channels.py
507 +508 +509 +510 +511 +512 +513 +514 +515 +516 +517 +518 +519 +520 +521 +522 +523 +524 +525 +526 +527 |
|
play(pulse_name, amplitude_scale=None, duration=None, condition=None, chirp=None, truncate=None, timestamp_stream=None, continue_chirp=False, target='', validate=True)
+
+Play a pulse on this channel.
+ + +Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
+ pulse_name
+ |
+
+ str
+ |
+
+
+
+ The name of the pulse to play. Should be registered in
+ |
+ + required + | +
+ amplitude_scale
+ |
+
+ (float, _PulseAmp)
+ |
+
+
+
+ Amplitude scale of the pulse. +Can be either a float, or qua.amp(float). + |
+
+ None
+ |
+
+ duration
+ |
+
+ int
+ |
+
+
+
+ Duration of the pulse in units of the clock cycle (4ns). +If not provided, the default pulse duration will be used. It is possible +to dynamically change the duration of both constant and arbitrary +pulses. Arbitrary pulses can only be stretched, not compressed. + |
+
+ None
+ |
+
+ chirp
+ |
+
+ Union[(list[int], str), (int, str)]
+ |
+
+
+
+ Allows to perform +piecewise linear sweep of the element's intermediate +frequency in time. Input should be a tuple, with the 1st +element being a list of rates and the second should be a +string with the units. The units can be either: 'Hz/nsec', +'mHz/nsec', 'uHz/nsec', 'pHz/nsec' or 'GHz/sec', 'MHz/sec', +'KHz/sec', 'Hz/sec', 'mHz/sec'. + |
+
+ None
+ |
+
+ truncate
+ |
+
+ Union[int, QUA variable of type int]
+ |
+
+
+
+ Allows playing +only part of the pulse, truncating the end. If provided, +will play only up to the given time in units of the clock +cycle (4ns). + |
+
+ None
+ |
+
+ condition
+ |
+
+ A logical expression to evaluate.
+ |
+
+
+
+ Will play analog +pulse only if the condition's value is true. Any digital +pulses associated with the operation will always play. + |
+
+ None
+ |
+
+ timestamp_stream
+ |
+
+ Union[str, _ResultSource]
+ |
+
+
+
+ (Supported from
+QOP 2.2) Adding a |
+
+ None
+ |
+
+ validate
+ |
+
+ bool
+ |
+
+
+
+ If True (default), validate that the pulse is registered +in Channel.operations + |
+
+ True
+ |
+
The element
argument from qm.qua.play()
is not needed, as it is
+automatically set to self.name
.
quam/components/channels.py
322 +323 +324 +325 +326 +327 +328 +329 +330 +331 +332 +333 +334 +335 +336 +337 +338 +339 +340 +341 +342 +343 +344 +345 +346 +347 +348 +349 +350 +351 +352 +353 +354 +355 +356 +357 +358 +359 +360 +361 +362 +363 +364 +365 +366 +367 +368 +369 +370 +371 +372 +373 +374 +375 +376 +377 +378 +379 +380 +381 +382 +383 +384 +385 +386 +387 +388 +389 +390 +391 +392 +393 +394 +395 +396 +397 +398 +399 |
|
update_frequency(new_frequency, units='Hz', keep_phase=False)
+
+Dynamically update the frequency of the associated oscillator.
+This changes the frequency from the value defined in the channel.
+The behavior of the phase (continuous vs. coherent) is controlled by the
+keep_phase
parameter and is discussed in the documentation.
Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
+ new_frequency
+ |
+
+ int
+ |
+
+
+
+ The new frequency value to set in units set
+by |
+ + required + | +
+ units
+ |
+
+ str
+ |
+
+
+
+ units of new frequency. Useful when sub-Hz +precision is required. Allowed units are "Hz", "mHz", "uHz", +"nHz", "pHz" + |
+
+ 'Hz'
+ |
+
+ keep_phase
+ |
+
+ bool
+ |
+
+
+
+ Determine whether phase will be continuous
+through the change (if |
+
+ False
+ |
+
with program() as prog:
+ update_frequency("q1", 4e6) # will set the frequency to 4 MHz
+
+ ### Example for sub-Hz resolution
+ # will set the frequency to 100 Hz (due to casting to int)
+ update_frequency("q1", 100.7)
+
+ # will set the frequency to 100.7 Hz
+ update_frequency("q1", 100700, units='mHz')
+
quam/components/channels.py
442 +443 +444 +445 +446 +447 +448 +449 +450 +451 +452 +453 +454 +455 +456 +457 +458 +459 +460 +461 +462 +463 +464 +465 +466 +467 +468 +469 +470 +471 +472 +473 +474 +475 +476 +477 +478 |
|
wait(duration, *other_elements)
+
+Wait for the given duration on all provided elements without outputting anything.
+Duration is in units of the clock cycle (4ns)
+ + +Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
+ duration
+ |
+
+ Union[int,QUA variable of type int]
+ |
+
+
+
+ time to wait in +units of the clock cycle (4ns). Range: [4, $2^{31}-1$] +in steps of 1. + |
+ + required + | +
+ *other_elements
+ |
+
+ Union[str,sequence of str]
+ |
+
+
+
+ elements to wait on, +in addition to this channel + |
+
+ ()
+ |
+
In case the value of this is outside the range above, unexpected results may occur.
+The current channel element is always included in the wait operation.
+The purpose of the wait
operation is to add latency. In most cases, the
+latency added will be exactly the same as that specified by the QUA variable or
+the literal used. However, in some cases an additional computational latency may
+be added. If the actual wait time has significance, such as in characterization
+experiments, the actual wait time should always be verified with a simulator.
quam/components/channels.py
401 +402 +403 +404 +405 +406 +407 +408 +409 +410 +411 +412 +413 +414 +415 +416 +417 +418 +419 +420 +421 +422 +423 +424 +425 +426 +427 +428 +429 +430 |
|
DigitalOutputChannel
+
+
+
+ Bases: QuamComponent
QuAM component for a digital output channel (signal going out of the OPX)
+Should be added to Channel.digital_outputs
so that it's also added to the
+respective element in the QUA config.
Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
+ opx_output
+ |
+
+ Tuple[str, int]
+ |
+
+
+
+ Channel output port from the OPX perspective, +E.g. ("con1", 1) + |
+ + required + | +
+ delay
+ |
+
+ int
+ |
+
+
+
+ Delay in nanoseconds. An intrinsic negative delay of +136 ns exists by default. + |
+ + required + | +
+ buffer
+ |
+
+ int
+ |
+
+
+
+ Digital pulses played to this element will be convolved +with a digital pulse of value 1 with this length [ns]. + |
+ + required + | +
+ shareable
+ |
+
+ bool
+ |
+
+
+
+ If True, the digital output can be shared with other +QM instances. Default is False + |
+ + required + | +
+ inverted
+ |
+
+ bool
+ |
+
+
+
+ If True, the digital output is inverted. +Default is False. + |
+ + required + | +
.
+ + + + + + +quam/components/channels.py
74 + 75 + 76 + 77 + 78 + 79 + 80 + 81 + 82 + 83 + 84 + 85 + 86 + 87 + 88 + 89 + 90 + 91 + 92 + 93 + 94 + 95 + 96 + 97 + 98 + 99 +100 +101 +102 +103 +104 +105 +106 +107 +108 +109 +110 +111 +112 +113 +114 +115 +116 +117 +118 +119 +120 +121 +122 +123 +124 +125 +126 +127 +128 +129 +130 +131 +132 +133 +134 +135 +136 +137 +138 +139 +140 +141 +142 +143 +144 +145 +146 +147 +148 +149 +150 +151 +152 +153 +154 +155 |
|
apply_to_config(config)
+
+Adds this DigitalOutputChannel to the QUA configuration.
+config.controllers.
See QuamComponent.apply_to_config
+for details.
quam/components/channels.py
123 +124 +125 +126 +127 +128 +129 +130 +131 +132 +133 +134 +135 +136 +137 +138 +139 +140 +141 +142 +143 +144 +145 +146 +147 +148 +149 +150 +151 +152 +153 +154 +155 |
|
generate_element_config()
+
+Generates the config entry for a digital channel in the QUA config.
+This config entry goes into:
+config.elements.
Returns:
+Type | +Description | +
---|---|
+ Dict[str, int]
+ |
+
+
+
+ Dict[str, int]: The digital channel config entry. +Contains "port", and optionally "delay", "buffer" if specified + |
+
quam/components/channels.py
101 +102 +103 +104 +105 +106 +107 +108 +109 +110 +111 +112 +113 +114 +115 +116 +117 +118 +119 +120 +121 |
|
IQChannel
+
+
+
+ Bases: _OutComplexChannel
QuAM component for an IQ output channel.
+ + +Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
+ operations
+ |
+
+ Dict[str, Pulse]
+ |
+
+
+
+ A dictionary of pulses to be played on this +channel. The key is the pulse label (e.g. "X90") and value is a Pulse. + |
+ + required + | +
+ id
+ |
+
+ (str, int)
+ |
+
+
+
+ The id of the channel, used to generate the name.
+Can be a string, or an integer in which case it will add
+ |
+ + required + | +
+ opx_output_I
+ |
+
+ Tuple[str, int]
+ |
+
+
+
+ Channel I output port from the OPX perspective, +a tuple of (controller_name, port). + |
+ + required + | +
+ opx_output_Q
+ |
+
+ Tuple[str, int]
+ |
+
+
+
+ Channel Q output port from the OPX perspective, +a tuple of (controller_name, port). + |
+ + required + | +
+ opx_output_offset_I
+ |
+
+ float
+ |
+
+
+
+ The offset of the I channel. Default is 0. + |
+ + required + | +
+ opx_output_offset_Q
+ |
+
+ float
+ |
+
+
+
+ The offset of the Q channel. Default is 0. + |
+ + required + | +
+ intermediate_frequency
+ |
+
+ float
+ |
+
+
+
+ Intermediate frequency of the mixer. +Default is 0.0 + |
+ + required + | +
+ LO_frequency
+ |
+
+ float
+ |
+
+
+
+ Local oscillator frequency. Default is the LO frequency +of the frequency converter up component. + |
+ + required + | +
+ RF_frequency
+ |
+
+ float
+ |
+
+
+
+ RF frequency of the mixer. By default, the RF frequency +is inferred by adding the LO frequency and the intermediate frequency. + |
+ + required + | +
+ frequency_converter_up
+ |
+
+ FrequencyConverter
+ |
+
+
+
+ Frequency converter QuAM component +for the IQ output. + |
+ + required + | +
quam/components/channels.py
1075 +1076 +1077 +1078 +1079 +1080 +1081 +1082 +1083 +1084 +1085 +1086 +1087 +1088 +1089 +1090 +1091 +1092 +1093 +1094 +1095 +1096 +1097 +1098 +1099 +1100 +1101 +1102 +1103 +1104 +1105 +1106 +1107 +1108 +1109 +1110 +1111 +1112 +1113 +1114 +1115 +1116 +1117 +1118 +1119 +1120 +1121 +1122 +1123 +1124 +1125 +1126 +1127 +1128 +1129 +1130 +1131 +1132 +1133 +1134 +1135 +1136 +1137 +1138 +1139 +1140 +1141 +1142 +1143 +1144 +1145 +1146 +1147 +1148 +1149 +1150 +1151 +1152 +1153 +1154 +1155 +1156 +1157 +1158 +1159 +1160 +1161 +1162 +1163 +1164 +1165 +1166 +1167 +1168 +1169 +1170 +1171 +1172 +1173 +1174 +1175 +1176 +1177 +1178 +1179 +1180 +1181 +1182 +1183 +1184 +1185 +1186 +1187 +1188 +1189 +1190 +1191 +1192 +1193 +1194 +1195 +1196 +1197 +1198 +1199 +1200 +1201 +1202 +1203 +1204 +1205 +1206 +1207 +1208 +1209 +1210 |
|
apply_to_config(config)
+
+Adds this IQChannel to the QUA configuration.
+See QuamComponent.apply_to_config
+for details.
quam/components/channels.py
1149 +1150 +1151 +1152 +1153 +1154 +1155 +1156 +1157 +1158 +1159 +1160 +1161 +1162 +1163 +1164 +1165 +1166 +1167 +1168 +1169 +1170 +1171 +1172 +1173 +1174 +1175 +1176 +1177 +1178 +1179 +1180 +1181 +1182 +1183 +1184 +1185 +1186 +1187 +1188 +1189 +1190 +1191 +1192 +1193 +1194 +1195 +1196 +1197 +1198 +1199 +1200 +1201 +1202 +1203 +1204 +1205 +1206 +1207 +1208 +1209 +1210 |
|
set_dc_offset(offset, element_input)
+
+Set the DC offset of an element's input to the given value. +This value will remain the DC offset until changed or until the Quantum Machine +is closed.
+ + +Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
+ offset
+ |
+
+ QuaNumberType
+ |
+
+
+
+ The DC offset to set the input to. +This is limited by the OPX output voltage range. +The number can be a QUA variable + |
+ + required + | +
+ element_input
+ |
+
+ Literal['I', 'Q']
+ |
+
+
+
+ The element input to set the offset for. + |
+ + required + | +
Raises:
+Type | +Description | +
---|---|
+ ValueError
+ |
+
+
+
+ If element_input is not "I" or "Q" + |
+
quam/components/channels.py
1129 +1130 +1131 +1132 +1133 +1134 +1135 +1136 +1137 +1138 +1139 +1140 +1141 +1142 +1143 +1144 +1145 +1146 +1147 |
|
InIQChannel
+
+
+
+ Bases: _InComplexChannel
QuAM component for an IQ input channel
+ + +Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
+ operations
+ |
+
+ Dict[str, Pulse]
+ |
+
+
+
+ A dictionary of pulses to be played on this +channel. The key is the pulse label (e.g. "readout") and value is a +ReadoutPulse. + |
+ + required + | +
+ id
+ |
+
+ (str, int)
+ |
+
+
+
+ The id of the channel, used to generate the name.
+Can be a string, or an integer in which case it will add
+ |
+ + required + | +
+ opx_input_I
+ |
+
+ Tuple[str, int]
+ |
+
+
+
+ Channel I input port from the OPX perspective, +a tuple of (controller_name, port). + |
+ + required + | +
+ opx_input_Q
+ |
+
+ Tuple[str, int]
+ |
+
+
+
+ Channel Q input port from the OPX perspective, +a tuple of (controller_name, port). + |
+ + required + | +
+ opx_input_offset_I
+ |
+
+ float
+ |
+
+
+
+ The offset of the I channel. Default is 0. + |
+ + required + | +
+ opx_input_offset_Q
+ |
+
+ float
+ |
+
+
+
+ The offset of the Q channel. Default is 0. + |
+ + required + | +
+ frequency_converter_down
+ |
+
+ Optional[FrequencyConverter]
+ |
+
+
+
+ Frequency converter +QuAM component for the IQ input port. Only needed for the old Octave. + |
+ + required + | +
+ time_of_flight
+ |
+
+ int
+ |
+
+
+
+ Round-trip signal duration in nanoseconds. + |
+ + required + | +
+ smearing
+ |
+
+ int
+ |
+
+
+
+ Additional window of ADC integration in nanoseconds. +Used to account for signal smearing. + |
+ + required + | +
+ input_gain
+ |
+
+ float
+ |
+
+
+
+ The gain of the input channel. Default is None. + |
+ + required + | +
quam/components/channels.py
1462 +1463 +1464 +1465 +1466 +1467 +1468 +1469 +1470 +1471 +1472 +1473 +1474 +1475 +1476 +1477 +1478 +1479 +1480 +1481 +1482 +1483 +1484 +1485 +1486 +1487 +1488 +1489 +1490 +1491 +1492 +1493 +1494 +1495 +1496 +1497 +1498 +1499 +1500 +1501 +1502 +1503 +1504 +1505 +1506 +1507 +1508 +1509 +1510 +1511 +1512 +1513 +1514 +1515 +1516 +1517 +1518 +1519 +1520 +1521 +1522 +1523 +1524 +1525 +1526 +1527 +1528 +1529 +1530 +1531 +1532 +1533 +1534 +1535 +1536 +1537 +1538 +1539 +1540 +1541 +1542 +1543 +1544 +1545 +1546 +1547 +1548 +1549 +1550 +1551 +1552 +1553 +1554 +1555 |
|
apply_to_config(config)
+
+Adds this InOutIQChannel to the QUA configuration.
+See QuamComponent.apply_to_config
+for details.
quam/components/channels.py
1502 +1503 +1504 +1505 +1506 +1507 +1508 +1509 +1510 +1511 +1512 +1513 +1514 +1515 +1516 +1517 +1518 +1519 +1520 +1521 +1522 +1523 +1524 +1525 +1526 +1527 +1528 +1529 +1530 +1531 +1532 +1533 +1534 +1535 +1536 +1537 +1538 +1539 +1540 +1541 +1542 +1543 +1544 +1545 +1546 +1547 +1548 +1549 +1550 +1551 +1552 +1553 +1554 +1555 |
|
InIQOutSingleChannel
+
+
+
+ Bases: SingleChannel
, InIQChannel
QuAM component for an IQ input channel with a single output.
+ + +Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
+ operations
+ |
+
+ Dict[str, Pulse]
+ |
+
+
+
+ A dictionary of pulses to be played on this +channel. The key is the pulse label (e.g. "readout") and value is a +ReadoutPulse. + |
+ + required + | +
+ id
+ |
+
+ (str, int)
+ |
+
+
+
+ The id of the channel, used to generate the name.
+Can be a string, or an integer in which case it will add
+ |
+ + required + | +
+ opx_output
+ |
+
+ Tuple[str, int]
+ |
+
+
+
+ Channel output port from the OPX perspective, +a tuple of (controller_name, port). + |
+ + required + | +
+ opx_output_offset
+ |
+
+ float
+ |
+
+
+
+ DC offset for the output port. + |
+ + required + | +
+ opx_input_I
+ |
+
+ Tuple[str, int]
+ |
+
+
+
+ Channel I input port from the OPX perspective, +a tuple of (controller_name, port). + |
+ + required + | +
+ opx_input_Q
+ |
+
+ Tuple[str, int]
+ |
+
+
+
+ Channel Q input port from the OPX perspective, +a tuple of (controller_name, port). + |
+ + required + | +
+ opx_input_offset_I
+ |
+
+ float
+ |
+
+
+
+ The offset of the I channel. Default is 0. + |
+ + required + | +
+ opx_input_offset_Q
+ |
+
+ float
+ |
+
+
+
+ The offset of the Q channel. Default is 0. + |
+ + required + | +
+ filter_fir_taps
+ |
+
+ List[float]
+ |
+
+
+
+ FIR filter taps for the output port. + |
+ + required + | +
+ filter_iir_taps
+ |
+
+ List[float]
+ |
+
+
+
+ IIR filter taps for the output port. + |
+ + required + | +
+ intermediate_frequency
+ |
+
+ float
+ |
+
+
+
+ Intermediate frequency of OPX output, default +is None. + |
+ + required + | +
+ time_of_flight
+ |
+
+ int
+ |
+
+
+
+ Round-trip signal duration in nanoseconds. + |
+ + required + | +
+ smearing
+ |
+
+ int
+ |
+
+
+
+ Additional window of ADC integration in nanoseconds. +Used to account for signal smearing. + |
+ + required + | +
quam/components/channels.py
1666 +1667 +1668 +1669 +1670 +1671 +1672 +1673 +1674 +1675 +1676 +1677 +1678 +1679 +1680 +1681 +1682 +1683 +1684 +1685 +1686 +1687 +1688 +1689 +1690 +1691 +1692 +1693 +1694 +1695 |
|
InMWChannel
+
+
+
+ Bases: _InComplexChannel
QuAM component for a MW FEM input channel
+ + +Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
+ operations
+ |
+
+ Dict[str, Pulse]
+ |
+
+
+
+ A dictionary of pulses to be played on this +channel. The key is the pulse label (e.g. "X90") and value is a Pulse. + |
+ + required + | +
+ id
+ |
+
+ (str, int)
+ |
+
+
+
+ The id of the channel, used to generate the name.
+Can be a string, or an integer in which case it will add
+ |
+ + required + | +
+ opx_input
+ |
+
+ MWFEMAnalogInputPort
+ |
+
+
+
+ Channel input port from the OPX perspective. + |
+ + required + | +
+ intermediate_frequency
+ |
+
+ float
+ |
+
+
+
+ Intermediate frequency of OPX output, default +is None. + |
+ + required + | +
quam/components/channels.py
1733 +1734 +1735 +1736 +1737 +1738 +1739 +1740 +1741 +1742 +1743 +1744 +1745 +1746 +1747 +1748 +1749 +1750 +1751 +1752 +1753 +1754 +1755 +1756 +1757 +1758 +1759 |
|
InOutIQChannel
+
+
+
+ Bases: IQChannel
, InIQChannel
QuAM component for an IQ channel with both input and output.
+An example of such a channel is a readout resonator, where you may want to +apply a readout tone and then measure the response.
+ + +Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
+ operations
+ |
+
+ Dict[str, Pulse]
+ |
+
+
+
+ A dictionary of pulses to be played on this +channel. The key is the pulse label (e.g. "readout") and value is a +ReadoutPulse. + |
+ + required + | +
+ id
+ |
+
+ (str, int)
+ |
+
+
+
+ The id of the channel, used to generate the name.
+Can be a string, or an integer in which case it will add
+ |
+ + required + | +
+ opx_output_I
+ |
+
+ Tuple[str, int]
+ |
+
+
+
+ Channel I output port from the OPX perspective, +a tuple of (controller_name, port). + |
+ + required + | +
+ opx_output_Q
+ |
+
+ Tuple[str, int]
+ |
+
+
+
+ Channel Q output port from the OPX perspective, +a tuple of (controller_name, port). + |
+ + required + | +
+ opx_output_offset_I
+ |
+
+ float
+ |
+
+
+
+ The offset of the I channel. Default is 0. + |
+ + required + | +
+ opx_output_offset_Q
+ |
+
+ float
+ |
+
+
+
+ The offset of the Q channel. Default is 0. + |
+ + required + | +
+ opx_input_I
+ |
+
+ Tuple[str, int]
+ |
+
+
+
+ Channel I input port from the OPX perspective, +a tuple of (controller_name, port). + |
+ + required + | +
+ opx_input_Q
+ |
+
+ Tuple[str, int]
+ |
+
+
+
+ Channel Q input port from the OPX perspective, +a tuple of (controller_name, port). + |
+ + required + | +
+ opx_input_offset_I
+ |
+
+ float
+ |
+
+
+
+ The offset of the I channel. Default is 0. + |
+ + required + | +
+ opx_input_offset_Q
+ |
+
+ float
+ |
+
+
+
+ The offset of the Q channel. Default is 0. + |
+ + required + | +
+ intermediate_frequency
+ |
+
+ float
+ |
+
+
+
+ Intermediate frequency of the mixer. +Default is 0.0 + |
+ + required + | +
+ LO_frequency
+ |
+
+ float
+ |
+
+
+
+ Local oscillator frequency. Default is the LO frequency +of the frequency converter up component. + |
+ + required + | +
+ RF_frequency
+ |
+
+ float
+ |
+
+
+
+ RF frequency of the mixer. By default, the RF frequency +is inferred by adding the LO frequency and the intermediate frequency. + |
+ + required + | +
+ frequency_converter_up
+ |
+
+ FrequencyConverter
+ |
+
+
+
+ Frequency converter QuAM component +for the IQ output. + |
+ + required + | +
+ frequency_converter_down
+ |
+
+ Optional[FrequencyConverter]
+ |
+
+
+
+ Frequency converter +QuAM component for the IQ input port. Only needed for the old Octave. + |
+ + required + | +
+ time_of_flight
+ |
+
+ int
+ |
+
+
+
+ Round-trip signal duration in nanoseconds. + |
+ + required + | +
+ smearing
+ |
+
+ int
+ |
+
+
+
+ Additional window of ADC integration in nanoseconds. +Used to account for signal smearing. + |
+ + required + | +
quam/components/channels.py
1586 +1587 +1588 +1589 +1590 +1591 +1592 +1593 +1594 +1595 +1596 +1597 +1598 +1599 +1600 +1601 +1602 +1603 +1604 +1605 +1606 +1607 +1608 +1609 +1610 +1611 +1612 +1613 +1614 +1615 +1616 +1617 +1618 +1619 +1620 +1621 +1622 +1623 +1624 +1625 +1626 +1627 |
|
InOutMWChannel
+
+
+
+ Bases: MWChannel
, InMWChannel
QuAM component for a MW FEM input channel
+ + +Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
+ operations
+ |
+
+ Dict[str, Pulse]
+ |
+
+
+
+ A dictionary of pulses to be played on this +channel. The key is the pulse label (e.g. "X90") and value is a Pulse. + |
+ + required + | +
+ id
+ |
+
+ (str, int)
+ |
+
+
+
+ The id of the channel, used to generate the name.
+Can be a string, or an integer in which case it will add
+ |
+ + required + | +
+ opx_output
+ |
+
+ MWFEMAnalogOutputPort
+ |
+
+
+
+ Channel output port from the OPX perspective. + |
+ + required + | +
+ opx_input
+ |
+
+ MWFEMAnalogInputPort
+ |
+
+
+
+ Channel input port from the OPX perspective. + |
+ + required + | +
+ intermediate_frequency
+ |
+
+ float
+ |
+
+
+
+ Intermediate frequency of OPX output, default +is None. + |
+ + required + | +
+ upconverter
+ |
+
+ int
+ |
+
+
+
+ The upconverter to use. Default is 1. + |
+ + required + | +
+ time_of_flight
+ |
+
+ int
+ |
+
+
+
+ Round-trip signal duration in nanoseconds. + |
+ + required + | +
+ smearing
+ |
+
+ int
+ |
+
+
+
+ Additional window of ADC integration in nanoseconds. +Used to account for signal smearing. + |
+ + required + | +
quam/components/channels.py
1762 +1763 +1764 +1765 +1766 +1767 +1768 +1769 +1770 +1771 +1772 +1773 +1774 +1775 +1776 +1777 +1778 +1779 +1780 +1781 +1782 |
|
InOutSingleChannel
+
+
+
+ Bases: SingleChannel
, InSingleChannel
QuAM component for a single (not IQ) input + output channel.
+ + +Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
+ operations
+ |
+
+ Dict[str, Pulse]
+ |
+
+
+
+ A dictionary of pulses to be played on this +channel. The key is the pulse label (e.g. "X90") and value is a Pulse. + |
+ + required + | +
+ id
+ |
+
+ (str, int)
+ |
+
+
+
+ The id of the channel, used to generate the name.
+Can be a string, or an integer in which case it will add
+ |
+ + required + | +
+ opx_output
+ |
+
+ Tuple[str, int]
+ |
+
+
+
+ Channel output port from the OPX perspective, +a tuple of (controller_name, port). + |
+ + required + | +
+ opx_output_offset
+ |
+
+ float
+ |
+
+
+
+ DC offset for the output port. + |
+ + required + | +
+ opx_input
+ |
+
+ Tuple[str, int]
+ |
+
+
+
+ Channel input port from OPX perspective, +a tuple of (controller_name, port). + |
+ + required + | +
+ opx_input_offset
+ |
+
+ float
+ |
+
+
+
+ DC offset for the input port. + |
+ + required + | +
+ filter_fir_taps
+ |
+
+ List[float]
+ |
+
+
+
+ FIR filter taps for the output port. + |
+ + required + | +
+ filter_iir_taps
+ |
+
+ List[float]
+ |
+
+
+
+ IIR filter taps for the output port. + |
+ + required + | +
+ intermediate_frequency
+ |
+
+ float
+ |
+
+
+
+ Intermediate frequency of OPX output, default +is None. + |
+ + required + | +
+ time_of_flight
+ |
+
+ int
+ |
+
+
+
+ Round-trip signal duration in nanoseconds. + |
+ + required + | +
+ smearing
+ |
+
+ int
+ |
+
+
+
+ Additional window of ADC integration in nanoseconds. +Used to account for signal smearing. + |
+ + required + | +
quam/components/channels.py
1558 +1559 +1560 +1561 +1562 +1563 +1564 +1565 +1566 +1567 +1568 +1569 +1570 +1571 +1572 +1573 +1574 +1575 +1576 +1577 +1578 +1579 +1580 +1581 +1582 +1583 |
|
InSingleChannel
+
+
+
+ Bases: Channel
QuAM component for a single (not IQ) input channel.
+ + +Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
+ operations
+ |
+
+ Dict[str, Pulse]
+ |
+
+
+
+ A dictionary of pulses to be played on this +channel. The key is the pulse label (e.g. "X90") and value is a Pulse. + |
+ + required + | +
+ id
+ |
+
+ (str, int)
+ |
+
+
+
+ The id of the channel, used to generate the name.
+Can be a string, or an integer in which case it will add
+ |
+ + required + | +
+ opx_input
+ |
+
+ Tuple[str, int]
+ |
+
+
+
+ Channel input port from OPX perspective, +a tuple of (controller_name, port). + |
+ + required + | +
+ opx_input_offset
+ |
+
+ float
+ |
+
+
+
+ DC offset for the input port. + |
+ + required + | +
+ intermediate_frequency
+ |
+
+ float
+ |
+
+
+
+ Intermediate frequency of OPX input, +default is None. + |
+ + required + | +
+ time_of_flight
+ |
+
+ int
+ |
+
+
+
+ Round-trip signal duration in nanoseconds. + |
+ + required + | +
+ smearing
+ |
+
+ int
+ |
+
+
+
+ Additional window of ADC integration in nanoseconds. +Used to account for signal smearing. + |
+ + required + | +
quam/components/channels.py
664 +665 +666 +667 +668 +669 +670 +671 +672 +673 +674 +675 +676 +677 +678 +679 +680 +681 +682 +683 +684 +685 +686 +687 +688 +689 +690 +691 +692 +693 +694 +695 +696 +697 +698 +699 +700 +701 +702 +703 +704 +705 +706 +707 +708 +709 +710 +711 +712 +713 +714 +715 +716 +717 +718 +719 +720 +721 +722 +723 +724 +725 +726 +727 +728 +729 +730 +731 +732 +733 +734 +735 +736 +737 +738 +739 +740 +741 +742 +743 +744 +745 +746 +747 +748 +749 +750 +751 +752 +753 +754 +755 +756 +757 +758 +759 +760 +761 +762 +763 +764 +765 +766 +767 +768 +769 +770 +771 +772 +773 +774 +775 +776 +777 +778 +779 +780 +781 +782 +783 +784 +785 +786 +787 +788 +789 +790 +791 +792 +793 +794 +795 +796 +797 +798 +799 +800 +801 +802 +803 +804 +805 +806 +807 +808 +809 +810 +811 +812 +813 +814 +815 +816 +817 +818 +819 +820 +821 +822 +823 +824 +825 +826 +827 +828 +829 +830 +831 +832 +833 +834 +835 +836 +837 +838 +839 +840 +841 +842 +843 +844 +845 +846 +847 +848 +849 +850 +851 +852 +853 +854 +855 +856 +857 +858 +859 +860 +861 +862 +863 +864 +865 +866 +867 +868 +869 +870 +871 +872 +873 +874 +875 +876 +877 +878 +879 +880 +881 +882 +883 +884 +885 +886 +887 +888 +889 +890 +891 +892 +893 +894 +895 +896 +897 +898 +899 +900 +901 +902 +903 +904 +905 +906 +907 +908 +909 +910 +911 +912 +913 +914 +915 +916 +917 +918 +919 +920 +921 +922 +923 +924 +925 +926 +927 +928 +929 +930 +931 +932 +933 +934 +935 +936 +937 +938 +939 +940 +941 +942 +943 +944 +945 +946 +947 +948 +949 +950 +951 +952 +953 +954 +955 +956 +957 +958 +959 +960 +961 +962 +963 +964 +965 +966 +967 +968 +969 +970 +971 +972 +973 +974 +975 +976 +977 +978 +979 +980 +981 +982 +983 +984 +985 +986 +987 +988 +989 +990 +991 +992 +993 +994 +995 +996 +997 +998 |
|
apply_to_config(config)
+
+Adds this InSingleChannel to the QUA configuration.
+See QuamComponent.apply_to_config
+for details.
quam/components/channels.py
692 +693 +694 +695 +696 +697 +698 +699 +700 +701 +702 +703 +704 +705 +706 +707 +708 +709 +710 +711 +712 +713 +714 +715 +716 +717 +718 +719 |
|
measure(pulse_name, amplitude_scale=None, qua_vars=None, stream=None)
+
+Perform a full demodulation measurement on this channel.
+ + +Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
+ pulse_name
+ |
+
+ str
+ |
+
+
+
+ The name of the pulse to play. Should be registered in
+ |
+ + required + | +
+ amplitude_scale
+ |
+
+ (float, _PulseAmp)
+ |
+
+
+
+ Amplitude scale of the pulse. +Can be either a float, or qua.amp(float). + |
+
+ None
+ |
+
+ qua_vars
+ |
+
+ Tuple[QuaVariableType, ...]
+ |
+
+
+
+ Two QUA +variables to store the I, Q measurement results. +If not provided, new variables will be declared and returned. + |
+
+ None
+ |
+
+ stream
+ |
+
+ Optional[StreamType]
+ |
+
+
+
+ The stream to save the measurement result to. +If not provided, the raw ADC signal will not be streamed. + |
+
+ None
+ |
+
Returns:
+Type | +Description | +
---|---|
+ Tuple[QuaVariableType, QuaVariableType]
+ |
+
+
+
+ I, Q: The QUA variables used to store the measurement results. +If provided as input, the same variables will be returned. +If not provided, new variables will be declared and returned. + |
+
Raises:
+Type | +Description | +
---|---|
+ ValueError
+ |
+
+
+
+ If |
+
quam/components/channels.py
721 +722 +723 +724 +725 +726 +727 +728 +729 +730 +731 +732 +733 +734 +735 +736 +737 +738 +739 +740 +741 +742 +743 +744 +745 +746 +747 +748 +749 +750 +751 +752 +753 +754 +755 +756 +757 +758 +759 +760 +761 +762 +763 +764 +765 +766 +767 +768 +769 +770 +771 +772 +773 +774 +775 |
|
measure_accumulated(pulse_name, amplitude_scale=None, num_segments=None, segment_length=None, qua_vars=None, stream=None)
+
+Perform an accumulated demodulation measurement on this channel.
+ + +Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
+ pulse_name
+ |
+
+ str
+ |
+
+
+
+ The name of the pulse to play. Should be registered in
+ |
+ + required + | +
+ amplitude_scale
+ |
+
+ (float, _PulseAmp)
+ |
+
+
+
+ Amplitude scale of the pulse. +Can be either a float, or qua.amp(float). + |
+
+ None
+ |
+
+ num_segments
+ |
+
+ int
+ |
+
+
+
+ The number of segments to accumulate.
+Should either specify this or |
+
+ None
+ |
+
+ segment_length
+ |
+
+ int
+ |
+
+
+
+ The length of the segment to accumulate.
+Should either specify this or |
+
+ None
+ |
+
+ qua_vars
+ |
+
+ Tuple[QuaVariableType, ...]
+ |
+
+
+
+ Two QUA +variables to store the I, Q measurement results. +If not provided, new variables will be declared and returned. + |
+
+ None
+ |
+
+ stream
+ |
+
+ Optional[StreamType]
+ |
+
+
+
+ The stream to save the measurement result to. +If not provided, the raw ADC signal will not be streamed. + |
+
+ None
+ |
+
Returns:
+Type | +Description | +
---|---|
+ Tuple[QuaVariableType, QuaVariableType]
+ |
+
+
+
+ I, Q: The QUA variables used to store the measurement results. +If provided as input, the same variables will be returned. +If not provided, new variables will be declared and returned. + |
+
Raises:
+Type | +Description | +
---|---|
+ ValueError
+ |
+
+
+
+ If both |
+
+ ValueError
+ |
+
+
+
+ If |
+
quam/components/channels.py
777 +778 +779 +780 +781 +782 +783 +784 +785 +786 +787 +788 +789 +790 +791 +792 +793 +794 +795 +796 +797 +798 +799 +800 +801 +802 +803 +804 +805 +806 +807 +808 +809 +810 +811 +812 +813 +814 +815 +816 +817 +818 +819 +820 +821 +822 +823 +824 +825 +826 +827 +828 +829 +830 +831 +832 +833 +834 +835 +836 +837 +838 +839 +840 +841 +842 +843 +844 +845 +846 +847 +848 +849 +850 +851 +852 +853 +854 +855 +856 +857 |
|
measure_sliced(pulse_name, amplitude_scale=None, num_segments=None, segment_length=None, qua_vars=None, stream=None)
+
+Perform an accumulated demodulation measurement on this channel.
+ + +Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
+ pulse_name
+ |
+
+ str
+ |
+
+
+
+ The name of the pulse to play. Should be registered in
+ |
+ + required + | +
+ amplitude_scale
+ |
+
+ (float, _PulseAmp)
+ |
+
+
+
+ Amplitude scale of the pulse. +Can be either a float, or qua.amp(float). + |
+
+ None
+ |
+
+ num_segments
+ |
+
+ int
+ |
+
+
+
+ The number of segments to accumulate.
+Should either specify this or |
+
+ None
+ |
+
+ segment_length
+ |
+
+ int
+ |
+
+
+
+ The length of the segment to accumulate.
+Should either specify this or |
+
+ None
+ |
+
+ qua_vars
+ |
+
+ Tuple[QuaVariableType, ...]
+ |
+
+
+
+ Two QUA +variables to store the I, Q measurement results. +If not provided, new variables will be declared and returned. + |
+
+ None
+ |
+
+ stream
+ |
+
+ Optional[StreamType]
+ |
+
+
+
+ The stream to save the measurement result to. +If not provided, the raw ADC signal will not be streamed. + |
+
+ None
+ |
+
Returns:
+Type | +Description | +
---|---|
+ Tuple[QuaVariableType, QuaVariableType]
+ |
+
+
+
+ I, Q: The QUA variables used to store the measurement results. +If provided as input, the same variables will be returned. +If not provided, new variables will be declared and returned. + |
+
Raises:
+Type | +Description | +
---|---|
+ ValueError
+ |
+
+
+
+ If both |
+
+ ValueError
+ |
+
+
+
+ If |
+
quam/components/channels.py
859 +860 +861 +862 +863 +864 +865 +866 +867 +868 +869 +870 +871 +872 +873 +874 +875 +876 +877 +878 +879 +880 +881 +882 +883 +884 +885 +886 +887 +888 +889 +890 +891 +892 +893 +894 +895 +896 +897 +898 +899 +900 +901 +902 +903 +904 +905 +906 +907 +908 +909 +910 +911 +912 +913 +914 +915 +916 +917 +918 +919 +920 +921 +922 +923 +924 +925 +926 +927 +928 +929 +930 +931 +932 +933 +934 +935 +936 +937 +938 +939 |
|
measure_time_tagging(pulse_name, size, max_time, qua_vars=None, stream=None, mode='analog')
+
+Perform a time tagging measurement on this channel.
+For details see https://docs.quantum-machines.co/latest/docs/Guides/features/#time-tagging
+ + +Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
+ pulse_name
+ |
+
+ str
+ |
+
+
+
+ The name of the pulse to play. Should be registered in
+ |
+ + required + | +
+ size
+ |
+
+ int
+ |
+
+
+
+ The size of the QUA array to store the times of the detected
+pulses. Ignored if |
+ + required + | +
+ max_time
+ |
+
+ QuaNumberType
+ |
+
+
+
+ The maximum time to search for pulses. + |
+ + required + | +
+ qua_vars
+ |
+
+ Tuple[QuaVariableType, QuaNumberType]
+ |
+
+
+
+ QUA variables +to store the times and counts of the detected pulses. If not provided, +new variables will be declared and returned. + |
+
+ None
+ |
+
+ stream
+ |
+
+ Optional[StreamType]
+ |
+
+
+
+ The stream to save the measurement result to. +If not provided, the raw ADC signal will not be streamed. + |
+
+ None
+ |
+
+ mode
+ |
+
+ Literal['analog', 'high_res', 'digital']
+ |
+
+
+
+ The time tagging mode. + |
+
+ 'analog'
+ |
+
Returns:
+Name | Type | +Description | +
---|---|---|
times |
+ QuaVariableType
+ |
+
+
+
+ The QUA variable to store the times of the detected +pulses. + |
+
counts |
+ QuaNumberType
+ |
+
+
+
+ The number of detected pulses. + |
+
times, counts = channel.measure_time_tagging("readout", size=1000, max_time=1000)
+
quam/components/channels.py
941 +942 +943 +944 +945 +946 +947 +948 +949 +950 +951 +952 +953 +954 +955 +956 +957 +958 +959 +960 +961 +962 +963 +964 +965 +966 +967 +968 +969 +970 +971 +972 +973 +974 +975 +976 +977 +978 +979 +980 +981 +982 +983 +984 +985 +986 +987 +988 +989 +990 +991 +992 +993 +994 +995 +996 +997 +998 |
|
InSingleOutIQChannel
+
+
+
+ Bases: IQChannel
, InSingleChannel
QuAM component for an IQ output channel with a single input.
+ + +Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
+ operations
+ |
+
+ Dict[str, Pulse]
+ |
+
+
+
+ A dictionary of pulses to be played on this +channel. The key is the pulse label (e.g. "readout") and value is a +ReadoutPulse. + |
+ + required + | +
+ id
+ |
+
+ (str, int)
+ |
+
+
+
+ The id of the channel, used to generate the name.
+Can be a string, or an integer in which case it will add
+ |
+ + required + | +
+ opx_output_I
+ |
+
+ Tuple[str, int]
+ |
+
+
+
+ Channel I output port from the OPX perspective, +a tuple of (controller_name, port). + |
+ + required + | +
+ opx_output_Q
+ |
+
+ Tuple[str, int]
+ |
+
+
+
+ Channel Q output port from the OPX perspective, +a tuple of (controller_name, port). + |
+ + required + | +
+ opx_output_offset_I
+ |
+
+ float
+ |
+
+
+
+ The offset of the I channel. Default is 0. + |
+ + required + | +
+ opx_output_offset_Q
+ |
+
+ float
+ |
+
+
+
+ The offset of the Q channel. Default is 0. + |
+ + required + | +
+ opx_input
+ |
+
+ Tuple[str, int]
+ |
+
+
+
+ Channel input port from OPX perspective, +a tuple of (controller_name, port). + |
+ + required + | +
+ opx_input_offset
+ |
+
+ float
+ |
+
+
+
+ DC offset for the input port. + |
+ + required + | +
+ intermediate_frequency
+ |
+
+ float
+ |
+
+
+
+ Intermediate frequency of the mixer. +Default is 0.0 + |
+ + required + | +
+ LO_frequency
+ |
+
+ float
+ |
+
+
+
+ Local oscillator frequency. Default is the LO frequency +of the frequency converter up component. + |
+ + required + | +
+ RF_frequency
+ |
+
+ float
+ |
+
+
+
+ RF frequency of the mixer. By default, the RF frequency +is inferred by adding the LO frequency and the intermediate frequency. + |
+ + required + | +
+ frequency_converter_up
+ |
+
+ FrequencyConverter
+ |
+
+
+
+ Frequency converter QuAM component +for the IQ output. + |
+ + required + | +
+ time_of_flight
+ |
+
+ int
+ |
+
+
+
+ Round-trip signal duration in nanoseconds. + |
+ + required + | +
+ smearing
+ |
+
+ int
+ |
+
+
+
+ Additional window of ADC integration in nanoseconds. +Used to account for signal smearing. + |
+ + required + | +
quam/components/channels.py
1630 +1631 +1632 +1633 +1634 +1635 +1636 +1637 +1638 +1639 +1640 +1641 +1642 +1643 +1644 +1645 +1646 +1647 +1648 +1649 +1650 +1651 +1652 +1653 +1654 +1655 +1656 +1657 +1658 +1659 +1660 +1661 +1662 +1663 |
|
MWChannel
+
+
+
+ Bases: _OutComplexChannel
QuAM component for a MW FEM output channel
+ + +Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
+ operations
+ |
+
+ Dict[str, Pulse]
+ |
+
+
+
+ A dictionary of pulses to be played on this +channel. The key is the pulse label (e.g. "X90") and value is a Pulse. + |
+ + required + | +
+ id
+ |
+
+ (str, int)
+ |
+
+
+
+ The id of the channel, used to generate the name.
+Can be a string, or an integer in which case it will add
+ |
+ + required + | +
+ opx_output
+ |
+
+ MWFEMAnalogOutputPort
+ |
+
+
+
+ Channel output port from the OPX perspective. + |
+ + required + | +
+ intermediate_frequency
+ |
+
+ float
+ |
+
+
+
+ Intermediate frequency of OPX output, default +is None. + |
+ + required + | +
+ upconverter
+ |
+
+ int
+ |
+
+
+
+ The upconverter to use. Default is 1. + |
+ + required + | +
+ time_of_flight
+ |
+
+ int
+ |
+
+
+
+ Round-trip signal duration in nanoseconds. + |
+ + required + | +
+ smearing
+ |
+
+ int
+ |
+
+
+
+ Additional window of ADC integration in nanoseconds. +Used to account for signal smearing. + |
+ + required + | +
quam/components/channels.py
1698 +1699 +1700 +1701 +1702 +1703 +1704 +1705 +1706 +1707 +1708 +1709 +1710 +1711 +1712 +1713 +1714 +1715 +1716 +1717 +1718 +1719 +1720 +1721 +1722 +1723 +1724 +1725 +1726 +1727 +1728 +1729 +1730 |
|
SingleChannel
+
+
+
+ Bases: Channel
QuAM component for a single (not IQ) output channel.
+ + +Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
+ operations
+ |
+
+ Dict[str, Pulse]
+ |
+
+
+
+ A dictionary of pulses to be played on this +channel. The key is the pulse label (e.g. "X90") and value is a Pulse. + |
+ + required + | +
+ id
+ |
+
+ (str, int)
+ |
+
+
+
+ The id of the channel, used to generate the name.
+Can be a string, or an integer in which case it will add
+ |
+ + required + | +
+ opx_output
+ |
+
+ Tuple[str, int]
+ |
+
+
+
+ Channel output port from the OPX perspective, +a tuple of (controller_name, port). + |
+ + required + | +
+ filter_fir_taps
+ |
+
+ List[float]
+ |
+
+
+
+ FIR filter taps for the output port. + |
+ + required + | +
+ filter_iir_taps
+ |
+
+ List[float]
+ |
+
+
+
+ IIR filter taps for the output port. + |
+ + required + | +
+ opx_output_offset
+ |
+
+ float
+ |
+
+
+
+ DC offset for the output port. + |
+ + required + | +
+ intermediate_frequency
+ |
+
+ float
+ |
+
+
+
+ Intermediate frequency of OPX output, default +is None. + |
+ + required + | +
quam/components/channels.py
579 +580 +581 +582 +583 +584 +585 +586 +587 +588 +589 +590 +591 +592 +593 +594 +595 +596 +597 +598 +599 +600 +601 +602 +603 +604 +605 +606 +607 +608 +609 +610 +611 +612 +613 +614 +615 +616 +617 +618 +619 +620 +621 +622 +623 +624 +625 +626 +627 +628 +629 +630 +631 +632 +633 +634 +635 +636 +637 +638 +639 +640 +641 +642 +643 +644 +645 +646 +647 +648 +649 +650 +651 +652 +653 +654 +655 +656 +657 +658 +659 +660 +661 |
|
apply_to_config(config)
+
+Adds this SingleChannel to the QUA configuration.
+See QuamComponent.apply_to_config
+for details.
quam/components/channels.py
616 +617 +618 +619 +620 +621 +622 +623 +624 +625 +626 +627 +628 +629 +630 +631 +632 +633 +634 +635 +636 +637 +638 +639 +640 +641 +642 +643 +644 +645 +646 +647 +648 +649 +650 +651 +652 +653 +654 +655 +656 +657 +658 +659 +660 +661 |
|
set_dc_offset(offset)
+
+Set the DC offset of an element's input to the given value. +This value will remain the DC offset until changed or until the Quantum Machine +is closed.
+ + +Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
+ offset
+ |
+
+ QuaNumberType
+ |
+
+
+
+ The DC offset to set the input to. +This is limited by the OPX output voltage range. +The number can be a QUA variable + |
+ + required + | +
quam/components/channels.py
604 +605 +606 +607 +608 +609 +610 +611 +612 +613 +614 |
|
StickyChannelAddon
+
+
+
+ Bases: QuamComponent
Addon to make channels sticky.
+ + +Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
+ duration
+ |
+
+ int
+ |
+
+
+
+ The ramp to zero duration, in ns. + |
+ + required + | +
+ enabled
+ |
+
+ bool
+ |
+
+
+
+ If False, the sticky parameters are not applied. +Default is True. + |
+ + required + | +
+ analog
+ |
+
+ bool
+ |
+
+
+
+ If False, the sticky parameters are not applied to +analog outputs. Default is True. + |
+ + required + | +
+ digital
+ |
+
+ bool
+ |
+
+
+
+ If False, the sticky parameters are not applied to +digital outputs. Default is True. + |
+ + required + | +
quam/components/channels.py
158 +159 +160 +161 +162 +163 +164 +165 +166 +167 +168 +169 +170 +171 +172 +173 +174 +175 +176 +177 +178 +179 +180 +181 +182 +183 +184 +185 +186 +187 +188 +189 +190 +191 +192 +193 +194 +195 +196 +197 +198 +199 +200 +201 |
|
channel: Optional[Channel]
+
+
+ property
+
+
+If the parent is a channel, returns the parent, otherwise returns None.
+TimeTaggingAddon
+
+
+
+ Bases: QuamComponent
Addon to perform time tagging on a channel.
+ + +Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
+ signal_threshold
+ |
+
+ float
+ |
+
+
+
+ The signal threshold in volts. +If not specified, the default value is 800 / 4096 ≈ 0.195 V. + |
+ + required + | +
+ signal_polarity
+ |
+
+ Literal['above', 'below']
+ |
+
+
+
+ The polarity of the signal +threshold. Default is "below". + |
+ + required + | +
+ derivative_threshold
+ |
+
+ float
+ |
+
+
+
+ The derivative threshold in volts/ns. +If not specified, the default value is 300 / 4096 ≈ 0.073 V/ns. + |
+ + required + | +
+ derivative_polarity
+ |
+
+ Literal['above', 'below']
+ |
+
+
+
+ The polarity of the derivative +threshold. Default is "below". + |
+ + required + | +
For details see Time Tagging
+ + + + + + +quam/components/channels.py
204 +205 +206 +207 +208 +209 +210 +211 +212 +213 +214 +215 +216 +217 +218 +219 +220 +221 +222 +223 +224 +225 +226 +227 +228 +229 +230 +231 +232 +233 +234 +235 +236 +237 +238 +239 +240 +241 +242 +243 +244 +245 +246 +247 +248 +249 +250 +251 +252 +253 +254 +255 +256 +257 |
|
channel: Optional[Channel]
+
+
+ property
+
+
+If the parent is a channel, returns the parent, otherwise returns None.
+Channel
+
+
+
+ Bases: QuamComponent
, ABC
Base QuAM component for a channel, can be output, input or both.
+ + +Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
+ operations
+ |
+
+ Dict[str, Pulse]
+ |
+
+
+
+ A dictionary of pulses to be played on this +channel. The key is the pulse label (e.g. "X90") and value is a Pulse. + |
+ + required + | +
+ id
+ |
+
+ (str, int)
+ |
+
+
+
+ The id of the channel, used to generate the name.
+Can be a string, or an integer in which case it will add
+ |
+ + required + | +
+ sticky
+ |
+
+ Sticky
+ |
+
+
+
+ Optional sticky parameters for the channel, i.e. defining +whether successive pulses are applied w.r.t the previous pulse or w.r.t 0 V. +If not specified, this channel is not sticky. + |
+ + required + | +
quam/components/channels.py
260 +261 +262 +263 +264 +265 +266 +267 +268 +269 +270 +271 +272 +273 +274 +275 +276 +277 +278 +279 +280 +281 +282 +283 +284 +285 +286 +287 +288 +289 +290 +291 +292 +293 +294 +295 +296 +297 +298 +299 +300 +301 +302 +303 +304 +305 +306 +307 +308 +309 +310 +311 +312 +313 +314 +315 +316 +317 +318 +319 +320 +321 +322 +323 +324 +325 +326 +327 +328 +329 +330 +331 +332 +333 +334 +335 +336 +337 +338 +339 +340 +341 +342 +343 +344 +345 +346 +347 +348 +349 +350 +351 +352 +353 +354 +355 +356 +357 +358 +359 +360 +361 +362 +363 +364 +365 +366 +367 +368 +369 +370 +371 +372 +373 +374 +375 +376 +377 +378 +379 +380 +381 +382 +383 +384 +385 +386 +387 +388 +389 +390 +391 +392 +393 +394 +395 +396 +397 +398 +399 +400 +401 +402 +403 +404 +405 +406 +407 +408 +409 +410 +411 +412 +413 +414 +415 +416 +417 +418 +419 +420 +421 +422 +423 +424 +425 +426 +427 +428 +429 +430 +431 +432 +433 +434 +435 +436 +437 +438 +439 +440 +441 +442 +443 +444 +445 +446 +447 +448 +449 +450 +451 +452 +453 +454 +455 +456 +457 +458 +459 +460 +461 +462 +463 +464 +465 +466 +467 +468 +469 +470 +471 +472 +473 +474 +475 +476 +477 +478 +479 +480 +481 +482 +483 +484 +485 +486 +487 +488 +489 +490 +491 +492 +493 +494 +495 +496 +497 +498 +499 +500 +501 +502 +503 +504 +505 +506 +507 +508 +509 +510 +511 +512 +513 +514 +515 +516 +517 +518 +519 +520 +521 +522 +523 +524 +525 +526 +527 +528 +529 +530 +531 +532 +533 +534 +535 +536 +537 +538 +539 +540 +541 +542 +543 +544 +545 +546 +547 +548 +549 +550 +551 +552 +553 +554 +555 +556 +557 +558 +559 +560 +561 +562 +563 +564 +565 +566 +567 +568 +569 +570 +571 +572 +573 +574 +575 +576 |
|
apply_to_config(config)
+
+Adds this Channel to the QUA configuration.
+config.elements.
Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
+ config
+ |
+
+ dict
+ |
+
+
+
+ The QUA config that's in the process of being generated. + |
+ + required + | +
Raises:
+Type | +Description | +
---|---|
+ ValueError
+ |
+
+
+
+ If the channel already exists in the config. + |
+
quam/components/channels.py
551 +552 +553 +554 +555 +556 +557 +558 +559 +560 +561 +562 +563 +564 +565 +566 +567 +568 +569 +570 +571 +572 +573 +574 +575 +576 |
|
frame_rotation(angle)
+
+Shift the phase of the channel element's oscillator by the given angle.
+This is typically used for virtual z-rotations.
+ + +The fixed point format of QUA variables of type fixed is 4.28, meaning the
+phase must be between $-8$ and $8-2^{28}$. Otherwise the phase value will be
+invalid. It is therefore better to use frame_rotation_2pi()
which avoids
+this issue.
The phase is accumulated with a resolution of 16 bit.
+Therefore, N changes to the phase can result in a phase (and amplitude)
+inaccuracy of about :math:N \cdot 2^{-16}
. To null out this accumulated
+error, it is recommended to use reset_frame(el)
from time to time.
Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
+ angle
+ |
+
+ Union[float, QUA variable of type fixed]
+ |
+
+
+
+ The angle to +add to the current phase (in radians) + |
+ + required + | +
+ *elements
+ |
+
+ str
+ |
+
+
+
+ a single element whose oscillator's phase will +be shifted. multiple elements can be given, in which case +all of their oscillators' phases will be shifted + |
+ + required + | +
quam/components/channels.py
480 +481 +482 +483 +484 +485 +486 +487 +488 +489 +490 +491 +492 +493 +494 +495 +496 +497 +498 +499 +500 +501 +502 +503 +504 +505 |
|
frame_rotation_2pi(angle)
+
+Shift the phase of the oscillator associated with an element by the given +angle in units of 2pi radians.
+This is typically used for virtual z-rotations.
+ + +Unlike the case of frame_rotation(), this method performs the 2-pi radian +wrap around of the angle automatically.
+The phase is accumulated with a resolution of 16 bit.
+Therefore, N changes to the phase can result in a phase inaccuracy of
+about :math:N \cdot 2^{-16}
. To null out this accumulated error, it is
+recommended to use reset_frame(el)
from time to time.
Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
+ angle
+ |
+
+ Union[float,QUA variable of type real]
+ |
+
+
+
+ The angle to add +to the current phase (in $2\pi$ radians) + |
+ + required + | +
quam/components/channels.py
507 +508 +509 +510 +511 +512 +513 +514 +515 +516 +517 +518 +519 +520 +521 +522 +523 +524 +525 +526 +527 |
|
play(pulse_name, amplitude_scale=None, duration=None, condition=None, chirp=None, truncate=None, timestamp_stream=None, continue_chirp=False, target='', validate=True)
+
+Play a pulse on this channel.
+ + +Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
+ pulse_name
+ |
+
+ str
+ |
+
+
+
+ The name of the pulse to play. Should be registered in
+ |
+ + required + | +
+ amplitude_scale
+ |
+
+ (float, _PulseAmp)
+ |
+
+
+
+ Amplitude scale of the pulse. +Can be either a float, or qua.amp(float). + |
+
+ None
+ |
+
+ duration
+ |
+
+ int
+ |
+
+
+
+ Duration of the pulse in units of the clock cycle (4ns). +If not provided, the default pulse duration will be used. It is possible +to dynamically change the duration of both constant and arbitrary +pulses. Arbitrary pulses can only be stretched, not compressed. + |
+
+ None
+ |
+
+ chirp
+ |
+
+ Union[(list[int], str), (int, str)]
+ |
+
+
+
+ Allows to perform +piecewise linear sweep of the element's intermediate +frequency in time. Input should be a tuple, with the 1st +element being a list of rates and the second should be a +string with the units. The units can be either: 'Hz/nsec', +'mHz/nsec', 'uHz/nsec', 'pHz/nsec' or 'GHz/sec', 'MHz/sec', +'KHz/sec', 'Hz/sec', 'mHz/sec'. + |
+
+ None
+ |
+
+ truncate
+ |
+
+ Union[int, QUA variable of type int]
+ |
+
+
+
+ Allows playing +only part of the pulse, truncating the end. If provided, +will play only up to the given time in units of the clock +cycle (4ns). + |
+
+ None
+ |
+
+ condition
+ |
+
+ A logical expression to evaluate.
+ |
+
+
+
+ Will play analog +pulse only if the condition's value is true. Any digital +pulses associated with the operation will always play. + |
+
+ None
+ |
+
+ timestamp_stream
+ |
+
+ Union[str, _ResultSource]
+ |
+
+
+
+ (Supported from
+QOP 2.2) Adding a |
+
+ None
+ |
+
+ validate
+ |
+
+ bool
+ |
+
+
+
+ If True (default), validate that the pulse is registered +in Channel.operations + |
+
+ True
+ |
+
The element
argument from qm.qua.play()
is not needed, as it is
+automatically set to self.name
.
quam/components/channels.py
322 +323 +324 +325 +326 +327 +328 +329 +330 +331 +332 +333 +334 +335 +336 +337 +338 +339 +340 +341 +342 +343 +344 +345 +346 +347 +348 +349 +350 +351 +352 +353 +354 +355 +356 +357 +358 +359 +360 +361 +362 +363 +364 +365 +366 +367 +368 +369 +370 +371 +372 +373 +374 +375 +376 +377 +378 +379 +380 +381 +382 +383 +384 +385 +386 +387 +388 +389 +390 +391 +392 +393 +394 +395 +396 +397 +398 +399 |
|
update_frequency(new_frequency, units='Hz', keep_phase=False)
+
+Dynamically update the frequency of the associated oscillator.
+This changes the frequency from the value defined in the channel.
+The behavior of the phase (continuous vs. coherent) is controlled by the
+keep_phase
parameter and is discussed in the documentation.
Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
+ new_frequency
+ |
+
+ int
+ |
+
+
+
+ The new frequency value to set in units set
+by |
+ + required + | +
+ units
+ |
+
+ str
+ |
+
+
+
+ units of new frequency. Useful when sub-Hz +precision is required. Allowed units are "Hz", "mHz", "uHz", +"nHz", "pHz" + |
+
+ 'Hz'
+ |
+
+ keep_phase
+ |
+
+ bool
+ |
+
+
+
+ Determine whether phase will be continuous
+through the change (if |
+
+ False
+ |
+
with program() as prog:
+ update_frequency("q1", 4e6) # will set the frequency to 4 MHz
+
+ ### Example for sub-Hz resolution
+ # will set the frequency to 100 Hz (due to casting to int)
+ update_frequency("q1", 100.7)
+
+ # will set the frequency to 100.7 Hz
+ update_frequency("q1", 100700, units='mHz')
+
quam/components/channels.py
442 +443 +444 +445 +446 +447 +448 +449 +450 +451 +452 +453 +454 +455 +456 +457 +458 +459 +460 +461 +462 +463 +464 +465 +466 +467 +468 +469 +470 +471 +472 +473 +474 +475 +476 +477 +478 |
|
wait(duration, *other_elements)
+
+Wait for the given duration on all provided elements without outputting anything.
+Duration is in units of the clock cycle (4ns)
+ + +Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
+ duration
+ |
+
+ Union[int,QUA variable of type int]
+ |
+
+
+
+ time to wait in +units of the clock cycle (4ns). Range: [4, $2^{31}-1$] +in steps of 1. + |
+ + required + | +
+ *other_elements
+ |
+
+ Union[str,sequence of str]
+ |
+
+
+
+ elements to wait on, +in addition to this channel + |
+
+ ()
+ |
+
In case the value of this is outside the range above, unexpected results may occur.
+The current channel element is always included in the wait operation.
+The purpose of the wait
operation is to add latency. In most cases, the
+latency added will be exactly the same as that specified by the QUA variable or
+the literal used. However, in some cases an additional computational latency may
+be added. If the actual wait time has significance, such as in characterization
+experiments, the actual wait time should always be verified with a simulator.
quam/components/channels.py
401 +402 +403 +404 +405 +406 +407 +408 +409 +410 +411 +412 +413 +414 +415 +416 +417 +418 +419 +420 +421 +422 +423 +424 +425 +426 +427 +428 +429 +430 |
|
DigitalOutputChannel
+
+
+
+ Bases: QuamComponent
QuAM component for a digital output channel (signal going out of the OPX)
+Should be added to Channel.digital_outputs
so that it's also added to the
+respective element in the QUA config.
Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
+ opx_output
+ |
+
+ Tuple[str, int]
+ |
+
+
+
+ Channel output port from the OPX perspective, +E.g. ("con1", 1) + |
+ + required + | +
+ delay
+ |
+
+ int
+ |
+
+
+
+ Delay in nanoseconds. An intrinsic negative delay of +136 ns exists by default. + |
+ + required + | +
+ buffer
+ |
+
+ int
+ |
+
+
+
+ Digital pulses played to this element will be convolved +with a digital pulse of value 1 with this length [ns]. + |
+ + required + | +
+ shareable
+ |
+
+ bool
+ |
+
+
+
+ If True, the digital output can be shared with other +QM instances. Default is False + |
+ + required + | +
+ inverted
+ |
+
+ bool
+ |
+
+
+
+ If True, the digital output is inverted. +Default is False. + |
+ + required + | +
.
+ + + + + + +quam/components/channels.py
74 + 75 + 76 + 77 + 78 + 79 + 80 + 81 + 82 + 83 + 84 + 85 + 86 + 87 + 88 + 89 + 90 + 91 + 92 + 93 + 94 + 95 + 96 + 97 + 98 + 99 +100 +101 +102 +103 +104 +105 +106 +107 +108 +109 +110 +111 +112 +113 +114 +115 +116 +117 +118 +119 +120 +121 +122 +123 +124 +125 +126 +127 +128 +129 +130 +131 +132 +133 +134 +135 +136 +137 +138 +139 +140 +141 +142 +143 +144 +145 +146 +147 +148 +149 +150 +151 +152 +153 +154 +155 |
|
apply_to_config(config)
+
+Adds this DigitalOutputChannel to the QUA configuration.
+config.controllers.
See QuamComponent.apply_to_config
+for details.
quam/components/channels.py
123 +124 +125 +126 +127 +128 +129 +130 +131 +132 +133 +134 +135 +136 +137 +138 +139 +140 +141 +142 +143 +144 +145 +146 +147 +148 +149 +150 +151 +152 +153 +154 +155 |
|
generate_element_config()
+
+Generates the config entry for a digital channel in the QUA config.
+This config entry goes into:
+config.elements.
Returns:
+Type | +Description | +
---|---|
+ Dict[str, int]
+ |
+
+
+
+ Dict[str, int]: The digital channel config entry. +Contains "port", and optionally "delay", "buffer" if specified + |
+
quam/components/channels.py
101 +102 +103 +104 +105 +106 +107 +108 +109 +110 +111 +112 +113 +114 +115 +116 +117 +118 +119 +120 +121 |
|
IQChannel
+
+
+
+ Bases: _OutComplexChannel
QuAM component for an IQ output channel.
+ + +Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
+ operations
+ |
+
+ Dict[str, Pulse]
+ |
+
+
+
+ A dictionary of pulses to be played on this +channel. The key is the pulse label (e.g. "X90") and value is a Pulse. + |
+ + required + | +
+ id
+ |
+
+ (str, int)
+ |
+
+
+
+ The id of the channel, used to generate the name.
+Can be a string, or an integer in which case it will add
+ |
+ + required + | +
+ opx_output_I
+ |
+
+ Tuple[str, int]
+ |
+
+
+
+ Channel I output port from the OPX perspective, +a tuple of (controller_name, port). + |
+ + required + | +
+ opx_output_Q
+ |
+
+ Tuple[str, int]
+ |
+
+
+
+ Channel Q output port from the OPX perspective, +a tuple of (controller_name, port). + |
+ + required + | +
+ opx_output_offset_I
+ |
+
+ float
+ |
+
+
+
+ The offset of the I channel. Default is 0. + |
+ + required + | +
+ opx_output_offset_Q
+ |
+
+ float
+ |
+
+
+
+ The offset of the Q channel. Default is 0. + |
+ + required + | +
+ intermediate_frequency
+ |
+
+ float
+ |
+
+
+
+ Intermediate frequency of the mixer. +Default is 0.0 + |
+ + required + | +
+ LO_frequency
+ |
+
+ float
+ |
+
+
+
+ Local oscillator frequency. Default is the LO frequency +of the frequency converter up component. + |
+ + required + | +
+ RF_frequency
+ |
+
+ float
+ |
+
+
+
+ RF frequency of the mixer. By default, the RF frequency +is inferred by adding the LO frequency and the intermediate frequency. + |
+ + required + | +
+ frequency_converter_up
+ |
+
+ FrequencyConverter
+ |
+
+
+
+ Frequency converter QuAM component +for the IQ output. + |
+ + required + | +
quam/components/channels.py
1075 +1076 +1077 +1078 +1079 +1080 +1081 +1082 +1083 +1084 +1085 +1086 +1087 +1088 +1089 +1090 +1091 +1092 +1093 +1094 +1095 +1096 +1097 +1098 +1099 +1100 +1101 +1102 +1103 +1104 +1105 +1106 +1107 +1108 +1109 +1110 +1111 +1112 +1113 +1114 +1115 +1116 +1117 +1118 +1119 +1120 +1121 +1122 +1123 +1124 +1125 +1126 +1127 +1128 +1129 +1130 +1131 +1132 +1133 +1134 +1135 +1136 +1137 +1138 +1139 +1140 +1141 +1142 +1143 +1144 +1145 +1146 +1147 +1148 +1149 +1150 +1151 +1152 +1153 +1154 +1155 +1156 +1157 +1158 +1159 +1160 +1161 +1162 +1163 +1164 +1165 +1166 +1167 +1168 +1169 +1170 +1171 +1172 +1173 +1174 +1175 +1176 +1177 +1178 +1179 +1180 +1181 +1182 +1183 +1184 +1185 +1186 +1187 +1188 +1189 +1190 +1191 +1192 +1193 +1194 +1195 +1196 +1197 +1198 +1199 +1200 +1201 +1202 +1203 +1204 +1205 +1206 +1207 +1208 +1209 +1210 |
|
apply_to_config(config)
+
+Adds this IQChannel to the QUA configuration.
+See QuamComponent.apply_to_config
+for details.
quam/components/channels.py
1149 +1150 +1151 +1152 +1153 +1154 +1155 +1156 +1157 +1158 +1159 +1160 +1161 +1162 +1163 +1164 +1165 +1166 +1167 +1168 +1169 +1170 +1171 +1172 +1173 +1174 +1175 +1176 +1177 +1178 +1179 +1180 +1181 +1182 +1183 +1184 +1185 +1186 +1187 +1188 +1189 +1190 +1191 +1192 +1193 +1194 +1195 +1196 +1197 +1198 +1199 +1200 +1201 +1202 +1203 +1204 +1205 +1206 +1207 +1208 +1209 +1210 |
|
set_dc_offset(offset, element_input)
+
+Set the DC offset of an element's input to the given value. +This value will remain the DC offset until changed or until the Quantum Machine +is closed.
+ + +Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
+ offset
+ |
+
+ QuaNumberType
+ |
+
+
+
+ The DC offset to set the input to. +This is limited by the OPX output voltage range. +The number can be a QUA variable + |
+ + required + | +
+ element_input
+ |
+
+ Literal['I', 'Q']
+ |
+
+
+
+ The element input to set the offset for. + |
+ + required + | +
Raises:
+Type | +Description | +
---|---|
+ ValueError
+ |
+
+
+
+ If element_input is not "I" or "Q" + |
+
quam/components/channels.py
1129 +1130 +1131 +1132 +1133 +1134 +1135 +1136 +1137 +1138 +1139 +1140 +1141 +1142 +1143 +1144 +1145 +1146 +1147 |
|
InIQChannel
+
+
+
+ Bases: _InComplexChannel
QuAM component for an IQ input channel
+ + +Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
+ operations
+ |
+
+ Dict[str, Pulse]
+ |
+
+
+
+ A dictionary of pulses to be played on this +channel. The key is the pulse label (e.g. "readout") and value is a +ReadoutPulse. + |
+ + required + | +
+ id
+ |
+
+ (str, int)
+ |
+
+
+
+ The id of the channel, used to generate the name.
+Can be a string, or an integer in which case it will add
+ |
+ + required + | +
+ opx_input_I
+ |
+
+ Tuple[str, int]
+ |
+
+
+
+ Channel I input port from the OPX perspective, +a tuple of (controller_name, port). + |
+ + required + | +
+ opx_input_Q
+ |
+
+ Tuple[str, int]
+ |
+
+
+
+ Channel Q input port from the OPX perspective, +a tuple of (controller_name, port). + |
+ + required + | +
+ opx_input_offset_I
+ |
+
+ float
+ |
+
+
+
+ The offset of the I channel. Default is 0. + |
+ + required + | +
+ opx_input_offset_Q
+ |
+
+ float
+ |
+
+
+
+ The offset of the Q channel. Default is 0. + |
+ + required + | +
+ frequency_converter_down
+ |
+
+ Optional[FrequencyConverter]
+ |
+
+
+
+ Frequency converter +QuAM component for the IQ input port. Only needed for the old Octave. + |
+ + required + | +
+ time_of_flight
+ |
+
+ int
+ |
+
+
+
+ Round-trip signal duration in nanoseconds. + |
+ + required + | +
+ smearing
+ |
+
+ int
+ |
+
+
+
+ Additional window of ADC integration in nanoseconds. +Used to account for signal smearing. + |
+ + required + | +
+ input_gain
+ |
+
+ float
+ |
+
+
+
+ The gain of the input channel. Default is None. + |
+ + required + | +
quam/components/channels.py
1462 +1463 +1464 +1465 +1466 +1467 +1468 +1469 +1470 +1471 +1472 +1473 +1474 +1475 +1476 +1477 +1478 +1479 +1480 +1481 +1482 +1483 +1484 +1485 +1486 +1487 +1488 +1489 +1490 +1491 +1492 +1493 +1494 +1495 +1496 +1497 +1498 +1499 +1500 +1501 +1502 +1503 +1504 +1505 +1506 +1507 +1508 +1509 +1510 +1511 +1512 +1513 +1514 +1515 +1516 +1517 +1518 +1519 +1520 +1521 +1522 +1523 +1524 +1525 +1526 +1527 +1528 +1529 +1530 +1531 +1532 +1533 +1534 +1535 +1536 +1537 +1538 +1539 +1540 +1541 +1542 +1543 +1544 +1545 +1546 +1547 +1548 +1549 +1550 +1551 +1552 +1553 +1554 +1555 |
|
apply_to_config(config)
+
+Adds this InOutIQChannel to the QUA configuration.
+See QuamComponent.apply_to_config
+for details.
quam/components/channels.py
1502 +1503 +1504 +1505 +1506 +1507 +1508 +1509 +1510 +1511 +1512 +1513 +1514 +1515 +1516 +1517 +1518 +1519 +1520 +1521 +1522 +1523 +1524 +1525 +1526 +1527 +1528 +1529 +1530 +1531 +1532 +1533 +1534 +1535 +1536 +1537 +1538 +1539 +1540 +1541 +1542 +1543 +1544 +1545 +1546 +1547 +1548 +1549 +1550 +1551 +1552 +1553 +1554 +1555 |
|
InIQOutSingleChannel
+
+
+
+ Bases: SingleChannel
, InIQChannel
QuAM component for an IQ input channel with a single output.
+ + +Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
+ operations
+ |
+
+ Dict[str, Pulse]
+ |
+
+
+
+ A dictionary of pulses to be played on this +channel. The key is the pulse label (e.g. "readout") and value is a +ReadoutPulse. + |
+ + required + | +
+ id
+ |
+
+ (str, int)
+ |
+
+
+
+ The id of the channel, used to generate the name.
+Can be a string, or an integer in which case it will add
+ |
+ + required + | +
+ opx_output
+ |
+
+ Tuple[str, int]
+ |
+
+
+
+ Channel output port from the OPX perspective, +a tuple of (controller_name, port). + |
+ + required + | +
+ opx_output_offset
+ |
+
+ float
+ |
+
+
+
+ DC offset for the output port. + |
+ + required + | +
+ opx_input_I
+ |
+
+ Tuple[str, int]
+ |
+
+
+
+ Channel I input port from the OPX perspective, +a tuple of (controller_name, port). + |
+ + required + | +
+ opx_input_Q
+ |
+
+ Tuple[str, int]
+ |
+
+
+
+ Channel Q input port from the OPX perspective, +a tuple of (controller_name, port). + |
+ + required + | +
+ opx_input_offset_I
+ |
+
+ float
+ |
+
+
+
+ The offset of the I channel. Default is 0. + |
+ + required + | +
+ opx_input_offset_Q
+ |
+
+ float
+ |
+
+
+
+ The offset of the Q channel. Default is 0. + |
+ + required + | +
+ filter_fir_taps
+ |
+
+ List[float]
+ |
+
+
+
+ FIR filter taps for the output port. + |
+ + required + | +
+ filter_iir_taps
+ |
+
+ List[float]
+ |
+
+
+
+ IIR filter taps for the output port. + |
+ + required + | +
+ intermediate_frequency
+ |
+
+ float
+ |
+
+
+
+ Intermediate frequency of OPX output, default +is None. + |
+ + required + | +
+ time_of_flight
+ |
+
+ int
+ |
+
+
+
+ Round-trip signal duration in nanoseconds. + |
+ + required + | +
+ smearing
+ |
+
+ int
+ |
+
+
+
+ Additional window of ADC integration in nanoseconds. +Used to account for signal smearing. + |
+ + required + | +
quam/components/channels.py
1666 +1667 +1668 +1669 +1670 +1671 +1672 +1673 +1674 +1675 +1676 +1677 +1678 +1679 +1680 +1681 +1682 +1683 +1684 +1685 +1686 +1687 +1688 +1689 +1690 +1691 +1692 +1693 +1694 +1695 |
|
InMWChannel
+
+
+
+ Bases: _InComplexChannel
QuAM component for a MW FEM input channel
+ + +Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
+ operations
+ |
+
+ Dict[str, Pulse]
+ |
+
+
+
+ A dictionary of pulses to be played on this +channel. The key is the pulse label (e.g. "X90") and value is a Pulse. + |
+ + required + | +
+ id
+ |
+
+ (str, int)
+ |
+
+
+
+ The id of the channel, used to generate the name.
+Can be a string, or an integer in which case it will add
+ |
+ + required + | +
+ opx_input
+ |
+
+ MWFEMAnalogInputPort
+ |
+
+
+
+ Channel input port from the OPX perspective. + |
+ + required + | +
+ intermediate_frequency
+ |
+
+ float
+ |
+
+
+
+ Intermediate frequency of OPX output, default +is None. + |
+ + required + | +
quam/components/channels.py
1733 +1734 +1735 +1736 +1737 +1738 +1739 +1740 +1741 +1742 +1743 +1744 +1745 +1746 +1747 +1748 +1749 +1750 +1751 +1752 +1753 +1754 +1755 +1756 +1757 +1758 +1759 |
|
InOutIQChannel
+
+
+
+ Bases: IQChannel
, InIQChannel
QuAM component for an IQ channel with both input and output.
+An example of such a channel is a readout resonator, where you may want to +apply a readout tone and then measure the response.
+ + +Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
+ operations
+ |
+
+ Dict[str, Pulse]
+ |
+
+
+
+ A dictionary of pulses to be played on this +channel. The key is the pulse label (e.g. "readout") and value is a +ReadoutPulse. + |
+ + required + | +
+ id
+ |
+
+ (str, int)
+ |
+
+
+
+ The id of the channel, used to generate the name.
+Can be a string, or an integer in which case it will add
+ |
+ + required + | +
+ opx_output_I
+ |
+
+ Tuple[str, int]
+ |
+
+
+
+ Channel I output port from the OPX perspective, +a tuple of (controller_name, port). + |
+ + required + | +
+ opx_output_Q
+ |
+
+ Tuple[str, int]
+ |
+
+
+
+ Channel Q output port from the OPX perspective, +a tuple of (controller_name, port). + |
+ + required + | +
+ opx_output_offset_I
+ |
+
+ float
+ |
+
+
+
+ The offset of the I channel. Default is 0. + |
+ + required + | +
+ opx_output_offset_Q
+ |
+
+ float
+ |
+
+
+
+ The offset of the Q channel. Default is 0. + |
+ + required + | +
+ opx_input_I
+ |
+
+ Tuple[str, int]
+ |
+
+
+
+ Channel I input port from the OPX perspective, +a tuple of (controller_name, port). + |
+ + required + | +
+ opx_input_Q
+ |
+
+ Tuple[str, int]
+ |
+
+
+
+ Channel Q input port from the OPX perspective, +a tuple of (controller_name, port). + |
+ + required + | +
+ opx_input_offset_I
+ |
+
+ float
+ |
+
+
+
+ The offset of the I channel. Default is 0. + |
+ + required + | +
+ opx_input_offset_Q
+ |
+
+ float
+ |
+
+
+
+ The offset of the Q channel. Default is 0. + |
+ + required + | +
+ intermediate_frequency
+ |
+
+ float
+ |
+
+
+
+ Intermediate frequency of the mixer. +Default is 0.0 + |
+ + required + | +
+ LO_frequency
+ |
+
+ float
+ |
+
+
+
+ Local oscillator frequency. Default is the LO frequency +of the frequency converter up component. + |
+ + required + | +
+ RF_frequency
+ |
+
+ float
+ |
+
+
+
+ RF frequency of the mixer. By default, the RF frequency +is inferred by adding the LO frequency and the intermediate frequency. + |
+ + required + | +
+ frequency_converter_up
+ |
+
+ FrequencyConverter
+ |
+
+
+
+ Frequency converter QuAM component +for the IQ output. + |
+ + required + | +
+ frequency_converter_down
+ |
+
+ Optional[FrequencyConverter]
+ |
+
+
+
+ Frequency converter +QuAM component for the IQ input port. Only needed for the old Octave. + |
+ + required + | +
+ time_of_flight
+ |
+
+ int
+ |
+
+
+
+ Round-trip signal duration in nanoseconds. + |
+ + required + | +
+ smearing
+ |
+
+ int
+ |
+
+
+
+ Additional window of ADC integration in nanoseconds. +Used to account for signal smearing. + |
+ + required + | +
quam/components/channels.py
1586 +1587 +1588 +1589 +1590 +1591 +1592 +1593 +1594 +1595 +1596 +1597 +1598 +1599 +1600 +1601 +1602 +1603 +1604 +1605 +1606 +1607 +1608 +1609 +1610 +1611 +1612 +1613 +1614 +1615 +1616 +1617 +1618 +1619 +1620 +1621 +1622 +1623 +1624 +1625 +1626 +1627 |
|
InOutMWChannel
+
+
+
+ Bases: MWChannel
, InMWChannel
QuAM component for a MW FEM input channel
+ + +Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
+ operations
+ |
+
+ Dict[str, Pulse]
+ |
+
+
+
+ A dictionary of pulses to be played on this +channel. The key is the pulse label (e.g. "X90") and value is a Pulse. + |
+ + required + | +
+ id
+ |
+
+ (str, int)
+ |
+
+
+
+ The id of the channel, used to generate the name.
+Can be a string, or an integer in which case it will add
+ |
+ + required + | +
+ opx_output
+ |
+
+ MWFEMAnalogOutputPort
+ |
+
+
+
+ Channel output port from the OPX perspective. + |
+ + required + | +
+ opx_input
+ |
+
+ MWFEMAnalogInputPort
+ |
+
+
+
+ Channel input port from the OPX perspective. + |
+ + required + | +
+ intermediate_frequency
+ |
+
+ float
+ |
+
+
+
+ Intermediate frequency of OPX output, default +is None. + |
+ + required + | +
+ upconverter
+ |
+
+ int
+ |
+
+
+
+ The upconverter to use. Default is 1. + |
+ + required + | +
+ time_of_flight
+ |
+
+ int
+ |
+
+
+
+ Round-trip signal duration in nanoseconds. + |
+ + required + | +
+ smearing
+ |
+
+ int
+ |
+
+
+
+ Additional window of ADC integration in nanoseconds. +Used to account for signal smearing. + |
+ + required + | +
quam/components/channels.py
1762 +1763 +1764 +1765 +1766 +1767 +1768 +1769 +1770 +1771 +1772 +1773 +1774 +1775 +1776 +1777 +1778 +1779 +1780 +1781 +1782 |
|
InOutSingleChannel
+
+
+
+ Bases: SingleChannel
, InSingleChannel
QuAM component for a single (not IQ) input + output channel.
+ + +Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
+ operations
+ |
+
+ Dict[str, Pulse]
+ |
+
+
+
+ A dictionary of pulses to be played on this +channel. The key is the pulse label (e.g. "X90") and value is a Pulse. + |
+ + required + | +
+ id
+ |
+
+ (str, int)
+ |
+
+
+
+ The id of the channel, used to generate the name.
+Can be a string, or an integer in which case it will add
+ |
+ + required + | +
+ opx_output
+ |
+
+ Tuple[str, int]
+ |
+
+
+
+ Channel output port from the OPX perspective, +a tuple of (controller_name, port). + |
+ + required + | +
+ opx_output_offset
+ |
+
+ float
+ |
+
+
+
+ DC offset for the output port. + |
+ + required + | +
+ opx_input
+ |
+
+ Tuple[str, int]
+ |
+
+
+
+ Channel input port from OPX perspective, +a tuple of (controller_name, port). + |
+ + required + | +
+ opx_input_offset
+ |
+
+ float
+ |
+
+
+
+ DC offset for the input port. + |
+ + required + | +
+ filter_fir_taps
+ |
+
+ List[float]
+ |
+
+
+
+ FIR filter taps for the output port. + |
+ + required + | +
+ filter_iir_taps
+ |
+
+ List[float]
+ |
+
+
+
+ IIR filter taps for the output port. + |
+ + required + | +
+ intermediate_frequency
+ |
+
+ float
+ |
+
+
+
+ Intermediate frequency of OPX output, default +is None. + |
+ + required + | +
+ time_of_flight
+ |
+
+ int
+ |
+
+
+
+ Round-trip signal duration in nanoseconds. + |
+ + required + | +
+ smearing
+ |
+
+ int
+ |
+
+
+
+ Additional window of ADC integration in nanoseconds. +Used to account for signal smearing. + |
+ + required + | +
quam/components/channels.py
1558 +1559 +1560 +1561 +1562 +1563 +1564 +1565 +1566 +1567 +1568 +1569 +1570 +1571 +1572 +1573 +1574 +1575 +1576 +1577 +1578 +1579 +1580 +1581 +1582 +1583 |
|
InSingleChannel
+
+
+
+ Bases: Channel
QuAM component for a single (not IQ) input channel.
+ + +Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
+ operations
+ |
+
+ Dict[str, Pulse]
+ |
+
+
+
+ A dictionary of pulses to be played on this +channel. The key is the pulse label (e.g. "X90") and value is a Pulse. + |
+ + required + | +
+ id
+ |
+
+ (str, int)
+ |
+
+
+
+ The id of the channel, used to generate the name.
+Can be a string, or an integer in which case it will add
+ |
+ + required + | +
+ opx_input
+ |
+
+ Tuple[str, int]
+ |
+
+
+
+ Channel input port from OPX perspective, +a tuple of (controller_name, port). + |
+ + required + | +
+ opx_input_offset
+ |
+
+ float
+ |
+
+
+
+ DC offset for the input port. + |
+ + required + | +
+ intermediate_frequency
+ |
+
+ float
+ |
+
+
+
+ Intermediate frequency of OPX input, +default is None. + |
+ + required + | +
+ time_of_flight
+ |
+
+ int
+ |
+
+
+
+ Round-trip signal duration in nanoseconds. + |
+ + required + | +
+ smearing
+ |
+
+ int
+ |
+
+
+
+ Additional window of ADC integration in nanoseconds. +Used to account for signal smearing. + |
+ + required + | +
quam/components/channels.py
664 +665 +666 +667 +668 +669 +670 +671 +672 +673 +674 +675 +676 +677 +678 +679 +680 +681 +682 +683 +684 +685 +686 +687 +688 +689 +690 +691 +692 +693 +694 +695 +696 +697 +698 +699 +700 +701 +702 +703 +704 +705 +706 +707 +708 +709 +710 +711 +712 +713 +714 +715 +716 +717 +718 +719 +720 +721 +722 +723 +724 +725 +726 +727 +728 +729 +730 +731 +732 +733 +734 +735 +736 +737 +738 +739 +740 +741 +742 +743 +744 +745 +746 +747 +748 +749 +750 +751 +752 +753 +754 +755 +756 +757 +758 +759 +760 +761 +762 +763 +764 +765 +766 +767 +768 +769 +770 +771 +772 +773 +774 +775 +776 +777 +778 +779 +780 +781 +782 +783 +784 +785 +786 +787 +788 +789 +790 +791 +792 +793 +794 +795 +796 +797 +798 +799 +800 +801 +802 +803 +804 +805 +806 +807 +808 +809 +810 +811 +812 +813 +814 +815 +816 +817 +818 +819 +820 +821 +822 +823 +824 +825 +826 +827 +828 +829 +830 +831 +832 +833 +834 +835 +836 +837 +838 +839 +840 +841 +842 +843 +844 +845 +846 +847 +848 +849 +850 +851 +852 +853 +854 +855 +856 +857 +858 +859 +860 +861 +862 +863 +864 +865 +866 +867 +868 +869 +870 +871 +872 +873 +874 +875 +876 +877 +878 +879 +880 +881 +882 +883 +884 +885 +886 +887 +888 +889 +890 +891 +892 +893 +894 +895 +896 +897 +898 +899 +900 +901 +902 +903 +904 +905 +906 +907 +908 +909 +910 +911 +912 +913 +914 +915 +916 +917 +918 +919 +920 +921 +922 +923 +924 +925 +926 +927 +928 +929 +930 +931 +932 +933 +934 +935 +936 +937 +938 +939 +940 +941 +942 +943 +944 +945 +946 +947 +948 +949 +950 +951 +952 +953 +954 +955 +956 +957 +958 +959 +960 +961 +962 +963 +964 +965 +966 +967 +968 +969 +970 +971 +972 +973 +974 +975 +976 +977 +978 +979 +980 +981 +982 +983 +984 +985 +986 +987 +988 +989 +990 +991 +992 +993 +994 +995 +996 +997 +998 |
|
apply_to_config(config)
+
+Adds this InSingleChannel to the QUA configuration.
+See QuamComponent.apply_to_config
+for details.
quam/components/channels.py
692 +693 +694 +695 +696 +697 +698 +699 +700 +701 +702 +703 +704 +705 +706 +707 +708 +709 +710 +711 +712 +713 +714 +715 +716 +717 +718 +719 |
|
measure(pulse_name, amplitude_scale=None, qua_vars=None, stream=None)
+
+Perform a full demodulation measurement on this channel.
+ + +Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
+ pulse_name
+ |
+
+ str
+ |
+
+
+
+ The name of the pulse to play. Should be registered in
+ |
+ + required + | +
+ amplitude_scale
+ |
+
+ (float, _PulseAmp)
+ |
+
+
+
+ Amplitude scale of the pulse. +Can be either a float, or qua.amp(float). + |
+
+ None
+ |
+
+ qua_vars
+ |
+
+ Tuple[QuaVariableType, ...]
+ |
+
+
+
+ Two QUA +variables to store the I, Q measurement results. +If not provided, new variables will be declared and returned. + |
+
+ None
+ |
+
+ stream
+ |
+
+ Optional[StreamType]
+ |
+
+
+
+ The stream to save the measurement result to. +If not provided, the raw ADC signal will not be streamed. + |
+
+ None
+ |
+
Returns:
+Type | +Description | +
---|---|
+ Tuple[QuaVariableType, QuaVariableType]
+ |
+
+
+
+ I, Q: The QUA variables used to store the measurement results. +If provided as input, the same variables will be returned. +If not provided, new variables will be declared and returned. + |
+
Raises:
+Type | +Description | +
---|---|
+ ValueError
+ |
+
+
+
+ If |
+
quam/components/channels.py
721 +722 +723 +724 +725 +726 +727 +728 +729 +730 +731 +732 +733 +734 +735 +736 +737 +738 +739 +740 +741 +742 +743 +744 +745 +746 +747 +748 +749 +750 +751 +752 +753 +754 +755 +756 +757 +758 +759 +760 +761 +762 +763 +764 +765 +766 +767 +768 +769 +770 +771 +772 +773 +774 +775 |
|
measure_accumulated(pulse_name, amplitude_scale=None, num_segments=None, segment_length=None, qua_vars=None, stream=None)
+
+Perform an accumulated demodulation measurement on this channel.
+ + +Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
+ pulse_name
+ |
+
+ str
+ |
+
+
+
+ The name of the pulse to play. Should be registered in
+ |
+ + required + | +
+ amplitude_scale
+ |
+
+ (float, _PulseAmp)
+ |
+
+
+
+ Amplitude scale of the pulse. +Can be either a float, or qua.amp(float). + |
+
+ None
+ |
+
+ num_segments
+ |
+
+ int
+ |
+
+
+
+ The number of segments to accumulate.
+Should either specify this or |
+
+ None
+ |
+
+ segment_length
+ |
+
+ int
+ |
+
+
+
+ The length of the segment to accumulate.
+Should either specify this or |
+
+ None
+ |
+
+ qua_vars
+ |
+
+ Tuple[QuaVariableType, ...]
+ |
+
+
+
+ Two QUA +variables to store the I, Q measurement results. +If not provided, new variables will be declared and returned. + |
+
+ None
+ |
+
+ stream
+ |
+
+ Optional[StreamType]
+ |
+
+
+
+ The stream to save the measurement result to. +If not provided, the raw ADC signal will not be streamed. + |
+
+ None
+ |
+
Returns:
+Type | +Description | +
---|---|
+ Tuple[QuaVariableType, QuaVariableType]
+ |
+
+
+
+ I, Q: The QUA variables used to store the measurement results. +If provided as input, the same variables will be returned. +If not provided, new variables will be declared and returned. + |
+
Raises:
+Type | +Description | +
---|---|
+ ValueError
+ |
+
+
+
+ If both |
+
+ ValueError
+ |
+
+
+
+ If |
+
quam/components/channels.py
777 +778 +779 +780 +781 +782 +783 +784 +785 +786 +787 +788 +789 +790 +791 +792 +793 +794 +795 +796 +797 +798 +799 +800 +801 +802 +803 +804 +805 +806 +807 +808 +809 +810 +811 +812 +813 +814 +815 +816 +817 +818 +819 +820 +821 +822 +823 +824 +825 +826 +827 +828 +829 +830 +831 +832 +833 +834 +835 +836 +837 +838 +839 +840 +841 +842 +843 +844 +845 +846 +847 +848 +849 +850 +851 +852 +853 +854 +855 +856 +857 |
|
measure_sliced(pulse_name, amplitude_scale=None, num_segments=None, segment_length=None, qua_vars=None, stream=None)
+
+Perform an accumulated demodulation measurement on this channel.
+ + +Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
+ pulse_name
+ |
+
+ str
+ |
+
+
+
+ The name of the pulse to play. Should be registered in
+ |
+ + required + | +
+ amplitude_scale
+ |
+
+ (float, _PulseAmp)
+ |
+
+
+
+ Amplitude scale of the pulse. +Can be either a float, or qua.amp(float). + |
+
+ None
+ |
+
+ num_segments
+ |
+
+ int
+ |
+
+
+
+ The number of segments to accumulate.
+Should either specify this or |
+
+ None
+ |
+
+ segment_length
+ |
+
+ int
+ |
+
+
+
+ The length of the segment to accumulate.
+Should either specify this or |
+
+ None
+ |
+
+ qua_vars
+ |
+
+ Tuple[QuaVariableType, ...]
+ |
+
+
+
+ Two QUA +variables to store the I, Q measurement results. +If not provided, new variables will be declared and returned. + |
+
+ None
+ |
+
+ stream
+ |
+
+ Optional[StreamType]
+ |
+
+
+
+ The stream to save the measurement result to. +If not provided, the raw ADC signal will not be streamed. + |
+
+ None
+ |
+
Returns:
+Type | +Description | +
---|---|
+ Tuple[QuaVariableType, QuaVariableType]
+ |
+
+
+
+ I, Q: The QUA variables used to store the measurement results. +If provided as input, the same variables will be returned. +If not provided, new variables will be declared and returned. + |
+
Raises:
+Type | +Description | +
---|---|
+ ValueError
+ |
+
+
+
+ If both |
+
+ ValueError
+ |
+
+
+
+ If |
+
quam/components/channels.py
859 +860 +861 +862 +863 +864 +865 +866 +867 +868 +869 +870 +871 +872 +873 +874 +875 +876 +877 +878 +879 +880 +881 +882 +883 +884 +885 +886 +887 +888 +889 +890 +891 +892 +893 +894 +895 +896 +897 +898 +899 +900 +901 +902 +903 +904 +905 +906 +907 +908 +909 +910 +911 +912 +913 +914 +915 +916 +917 +918 +919 +920 +921 +922 +923 +924 +925 +926 +927 +928 +929 +930 +931 +932 +933 +934 +935 +936 +937 +938 +939 |
|
measure_time_tagging(pulse_name, size, max_time, qua_vars=None, stream=None, mode='analog')
+
+Perform a time tagging measurement on this channel.
+For details see https://docs.quantum-machines.co/latest/docs/Guides/features/#time-tagging
+ + +Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
+ pulse_name
+ |
+
+ str
+ |
+
+
+
+ The name of the pulse to play. Should be registered in
+ |
+ + required + | +
+ size
+ |
+
+ int
+ |
+
+
+
+ The size of the QUA array to store the times of the detected
+pulses. Ignored if |
+ + required + | +
+ max_time
+ |
+
+ QuaNumberType
+ |
+
+
+
+ The maximum time to search for pulses. + |
+ + required + | +
+ qua_vars
+ |
+
+ Tuple[QuaVariableType, QuaNumberType]
+ |
+
+
+
+ QUA variables +to store the times and counts of the detected pulses. If not provided, +new variables will be declared and returned. + |
+
+ None
+ |
+
+ stream
+ |
+
+ Optional[StreamType]
+ |
+
+
+
+ The stream to save the measurement result to. +If not provided, the raw ADC signal will not be streamed. + |
+
+ None
+ |
+
+ mode
+ |
+
+ Literal['analog', 'high_res', 'digital']
+ |
+
+
+
+ The time tagging mode. + |
+
+ 'analog'
+ |
+
Returns:
+Name | Type | +Description | +
---|---|---|
times |
+ QuaVariableType
+ |
+
+
+
+ The QUA variable to store the times of the detected +pulses. + |
+
counts |
+ QuaNumberType
+ |
+
+
+
+ The number of detected pulses. + |
+
times, counts = channel.measure_time_tagging("readout", size=1000, max_time=1000)
+
quam/components/channels.py
941 +942 +943 +944 +945 +946 +947 +948 +949 +950 +951 +952 +953 +954 +955 +956 +957 +958 +959 +960 +961 +962 +963 +964 +965 +966 +967 +968 +969 +970 +971 +972 +973 +974 +975 +976 +977 +978 +979 +980 +981 +982 +983 +984 +985 +986 +987 +988 +989 +990 +991 +992 +993 +994 +995 +996 +997 +998 |
|
InSingleOutIQChannel
+
+
+
+ Bases: IQChannel
, InSingleChannel
QuAM component for an IQ output channel with a single input.
+ + +Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
+ operations
+ |
+
+ Dict[str, Pulse]
+ |
+
+
+
+ A dictionary of pulses to be played on this +channel. The key is the pulse label (e.g. "readout") and value is a +ReadoutPulse. + |
+ + required + | +
+ id
+ |
+
+ (str, int)
+ |
+
+
+
+ The id of the channel, used to generate the name.
+Can be a string, or an integer in which case it will add
+ |
+ + required + | +
+ opx_output_I
+ |
+
+ Tuple[str, int]
+ |
+
+
+
+ Channel I output port from the OPX perspective, +a tuple of (controller_name, port). + |
+ + required + | +
+ opx_output_Q
+ |
+
+ Tuple[str, int]
+ |
+
+
+
+ Channel Q output port from the OPX perspective, +a tuple of (controller_name, port). + |
+ + required + | +
+ opx_output_offset_I
+ |
+
+ float
+ |
+
+
+
+ The offset of the I channel. Default is 0. + |
+ + required + | +
+ opx_output_offset_Q
+ |
+
+ float
+ |
+
+
+
+ The offset of the Q channel. Default is 0. + |
+ + required + | +
+ opx_input
+ |
+
+ Tuple[str, int]
+ |
+
+
+
+ Channel input port from OPX perspective, +a tuple of (controller_name, port). + |
+ + required + | +
+ opx_input_offset
+ |
+
+ float
+ |
+
+
+
+ DC offset for the input port. + |
+ + required + | +
+ intermediate_frequency
+ |
+
+ float
+ |
+
+
+
+ Intermediate frequency of the mixer. +Default is 0.0 + |
+ + required + | +
+ LO_frequency
+ |
+
+ float
+ |
+
+
+
+ Local oscillator frequency. Default is the LO frequency +of the frequency converter up component. + |
+ + required + | +
+ RF_frequency
+ |
+
+ float
+ |
+
+
+
+ RF frequency of the mixer. By default, the RF frequency +is inferred by adding the LO frequency and the intermediate frequency. + |
+ + required + | +
+ frequency_converter_up
+ |
+
+ FrequencyConverter
+ |
+
+
+
+ Frequency converter QuAM component +for the IQ output. + |
+ + required + | +
+ time_of_flight
+ |
+
+ int
+ |
+
+
+
+ Round-trip signal duration in nanoseconds. + |
+ + required + | +
+ smearing
+ |
+
+ int
+ |
+
+
+
+ Additional window of ADC integration in nanoseconds. +Used to account for signal smearing. + |
+ + required + | +
quam/components/channels.py
1630 +1631 +1632 +1633 +1634 +1635 +1636 +1637 +1638 +1639 +1640 +1641 +1642 +1643 +1644 +1645 +1646 +1647 +1648 +1649 +1650 +1651 +1652 +1653 +1654 +1655 +1656 +1657 +1658 +1659 +1660 +1661 +1662 +1663 |
|
MWChannel
+
+
+
+ Bases: _OutComplexChannel
QuAM component for a MW FEM output channel
+ + +Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
+ operations
+ |
+
+ Dict[str, Pulse]
+ |
+
+
+
+ A dictionary of pulses to be played on this +channel. The key is the pulse label (e.g. "X90") and value is a Pulse. + |
+ + required + | +
+ id
+ |
+
+ (str, int)
+ |
+
+
+
+ The id of the channel, used to generate the name.
+Can be a string, or an integer in which case it will add
+ |
+ + required + | +
+ opx_output
+ |
+
+ MWFEMAnalogOutputPort
+ |
+
+
+
+ Channel output port from the OPX perspective. + |
+ + required + | +
+ intermediate_frequency
+ |
+
+ float
+ |
+
+
+
+ Intermediate frequency of OPX output, default +is None. + |
+ + required + | +
+ upconverter
+ |
+
+ int
+ |
+
+
+
+ The upconverter to use. Default is 1. + |
+ + required + | +
+ time_of_flight
+ |
+
+ int
+ |
+
+
+
+ Round-trip signal duration in nanoseconds. + |
+ + required + | +
+ smearing
+ |
+
+ int
+ |
+
+
+
+ Additional window of ADC integration in nanoseconds. +Used to account for signal smearing. + |
+ + required + | +
quam/components/channels.py
1698 +1699 +1700 +1701 +1702 +1703 +1704 +1705 +1706 +1707 +1708 +1709 +1710 +1711 +1712 +1713 +1714 +1715 +1716 +1717 +1718 +1719 +1720 +1721 +1722 +1723 +1724 +1725 +1726 +1727 +1728 +1729 +1730 |
|
SingleChannel
+
+
+
+ Bases: Channel
QuAM component for a single (not IQ) output channel.
+ + +Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
+ operations
+ |
+
+ Dict[str, Pulse]
+ |
+
+
+
+ A dictionary of pulses to be played on this +channel. The key is the pulse label (e.g. "X90") and value is a Pulse. + |
+ + required + | +
+ id
+ |
+
+ (str, int)
+ |
+
+
+
+ The id of the channel, used to generate the name.
+Can be a string, or an integer in which case it will add
+ |
+ + required + | +
+ opx_output
+ |
+
+ Tuple[str, int]
+ |
+
+
+
+ Channel output port from the OPX perspective, +a tuple of (controller_name, port). + |
+ + required + | +
+ filter_fir_taps
+ |
+
+ List[float]
+ |
+
+
+
+ FIR filter taps for the output port. + |
+ + required + | +
+ filter_iir_taps
+ |
+
+ List[float]
+ |
+
+
+
+ IIR filter taps for the output port. + |
+ + required + | +
+ opx_output_offset
+ |
+
+ float
+ |
+
+
+
+ DC offset for the output port. + |
+ + required + | +
+ intermediate_frequency
+ |
+
+ float
+ |
+
+
+
+ Intermediate frequency of OPX output, default +is None. + |
+ + required + | +
quam/components/channels.py
579 +580 +581 +582 +583 +584 +585 +586 +587 +588 +589 +590 +591 +592 +593 +594 +595 +596 +597 +598 +599 +600 +601 +602 +603 +604 +605 +606 +607 +608 +609 +610 +611 +612 +613 +614 +615 +616 +617 +618 +619 +620 +621 +622 +623 +624 +625 +626 +627 +628 +629 +630 +631 +632 +633 +634 +635 +636 +637 +638 +639 +640 +641 +642 +643 +644 +645 +646 +647 +648 +649 +650 +651 +652 +653 +654 +655 +656 +657 +658 +659 +660 +661 |
|
apply_to_config(config)
+
+Adds this SingleChannel to the QUA configuration.
+See QuamComponent.apply_to_config
+for details.
quam/components/channels.py
616 +617 +618 +619 +620 +621 +622 +623 +624 +625 +626 +627 +628 +629 +630 +631 +632 +633 +634 +635 +636 +637 +638 +639 +640 +641 +642 +643 +644 +645 +646 +647 +648 +649 +650 +651 +652 +653 +654 +655 +656 +657 +658 +659 +660 +661 |
|
set_dc_offset(offset)
+
+Set the DC offset of an element's input to the given value. +This value will remain the DC offset until changed or until the Quantum Machine +is closed.
+ + +Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
+ offset
+ |
+
+ QuaNumberType
+ |
+
+
+
+ The DC offset to set the input to. +This is limited by the OPX output voltage range. +The number can be a QUA variable + |
+ + required + | +
quam/components/channels.py
604 +605 +606 +607 +608 +609 +610 +611 +612 +613 +614 |
|
StickyChannelAddon
+
+
+
+ Bases: QuamComponent
Addon to make channels sticky.
+ + +Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
+ duration
+ |
+
+ int
+ |
+
+
+
+ The ramp to zero duration, in ns. + |
+ + required + | +
+ enabled
+ |
+
+ bool
+ |
+
+
+
+ If False, the sticky parameters are not applied. +Default is True. + |
+ + required + | +
+ analog
+ |
+
+ bool
+ |
+
+
+
+ If False, the sticky parameters are not applied to +analog outputs. Default is True. + |
+ + required + | +
+ digital
+ |
+
+ bool
+ |
+
+
+
+ If False, the sticky parameters are not applied to +digital outputs. Default is True. + |
+ + required + | +
quam/components/channels.py
158 +159 +160 +161 +162 +163 +164 +165 +166 +167 +168 +169 +170 +171 +172 +173 +174 +175 +176 +177 +178 +179 +180 +181 +182 +183 +184 +185 +186 +187 +188 +189 +190 +191 +192 +193 +194 +195 +196 +197 +198 +199 +200 +201 |
|
channel: Optional[Channel]
+
+
+ property
+
+
+If the parent is a channel, returns the parent, otherwise returns None.
+TimeTaggingAddon
+
+
+
+ Bases: QuamComponent
Addon to perform time tagging on a channel.
+ + +Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
+ signal_threshold
+ |
+
+ float
+ |
+
+
+
+ The signal threshold in volts. +If not specified, the default value is 800 / 4096 ≈ 0.195 V. + |
+ + required + | +
+ signal_polarity
+ |
+
+ Literal['above', 'below']
+ |
+
+
+
+ The polarity of the signal +threshold. Default is "below". + |
+ + required + | +
+ derivative_threshold
+ |
+
+ float
+ |
+
+
+
+ The derivative threshold in volts/ns. +If not specified, the default value is 300 / 4096 ≈ 0.073 V/ns. + |
+ + required + | +
+ derivative_polarity
+ |
+
+ Literal['above', 'below']
+ |
+
+
+
+ The polarity of the derivative +threshold. Default is "below". + |
+ + required + | +
For details see Time Tagging
+ + + + + + +quam/components/channels.py
204 +205 +206 +207 +208 +209 +210 +211 +212 +213 +214 +215 +216 +217 +218 +219 +220 +221 +222 +223 +224 +225 +226 +227 +228 +229 +230 +231 +232 +233 +234 +235 +236 +237 +238 +239 +240 +241 +242 +243 +244 +245 +246 +247 +248 +249 +250 +251 +252 +253 +254 +255 +256 +257 |
|
channel: Optional[Channel]
+
+
+ property
+
+
+If the parent is a channel, returns the parent, otherwise returns None.
+BaseFrequencyConverter
+
+
+
+ Bases: QuamComponent
Base class for frequency converters.
+ + + + + + +quam/components/hardware.py
110 +111 +112 +113 +114 |
|
FrequencyConverter
+
+
+
+ Bases: BaseFrequencyConverter
Frequency up/down converter component.
+This component encapsulates the local oscillator and mixer used to upconvert or +downconvert an RF signal.
+The FrequencyConverter component is attached to IQ channels through
+IQChannel.frequency_converter_up
InOutIQChannel.frequency_converter_down
Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
+ local_oscillator
+ |
+
+ LocalOscillator
+ |
+
+
+
+ The local oscillator for the frequency converter. + |
+ + required + | +
+ mixer
+ |
+
+ Mixer
+ |
+
+
+
+ The mixer for the frequency converter. + |
+ + required + | +
+ gain
+ |
+
+ float
+ |
+
+
+
+ The gain of the frequency converter. + |
+ + required + | +
quam/components/hardware.py
117 +118 +119 +120 +121 +122 +123 +124 +125 +126 +127 +128 +129 +130 +131 +132 +133 +134 +135 +136 +137 +138 +139 +140 +141 +142 +143 +144 +145 |
|
LocalOscillator
+
+
+
+ Bases: QuamComponent
QuAM component for a local oscillator.
+ + +Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
+ frequency
+ |
+
+ float
+ |
+
+
+
+ The frequency of the local oscillator. +Used by the mixer to determine the intermediate frequency. + |
+ + required + | +
+ power
+ |
+
+ float
+ |
+
+
+
+ The power of the local oscillator. +Not used for the QUA configuration + |
+ + required + | +
quam/components/hardware.py
15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 |
|
Mixer
+
+
+
+ Bases: QuamComponent
QuAM component for a mixer.
+All properties are optional, so it can be instantiated as Mixer()
.
+For the default values, it is assumed that the mixer parent is an IQChannel
+that has a LocalOscillator
.
Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
+ local_oscillator_frequency
+ |
+
+ float
+ |
+
+
+
+ The frequency of the local
+oscillator. Default is |
+ + required + | +
+ intermediate_frequency
+ |
+
+ float
+ |
+
+
+
+ The intermediate frequency of the
+mixer. Default is |
+ + required + | +
+ correction_gain
+ |
+
+ float
+ |
+
+
+
+ The gain imbalance of the mixer.
+Default is 0, see |
+ + required + | +
+ correction_phase
+ |
+
+ float
+ |
+
+
+
+ The phase imbalance of the mixer in radians. + |
+ + required + | +
quam/components/hardware.py
32 + 33 + 34 + 35 + 36 + 37 + 38 + 39 + 40 + 41 + 42 + 43 + 44 + 45 + 46 + 47 + 48 + 49 + 50 + 51 + 52 + 53 + 54 + 55 + 56 + 57 + 58 + 59 + 60 + 61 + 62 + 63 + 64 + 65 + 66 + 67 + 68 + 69 + 70 + 71 + 72 + 73 + 74 + 75 + 76 + 77 + 78 + 79 + 80 + 81 + 82 + 83 + 84 + 85 + 86 + 87 + 88 + 89 + 90 + 91 + 92 + 93 + 94 + 95 + 96 + 97 + 98 + 99 +100 +101 +102 +103 +104 +105 +106 +107 |
|
IQ_imbalance(g, phi)
+
+
+ staticmethod
+
+
+Creates the correction matrix for the mixer imbalance caused by the gain and +phase imbalances, more information can be seen here: +https://docs.qualang.io/libs/examples/mixer-calibration/#non-ideal-mixer +:param g: relative gain imbalance between the I & Q ports. (unit-less), + set to 0 for no gain imbalance. +:param phi: relative phase imbalance between the I & Q ports (radians), + set to 0 for no phase imbalance.
+ +quam/components/hardware.py
91 + 92 + 93 + 94 + 95 + 96 + 97 + 98 + 99 +100 +101 +102 +103 +104 +105 +106 +107 |
|
apply_to_config(config)
+
+Adds this mixer to the QUA configuration.
+See QuamComponent.apply_to_config
+for details.
quam/components/hardware.py
73 +74 +75 +76 +77 +78 +79 +80 +81 +82 +83 +84 +85 +86 +87 +88 +89 |
|
BaseFrequencyConverter
+
+
+
+ Bases: QuamComponent
Base class for frequency converters.
+ + + + + + +quam/components/hardware.py
110 +111 +112 +113 +114 |
|
FrequencyConverter
+
+
+
+ Bases: BaseFrequencyConverter
Frequency up/down converter component.
+This component encapsulates the local oscillator and mixer used to upconvert or +downconvert an RF signal.
+The FrequencyConverter component is attached to IQ channels through
+IQChannel.frequency_converter_up
InOutIQChannel.frequency_converter_down
Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
+ local_oscillator
+ |
+
+ LocalOscillator
+ |
+
+
+
+ The local oscillator for the frequency converter. + |
+ + required + | +
+ mixer
+ |
+
+ Mixer
+ |
+
+
+
+ The mixer for the frequency converter. + |
+ + required + | +
+ gain
+ |
+
+ float
+ |
+
+
+
+ The gain of the frequency converter. + |
+ + required + | +
quam/components/hardware.py
117 +118 +119 +120 +121 +122 +123 +124 +125 +126 +127 +128 +129 +130 +131 +132 +133 +134 +135 +136 +137 +138 +139 +140 +141 +142 +143 +144 +145 |
|
LocalOscillator
+
+
+
+ Bases: QuamComponent
QuAM component for a local oscillator.
+ + +Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
+ frequency
+ |
+
+ float
+ |
+
+
+
+ The frequency of the local oscillator. +Used by the mixer to determine the intermediate frequency. + |
+ + required + | +
+ power
+ |
+
+ float
+ |
+
+
+
+ The power of the local oscillator. +Not used for the QUA configuration + |
+ + required + | +
quam/components/hardware.py
15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 |
|
Mixer
+
+
+
+ Bases: QuamComponent
QuAM component for a mixer.
+All properties are optional, so it can be instantiated as Mixer()
.
+For the default values, it is assumed that the mixer parent is an IQChannel
+that has a LocalOscillator
.
Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
+ local_oscillator_frequency
+ |
+
+ float
+ |
+
+
+
+ The frequency of the local
+oscillator. Default is |
+ + required + | +
+ intermediate_frequency
+ |
+
+ float
+ |
+
+
+
+ The intermediate frequency of the
+mixer. Default is |
+ + required + | +
+ correction_gain
+ |
+
+ float
+ |
+
+
+
+ The gain imbalance of the mixer.
+Default is 0, see |
+ + required + | +
+ correction_phase
+ |
+
+ float
+ |
+
+
+
+ The phase imbalance of the mixer in radians. + |
+ + required + | +
quam/components/hardware.py
32 + 33 + 34 + 35 + 36 + 37 + 38 + 39 + 40 + 41 + 42 + 43 + 44 + 45 + 46 + 47 + 48 + 49 + 50 + 51 + 52 + 53 + 54 + 55 + 56 + 57 + 58 + 59 + 60 + 61 + 62 + 63 + 64 + 65 + 66 + 67 + 68 + 69 + 70 + 71 + 72 + 73 + 74 + 75 + 76 + 77 + 78 + 79 + 80 + 81 + 82 + 83 + 84 + 85 + 86 + 87 + 88 + 89 + 90 + 91 + 92 + 93 + 94 + 95 + 96 + 97 + 98 + 99 +100 +101 +102 +103 +104 +105 +106 +107 |
|
IQ_imbalance(g, phi)
+
+
+ staticmethod
+
+
+Creates the correction matrix for the mixer imbalance caused by the gain and +phase imbalances, more information can be seen here: +https://docs.qualang.io/libs/examples/mixer-calibration/#non-ideal-mixer +:param g: relative gain imbalance between the I & Q ports. (unit-less), + set to 0 for no gain imbalance. +:param phi: relative phase imbalance between the I & Q ports (radians), + set to 0 for no phase imbalance.
+ +quam/components/hardware.py
91 + 92 + 93 + 94 + 95 + 96 + 97 + 98 + 99 +100 +101 +102 +103 +104 +105 +106 +107 |
|
apply_to_config(config)
+
+Adds this mixer to the QUA configuration.
+See QuamComponent.apply_to_config
+for details.
quam/components/hardware.py
73 +74 +75 +76 +77 +78 +79 +80 +81 +82 +83 +84 +85 +86 +87 +88 +89 |
|
Octave
+
+
+
+ Bases: QuamComponent
QuAM component for the QM Octave.
+The QM Octave is a device that can be used to upconvert and downconvert signals. It
+has 5 RF outputs and 2 RF inputs. Each RF_output has an associated
+OctaveUpConverter
, and similarly each RF_input has an OctaveDownConverter
.
In many cases the Octave is connected to a single OPX in the default configuration,
+i.e. OPX outputs are connected to the corresponding Octave I/Q input, and Octave IF
+outputs are connected to the corresponding OPX input. In this case you can configure
+the Octave with the correct FrequencyConverter
s using
+Octave.initialize_default_connectivity()
.
Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
+ name
+ |
+ + | +
+
+
+ The name of the Octave. Must be unique + |
+ + required + | +
+ ip
+ |
+ + | +
+
+
+ The IP address of the Octave. Used in |
+ + required + | +
+ port
+ |
+ + | +
+
+
+ The port number of the Octave. Used in |
+ + required + | +
+ calibration_db_path
+ |
+ + | +
+
+
+ The path to the calibration database. If not specified, the +current working directory is used. + |
+ + required + | +
+ RF_outputs
+ |
+ + | +
+
+
+ A dictionary of |
+ + required + | +
+ RF_inputs
+ |
+ + | +
+
+
+ A dictionary of |
+ + required + | +
+ loopbacks
+ |
+ + | +
+
+
+ A list of loopback connections, for example to connect a local +oscillator. See the QUA Octave documentation for details. + |
+ + required + | +
quam/components/octave.py
32 + 33 + 34 + 35 + 36 + 37 + 38 + 39 + 40 + 41 + 42 + 43 + 44 + 45 + 46 + 47 + 48 + 49 + 50 + 51 + 52 + 53 + 54 + 55 + 56 + 57 + 58 + 59 + 60 + 61 + 62 + 63 + 64 + 65 + 66 + 67 + 68 + 69 + 70 + 71 + 72 + 73 + 74 + 75 + 76 + 77 + 78 + 79 + 80 + 81 + 82 + 83 + 84 + 85 + 86 + 87 + 88 + 89 + 90 + 91 + 92 + 93 + 94 + 95 + 96 + 97 + 98 + 99 +100 +101 +102 +103 +104 +105 +106 +107 +108 +109 +110 +111 +112 +113 +114 +115 +116 +117 +118 +119 +120 +121 +122 +123 +124 +125 +126 +127 +128 +129 +130 +131 +132 +133 +134 +135 +136 +137 +138 +139 +140 +141 |
|
apply_to_config(config)
+
+Add the Octave configuration to a config dictionary.
+This method is called by the QuamComponent.generate_config
method.
Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
+ config
+ |
+
+ Dict
+ |
+
+
+
+ A dictionary representing a QUA config file. + |
+ + required + | +
Raises:
+Type | +Description | +
---|---|
+ KeyError
+ |
+
+
+
+ If the Octave is already in the config. + |
+
quam/components/octave.py
117 +118 +119 +120 +121 +122 +123 +124 +125 +126 +127 +128 +129 +130 +131 +132 +133 +134 +135 +136 +137 +138 +139 +140 +141 |
|
get_octave_config()
+
+Return a QmOctaveConfig object with the current Octave configuration.
+ +quam/components/octave.py
105 +106 +107 +108 +109 +110 +111 +112 +113 +114 +115 |
|
initialize_frequency_converters()
+
+Initialize the Octave frequency converterswith default connectivity.
+This method initializes the Octave with default connectivity, i.e. it connects
+the Octave to a single OPX. It creates an OctaveUpConverter
for each RF output
+and an OctaveDownConverter
for each RF input. The OctaveUpConverter
objects
+are added to Octave.RF_outputs
and the OctaveDownConverter
objects are added
+to Octave.RF_inputs
.
Raises:
+Type | +Description | +
---|---|
+ ValueError
+ |
+
+
+
+ If the Octave already has RF_outputs or RF_inputs. + |
+
quam/components/octave.py
69 + 70 + 71 + 72 + 73 + 74 + 75 + 76 + 77 + 78 + 79 + 80 + 81 + 82 + 83 + 84 + 85 + 86 + 87 + 88 + 89 + 90 + 91 + 92 + 93 + 94 + 95 + 96 + 97 + 98 + 99 +100 +101 +102 +103 |
|
OctaveDownConverter
+
+
+
+ Bases: OctaveFrequencyConverter
A frequency downconverter for the QM Octave.
+The OctaveDownConverter represents a frequency downconverter in the QM Octave. The
+OctaveDownConverter is usually connected to an InOutIQChannel, in which case the
+two OPX inputs are connected to the IF outputs of the OctaveDownConverter. The
+OPX inputs are specified in the OctaveDownConverter.channel
attribute. The
+channel is either an InOutIQChannel or an InOutSingleChannel.
Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
+ id
+ |
+ + | +
+
+
+ The RF input id, must be between 1-2. + |
+ + required + | +
+ LO_frequency
+ |
+ + | +
+
+
+ The local oscillator frequency in Hz, between 2 and 18 GHz. + |
+ + required + | +
+ LO_source
+ |
+ + | +
+
+
+ The local oscillator source, "internal" or "external. +For down converter 1 "internal" is the default, +for down converter 2 "external" is the default. + |
+ + required + | +
+ IF_mode_I
+ |
+ + | +
+
+
+ Sets the mode of the I port of the IF Down Converter module as can be +seen in the octave block diagram (see Octave page in QUA documentation). +Can be "direct" / "envelope" / "mixer" / "off". The default is "direct". +- "direct" - The signal bypasses the IF module. +- "envelope" - The signal passes through an envelope detector. +- "mixer" - The signal passes through a low-frequency mixer. +- "off" - the signal doesn't pass to the output port. + |
+ + required + | +
+ IF_mode_Q
+ |
+ + | +
+
+
+ Sets the mode of the Q port of the IF Down Converter module. + |
+ + required + | +
+ IF_output_I
+ |
+ + | +
+
+
+ The output port of the IF Down Converter module for the I port. +Can be 1 or 2. The default is 1. This will be 2 if the IF outputs +are connected to the opposite OPX inputs + |
+ + required + | +
+ IF_output_Q
+ |
+ + | +
+
+
+ The output port of the IF Down Converter module for the Q port. +Can be 1 or 2. The default is 2. This will be 1 if the IF outputs +are connected to the opposite OPX inputs. + |
+ + required + | +
quam/components/octave.py
297 +298 +299 +300 +301 +302 +303 +304 +305 +306 +307 +308 +309 +310 +311 +312 +313 +314 +315 +316 +317 +318 +319 +320 +321 +322 +323 +324 +325 +326 +327 +328 +329 +330 +331 +332 +333 +334 +335 +336 +337 +338 +339 +340 +341 +342 +343 +344 +345 +346 +347 +348 +349 +350 +351 +352 +353 +354 +355 +356 +357 +358 +359 +360 +361 +362 +363 +364 +365 +366 +367 +368 +369 +370 +371 +372 +373 +374 +375 +376 +377 +378 +379 +380 +381 +382 +383 +384 +385 +386 +387 +388 +389 +390 +391 +392 +393 +394 +395 +396 +397 +398 +399 +400 +401 +402 +403 +404 +405 +406 +407 +408 +409 +410 +411 |
|
config_settings
+
+
+ property
+
+
+Specifies that the converter will be added to the config after the Octave.
+apply_to_config(config)
+
+Add information about the frequency down-converter to the QUA config
+This method is called by the QuamComponent.generate_config
method.
Nothing is added to the config if the OctaveDownConverter.channel
is not
+specified or if the OctaveDownConverter.LO_frequency
is not specified.
Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
+ config
+ |
+
+ Dict
+ |
+
+
+
+ A dictionary representing a QUA config file. + |
+ + required + | +
Raises:
+Type | +Description | +
---|---|
+ ValueError
+ |
+
+
+
+ If the LO_frequency is not specified. + |
+
+ KeyError
+ |
+
+
+
+ If the Octave is not in the config, or if config["octaves"] does +not exist. + |
+
+ KeyError
+ |
+
+
+
+ If the Octave already has an entry for the OctaveDownConverter. + |
+
+ ValueError
+ |
+
+
+
+ If the IF_output_I and IF_output_Q are already assigned to +other ports. + |
+
quam/components/octave.py
341 +342 +343 +344 +345 +346 +347 +348 +349 +350 +351 +352 +353 +354 +355 +356 +357 +358 +359 +360 +361 +362 +363 +364 +365 +366 +367 +368 +369 +370 +371 +372 +373 +374 +375 +376 +377 +378 +379 +380 +381 +382 +383 +384 +385 +386 +387 +388 +389 +390 +391 +392 +393 +394 +395 +396 +397 +398 +399 +400 +401 +402 +403 +404 +405 +406 +407 +408 +409 +410 +411 |
|
OctaveFrequencyConverter
+
+
+
+ Bases: BaseFrequencyConverter
, ABC
Base class for OctaveUpConverter and OctaveDownConverter.
+ + +Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
+ id
+ |
+ + | +
+
+
+ The id of the converter. Must be unique within the Octave. +For OctaveUpConverter, the id is used as the RF output number. +For OctaveDownConverter, the id is used as the RF input number. + |
+ + required + | +
+ channel
+ |
+ + | +
+
+
+ The channel that the converter is connected to. + |
+ + required + | +
quam/components/octave.py
144 +145 +146 +147 +148 +149 +150 +151 +152 +153 +154 +155 +156 +157 +158 +159 +160 +161 +162 +163 +164 +165 +166 +167 +168 +169 +170 +171 +172 +173 +174 +175 +176 +177 +178 +179 +180 +181 +182 +183 +184 +185 +186 +187 +188 +189 +190 +191 +192 +193 +194 +195 +196 +197 +198 +199 |
|
config_settings: Dict[str, Any]
+
+
+ property
+
+
+Specifies that the converter will be added to the config after the Octave.
+apply_to_config(config)
+
+Add information about the frequency converter to the QUA config
+This method is called by the QuamComponent.generate_config
method.
Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
+ config
+ |
+
+ Dict
+ |
+
+
+
+ A dictionary representing a QUA config file. + |
+ + required + | +
Raises:
+Type | +Description | +
---|---|
+ KeyError
+ |
+
+
+
+ If the Octave is not in the config, or if config["octaves"] does +not exist. + |
+
quam/components/octave.py
172 +173 +174 +175 +176 +177 +178 +179 +180 +181 +182 +183 +184 +185 +186 +187 +188 +189 +190 +191 +192 +193 +194 +195 +196 +197 +198 +199 |
|
OctaveUpConverter
+
+
+
+ Bases: OctaveFrequencyConverter
A frequency upconverter for the QM Octave.
+The OctaveUpConverter represents a frequency upconverter in the QM Octave. Usually
+an IQChannel is connected OctaveUpconverter.channel
, in which case the two OPX
+outputs are connected to the I and Q inputs of the OctaveUpConverter.
+The OPX outputs are specified in the OctaveUpConverter.channel
attribute.
+The channel is either an IQChannel or a SingleChannel.
Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
+ id
+ |
+ + | +
+
+
+ The RF output id, must be between 1-5. + |
+ + required + | +
+ LO_frequency
+ |
+ + | +
+
+
+ The local oscillator frequency in Hz, between 2 and 18 GHz. + |
+ + required + | +
+ LO_source
+ |
+ + | +
+
+
+ The local oscillator source, "internal" (default) or "external". + |
+ + required + | +
+ gain
+ |
+ + | +
+
+
+ The gain of the output, between -20 and 20 dB in steps of 0.5. +Default is 0 dB. + |
+ + required + | +
+ output_mode
+ |
+ + | +
+
+
+ Sets the fast switch's mode of the up converter module. +Can be "always_on" / "always_off" / "triggered" / "triggered_reversed". +The default is "always_off". +- "always_on" - Output is always on +- "always_off" - Output is always off +- "triggered" - The output will play when rising edge is detected in the + octave's digital port. +- "triggered_reversed" - The output will play when falling edge is detected + in the octave's digital port. + |
+ + required + | +
+ input_attenuators
+ |
+ + | +
+
+
+ Whether the I and Q ports have a 10 dB attenuator before +entering the mixer. Off by default. + |
+ + required + | +
quam/components/octave.py
202 +203 +204 +205 +206 +207 +208 +209 +210 +211 +212 +213 +214 +215 +216 +217 +218 +219 +220 +221 +222 +223 +224 +225 +226 +227 +228 +229 +230 +231 +232 +233 +234 +235 +236 +237 +238 +239 +240 +241 +242 +243 +244 +245 +246 +247 +248 +249 +250 +251 +252 +253 +254 +255 +256 +257 +258 +259 +260 +261 +262 +263 +264 +265 +266 +267 +268 +269 +270 +271 +272 +273 +274 +275 +276 +277 +278 +279 +280 +281 +282 +283 +284 +285 +286 +287 +288 +289 +290 +291 +292 +293 +294 |
|
apply_to_config(config)
+
+Add information about the frequency up-converter to the QUA config
+This method is called by the QuamComponent.generate_config
method.
Nothing is added to the config if the OctaveUpConverter.channel
is not
+specified or if the OctaveUpConverter.LO_frequency
is not specified.
Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
+ config
+ |
+
+ Dict
+ |
+
+
+
+ A dictionary representing a QUA config file. + |
+ + required + | +
Raises:
+Type | +Description | +
---|---|
+ ValueError
+ |
+
+
+
+ If the LO_frequency is not specified. + |
+
+ KeyError
+ |
+
+
+
+ If the Octave is not in the config, or if config["octaves"] does +not exist. + |
+
+ KeyError
+ |
+
+
+
+ If the Octave already has an entry for the OctaveUpConverter. + |
+
quam/components/octave.py
239 +240 +241 +242 +243 +244 +245 +246 +247 +248 +249 +250 +251 +252 +253 +254 +255 +256 +257 +258 +259 +260 +261 +262 +263 +264 +265 +266 +267 +268 +269 +270 +271 +272 +273 +274 +275 +276 +277 +278 +279 +280 +281 +282 +283 +284 +285 +286 +287 +288 +289 +290 +291 +292 +293 +294 |
|
The Octave component in the Quantum Abstract Machine (QuAM) manages signal upconversion and downconversion through its frequency converters. This section provides an API guide for setting up and customizing the Octave, detailing its integration with quantum processors for efficient signal processing. Explore the capabilities, configuration options, and practical examples to enhance your quantum operations with Octave's advanced functionalities.
+ + +Octave
+
+
+
+ Bases: QuamComponent
QuAM component for the QM Octave.
+The QM Octave is a device that can be used to upconvert and downconvert signals. It
+has 5 RF outputs and 2 RF inputs. Each RF_output has an associated
+OctaveUpConverter
, and similarly each RF_input has an OctaveDownConverter
.
In many cases the Octave is connected to a single OPX in the default configuration,
+i.e. OPX outputs are connected to the corresponding Octave I/Q input, and Octave IF
+outputs are connected to the corresponding OPX input. In this case you can configure
+the Octave with the correct FrequencyConverter
s using
+Octave.initialize_default_connectivity()
.
Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
+ name
+ |
+ + | +
+
+
+ The name of the Octave. Must be unique + |
+ + required + | +
+ ip
+ |
+ + | +
+
+
+ The IP address of the Octave. Used in |
+ + required + | +
+ port
+ |
+ + | +
+
+
+ The port number of the Octave. Used in |
+ + required + | +
+ calibration_db_path
+ |
+ + | +
+
+
+ The path to the calibration database. If not specified, the +current working directory is used. + |
+ + required + | +
+ RF_outputs
+ |
+ + | +
+
+
+ A dictionary of |
+ + required + | +
+ RF_inputs
+ |
+ + | +
+
+
+ A dictionary of |
+ + required + | +
+ loopbacks
+ |
+ + | +
+
+
+ A list of loopback connections, for example to connect a local +oscillator. See the QUA Octave documentation for details. + |
+ + required + | +
quam/components/octave.py
32 + 33 + 34 + 35 + 36 + 37 + 38 + 39 + 40 + 41 + 42 + 43 + 44 + 45 + 46 + 47 + 48 + 49 + 50 + 51 + 52 + 53 + 54 + 55 + 56 + 57 + 58 + 59 + 60 + 61 + 62 + 63 + 64 + 65 + 66 + 67 + 68 + 69 + 70 + 71 + 72 + 73 + 74 + 75 + 76 + 77 + 78 + 79 + 80 + 81 + 82 + 83 + 84 + 85 + 86 + 87 + 88 + 89 + 90 + 91 + 92 + 93 + 94 + 95 + 96 + 97 + 98 + 99 +100 +101 +102 +103 +104 +105 +106 +107 +108 +109 +110 +111 +112 +113 +114 +115 +116 +117 +118 +119 +120 +121 +122 +123 +124 +125 +126 +127 +128 +129 +130 +131 +132 +133 +134 +135 +136 +137 +138 +139 +140 +141 |
|
apply_to_config(config)
+
+Add the Octave configuration to a config dictionary.
+This method is called by the QuamComponent.generate_config
method.
Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
+ config
+ |
+
+ Dict
+ |
+
+
+
+ A dictionary representing a QUA config file. + |
+ + required + | +
Raises:
+Type | +Description | +
---|---|
+ KeyError
+ |
+
+
+
+ If the Octave is already in the config. + |
+
quam/components/octave.py
117 +118 +119 +120 +121 +122 +123 +124 +125 +126 +127 +128 +129 +130 +131 +132 +133 +134 +135 +136 +137 +138 +139 +140 +141 |
|
get_octave_config()
+
+Return a QmOctaveConfig object with the current Octave configuration.
+ +quam/components/octave.py
105 +106 +107 +108 +109 +110 +111 +112 +113 +114 +115 |
|
initialize_frequency_converters()
+
+Initialize the Octave frequency converterswith default connectivity.
+This method initializes the Octave with default connectivity, i.e. it connects
+the Octave to a single OPX. It creates an OctaveUpConverter
for each RF output
+and an OctaveDownConverter
for each RF input. The OctaveUpConverter
objects
+are added to Octave.RF_outputs
and the OctaveDownConverter
objects are added
+to Octave.RF_inputs
.
Raises:
+Type | +Description | +
---|---|
+ ValueError
+ |
+
+
+
+ If the Octave already has RF_outputs or RF_inputs. + |
+
quam/components/octave.py
69 + 70 + 71 + 72 + 73 + 74 + 75 + 76 + 77 + 78 + 79 + 80 + 81 + 82 + 83 + 84 + 85 + 86 + 87 + 88 + 89 + 90 + 91 + 92 + 93 + 94 + 95 + 96 + 97 + 98 + 99 +100 +101 +102 +103 |
|
OctaveFrequencyConverter
+
+
+
+ Bases: BaseFrequencyConverter
, ABC
Base class for OctaveUpConverter and OctaveDownConverter.
+ + +Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
+ id
+ |
+ + | +
+
+
+ The id of the converter. Must be unique within the Octave. +For OctaveUpConverter, the id is used as the RF output number. +For OctaveDownConverter, the id is used as the RF input number. + |
+ + required + | +
+ channel
+ |
+ + | +
+
+
+ The channel that the converter is connected to. + |
+ + required + | +
quam/components/octave.py
144 +145 +146 +147 +148 +149 +150 +151 +152 +153 +154 +155 +156 +157 +158 +159 +160 +161 +162 +163 +164 +165 +166 +167 +168 +169 +170 +171 +172 +173 +174 +175 +176 +177 +178 +179 +180 +181 +182 +183 +184 +185 +186 +187 +188 +189 +190 +191 +192 +193 +194 +195 +196 +197 +198 +199 |
|
config_settings: Dict[str, Any]
+
+
+ property
+
+
+Specifies that the converter will be added to the config after the Octave.
+apply_to_config(config)
+
+Add information about the frequency converter to the QUA config
+This method is called by the QuamComponent.generate_config
method.
Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
+ config
+ |
+
+ Dict
+ |
+
+
+
+ A dictionary representing a QUA config file. + |
+ + required + | +
Raises:
+Type | +Description | +
---|---|
+ KeyError
+ |
+
+
+
+ If the Octave is not in the config, or if config["octaves"] does +not exist. + |
+
quam/components/octave.py
172 +173 +174 +175 +176 +177 +178 +179 +180 +181 +182 +183 +184 +185 +186 +187 +188 +189 +190 +191 +192 +193 +194 +195 +196 +197 +198 +199 |
|
OctaveUpConverter
+
+
+
+ Bases: OctaveFrequencyConverter
A frequency upconverter for the QM Octave.
+The OctaveUpConverter represents a frequency upconverter in the QM Octave. Usually
+an IQChannel is connected OctaveUpconverter.channel
, in which case the two OPX
+outputs are connected to the I and Q inputs of the OctaveUpConverter.
+The OPX outputs are specified in the OctaveUpConverter.channel
attribute.
+The channel is either an IQChannel or a SingleChannel.
Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
+ id
+ |
+ + | +
+
+
+ The RF output id, must be between 1-5. + |
+ + required + | +
+ LO_frequency
+ |
+ + | +
+
+
+ The local oscillator frequency in Hz, between 2 and 18 GHz. + |
+ + required + | +
+ LO_source
+ |
+ + | +
+
+
+ The local oscillator source, "internal" (default) or "external". + |
+ + required + | +
+ gain
+ |
+ + | +
+
+
+ The gain of the output, between -20 and 20 dB in steps of 0.5. +Default is 0 dB. + |
+ + required + | +
+ output_mode
+ |
+ + | +
+
+
+ Sets the fast switch's mode of the up converter module. +Can be "always_on" / "always_off" / "triggered" / "triggered_reversed". +The default is "always_off". +- "always_on" - Output is always on +- "always_off" - Output is always off +- "triggered" - The output will play when rising edge is detected in the + octave's digital port. +- "triggered_reversed" - The output will play when falling edge is detected + in the octave's digital port. + |
+ + required + | +
+ input_attenuators
+ |
+ + | +
+
+
+ Whether the I and Q ports have a 10 dB attenuator before +entering the mixer. Off by default. + |
+ + required + | +
quam/components/octave.py
202 +203 +204 +205 +206 +207 +208 +209 +210 +211 +212 +213 +214 +215 +216 +217 +218 +219 +220 +221 +222 +223 +224 +225 +226 +227 +228 +229 +230 +231 +232 +233 +234 +235 +236 +237 +238 +239 +240 +241 +242 +243 +244 +245 +246 +247 +248 +249 +250 +251 +252 +253 +254 +255 +256 +257 +258 +259 +260 +261 +262 +263 +264 +265 +266 +267 +268 +269 +270 +271 +272 +273 +274 +275 +276 +277 +278 +279 +280 +281 +282 +283 +284 +285 +286 +287 +288 +289 +290 +291 +292 +293 +294 |
|
apply_to_config(config)
+
+Add information about the frequency up-converter to the QUA config
+This method is called by the QuamComponent.generate_config
method.
Nothing is added to the config if the OctaveUpConverter.channel
is not
+specified or if the OctaveUpConverter.LO_frequency
is not specified.
Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
+ config
+ |
+
+ Dict
+ |
+
+
+
+ A dictionary representing a QUA config file. + |
+ + required + | +
Raises:
+Type | +Description | +
---|---|
+ ValueError
+ |
+
+
+
+ If the LO_frequency is not specified. + |
+
+ KeyError
+ |
+
+
+
+ If the Octave is not in the config, or if config["octaves"] does +not exist. + |
+
+ KeyError
+ |
+
+
+
+ If the Octave already has an entry for the OctaveUpConverter. + |
+
quam/components/octave.py
239 +240 +241 +242 +243 +244 +245 +246 +247 +248 +249 +250 +251 +252 +253 +254 +255 +256 +257 +258 +259 +260 +261 +262 +263 +264 +265 +266 +267 +268 +269 +270 +271 +272 +273 +274 +275 +276 +277 +278 +279 +280 +281 +282 +283 +284 +285 +286 +287 +288 +289 +290 +291 +292 +293 +294 |
|
OctaveDownConverter
+
+
+
+ Bases: OctaveFrequencyConverter
A frequency downconverter for the QM Octave.
+The OctaveDownConverter represents a frequency downconverter in the QM Octave. The
+OctaveDownConverter is usually connected to an InOutIQChannel, in which case the
+two OPX inputs are connected to the IF outputs of the OctaveDownConverter. The
+OPX inputs are specified in the OctaveDownConverter.channel
attribute. The
+channel is either an InOutIQChannel or an InOutSingleChannel.
Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
+ id
+ |
+ + | +
+
+
+ The RF input id, must be between 1-2. + |
+ + required + | +
+ LO_frequency
+ |
+ + | +
+
+
+ The local oscillator frequency in Hz, between 2 and 18 GHz. + |
+ + required + | +
+ LO_source
+ |
+ + | +
+
+
+ The local oscillator source, "internal" or "external. +For down converter 1 "internal" is the default, +for down converter 2 "external" is the default. + |
+ + required + | +
+ IF_mode_I
+ |
+ + | +
+
+
+ Sets the mode of the I port of the IF Down Converter module as can be +seen in the octave block diagram (see Octave page in QUA documentation). +Can be "direct" / "envelope" / "mixer" / "off". The default is "direct". +- "direct" - The signal bypasses the IF module. +- "envelope" - The signal passes through an envelope detector. +- "mixer" - The signal passes through a low-frequency mixer. +- "off" - the signal doesn't pass to the output port. + |
+ + required + | +
+ IF_mode_Q
+ |
+ + | +
+
+
+ Sets the mode of the Q port of the IF Down Converter module. + |
+ + required + | +
+ IF_output_I
+ |
+ + | +
+
+
+ The output port of the IF Down Converter module for the I port. +Can be 1 or 2. The default is 1. This will be 2 if the IF outputs +are connected to the opposite OPX inputs + |
+ + required + | +
+ IF_output_Q
+ |
+ + | +
+
+
+ The output port of the IF Down Converter module for the Q port. +Can be 1 or 2. The default is 2. This will be 1 if the IF outputs +are connected to the opposite OPX inputs. + |
+ + required + | +
quam/components/octave.py
297 +298 +299 +300 +301 +302 +303 +304 +305 +306 +307 +308 +309 +310 +311 +312 +313 +314 +315 +316 +317 +318 +319 +320 +321 +322 +323 +324 +325 +326 +327 +328 +329 +330 +331 +332 +333 +334 +335 +336 +337 +338 +339 +340 +341 +342 +343 +344 +345 +346 +347 +348 +349 +350 +351 +352 +353 +354 +355 +356 +357 +358 +359 +360 +361 +362 +363 +364 +365 +366 +367 +368 +369 +370 +371 +372 +373 +374 +375 +376 +377 +378 +379 +380 +381 +382 +383 +384 +385 +386 +387 +388 +389 +390 +391 +392 +393 +394 +395 +396 +397 +398 +399 +400 +401 +402 +403 +404 +405 +406 +407 +408 +409 +410 +411 |
|
config_settings
+
+
+ property
+
+
+Specifies that the converter will be added to the config after the Octave.
+apply_to_config(config)
+
+Add information about the frequency down-converter to the QUA config
+This method is called by the QuamComponent.generate_config
method.
Nothing is added to the config if the OctaveDownConverter.channel
is not
+specified or if the OctaveDownConverter.LO_frequency
is not specified.
Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
+ config
+ |
+
+ Dict
+ |
+
+
+
+ A dictionary representing a QUA config file. + |
+ + required + | +
Raises:
+Type | +Description | +
---|---|
+ ValueError
+ |
+
+
+
+ If the LO_frequency is not specified. + |
+
+ KeyError
+ |
+
+
+
+ If the Octave is not in the config, or if config["octaves"] does +not exist. + |
+
+ KeyError
+ |
+
+
+
+ If the Octave already has an entry for the OctaveDownConverter. + |
+
+ ValueError
+ |
+
+
+
+ If the IF_output_I and IF_output_Q are already assigned to +other ports. + |
+
quam/components/octave.py
341 +342 +343 +344 +345 +346 +347 +348 +349 +350 +351 +352 +353 +354 +355 +356 +357 +358 +359 +360 +361 +362 +363 +364 +365 +366 +367 +368 +369 +370 +371 +372 +373 +374 +375 +376 +377 +378 +379 +380 +381 +382 +383 +384 +385 +386 +387 +388 +389 +390 +391 +392 +393 +394 +395 +396 +397 +398 +399 +400 +401 +402 +403 +404 +405 +406 +407 +408 +409 +410 +411 |
|
BaseReadoutPulse
+
+
+
+ Bases: Pulse
, ABC
QuAM abstract base component for a general readout pulse.
+Readout pulse classes should usually inherit from ReadoutPulse
, the
+exception being when a custom integration weights function is required.
Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
+ length
+ |
+
+ int
+ |
+
+
+
+ The length of the pulse in samples. + |
+ + required + | +
+ digital_marker
+ |
+
+ (str, list)
+ |
+
+
+
+ The digital marker to use for the pulse. +Default is "ON". + |
+ + required + | +
quam/components/pulses.py
372 +373 +374 +375 +376 +377 +378 +379 +380 +381 +382 +383 +384 +385 +386 +387 +388 +389 +390 +391 +392 +393 +394 +395 +396 +397 +398 +399 +400 +401 +402 +403 +404 +405 +406 +407 +408 +409 +410 +411 +412 +413 +414 +415 +416 +417 +418 +419 +420 +421 +422 +423 +424 +425 +426 +427 +428 +429 +430 +431 +432 +433 +434 +435 +436 +437 +438 +439 |
|
apply_to_config(config)
+
+Adds this readout pulse to the QUA configuration.
+See QuamComponent.apply_to_config
+for details.
quam/components/pulses.py
432 +433 +434 +435 +436 +437 +438 +439 |
|
integration_weights_function()
+
+
+ abstractmethod
+
+
+Abstract method to calculate the integration weights.
+ + +Returns:
+Type | +Description | +
---|---|
+ Dict[str, List[Tuple[float, int]]]
+ |
+
+
+
+ Dict containing keys "real", "imag", "minus_real", "minus_imag". + |
+
+ Dict[str, List[Tuple[float, int]]]
+ |
+
+
+
+ Values are lists of tuples of (weight, length) pairs. + |
+
quam/components/pulses.py
402 +403 +404 +405 +406 +407 +408 +409 +410 |
|
DragCosinePulse
+
+
+
+ Bases: Pulse
Cosine based DRAG pulse that compensate for the leakage and AC stark shift.
+These DRAG waveforms has been implemented following the next Refs.: +Chen et al. PRL, 116, 020501 (2016) +https://journals.aps.org/prl/abstract/10.1103/PhysRevLett.116.020501 +and Chen's thesis +https://web.physics.ucsb.edu/~martinisgroup/theses/Chen2018.pdf
+ + +Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
+ length
+ |
+
+ int
+ |
+
+
+
+ The pulse length in ns. + |
+ + required + | +
+ axis_angle
+ |
+
+ float
+ |
+
+
+
+ IQ axis angle of the output pulse in radians. +If None (default), the pulse is meant for a single channel or the I port + of an IQ channel +If not None, the pulse is meant for an IQ channel (0 is X, pi/2 is Y). + |
+ + required + | +
+ amplitude
+ |
+
+ float
+ |
+
+
+
+ The amplitude in volts. + |
+ + required + | +
+ alpha
+ |
+
+ float
+ |
+
+
+
+ The DRAG coefficient. + |
+ + required + | +
+ anharmonicity
+ |
+
+ float
+ |
+
+
+
+ f_21 - f_10 - The differences in energy between the 2-1 +and the 1-0 energy levels, in Hz. + |
+ + required + | +
+ detuning
+ |
+
+ float
+ |
+
+
+
+ The frequency shift to correct for AC stark shift, in Hz. + |
+ + required + | +
quam/components/pulses.py
599 +600 +601 +602 +603 +604 +605 +606 +607 +608 +609 +610 +611 +612 +613 +614 +615 +616 +617 +618 +619 +620 +621 +622 +623 +624 +625 +626 +627 +628 +629 +630 +631 +632 +633 +634 +635 +636 +637 +638 +639 +640 +641 +642 +643 +644 +645 +646 |
|
DragGaussianPulse
+
+
+
+ Bases: Pulse
Gaussian-based DRAG pulse that compensate for the leakage and AC stark shift.
+These DRAG waveforms has been implemented following the next Refs.: +Chen et al. PRL, 116, 020501 (2016) +https://journals.aps.org/prl/abstract/10.1103/PhysRevLett.116.020501 +and Chen's thesis +https://web.physics.ucsb.edu/~martinisgroup/theses/Chen2018.pdf
+ + +Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
+ length
+ |
+
+ int
+ |
+
+
+
+ The pulse length in ns. + |
+ + required + | +
+ axis_angle
+ |
+
+ float
+ |
+
+
+
+ IQ axis angle of the output pulse in radians. +If None (default), the pulse is meant for a single channel or the I port + of an IQ channel +If not None, the pulse is meant for an IQ channel (0 is X, pi/2 is Y). + |
+ + required + | +
+ amplitude
+ |
+
+ float
+ |
+
+
+
+ The amplitude in volts. + |
+ + required + | +
+ sigma
+ |
+
+ float
+ |
+
+
+
+ The gaussian standard deviation. + |
+ + required + | +
+ alpha
+ |
+
+ float
+ |
+
+
+
+ The DRAG coefficient. + |
+ + required + | +
+ anharmonicity
+ |
+
+ float
+ |
+
+
+
+ f_21 - f_10 - The differences in energy between the 2-1 +and the 1-0 energy levels, in Hz. + |
+ + required + | +
+ detuning
+ |
+
+ float
+ |
+
+
+
+ The frequency shift to correct for AC stark shift, in Hz. + |
+ + required + | +
+ subtracted
+ |
+
+ bool
+ |
+
+
+
+ If true, returns a subtracted Gaussian, such that the first +and last points will be at 0 volts. This reduces high-frequency components +due to the initial and final points offset. Default is true. + |
+ + required + | +
quam/components/pulses.py
530 +531 +532 +533 +534 +535 +536 +537 +538 +539 +540 +541 +542 +543 +544 +545 +546 +547 +548 +549 +550 +551 +552 +553 +554 +555 +556 +557 +558 +559 +560 +561 +562 +563 +564 +565 +566 +567 +568 +569 +570 +571 +572 +573 +574 +575 +576 +577 +578 +579 +580 +581 +582 +583 +584 +585 +586 |
|
FlatTopGaussianPulse
+
+
+
+ Bases: Pulse
Gaussian pulse with flat top QuAM component.
+ + +Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
+ length
+ |
+
+ int
+ |
+
+
+
+ The total length of the pulse in samples. + |
+ + required + | +
+ amplitude
+ |
+
+ float
+ |
+
+
+
+ The amplitude of the pulse in volts. + |
+ + required + | +
+ axis_angle
+ |
+
+ float
+ |
+
+
+
+ IQ axis angle of the output pulse in radians. +If None (default), the pulse is meant for a single channel or the I port + of an IQ channel +If not None, the pulse is meant for an IQ channel (0 is X, pi/2 is Y). + |
+ + required + | +
+ flat_length
+ |
+
+ int
+ |
+
+
+
+ The length of the pulse's flat top in samples. +The rise and fall lengths are calculated from the total length and the +flat length. + |
+ + required + | +
quam/components/pulses.py
747 +748 +749 +750 +751 +752 +753 +754 +755 +756 +757 +758 +759 +760 +761 +762 +763 +764 +765 +766 +767 +768 +769 +770 +771 +772 +773 +774 +775 +776 +777 +778 +779 +780 +781 +782 +783 +784 +785 +786 +787 +788 +789 |
|
GaussianPulse
+
+
+
+ Bases: Pulse
Gaussian pulse QuAM component.
+ + +Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
+ amplitude
+ |
+
+ float
+ |
+
+
+
+ The amplitude of the pulse in volts. + |
+ + required + | +
+ length
+ |
+
+ int
+ |
+
+
+
+ The length of the pulse in samples. + |
+ + required + | +
+ sigma
+ |
+
+ float
+ |
+
+
+
+ The standard deviation of the gaussian pulse. +Should generally be less than half the length of the pulse. + |
+ + required + | +
+ axis_angle
+ |
+
+ float
+ |
+
+
+
+ IQ axis angle of the output pulse in radians. +If None (default), the pulse is meant for a single channel or the I port + of an IQ channel +If not None, the pulse is meant for an IQ channel (0 is X, pi/2 is Y). + |
+ + required + | +
+ subtracted
+ |
+
+ bool
+ |
+
+
+
+ If true, returns a subtracted Gaussian, such that the first +and last points will be at 0 volts. This reduces high-frequency components +due to the initial and final points offset. Default is true. + |
+ + required + | +
quam/components/pulses.py
709 +710 +711 +712 +713 +714 +715 +716 +717 +718 +719 +720 +721 +722 +723 +724 +725 +726 +727 +728 +729 +730 +731 +732 +733 +734 +735 +736 +737 +738 +739 +740 +741 +742 +743 +744 |
|
Pulse
+
+
+
+ Bases: QuamComponent
QuAM base component for a pulse.
+Pulses are added to a channel using +
channel.operations["pulse_name"] = pulse
+
The Pulse
class is an abstract base class, and should not be instantiated
+directly. Instead, use one of the subclasses such as:
+- ConstantReadoutPulse
+- DragPulse
+- SquarePulse
+- GaussianPulse
+or create a custom subclass. In this case, the method waveform_function
should
+be implemented.
Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
+ operation
+ |
+
+ str
+ |
+
+
+
+ The operation of the pulse, either "control" or "measurement". +Default is "control". + |
+ + required + | +
+ length
+ |
+
+ int
+ |
+
+
+
+ The length of the pulse in samples. + |
+ + required + | +
+ digital_marker
+ |
+
+ (str, list)
+ |
+
+
+
+ The digital marker to use for the pulse. +Can be a string, in which case it is a reference to a digital marker in the +config, or a list of tuples of (sample, length) pairs. Default is None. + |
+ + required + | +
The unique pulse label is automatically generated from the channel name and
+the pulse name, the same for the waveform and digital marker names.
+The pulse label is defined as "{channel_name}.{pulse_name}.pulse"
.
+The waveform label is defined as "{channel_name}.{pulse_name}.wf"
.
+The digital marker label is defined as "{channel_name}.{pulse_name}.dm"
.
quam/components/pulses.py
35 + 36 + 37 + 38 + 39 + 40 + 41 + 42 + 43 + 44 + 45 + 46 + 47 + 48 + 49 + 50 + 51 + 52 + 53 + 54 + 55 + 56 + 57 + 58 + 59 + 60 + 61 + 62 + 63 + 64 + 65 + 66 + 67 + 68 + 69 + 70 + 71 + 72 + 73 + 74 + 75 + 76 + 77 + 78 + 79 + 80 + 81 + 82 + 83 + 84 + 85 + 86 + 87 + 88 + 89 + 90 + 91 + 92 + 93 + 94 + 95 + 96 + 97 + 98 + 99 +100 +101 +102 +103 +104 +105 +106 +107 +108 +109 +110 +111 +112 +113 +114 +115 +116 +117 +118 +119 +120 +121 +122 +123 +124 +125 +126 +127 +128 +129 +130 +131 +132 +133 +134 +135 +136 +137 +138 +139 +140 +141 +142 +143 +144 +145 +146 +147 +148 +149 +150 +151 +152 +153 +154 +155 +156 +157 +158 +159 +160 +161 +162 +163 +164 +165 +166 +167 +168 +169 +170 +171 +172 +173 +174 +175 +176 +177 +178 +179 +180 +181 +182 +183 +184 +185 +186 +187 +188 +189 +190 +191 +192 +193 +194 +195 +196 +197 +198 +199 +200 +201 +202 +203 +204 +205 +206 +207 +208 +209 +210 +211 +212 +213 +214 +215 +216 +217 +218 +219 +220 +221 +222 +223 +224 +225 +226 +227 +228 +229 +230 +231 +232 +233 +234 +235 +236 +237 +238 +239 +240 +241 +242 +243 +244 +245 +246 +247 +248 +249 +250 +251 +252 +253 +254 +255 +256 +257 +258 +259 +260 +261 +262 +263 +264 +265 +266 +267 +268 +269 +270 +271 +272 +273 +274 +275 +276 +277 +278 +279 +280 +281 +282 +283 +284 +285 +286 +287 +288 +289 +290 +291 +292 +293 +294 +295 +296 +297 +298 +299 +300 +301 +302 +303 +304 +305 +306 +307 +308 +309 +310 +311 +312 +313 +314 +315 +316 +317 +318 +319 +320 +321 +322 +323 +324 +325 +326 +327 +328 +329 +330 +331 +332 +333 +334 +335 +336 +337 +338 +339 +340 +341 +342 +343 +344 +345 +346 +347 +348 +349 +350 +351 +352 +353 +354 +355 +356 +357 +358 +359 +360 +361 +362 +363 +364 +365 +366 +367 +368 +369 |
|
channel
+
+
+ property
+
+
+The channel to which the pulse is attached, None if no channel is attached
+apply_to_config(config)
+
+Adds this pulse, waveform, and digital marker to the QUA configuration.
+See QuamComponent.apply_to_config
+for details.
quam/components/pulses.py
356 +357 +358 +359 +360 +361 +362 +363 +364 +365 +366 +367 +368 +369 |
|
calculate_waveform()
+
+Calculate the waveform of the pulse.
+This function calls Pulse.waveform_function
, which should generally be
+subclassed, to generate the waveform.
This function then processes the results such that IQ waveforms are cast +into complex values.
+ + +Returns:
+Type | +Description | +
---|---|
+ Union[float, complex, List[float], List[complex]]
+ |
+
+
+
+ The processed waveform, which can be either + |
+
+ Union[float, complex, List[float], List[complex]]
+ |
+
+
+
+
|
+
+ Union[float, complex, List[float], List[complex]]
+ |
+
+
+
+
|
+
+ Union[float, complex, List[float], List[complex]]
+ |
+
+
+
+
|
+
+ Union[float, complex, List[float], List[complex]]
+ |
+
+
+
+
|
+
quam/components/pulses.py
115 +116 +117 +118 +119 +120 +121 +122 +123 +124 +125 +126 +127 +128 +129 +130 +131 +132 +133 +134 +135 +136 +137 +138 +139 +140 |
|
play(amplitude_scale=None, duration=None, condition=None, chirp=None, truncate=None, timestamp_stream=None, continue_chirp=False, target='', validate=True)
+
+Play the pulse on the channel.
+The corresponding channel to play the pulse on is determined from the +parent of the pulse.
+ + +Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
+ pulse_name
+ |
+
+ str
+ |
+
+
+
+ The name of the pulse to play. Should be registered in
+ |
+ + required + | +
+ amplitude_scale
+ |
+
+ (float, _PulseAmp)
+ |
+
+
+
+ Amplitude scale of the pulse. +Can be either a float, or qua.amp(float). + |
+
+ None
+ |
+
+ duration
+ |
+
+ int
+ |
+
+
+
+ Duration of the pulse in units of the clock cycle (4ns). +If not provided, the default pulse duration will be used. It is possible +to dynamically change the duration of both constant and arbitrary +pulses. Arbitrary pulses can only be stretched, not compressed. + |
+
+ None
+ |
+
+ chirp
+ |
+
+ Union[(list[int], str), (int, str)]
+ |
+
+
+
+ Allows to perform +piecewise linear sweep of the element's intermediate +frequency in time. Input should be a tuple, with the 1st +element being a list of rates and the second should be a +string with the units. The units can be either: 'Hz/nsec', +'mHz/nsec', 'uHz/nsec', 'pHz/nsec' or 'GHz/sec', 'MHz/sec', +'KHz/sec', 'Hz/sec', 'mHz/sec'. + |
+
+ None
+ |
+
+ truncate
+ |
+
+ Union[int, QUA variable of type int]
+ |
+
+
+
+ Allows playing +only part of the pulse, truncating the end. If provided, +will play only up to the given time in units of the clock +cycle (4ns). + |
+
+ None
+ |
+
+ condition
+ |
+
+ A logical expression to evaluate.
+ |
+
+
+
+ Will play analog +pulse only if the condition's value is true. Any digital +pulses associated with the operation will always play. + |
+
+ None
+ |
+
+ timestamp_stream
+ |
+
+ Union[str, _ResultSource]
+ |
+
+
+
+ (Supported from
+QOP 2.2) Adding a |
+
+ None
+ |
+
+ validate
+ |
+
+ bool
+ |
+
+
+
+ If True (default), validate that the pulse is registered +in Channel.operations + |
+
+ True
+ |
+
Raises:
+Type | +Description | +
---|---|
+ ValueError
+ |
+
+
+
+ If the pulse is not attached to a channel. + |
+
+ KeyError
+ |
+
+
+
+ If the pulse is not registered in the channel's operations. + |
+
quam/components/pulses.py
169 +170 +171 +172 +173 +174 +175 +176 +177 +178 +179 +180 +181 +182 +183 +184 +185 +186 +187 +188 +189 +190 +191 +192 +193 +194 +195 +196 +197 +198 +199 +200 +201 +202 +203 +204 +205 +206 +207 +208 +209 +210 +211 +212 +213 +214 +215 +216 +217 +218 +219 +220 +221 +222 +223 +224 +225 +226 +227 +228 +229 +230 +231 +232 +233 +234 +235 +236 +237 +238 +239 +240 +241 +242 +243 |
|
waveform_function()
+
+Function that returns the waveform of the pulse.
+The waveform function should use the relevant parameters from the pulse, which +is passed as the only argument.
+This function is called from Pulse.calculate_waveform
Returns:
+Type | +Description | +
---|---|
+ Union[float, complex, List[float], List[complex], Tuple[float, float], Tuple[List[float], List[float]]]
+ |
+
+
+
+ The waveform of the pulse. Can be one of the following: + |
+
+ Union[float, complex, List[float], List[complex], Tuple[float, float], Tuple[List[float], List[float]]]
+ |
+
+
+
+
|
+
+ Union[float, complex, List[float], List[complex], Tuple[float, float], Tuple[List[float], List[float]]]
+ |
+
+
+
+
|
+
+ Union[float, complex, List[float], List[complex], Tuple[float, float], Tuple[List[float], List[float]]]
+ |
+
+
+
+
|
+
+ Union[float, complex, List[float], List[complex], Tuple[float, float], Tuple[List[float], List[float]]]
+ |
+
+
+
+
|
+
+ Union[float, complex, List[float], List[complex], Tuple[float, float], Tuple[List[float], List[float]]]
+ |
+
+
+
+
|
+
quam/components/pulses.py
142 +143 +144 +145 +146 +147 +148 +149 +150 +151 +152 +153 +154 +155 +156 +157 +158 +159 +160 +161 +162 +163 +164 +165 +166 +167 |
|
ReadoutPulse
+
+
+
+ Bases: BaseReadoutPulse
, ABC
QuAM abstract base component for most readout pulses.
+This class is a subclass of ReadoutPulse
and should be used for most readout
+pulses. It provides a default implementation of the integration_weights_function
+method, which is suitable for most cases.
Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
+ length
+ |
+
+ int
+ |
+
+
+
+ The length of the pulse in samples. + |
+ + required + | +
+ digital_marker
+ |
+
+ (str, list)
+ |
+
+
+
+ The digital marker to use for the pulse. +Default is "ON". + |
+ + required + | +
+ integration_weights
+ |
+
+ (list[float], list[tuple[float, int]])
+ |
+
+
+
+ The +integration weights, can be either +- a list of floats (one per sample), the length must match the pulse length +- a list of tuples of (weight, length) pairs, the sum of the lengths must + match the pulse length + |
+ + required + | +
+ integration_weights_angle
+ |
+
+ float
+ |
+
+
+
+ The rotation angle for the +integration weights in radians. + |
+ + required + | +
quam/components/pulses.py
442 +443 +444 +445 +446 +447 +448 +449 +450 +451 +452 +453 +454 +455 +456 +457 +458 +459 +460 +461 +462 +463 +464 +465 +466 +467 +468 +469 +470 +471 +472 +473 +474 +475 +476 +477 +478 +479 +480 +481 +482 +483 |
|
SquarePulse
+
+
+
+ Bases: Pulse
Square pulse QuAM component.
+ + +Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
+ length
+ |
+
+ int
+ |
+
+
+
+ The length of the pulse in samples. + |
+ + required + | +
+ digital_marker
+ |
+
+ (str, list)
+ |
+
+
+
+ The digital marker to use for the pulse. + |
+ + required + | +
+ amplitude
+ |
+
+ float
+ |
+
+
+
+ The amplitude of the pulse in volts. + |
+ + required + | +
+ axis_angle
+ |
+
+ float
+ |
+
+
+
+ IQ axis angle of the output pulse in radians. +If None (default), the pulse is meant for a single channel or the I port + of an IQ channel +If not None, the pulse is meant for an IQ channel (0 is X, pi/2 is Y). + |
+ + required + | +
quam/components/pulses.py
649 +650 +651 +652 +653 +654 +655 +656 +657 +658 +659 +660 +661 +662 +663 +664 +665 +666 +667 +668 +669 +670 +671 |
|
SquareReadoutPulse
+
+
+
+ Bases: ReadoutPulse
, SquarePulse
QuAM component for a square readout pulse.
+ + +Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
+ length
+ |
+
+ int
+ |
+
+
+
+ The length of the pulse in samples. + |
+ + required + | +
+ digital_marker
+ |
+
+ (str, list)
+ |
+
+
+
+ The digital marker to use for the pulse. +Default is "ON". + |
+ + required + | +
+ amplitude
+ |
+
+ float
+ |
+
+
+
+ The constant amplitude of the pulse. + |
+ + required + | +
+ axis_angle
+ |
+
+ float
+ |
+
+
+
+ IQ axis angle of the output pulse in radians. +If None (default), the pulse is meant for a single channel or the I port + of an IQ channel +If not None, the pulse is meant for an IQ channel (0 is X, pi/2 is Y). + |
+ + required + | +
+ integration_weights
+ |
+
+ (list[float], list[tuple[float, int]])
+ |
+
+
+
+ The +integration weights, can be either +- a list of floats (one per sample), the length must match the pulse length +- a list of tuples of (weight, length) pairs, the sum of the lengths must + match the pulse length + |
+ + required + | +
+ integration_weights_angle
+ |
+
+ float
+ |
+
+
+
+ The rotation angle for the +integration weights in radians. + |
+ + required + | +
quam/components/pulses.py
674 +675 +676 +677 +678 +679 +680 +681 +682 +683 +684 +685 +686 +687 +688 +689 +690 +691 +692 +693 +694 +695 +696 |
|
WaveformPulse
+
+
+
+ Bases: Pulse
Pulse that uses a pre-defined waveform, as opposed to a function.
+For a single channel, only waveform_I
is required.
+For an IQ channel, both waveform_I
and waveform_Q
are required.
The length of the pulse is derived from the length of waveform_I
.
Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
+ waveform_I
+ |
+
+ list[float]
+ |
+
+
+
+ The in-phase waveform. + |
+ + required + | +
+ waveform_Q
+ |
+
+ list[float]
+ |
+
+
+
+ The quadrature waveform. + |
+ + required + | +
quam/components/pulses.py
486 +487 +488 +489 +490 +491 +492 +493 +494 +495 +496 +497 +498 +499 +500 +501 +502 +503 +504 +505 +506 +507 +508 +509 +510 +511 +512 +513 +514 +515 +516 +517 +518 +519 +520 +521 +522 +523 +524 +525 +526 +527 |
|
Welcome to the QuAM Pulses API Documentation. +The QuAM Pulses module offers a versatile framework for creating and controlling pulse schemes essential for quantum operations. +Information can be found in QuAM Pulses Documentation in the User Guide.
+This section provides detailed API references for various pulse types—ranging from simple waveforms to complex modulated pulses—tailored for precise quantum state manipulation and measurement. Explore the properties, methods, and examples to effectively integrate these pulse components into your quantum experiments.
+ + +BaseReadoutPulse
+
+
+
+ Bases: Pulse
, ABC
QuAM abstract base component for a general readout pulse.
+Readout pulse classes should usually inherit from ReadoutPulse
, the
+exception being when a custom integration weights function is required.
Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
+ length
+ |
+
+ int
+ |
+
+
+
+ The length of the pulse in samples. + |
+ + required + | +
+ digital_marker
+ |
+
+ (str, list)
+ |
+
+
+
+ The digital marker to use for the pulse. +Default is "ON". + |
+ + required + | +
quam/components/pulses.py
372 +373 +374 +375 +376 +377 +378 +379 +380 +381 +382 +383 +384 +385 +386 +387 +388 +389 +390 +391 +392 +393 +394 +395 +396 +397 +398 +399 +400 +401 +402 +403 +404 +405 +406 +407 +408 +409 +410 +411 +412 +413 +414 +415 +416 +417 +418 +419 +420 +421 +422 +423 +424 +425 +426 +427 +428 +429 +430 +431 +432 +433 +434 +435 +436 +437 +438 +439 |
|
apply_to_config(config)
+
+Adds this readout pulse to the QUA configuration.
+See QuamComponent.apply_to_config
+for details.
quam/components/pulses.py
432 +433 +434 +435 +436 +437 +438 +439 |
|
integration_weights_function()
+
+
+ abstractmethod
+
+
+Abstract method to calculate the integration weights.
+ + +Returns:
+Type | +Description | +
---|---|
+ Dict[str, List[Tuple[float, int]]]
+ |
+
+
+
+ Dict containing keys "real", "imag", "minus_real", "minus_imag". + |
+
+ Dict[str, List[Tuple[float, int]]]
+ |
+
+
+
+ Values are lists of tuples of (weight, length) pairs. + |
+
quam/components/pulses.py
402 +403 +404 +405 +406 +407 +408 +409 +410 |
|
DragCosinePulse
+
+
+
+ Bases: Pulse
Cosine based DRAG pulse that compensate for the leakage and AC stark shift.
+These DRAG waveforms has been implemented following the next Refs.: +Chen et al. PRL, 116, 020501 (2016) +https://journals.aps.org/prl/abstract/10.1103/PhysRevLett.116.020501 +and Chen's thesis +https://web.physics.ucsb.edu/~martinisgroup/theses/Chen2018.pdf
+ + +Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
+ length
+ |
+
+ int
+ |
+
+
+
+ The pulse length in ns. + |
+ + required + | +
+ axis_angle
+ |
+
+ float
+ |
+
+
+
+ IQ axis angle of the output pulse in radians. +If None (default), the pulse is meant for a single channel or the I port + of an IQ channel +If not None, the pulse is meant for an IQ channel (0 is X, pi/2 is Y). + |
+ + required + | +
+ amplitude
+ |
+
+ float
+ |
+
+
+
+ The amplitude in volts. + |
+ + required + | +
+ alpha
+ |
+
+ float
+ |
+
+
+
+ The DRAG coefficient. + |
+ + required + | +
+ anharmonicity
+ |
+
+ float
+ |
+
+
+
+ f_21 - f_10 - The differences in energy between the 2-1 +and the 1-0 energy levels, in Hz. + |
+ + required + | +
+ detuning
+ |
+
+ float
+ |
+
+
+
+ The frequency shift to correct for AC stark shift, in Hz. + |
+ + required + | +
quam/components/pulses.py
599 +600 +601 +602 +603 +604 +605 +606 +607 +608 +609 +610 +611 +612 +613 +614 +615 +616 +617 +618 +619 +620 +621 +622 +623 +624 +625 +626 +627 +628 +629 +630 +631 +632 +633 +634 +635 +636 +637 +638 +639 +640 +641 +642 +643 +644 +645 +646 |
|
DragGaussianPulse
+
+
+
+ Bases: Pulse
Gaussian-based DRAG pulse that compensate for the leakage and AC stark shift.
+These DRAG waveforms has been implemented following the next Refs.: +Chen et al. PRL, 116, 020501 (2016) +https://journals.aps.org/prl/abstract/10.1103/PhysRevLett.116.020501 +and Chen's thesis +https://web.physics.ucsb.edu/~martinisgroup/theses/Chen2018.pdf
+ + +Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
+ length
+ |
+
+ int
+ |
+
+
+
+ The pulse length in ns. + |
+ + required + | +
+ axis_angle
+ |
+
+ float
+ |
+
+
+
+ IQ axis angle of the output pulse in radians. +If None (default), the pulse is meant for a single channel or the I port + of an IQ channel +If not None, the pulse is meant for an IQ channel (0 is X, pi/2 is Y). + |
+ + required + | +
+ amplitude
+ |
+
+ float
+ |
+
+
+
+ The amplitude in volts. + |
+ + required + | +
+ sigma
+ |
+
+ float
+ |
+
+
+
+ The gaussian standard deviation. + |
+ + required + | +
+ alpha
+ |
+
+ float
+ |
+
+
+
+ The DRAG coefficient. + |
+ + required + | +
+ anharmonicity
+ |
+
+ float
+ |
+
+
+
+ f_21 - f_10 - The differences in energy between the 2-1 +and the 1-0 energy levels, in Hz. + |
+ + required + | +
+ detuning
+ |
+
+ float
+ |
+
+
+
+ The frequency shift to correct for AC stark shift, in Hz. + |
+ + required + | +
+ subtracted
+ |
+
+ bool
+ |
+
+
+
+ If true, returns a subtracted Gaussian, such that the first +and last points will be at 0 volts. This reduces high-frequency components +due to the initial and final points offset. Default is true. + |
+ + required + | +
quam/components/pulses.py
530 +531 +532 +533 +534 +535 +536 +537 +538 +539 +540 +541 +542 +543 +544 +545 +546 +547 +548 +549 +550 +551 +552 +553 +554 +555 +556 +557 +558 +559 +560 +561 +562 +563 +564 +565 +566 +567 +568 +569 +570 +571 +572 +573 +574 +575 +576 +577 +578 +579 +580 +581 +582 +583 +584 +585 +586 |
|
FlatTopGaussianPulse
+
+
+
+ Bases: Pulse
Gaussian pulse with flat top QuAM component.
+ + +Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
+ length
+ |
+
+ int
+ |
+
+
+
+ The total length of the pulse in samples. + |
+ + required + | +
+ amplitude
+ |
+
+ float
+ |
+
+
+
+ The amplitude of the pulse in volts. + |
+ + required + | +
+ axis_angle
+ |
+
+ float
+ |
+
+
+
+ IQ axis angle of the output pulse in radians. +If None (default), the pulse is meant for a single channel or the I port + of an IQ channel +If not None, the pulse is meant for an IQ channel (0 is X, pi/2 is Y). + |
+ + required + | +
+ flat_length
+ |
+
+ int
+ |
+
+
+
+ The length of the pulse's flat top in samples. +The rise and fall lengths are calculated from the total length and the +flat length. + |
+ + required + | +
quam/components/pulses.py
747 +748 +749 +750 +751 +752 +753 +754 +755 +756 +757 +758 +759 +760 +761 +762 +763 +764 +765 +766 +767 +768 +769 +770 +771 +772 +773 +774 +775 +776 +777 +778 +779 +780 +781 +782 +783 +784 +785 +786 +787 +788 +789 |
|
GaussianPulse
+
+
+
+ Bases: Pulse
Gaussian pulse QuAM component.
+ + +Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
+ amplitude
+ |
+
+ float
+ |
+
+
+
+ The amplitude of the pulse in volts. + |
+ + required + | +
+ length
+ |
+
+ int
+ |
+
+
+
+ The length of the pulse in samples. + |
+ + required + | +
+ sigma
+ |
+
+ float
+ |
+
+
+
+ The standard deviation of the gaussian pulse. +Should generally be less than half the length of the pulse. + |
+ + required + | +
+ axis_angle
+ |
+
+ float
+ |
+
+
+
+ IQ axis angle of the output pulse in radians. +If None (default), the pulse is meant for a single channel or the I port + of an IQ channel +If not None, the pulse is meant for an IQ channel (0 is X, pi/2 is Y). + |
+ + required + | +
+ subtracted
+ |
+
+ bool
+ |
+
+
+
+ If true, returns a subtracted Gaussian, such that the first +and last points will be at 0 volts. This reduces high-frequency components +due to the initial and final points offset. Default is true. + |
+ + required + | +
quam/components/pulses.py
709 +710 +711 +712 +713 +714 +715 +716 +717 +718 +719 +720 +721 +722 +723 +724 +725 +726 +727 +728 +729 +730 +731 +732 +733 +734 +735 +736 +737 +738 +739 +740 +741 +742 +743 +744 |
|
Pulse
+
+
+
+ Bases: QuamComponent
QuAM base component for a pulse.
+Pulses are added to a channel using +
channel.operations["pulse_name"] = pulse
+
The Pulse
class is an abstract base class, and should not be instantiated
+directly. Instead, use one of the subclasses such as:
+- ConstantReadoutPulse
+- DragPulse
+- SquarePulse
+- GaussianPulse
+or create a custom subclass. In this case, the method waveform_function
should
+be implemented.
Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
+ operation
+ |
+
+ str
+ |
+
+
+
+ The operation of the pulse, either "control" or "measurement". +Default is "control". + |
+ + required + | +
+ length
+ |
+
+ int
+ |
+
+
+
+ The length of the pulse in samples. + |
+ + required + | +
+ digital_marker
+ |
+
+ (str, list)
+ |
+
+
+
+ The digital marker to use for the pulse. +Can be a string, in which case it is a reference to a digital marker in the +config, or a list of tuples of (sample, length) pairs. Default is None. + |
+ + required + | +
The unique pulse label is automatically generated from the channel name and
+the pulse name, the same for the waveform and digital marker names.
+The pulse label is defined as "{channel_name}.{pulse_name}.pulse"
.
+The waveform label is defined as "{channel_name}.{pulse_name}.wf"
.
+The digital marker label is defined as "{channel_name}.{pulse_name}.dm"
.
quam/components/pulses.py
35 + 36 + 37 + 38 + 39 + 40 + 41 + 42 + 43 + 44 + 45 + 46 + 47 + 48 + 49 + 50 + 51 + 52 + 53 + 54 + 55 + 56 + 57 + 58 + 59 + 60 + 61 + 62 + 63 + 64 + 65 + 66 + 67 + 68 + 69 + 70 + 71 + 72 + 73 + 74 + 75 + 76 + 77 + 78 + 79 + 80 + 81 + 82 + 83 + 84 + 85 + 86 + 87 + 88 + 89 + 90 + 91 + 92 + 93 + 94 + 95 + 96 + 97 + 98 + 99 +100 +101 +102 +103 +104 +105 +106 +107 +108 +109 +110 +111 +112 +113 +114 +115 +116 +117 +118 +119 +120 +121 +122 +123 +124 +125 +126 +127 +128 +129 +130 +131 +132 +133 +134 +135 +136 +137 +138 +139 +140 +141 +142 +143 +144 +145 +146 +147 +148 +149 +150 +151 +152 +153 +154 +155 +156 +157 +158 +159 +160 +161 +162 +163 +164 +165 +166 +167 +168 +169 +170 +171 +172 +173 +174 +175 +176 +177 +178 +179 +180 +181 +182 +183 +184 +185 +186 +187 +188 +189 +190 +191 +192 +193 +194 +195 +196 +197 +198 +199 +200 +201 +202 +203 +204 +205 +206 +207 +208 +209 +210 +211 +212 +213 +214 +215 +216 +217 +218 +219 +220 +221 +222 +223 +224 +225 +226 +227 +228 +229 +230 +231 +232 +233 +234 +235 +236 +237 +238 +239 +240 +241 +242 +243 +244 +245 +246 +247 +248 +249 +250 +251 +252 +253 +254 +255 +256 +257 +258 +259 +260 +261 +262 +263 +264 +265 +266 +267 +268 +269 +270 +271 +272 +273 +274 +275 +276 +277 +278 +279 +280 +281 +282 +283 +284 +285 +286 +287 +288 +289 +290 +291 +292 +293 +294 +295 +296 +297 +298 +299 +300 +301 +302 +303 +304 +305 +306 +307 +308 +309 +310 +311 +312 +313 +314 +315 +316 +317 +318 +319 +320 +321 +322 +323 +324 +325 +326 +327 +328 +329 +330 +331 +332 +333 +334 +335 +336 +337 +338 +339 +340 +341 +342 +343 +344 +345 +346 +347 +348 +349 +350 +351 +352 +353 +354 +355 +356 +357 +358 +359 +360 +361 +362 +363 +364 +365 +366 +367 +368 +369 |
|
channel
+
+
+ property
+
+
+The channel to which the pulse is attached, None if no channel is attached
+apply_to_config(config)
+
+Adds this pulse, waveform, and digital marker to the QUA configuration.
+See QuamComponent.apply_to_config
+for details.
quam/components/pulses.py
356 +357 +358 +359 +360 +361 +362 +363 +364 +365 +366 +367 +368 +369 |
|
calculate_waveform()
+
+Calculate the waveform of the pulse.
+This function calls Pulse.waveform_function
, which should generally be
+subclassed, to generate the waveform.
This function then processes the results such that IQ waveforms are cast +into complex values.
+ + +Returns:
+Type | +Description | +
---|---|
+ Union[float, complex, List[float], List[complex]]
+ |
+
+
+
+ The processed waveform, which can be either + |
+
+ Union[float, complex, List[float], List[complex]]
+ |
+
+
+
+
|
+
+ Union[float, complex, List[float], List[complex]]
+ |
+
+
+
+
|
+
+ Union[float, complex, List[float], List[complex]]
+ |
+
+
+
+
|
+
+ Union[float, complex, List[float], List[complex]]
+ |
+
+
+
+
|
+
quam/components/pulses.py
115 +116 +117 +118 +119 +120 +121 +122 +123 +124 +125 +126 +127 +128 +129 +130 +131 +132 +133 +134 +135 +136 +137 +138 +139 +140 |
|
play(amplitude_scale=None, duration=None, condition=None, chirp=None, truncate=None, timestamp_stream=None, continue_chirp=False, target='', validate=True)
+
+Play the pulse on the channel.
+The corresponding channel to play the pulse on is determined from the +parent of the pulse.
+ + +Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
+ pulse_name
+ |
+
+ str
+ |
+
+
+
+ The name of the pulse to play. Should be registered in
+ |
+ + required + | +
+ amplitude_scale
+ |
+
+ (float, _PulseAmp)
+ |
+
+
+
+ Amplitude scale of the pulse. +Can be either a float, or qua.amp(float). + |
+
+ None
+ |
+
+ duration
+ |
+
+ int
+ |
+
+
+
+ Duration of the pulse in units of the clock cycle (4ns). +If not provided, the default pulse duration will be used. It is possible +to dynamically change the duration of both constant and arbitrary +pulses. Arbitrary pulses can only be stretched, not compressed. + |
+
+ None
+ |
+
+ chirp
+ |
+
+ Union[(list[int], str), (int, str)]
+ |
+
+
+
+ Allows to perform +piecewise linear sweep of the element's intermediate +frequency in time. Input should be a tuple, with the 1st +element being a list of rates and the second should be a +string with the units. The units can be either: 'Hz/nsec', +'mHz/nsec', 'uHz/nsec', 'pHz/nsec' or 'GHz/sec', 'MHz/sec', +'KHz/sec', 'Hz/sec', 'mHz/sec'. + |
+
+ None
+ |
+
+ truncate
+ |
+
+ Union[int, QUA variable of type int]
+ |
+
+
+
+ Allows playing +only part of the pulse, truncating the end. If provided, +will play only up to the given time in units of the clock +cycle (4ns). + |
+
+ None
+ |
+
+ condition
+ |
+
+ A logical expression to evaluate.
+ |
+
+
+
+ Will play analog +pulse only if the condition's value is true. Any digital +pulses associated with the operation will always play. + |
+
+ None
+ |
+
+ timestamp_stream
+ |
+
+ Union[str, _ResultSource]
+ |
+
+
+
+ (Supported from
+QOP 2.2) Adding a |
+
+ None
+ |
+
+ validate
+ |
+
+ bool
+ |
+
+
+
+ If True (default), validate that the pulse is registered +in Channel.operations + |
+
+ True
+ |
+
Raises:
+Type | +Description | +
---|---|
+ ValueError
+ |
+
+
+
+ If the pulse is not attached to a channel. + |
+
+ KeyError
+ |
+
+
+
+ If the pulse is not registered in the channel's operations. + |
+
quam/components/pulses.py
169 +170 +171 +172 +173 +174 +175 +176 +177 +178 +179 +180 +181 +182 +183 +184 +185 +186 +187 +188 +189 +190 +191 +192 +193 +194 +195 +196 +197 +198 +199 +200 +201 +202 +203 +204 +205 +206 +207 +208 +209 +210 +211 +212 +213 +214 +215 +216 +217 +218 +219 +220 +221 +222 +223 +224 +225 +226 +227 +228 +229 +230 +231 +232 +233 +234 +235 +236 +237 +238 +239 +240 +241 +242 +243 |
|
waveform_function()
+
+Function that returns the waveform of the pulse.
+The waveform function should use the relevant parameters from the pulse, which +is passed as the only argument.
+This function is called from Pulse.calculate_waveform
Returns:
+Type | +Description | +
---|---|
+ Union[float, complex, List[float], List[complex], Tuple[float, float], Tuple[List[float], List[float]]]
+ |
+
+
+
+ The waveform of the pulse. Can be one of the following: + |
+
+ Union[float, complex, List[float], List[complex], Tuple[float, float], Tuple[List[float], List[float]]]
+ |
+
+
+
+
|
+
+ Union[float, complex, List[float], List[complex], Tuple[float, float], Tuple[List[float], List[float]]]
+ |
+
+
+
+
|
+
+ Union[float, complex, List[float], List[complex], Tuple[float, float], Tuple[List[float], List[float]]]
+ |
+
+
+
+
|
+
+ Union[float, complex, List[float], List[complex], Tuple[float, float], Tuple[List[float], List[float]]]
+ |
+
+
+
+
|
+
+ Union[float, complex, List[float], List[complex], Tuple[float, float], Tuple[List[float], List[float]]]
+ |
+
+
+
+
|
+
quam/components/pulses.py
142 +143 +144 +145 +146 +147 +148 +149 +150 +151 +152 +153 +154 +155 +156 +157 +158 +159 +160 +161 +162 +163 +164 +165 +166 +167 |
|
ReadoutPulse
+
+
+
+ Bases: BaseReadoutPulse
, ABC
QuAM abstract base component for most readout pulses.
+This class is a subclass of ReadoutPulse
and should be used for most readout
+pulses. It provides a default implementation of the integration_weights_function
+method, which is suitable for most cases.
Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
+ length
+ |
+
+ int
+ |
+
+
+
+ The length of the pulse in samples. + |
+ + required + | +
+ digital_marker
+ |
+
+ (str, list)
+ |
+
+
+
+ The digital marker to use for the pulse. +Default is "ON". + |
+ + required + | +
+ integration_weights
+ |
+
+ (list[float], list[tuple[float, int]])
+ |
+
+
+
+ The +integration weights, can be either +- a list of floats (one per sample), the length must match the pulse length +- a list of tuples of (weight, length) pairs, the sum of the lengths must + match the pulse length + |
+ + required + | +
+ integration_weights_angle
+ |
+
+ float
+ |
+
+
+
+ The rotation angle for the +integration weights in radians. + |
+ + required + | +
quam/components/pulses.py
442 +443 +444 +445 +446 +447 +448 +449 +450 +451 +452 +453 +454 +455 +456 +457 +458 +459 +460 +461 +462 +463 +464 +465 +466 +467 +468 +469 +470 +471 +472 +473 +474 +475 +476 +477 +478 +479 +480 +481 +482 +483 |
|
SquarePulse
+
+
+
+ Bases: Pulse
Square pulse QuAM component.
+ + +Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
+ length
+ |
+
+ int
+ |
+
+
+
+ The length of the pulse in samples. + |
+ + required + | +
+ digital_marker
+ |
+
+ (str, list)
+ |
+
+
+
+ The digital marker to use for the pulse. + |
+ + required + | +
+ amplitude
+ |
+
+ float
+ |
+
+
+
+ The amplitude of the pulse in volts. + |
+ + required + | +
+ axis_angle
+ |
+
+ float
+ |
+
+
+
+ IQ axis angle of the output pulse in radians. +If None (default), the pulse is meant for a single channel or the I port + of an IQ channel +If not None, the pulse is meant for an IQ channel (0 is X, pi/2 is Y). + |
+ + required + | +
quam/components/pulses.py
649 +650 +651 +652 +653 +654 +655 +656 +657 +658 +659 +660 +661 +662 +663 +664 +665 +666 +667 +668 +669 +670 +671 |
|
SquareReadoutPulse
+
+
+
+ Bases: ReadoutPulse
, SquarePulse
QuAM component for a square readout pulse.
+ + +Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
+ length
+ |
+
+ int
+ |
+
+
+
+ The length of the pulse in samples. + |
+ + required + | +
+ digital_marker
+ |
+
+ (str, list)
+ |
+
+
+
+ The digital marker to use for the pulse. +Default is "ON". + |
+ + required + | +
+ amplitude
+ |
+
+ float
+ |
+
+
+
+ The constant amplitude of the pulse. + |
+ + required + | +
+ axis_angle
+ |
+
+ float
+ |
+
+
+
+ IQ axis angle of the output pulse in radians. +If None (default), the pulse is meant for a single channel or the I port + of an IQ channel +If not None, the pulse is meant for an IQ channel (0 is X, pi/2 is Y). + |
+ + required + | +
+ integration_weights
+ |
+
+ (list[float], list[tuple[float, int]])
+ |
+
+
+
+ The +integration weights, can be either +- a list of floats (one per sample), the length must match the pulse length +- a list of tuples of (weight, length) pairs, the sum of the lengths must + match the pulse length + |
+ + required + | +
+ integration_weights_angle
+ |
+
+ float
+ |
+
+
+
+ The rotation angle for the +integration weights in radians. + |
+ + required + | +
quam/components/pulses.py
674 +675 +676 +677 +678 +679 +680 +681 +682 +683 +684 +685 +686 +687 +688 +689 +690 +691 +692 +693 +694 +695 +696 |
|
WaveformPulse
+
+
+
+ Bases: Pulse
Pulse that uses a pre-defined waveform, as opposed to a function.
+For a single channel, only waveform_I
is required.
+For an IQ channel, both waveform_I
and waveform_Q
are required.
The length of the pulse is derived from the length of waveform_I
.
Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
+ waveform_I
+ |
+
+ list[float]
+ |
+
+
+
+ The in-phase waveform. + |
+ + required + | +
+ waveform_Q
+ |
+
+ list[float]
+ |
+
+
+
+ The quadrature waveform. + |
+ + required + | +
quam/components/pulses.py
486 +487 +488 +489 +490 +491 +492 +493 +494 +495 +496 +497 +498 +499 +500 +501 +502 +503 +504 +505 +506 +507 +508 +509 +510 +511 +512 +513 +514 +515 +516 +517 +518 +519 +520 +521 +522 +523 +524 +525 +526 +527 |
|
ParentDescriptor
+
+
+Descriptor for the parent attribute of QuamBase.
+This descriptor is used to ensure that the parent attribute of a QuamBase +object is not overwritten. This is to prevent the following situation:
+parent1 = QuamBase()
+parent2 = QuamBase()
+
+child = QuamBase()
+child.parent = parent1 # This is fine
+child.parent = parent2 # This raises an AttributeError
+
quam/core/quam_classes.py
184 +185 +186 +187 +188 +189 +190 +191 +192 +193 +194 +195 +196 +197 +198 +199 +200 +201 +202 +203 +204 +205 +206 +207 +208 +209 +210 +211 +212 +213 +214 +215 +216 +217 +218 +219 |
|
QuamBase
+
+
+
+ Bases: ReferenceClass
Base class for any QuAM component class.
+ + +Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
+ parent
+ |
+ + | +
+
+
+ The parent of this object. This is automatically set when adding +this object to another QuamBase object. + |
+ + required + | +
+ _root
+ |
+ + | +
+
+
+ The QuamRoot object. This is automatically set when instantiating +a QuamRoot object. + |
+ + required + | +
+ config_settings
+ |
+ + | +
+
+
+ A dictionary of configuration settings for this object.
+This is used by |
+ + required + | +
This class should not be used directly, but should generally be subclassed. +The subclasses should be dataclasses.
+quam/core/quam_classes.py
222 +223 +224 +225 +226 +227 +228 +229 +230 +231 +232 +233 +234 +235 +236 +237 +238 +239 +240 +241 +242 +243 +244 +245 +246 +247 +248 +249 +250 +251 +252 +253 +254 +255 +256 +257 +258 +259 +260 +261 +262 +263 +264 +265 +266 +267 +268 +269 +270 +271 +272 +273 +274 +275 +276 +277 +278 +279 +280 +281 +282 +283 +284 +285 +286 +287 +288 +289 +290 +291 +292 +293 +294 +295 +296 +297 +298 +299 +300 +301 +302 +303 +304 +305 +306 +307 +308 +309 +310 +311 +312 +313 +314 +315 +316 +317 +318 +319 +320 +321 +322 +323 +324 +325 +326 +327 +328 +329 +330 +331 +332 +333 +334 +335 +336 +337 +338 +339 +340 +341 +342 +343 +344 +345 +346 +347 +348 +349 +350 +351 +352 +353 +354 +355 +356 +357 +358 +359 +360 +361 +362 +363 +364 +365 +366 +367 +368 +369 +370 +371 +372 +373 +374 +375 +376 +377 +378 +379 +380 +381 +382 +383 +384 +385 +386 +387 +388 +389 +390 +391 +392 +393 +394 +395 +396 +397 +398 +399 +400 +401 +402 +403 +404 +405 +406 +407 +408 +409 +410 +411 +412 +413 +414 +415 +416 +417 +418 +419 +420 +421 +422 +423 +424 +425 +426 +427 +428 +429 +430 +431 +432 +433 +434 +435 +436 +437 +438 +439 +440 +441 +442 +443 +444 +445 +446 +447 +448 +449 +450 +451 +452 +453 +454 +455 +456 +457 +458 +459 +460 +461 +462 +463 +464 +465 +466 +467 +468 +469 +470 +471 +472 +473 +474 +475 +476 +477 +478 +479 +480 +481 +482 +483 +484 +485 +486 +487 +488 +489 +490 +491 +492 +493 +494 +495 +496 +497 +498 +499 +500 +501 +502 +503 +504 +505 +506 +507 +508 +509 +510 +511 +512 +513 +514 +515 +516 +517 +518 +519 +520 +521 +522 +523 +524 +525 +526 +527 +528 +529 +530 +531 +532 +533 +534 +535 +536 +537 +538 +539 +540 +541 +542 +543 |
|
get_attr_name(attr_val)
+
+Get the name of an attribute that matches the value.
+ + +Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
+ attr_val
+ |
+
+ Any
+ |
+
+
+
+ The value of the attribute. + |
+ + required + | +
Returns:
+Type | +Description | +
---|---|
+ str
+ |
+
+
+
+ The name of the attribute. + |
+
quam/core/quam_classes.py
272 +273 +274 +275 +276 +277 +278 +279 +280 +281 +282 +283 +284 +285 +286 +287 +288 +289 +290 +291 +292 |
|
get_attrs(follow_references=False, include_defaults=True)
+
+Get all attributes and corresponding values of this object.
+ + +Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
+ follow_references
+ |
+
+ bool
+ |
+
+
+
+ Whether to follow references when getting the value. +If False, the reference will be returned as a string. + |
+
+ False
+ |
+
+ include_defaults
+ |
+
+ bool
+ |
+
+
+
+ Whether to include attributes that have the default +value. + |
+
+ True
+ |
+
Returns:
+Type | +Description | +
---|---|
+ Dict[str, Any]
+ |
+
+
+
+ A dictionary of attribute names and values. + |
+
quam/core/quam_classes.py
365 +366 +367 +368 +369 +370 +371 +372 +373 +374 +375 +376 +377 +378 +379 +380 +381 +382 +383 +384 +385 +386 +387 +388 +389 +390 +391 +392 +393 +394 +395 +396 |
|
get_reference(attr=None)
+
+Get the reference path of this object.
+ + +Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
+ attr
+ |
+ + | +
+
+
+ The attribute to get the reference path for. If None, the reference +path of the object itself is returned. + |
+
+ None
+ |
+
Returns:
+Type | +Description | +
---|---|
+ Optional[str]
+ |
+
+
+
+ The reference path of this object. + |
+
quam/core/quam_classes.py
345 +346 +347 +348 +349 +350 +351 +352 +353 +354 +355 +356 +357 +358 +359 +360 +361 +362 +363 |
|
iterate_components(skip_elems=None)
+
+Iterate over all QuamBase objects in this object, including nested objects.
+ + +Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
+ skip_elems
+ |
+
+ bool
+ |
+
+
+
+ A list of QuamBase objects to skip. +This is used to prevent infinite loops when iterating over nested +objects. + |
+
+ None
+ |
+
Returns:
+Type | +Description | +
---|---|
+ None
+ |
+
+
+
+ A generator of QuamBase objects. + |
+
quam/core/quam_classes.py
434 +435 +436 +437 +438 +439 +440 +441 +442 +443 +444 +445 +446 +447 +448 +449 +450 +451 +452 +453 +454 +455 +456 +457 +458 +459 +460 +461 +462 +463 +464 +465 |
|
print_summary(indent=0)
+
+Print a summary of the QuamBase object.
+ + +Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
+ indent
+ |
+
+ int
+ |
+
+
+
+ The number of spaces to indent the summary. + |
+
+ 0
+ |
+
quam/core/quam_classes.py
515 +516 +517 +518 +519 +520 +521 +522 +523 +524 +525 +526 +527 +528 +529 +530 +531 +532 +533 +534 +535 +536 +537 +538 +539 +540 +541 +542 +543 |
|
to_dict(follow_references=False, include_defaults=False)
+
+Convert this object to a dictionary.
+ + +Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
+ follow_references
+ |
+
+ bool
+ |
+
+
+
+ Whether to follow references when getting the value. +If False, the reference will be returned as a string. + |
+
+ False
+ |
+
+ include_defaults
+ |
+
+ bool
+ |
+
+
+
+ Whether to include attributes that have the default + |
+
+ False
+ |
+
Returns:
+Type | +Description | +
---|---|
+ Dict[str, Any]
+ |
+
+
+
+ A dictionary representation of this object. + |
+
+ Dict[str, Any]
+ |
+
+
+
+ Any QuamBase objects will be recursively converted to dictionaries. + |
+
If the value of an attribute does not match the annotation, the
+"__class__"
key will be added to the dictionary. This is to ensure
+that the object can be reconstructed when loading from a file.
quam/core/quam_classes.py
398 +399 +400 +401 +402 +403 +404 +405 +406 +407 +408 +409 +410 +411 +412 +413 +414 +415 +416 +417 +418 +419 +420 +421 +422 +423 +424 +425 +426 +427 +428 +429 +430 +431 +432 |
|
QuamComponent
+
+
+
+ Bases: QuamBase
Base class for any QuAM component class.
+Examples of QuamComponent classes are Mixer
,
+LocalOscillator
,
+Pulse
, etc.
This class should be subclassed and made a dataclass.
+quam/core/quam_classes.py
689 +690 +691 +692 +693 +694 +695 +696 +697 +698 +699 +700 +701 +702 +703 +704 +705 +706 +707 +708 +709 +710 +711 +712 +713 +714 +715 +716 +717 +718 +719 +720 +721 |
|
apply_to_config(config)
+
+Add information to the QUA configuration, such as pulses and waveforms.
+ + +Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
+ config
+ |
+
+ dict
+ |
+
+
+
+ The QUA configuration dictionary. Initially this is a nearly empty +dictionary, but + |
+ + required + | +
This function is called by
+QuamRoot.generate_config
.
The config has a starting template, defined at quam.core.qua_config_template
quam/core/quam_classes.py
707 +708 +709 +710 +711 +712 +713 +714 +715 +716 +717 +718 +719 +720 +721 |
|
QuamDict
+
+
+
+ Bases: UserDict
, QuamBase
A QuAM dictionary class.
+Any dict added to a QuamBase
object is automatically converted to a QuamDict
.
+The QuamDict
adds the following functionalities to a dict:
+- Values can be references (see below)
+- Keys can also be accessed through attributes (e.g. d.a
instead of d["a"]
)
QuamDict values can be references, which are strings that start with #
. See the
+documentation for details on references. An example is shown here:
+
d = QuamDict({"a": 1, "b": "#./a"})
+assert d["b"] == 1
+
This class is a subclass of QuamBase
, but also of UserDict
. As a result,
+it can be used as a normal dictionary, but it is not a subclass of dict
.
quam/core/quam_classes.py
724 +725 +726 +727 +728 +729 +730 +731 +732 +733 +734 +735 +736 +737 +738 +739 +740 +741 +742 +743 +744 +745 +746 +747 +748 +749 +750 +751 +752 +753 +754 +755 +756 +757 +758 +759 +760 +761 +762 +763 +764 +765 +766 +767 +768 +769 +770 +771 +772 +773 +774 +775 +776 +777 +778 +779 +780 +781 +782 +783 +784 +785 +786 +787 +788 +789 +790 +791 +792 +793 +794 +795 +796 +797 +798 +799 +800 +801 +802 +803 +804 +805 +806 +807 +808 +809 +810 +811 +812 +813 +814 +815 +816 +817 +818 +819 +820 +821 +822 +823 +824 +825 +826 +827 +828 +829 +830 +831 +832 +833 +834 +835 +836 +837 +838 +839 +840 +841 +842 +843 +844 +845 +846 +847 +848 +849 +850 +851 +852 +853 +854 +855 +856 +857 +858 +859 +860 +861 +862 +863 +864 +865 +866 +867 +868 +869 +870 +871 +872 +873 +874 +875 +876 +877 +878 +879 +880 +881 +882 +883 +884 +885 +886 +887 +888 +889 +890 +891 +892 +893 +894 +895 +896 +897 +898 +899 +900 +901 +902 +903 +904 +905 +906 +907 +908 |
|
get_attr_name(attr_val)
+
+Get the name of an attribute that matches the value.
+ + +Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
+ attr_val
+ |
+
+ Any
+ |
+
+
+
+ The value of the attribute. + |
+ + required + | +
Returns:
+Type | +Description | +
---|---|
+ Union[str, int]
+ |
+
+
+
+ The name of the attribute. This can also be an int depending on the dict key + |
+
quam/core/quam_classes.py
818 +819 +820 +821 +822 +823 +824 +825 +826 +827 +828 +829 +830 +831 +832 +833 +834 +835 +836 +837 +838 |
|
get_unreferenced_value(attr)
+
+Get the value of an attribute without following references.
+ + +Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
+ attr
+ |
+
+ str
+ |
+
+
+
+ The name of the attribute. + |
+ + required + | +
Returns:
+Type | +Description | +
---|---|
+ bool
+ |
+
+
+
+ The value of the attribute. If the value is a reference, it returns the + |
+
+ bool
+ |
+
+
+
+ reference string instead of the value it is referencing. + |
+
quam/core/quam_classes.py
869 +870 +871 +872 +873 +874 +875 +876 +877 +878 +879 +880 +881 +882 +883 +884 +885 |
|
iterate_components(skip_elems=None)
+
+Iterate over all QuamBase objects in this object, including nested objects.
+ + +Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
+ skip_elems
+ |
+
+ Sequence[QuamBase]
+ |
+
+
+
+ A list of QuamBase objects to skip. +This is used to prevent infinite loops when iterating over nested +objects. + |
+
+ None
+ |
+
Returns:
+Type | +Description | +
---|---|
+ None
+ |
+
+
+
+ A generator of QuamBase objects. + |
+
quam/core/quam_classes.py
887 +888 +889 +890 +891 +892 +893 +894 +895 +896 +897 +898 +899 +900 +901 +902 +903 +904 +905 +906 +907 +908 |
|
QuamList
+
+
+
+ Bases: UserList
, QuamBase
A QuAM list class.
+Any list added to a QuamBase
object is automatically converted to a QuamList
.
+The QuamList
adds the following functionalities to a list:
+- Elements can be references (see below)
QuamList values can be references, which are strings that start with #
. See the
+documentation for details on references. An example is shown here:
+
d = QuamList([1, "#./0"]])
+assert d[1] == 1
+
This class is a subclass of QuamBase
, but also of UserList
. As a result,
+it can be used as a normal list, but it is not a subclass of list
.
quam/core/quam_classes.py
911 + 912 + 913 + 914 + 915 + 916 + 917 + 918 + 919 + 920 + 921 + 922 + 923 + 924 + 925 + 926 + 927 + 928 + 929 + 930 + 931 + 932 + 933 + 934 + 935 + 936 + 937 + 938 + 939 + 940 + 941 + 942 + 943 + 944 + 945 + 946 + 947 + 948 + 949 + 950 + 951 + 952 + 953 + 954 + 955 + 956 + 957 + 958 + 959 + 960 + 961 + 962 + 963 + 964 + 965 + 966 + 967 + 968 + 969 + 970 + 971 + 972 + 973 + 974 + 975 + 976 + 977 + 978 + 979 + 980 + 981 + 982 + 983 + 984 + 985 + 986 + 987 + 988 + 989 + 990 + 991 + 992 + 993 + 994 + 995 + 996 + 997 + 998 + 999 +1000 +1001 +1002 +1003 +1004 +1005 +1006 +1007 +1008 +1009 +1010 +1011 +1012 +1013 +1014 +1015 +1016 +1017 +1018 +1019 +1020 +1021 +1022 +1023 +1024 +1025 +1026 +1027 +1028 +1029 +1030 +1031 +1032 +1033 +1034 +1035 +1036 +1037 +1038 +1039 +1040 +1041 +1042 +1043 +1044 +1045 +1046 +1047 +1048 +1049 +1050 +1051 +1052 +1053 +1054 +1055 +1056 +1057 +1058 +1059 +1060 +1061 +1062 +1063 +1064 +1065 +1066 +1067 +1068 +1069 +1070 +1071 +1072 +1073 +1074 +1075 +1076 +1077 +1078 +1079 +1080 +1081 +1082 +1083 +1084 +1085 +1086 +1087 +1088 +1089 +1090 +1091 +1092 +1093 +1094 +1095 +1096 +1097 +1098 +1099 +1100 +1101 +1102 +1103 +1104 +1105 +1106 +1107 +1108 +1109 +1110 +1111 +1112 +1113 +1114 +1115 +1116 +1117 |
|
iterate_components(skip_elems=None)
+
+Iterate over all QuamBase objects in this object, including nested objects.
+ + +Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
+ skip_elems
+ |
+
+ List[QuamBase]
+ |
+
+
+
+ A list of QuamBase objects to skip. +This is used to prevent infinite loops when iterating over nested +objects. + |
+
+ None
+ |
+
Returns:
+Type | +Description | +
---|---|
+ None
+ |
+
+
+
+ A generator of QuamBase objects. + |
+
quam/core/quam_classes.py
1061 +1062 +1063 +1064 +1065 +1066 +1067 +1068 +1069 +1070 +1071 +1072 +1073 +1074 +1075 +1076 +1077 +1078 +1079 +1080 +1081 +1082 |
|
print_summary(indent=0)
+
+Print a summary of the QuamBase object.
+ + +Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
+ indent
+ |
+
+ int
+ |
+
+
+
+ The number of spaces to indent the summary. + |
+
+ 0
+ |
+
quam/core/quam_classes.py
1089 +1090 +1091 +1092 +1093 +1094 +1095 +1096 +1097 +1098 +1099 +1100 +1101 +1102 +1103 +1104 +1105 +1106 +1107 +1108 +1109 +1110 +1111 +1112 +1113 +1114 +1115 +1116 +1117 |
|
to_dict(follow_references=False, include_defaults=False)
+
+Convert this object to a list, usually as part of a dictionary representation.
+ + +Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
+ follow_references
+ |
+
+ bool
+ |
+
+
+
+ Whether to follow references when getting the value. +If False, the reference will be returned as a string. + |
+
+ False
+ |
+
+ include_defaults
+ |
+
+ bool
+ |
+
+
+
+ Whether to include attributes that have the default +value. + |
+
+ False
+ |
+
Returns:
+Type | +Description | +
---|---|
+ list
+ |
+
+
+
+ A list with the values of this object. Any QuamBase objects will be + |
+
+ list
+ |
+
+
+
+ recursively converted to dictionaries. + |
+
If the value of an attribute does not match the annotation of
+QuamList._value_annotation
, the "__class__"
key will be added to the
+dictionary. This is to ensure that the object can be reconstructed when
+loading from a file.
quam/core/quam_classes.py
1025 +1026 +1027 +1028 +1029 +1030 +1031 +1032 +1033 +1034 +1035 +1036 +1037 +1038 +1039 +1040 +1041 +1042 +1043 +1044 +1045 +1046 +1047 +1048 +1049 +1050 +1051 +1052 +1053 +1054 +1055 +1056 +1057 +1058 +1059 |
|
QuamRoot
+
+
+
+ Bases: QuamBase
Base class for the root of a QuAM object.
+This class should be subclassed and made a dataclass.
+ + +Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
+ serialiser
+ |
+ + | +
+
+
+ The serialiser class to use for saving and loading.
+The default is to use the |
+ + required + | +
This class should not be used directly, but should generally be subclassed and +made a dataclass. The dataclass fields should correspond to the QuAM root +structure.
+Upon instantiating a QuamRoot
object, it sets the class attribute
+QuamBase._root
to itself. This is used such that any references with an
+absolute path are resolved from the root.
quam/core/quam_classes.py
550 +551 +552 +553 +554 +555 +556 +557 +558 +559 +560 +561 +562 +563 +564 +565 +566 +567 +568 +569 +570 +571 +572 +573 +574 +575 +576 +577 +578 +579 +580 +581 +582 +583 +584 +585 +586 +587 +588 +589 +590 +591 +592 +593 +594 +595 +596 +597 +598 +599 +600 +601 +602 +603 +604 +605 +606 +607 +608 +609 +610 +611 +612 +613 +614 +615 +616 +617 +618 +619 +620 +621 +622 +623 +624 +625 +626 +627 +628 +629 +630 +631 +632 +633 +634 +635 +636 +637 +638 +639 +640 +641 +642 +643 +644 +645 +646 +647 +648 +649 +650 +651 +652 +653 +654 +655 +656 +657 +658 +659 +660 +661 +662 +663 +664 +665 +666 +667 +668 +669 +670 +671 +672 +673 +674 +675 +676 +677 +678 +679 +680 +681 +682 +683 +684 +685 +686 |
|
generate_config()
+
+Generate the QUA configuration from the QuAM object.
+ + +Returns:
+Type | +Description | +
---|---|
+ Dict[str, Any]
+ |
+
+
+
+ A dictionary with the QUA configuration. + |
+
This function collects all the nested QuamComponent objects and calls
+QuamComponent.apply_to_config
on them.
quam/core/quam_classes.py
663 +664 +665 +666 +667 +668 +669 +670 +671 +672 +673 +674 +675 +676 +677 +678 +679 +680 +681 +682 +683 |
|
load(filepath_or_dict, validate_type=True, fix_attrs=True)
+
+
+ classmethod
+
+
+Load a QuamRoot object from a file.
+ + +Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
+ filepath_or_dict
+ |
+
+ Union[str, Path, dict]
+ |
+
+
+
+ The path to the file/folder to load, or a dictionary.
+The dictionary would be the result from a call to |
+ + required + | +
+ validate_type
+ |
+
+ bool
+ |
+
+
+
+ Whether to validate the type of all attributes while loading. + |
+
+ True
+ |
+
+ fix_attrs
+ |
+
+ bool
+ |
+
+
+
+ Whether attributes can be added to QuamBase objects that are not +defined as dataclass fields. + |
+
+ True
+ |
+
Returns:
+Type | +Description | +
---|---|
+ QuamRootType
+ |
+
+
+
+ A QuamRoot object instantiated from the file/folder/dict. + |
+
quam/core/quam_classes.py
631 +632 +633 +634 +635 +636 +637 +638 +639 +640 +641 +642 +643 +644 +645 +646 +647 +648 +649 +650 +651 +652 +653 +654 +655 +656 +657 +658 +659 +660 +661 |
|
save(path=None, content_mapping=None, include_defaults=False, ignore=None)
+
+Save the entire QuamRoot object to a file. This includes nested objects.
+ + +Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
+ path
+ |
+
+ Union[Path, str]
+ |
+
+
+
+ The path to save the file to. If None, the path will be saved to
+ |
+
+ None
+ |
+
+ content_mapping
+ |
+
+ Dict[str, str]
+ |
+
+
+
+ A dictionary of paths to save to and a list of attributes +to save to that path. This can be used to save different parts of the +QuamRoot object to different files. + |
+
+ None
+ |
+
+ include_defaults
+ |
+
+ bool
+ |
+
+
+
+ Whether to include attributes that have the default +value. + |
+
+ False
+ |
+
+ ignore
+ |
+
+ Sequence[str]
+ |
+
+
+
+ A list of attributes to ignore. + |
+
+ None
+ |
+
quam/core/quam_classes.py
586 +587 +588 +589 +590 +591 +592 +593 +594 +595 +596 +597 +598 +599 +600 +601 +602 +603 +604 +605 +606 +607 +608 +609 +610 +611 +612 |
|
to_dict(follow_references=False, include_defaults=False)
+
+Convert this object to a dictionary.
+ + +Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
+ follow_references
+ |
+
+ bool
+ |
+
+
+
+ Whether to follow references when getting the value. +If False, the reference will be returned as a string. + |
+
+ False
+ |
+
+ include_defaults
+ |
+
+ bool
+ |
+
+
+
+ Whether to include attributes that have the default +value. + |
+
+ False
+ |
+
quam/core/quam_classes.py
614 +615 +616 +617 +618 +619 +620 +621 +622 +623 +624 +625 +626 +627 +628 +629 |
|
convert_dict_and_list(value, cls_or_obj=None, attr=None)
+
+Convert a dict or list to a QuamDict or QuamList if possible.
+ +quam/core/quam_classes.py
72 +73 +74 +75 +76 +77 +78 +79 +80 +81 |
|
sort_quam_components(components, max_attempts=5)
+
+Sort QuamComponent objects based on their config_settings.
+ + +Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
+ components
+ |
+
+ List[QuamComponent]
+ |
+
+
+
+ A list of QuamComponent objects. + |
+ + required + | +
+ max_attempts
+ |
+ + | +
+
+
+ The maximum number of attempts to sort the components. +If the components aren't yet properly sorted after all these attempts, +a warning is raised and the components are returned in the final attempted +ordering. + |
+
+ 5
+ |
+
Returns:
+Type | +Description | +
---|---|
+ List[QuamComponent]
+ |
+
+
+
+ A sorted list of QuamComponent objects. + |
+
This function is used by
+QuamRoot.generate_config
+to determine the order in which to add the components to the QUA config.
+This sorting isn't guaranteed to be successful.
quam/core/quam_classes.py
84 + 85 + 86 + 87 + 88 + 89 + 90 + 91 + 92 + 93 + 94 + 95 + 96 + 97 + 98 + 99 +100 +101 +102 +103 +104 +105 +106 +107 +108 +109 +110 +111 +112 +113 +114 +115 +116 +117 +118 +119 +120 +121 +122 +123 +124 +125 +126 +127 +128 +129 +130 +131 +132 +133 +134 +135 +136 +137 +138 +139 +140 +141 |
|
QuamBase
+
+
+
+ Bases: ReferenceClass
Base class for any QuAM component class.
+ + +Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
+ parent
+ |
+ + | +
+
+
+ The parent of this object. This is automatically set when adding +this object to another QuamBase object. + |
+ + required + | +
+ _root
+ |
+ + | +
+
+
+ The QuamRoot object. This is automatically set when instantiating +a QuamRoot object. + |
+ + required + | +
+ config_settings
+ |
+ + | +
+
+
+ A dictionary of configuration settings for this object.
+This is used by |
+ + required + | +
This class should not be used directly, but should generally be subclassed. +The subclasses should be dataclasses.
+quam/core/quam_classes.py
222 +223 +224 +225 +226 +227 +228 +229 +230 +231 +232 +233 +234 +235 +236 +237 +238 +239 +240 +241 +242 +243 +244 +245 +246 +247 +248 +249 +250 +251 +252 +253 +254 +255 +256 +257 +258 +259 +260 +261 +262 +263 +264 +265 +266 +267 +268 +269 +270 +271 +272 +273 +274 +275 +276 +277 +278 +279 +280 +281 +282 +283 +284 +285 +286 +287 +288 +289 +290 +291 +292 +293 +294 +295 +296 +297 +298 +299 +300 +301 +302 +303 +304 +305 +306 +307 +308 +309 +310 +311 +312 +313 +314 +315 +316 +317 +318 +319 +320 +321 +322 +323 +324 +325 +326 +327 +328 +329 +330 +331 +332 +333 +334 +335 +336 +337 +338 +339 +340 +341 +342 +343 +344 +345 +346 +347 +348 +349 +350 +351 +352 +353 +354 +355 +356 +357 +358 +359 +360 +361 +362 +363 +364 +365 +366 +367 +368 +369 +370 +371 +372 +373 +374 +375 +376 +377 +378 +379 +380 +381 +382 +383 +384 +385 +386 +387 +388 +389 +390 +391 +392 +393 +394 +395 +396 +397 +398 +399 +400 +401 +402 +403 +404 +405 +406 +407 +408 +409 +410 +411 +412 +413 +414 +415 +416 +417 +418 +419 +420 +421 +422 +423 +424 +425 +426 +427 +428 +429 +430 +431 +432 +433 +434 +435 +436 +437 +438 +439 +440 +441 +442 +443 +444 +445 +446 +447 +448 +449 +450 +451 +452 +453 +454 +455 +456 +457 +458 +459 +460 +461 +462 +463 +464 +465 +466 +467 +468 +469 +470 +471 +472 +473 +474 +475 +476 +477 +478 +479 +480 +481 +482 +483 +484 +485 +486 +487 +488 +489 +490 +491 +492 +493 +494 +495 +496 +497 +498 +499 +500 +501 +502 +503 +504 +505 +506 +507 +508 +509 +510 +511 +512 +513 +514 +515 +516 +517 +518 +519 +520 +521 +522 +523 +524 +525 +526 +527 +528 +529 +530 +531 +532 +533 +534 +535 +536 +537 +538 +539 +540 +541 +542 +543 |
|
get_attr_name(attr_val)
+
+Get the name of an attribute that matches the value.
+ + +Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
+ attr_val
+ |
+
+ Any
+ |
+
+
+
+ The value of the attribute. + |
+ + required + | +
Returns:
+Type | +Description | +
---|---|
+ str
+ |
+
+
+
+ The name of the attribute. + |
+
quam/core/quam_classes.py
272 +273 +274 +275 +276 +277 +278 +279 +280 +281 +282 +283 +284 +285 +286 +287 +288 +289 +290 +291 +292 |
|
get_attrs(follow_references=False, include_defaults=True)
+
+Get all attributes and corresponding values of this object.
+ + +Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
+ follow_references
+ |
+
+ bool
+ |
+
+
+
+ Whether to follow references when getting the value. +If False, the reference will be returned as a string. + |
+
+ False
+ |
+
+ include_defaults
+ |
+
+ bool
+ |
+
+
+
+ Whether to include attributes that have the default +value. + |
+
+ True
+ |
+
Returns:
+Type | +Description | +
---|---|
+ Dict[str, Any]
+ |
+
+
+
+ A dictionary of attribute names and values. + |
+
quam/core/quam_classes.py
365 +366 +367 +368 +369 +370 +371 +372 +373 +374 +375 +376 +377 +378 +379 +380 +381 +382 +383 +384 +385 +386 +387 +388 +389 +390 +391 +392 +393 +394 +395 +396 |
|
get_reference(attr=None)
+
+Get the reference path of this object.
+ + +Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
+ attr
+ |
+ + | +
+
+
+ The attribute to get the reference path for. If None, the reference +path of the object itself is returned. + |
+
+ None
+ |
+
Returns:
+Type | +Description | +
---|---|
+ Optional[str]
+ |
+
+
+
+ The reference path of this object. + |
+
quam/core/quam_classes.py
345 +346 +347 +348 +349 +350 +351 +352 +353 +354 +355 +356 +357 +358 +359 +360 +361 +362 +363 |
|
iterate_components(skip_elems=None)
+
+Iterate over all QuamBase objects in this object, including nested objects.
+ + +Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
+ skip_elems
+ |
+
+ bool
+ |
+
+
+
+ A list of QuamBase objects to skip. +This is used to prevent infinite loops when iterating over nested +objects. + |
+
+ None
+ |
+
Returns:
+Type | +Description | +
---|---|
+ None
+ |
+
+
+
+ A generator of QuamBase objects. + |
+
quam/core/quam_classes.py
434 +435 +436 +437 +438 +439 +440 +441 +442 +443 +444 +445 +446 +447 +448 +449 +450 +451 +452 +453 +454 +455 +456 +457 +458 +459 +460 +461 +462 +463 +464 +465 |
|
print_summary(indent=0)
+
+Print a summary of the QuamBase object.
+ + +Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
+ indent
+ |
+
+ int
+ |
+
+
+
+ The number of spaces to indent the summary. + |
+
+ 0
+ |
+
quam/core/quam_classes.py
515 +516 +517 +518 +519 +520 +521 +522 +523 +524 +525 +526 +527 +528 +529 +530 +531 +532 +533 +534 +535 +536 +537 +538 +539 +540 +541 +542 +543 |
|
to_dict(follow_references=False, include_defaults=False)
+
+Convert this object to a dictionary.
+ + +Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
+ follow_references
+ |
+
+ bool
+ |
+
+
+
+ Whether to follow references when getting the value. +If False, the reference will be returned as a string. + |
+
+ False
+ |
+
+ include_defaults
+ |
+
+ bool
+ |
+
+
+
+ Whether to include attributes that have the default + |
+
+ False
+ |
+
Returns:
+Type | +Description | +
---|---|
+ Dict[str, Any]
+ |
+
+
+
+ A dictionary representation of this object. + |
+
+ Dict[str, Any]
+ |
+
+
+
+ Any QuamBase objects will be recursively converted to dictionaries. + |
+
If the value of an attribute does not match the annotation, the
+"__class__"
key will be added to the dictionary. This is to ensure
+that the object can be reconstructed when loading from a file.
quam/core/quam_classes.py
398 +399 +400 +401 +402 +403 +404 +405 +406 +407 +408 +409 +410 +411 +412 +413 +414 +415 +416 +417 +418 +419 +420 +421 +422 +423 +424 +425 +426 +427 +428 +429 +430 +431 +432 |
|
QuamRoot
+
+
+
+ Bases: QuamBase
Base class for the root of a QuAM object.
+This class should be subclassed and made a dataclass.
+ + +Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
+ serialiser
+ |
+ + | +
+
+
+ The serialiser class to use for saving and loading.
+The default is to use the |
+ + required + | +
This class should not be used directly, but should generally be subclassed and +made a dataclass. The dataclass fields should correspond to the QuAM root +structure.
+Upon instantiating a QuamRoot
object, it sets the class attribute
+QuamBase._root
to itself. This is used such that any references with an
+absolute path are resolved from the root.
quam/core/quam_classes.py
550 +551 +552 +553 +554 +555 +556 +557 +558 +559 +560 +561 +562 +563 +564 +565 +566 +567 +568 +569 +570 +571 +572 +573 +574 +575 +576 +577 +578 +579 +580 +581 +582 +583 +584 +585 +586 +587 +588 +589 +590 +591 +592 +593 +594 +595 +596 +597 +598 +599 +600 +601 +602 +603 +604 +605 +606 +607 +608 +609 +610 +611 +612 +613 +614 +615 +616 +617 +618 +619 +620 +621 +622 +623 +624 +625 +626 +627 +628 +629 +630 +631 +632 +633 +634 +635 +636 +637 +638 +639 +640 +641 +642 +643 +644 +645 +646 +647 +648 +649 +650 +651 +652 +653 +654 +655 +656 +657 +658 +659 +660 +661 +662 +663 +664 +665 +666 +667 +668 +669 +670 +671 +672 +673 +674 +675 +676 +677 +678 +679 +680 +681 +682 +683 +684 +685 +686 |
|
generate_config()
+
+Generate the QUA configuration from the QuAM object.
+ + +Returns:
+Type | +Description | +
---|---|
+ Dict[str, Any]
+ |
+
+
+
+ A dictionary with the QUA configuration. + |
+
This function collects all the nested QuamComponent objects and calls
+QuamComponent.apply_to_config
on them.
quam/core/quam_classes.py
663 +664 +665 +666 +667 +668 +669 +670 +671 +672 +673 +674 +675 +676 +677 +678 +679 +680 +681 +682 +683 |
|
load(filepath_or_dict, validate_type=True, fix_attrs=True)
+
+
+ classmethod
+
+
+Load a QuamRoot object from a file.
+ + +Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
+ filepath_or_dict
+ |
+
+ Union[str, Path, dict]
+ |
+
+
+
+ The path to the file/folder to load, or a dictionary.
+The dictionary would be the result from a call to |
+ + required + | +
+ validate_type
+ |
+
+ bool
+ |
+
+
+
+ Whether to validate the type of all attributes while loading. + |
+
+ True
+ |
+
+ fix_attrs
+ |
+
+ bool
+ |
+
+
+
+ Whether attributes can be added to QuamBase objects that are not +defined as dataclass fields. + |
+
+ True
+ |
+
Returns:
+Type | +Description | +
---|---|
+ QuamRootType
+ |
+
+
+
+ A QuamRoot object instantiated from the file/folder/dict. + |
+
quam/core/quam_classes.py
631 +632 +633 +634 +635 +636 +637 +638 +639 +640 +641 +642 +643 +644 +645 +646 +647 +648 +649 +650 +651 +652 +653 +654 +655 +656 +657 +658 +659 +660 +661 |
|
save(path=None, content_mapping=None, include_defaults=False, ignore=None)
+
+Save the entire QuamRoot object to a file. This includes nested objects.
+ + +Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
+ path
+ |
+
+ Union[Path, str]
+ |
+
+
+
+ The path to save the file to. If None, the path will be saved to
+ |
+
+ None
+ |
+
+ content_mapping
+ |
+
+ Dict[str, str]
+ |
+
+
+
+ A dictionary of paths to save to and a list of attributes +to save to that path. This can be used to save different parts of the +QuamRoot object to different files. + |
+
+ None
+ |
+
+ include_defaults
+ |
+
+ bool
+ |
+
+
+
+ Whether to include attributes that have the default +value. + |
+
+ False
+ |
+
+ ignore
+ |
+
+ Sequence[str]
+ |
+
+
+
+ A list of attributes to ignore. + |
+
+ None
+ |
+
quam/core/quam_classes.py
586 +587 +588 +589 +590 +591 +592 +593 +594 +595 +596 +597 +598 +599 +600 +601 +602 +603 +604 +605 +606 +607 +608 +609 +610 +611 +612 |
|
to_dict(follow_references=False, include_defaults=False)
+
+Convert this object to a dictionary.
+ + +Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
+ follow_references
+ |
+
+ bool
+ |
+
+
+
+ Whether to follow references when getting the value. +If False, the reference will be returned as a string. + |
+
+ False
+ |
+
+ include_defaults
+ |
+
+ bool
+ |
+
+
+
+ Whether to include attributes that have the default +value. + |
+
+ False
+ |
+
quam/core/quam_classes.py
614 +615 +616 +617 +618 +619 +620 +621 +622 +623 +624 +625 +626 +627 +628 +629 |
|
QuamComponent
+
+
+
+ Bases: QuamBase
Base class for any QuAM component class.
+Examples of QuamComponent classes are Mixer
,
+LocalOscillator
,
+Pulse
, etc.
This class should be subclassed and made a dataclass.
+quam/core/quam_classes.py
689 +690 +691 +692 +693 +694 +695 +696 +697 +698 +699 +700 +701 +702 +703 +704 +705 +706 +707 +708 +709 +710 +711 +712 +713 +714 +715 +716 +717 +718 +719 +720 +721 |
|
apply_to_config(config)
+
+Add information to the QUA configuration, such as pulses and waveforms.
+ + +Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
+ config
+ |
+
+ dict
+ |
+
+
+
+ The QUA configuration dictionary. Initially this is a nearly empty +dictionary, but + |
+ + required + | +
This function is called by
+QuamRoot.generate_config
.
The config has a starting template, defined at quam.core.qua_config_template
quam/core/quam_classes.py
707 +708 +709 +710 +711 +712 +713 +714 +715 +716 +717 +718 +719 +720 +721 |
|
QuamDict
+
+
+
+ Bases: UserDict
, QuamBase
A QuAM dictionary class.
+Any dict added to a QuamBase
object is automatically converted to a QuamDict
.
+The QuamDict
adds the following functionalities to a dict:
+- Values can be references (see below)
+- Keys can also be accessed through attributes (e.g. d.a
instead of d["a"]
)
QuamDict values can be references, which are strings that start with #
. See the
+documentation for details on references. An example is shown here:
+
d = QuamDict({"a": 1, "b": "#./a"})
+assert d["b"] == 1
+
This class is a subclass of QuamBase
, but also of UserDict
. As a result,
+it can be used as a normal dictionary, but it is not a subclass of dict
.
quam/core/quam_classes.py
724 +725 +726 +727 +728 +729 +730 +731 +732 +733 +734 +735 +736 +737 +738 +739 +740 +741 +742 +743 +744 +745 +746 +747 +748 +749 +750 +751 +752 +753 +754 +755 +756 +757 +758 +759 +760 +761 +762 +763 +764 +765 +766 +767 +768 +769 +770 +771 +772 +773 +774 +775 +776 +777 +778 +779 +780 +781 +782 +783 +784 +785 +786 +787 +788 +789 +790 +791 +792 +793 +794 +795 +796 +797 +798 +799 +800 +801 +802 +803 +804 +805 +806 +807 +808 +809 +810 +811 +812 +813 +814 +815 +816 +817 +818 +819 +820 +821 +822 +823 +824 +825 +826 +827 +828 +829 +830 +831 +832 +833 +834 +835 +836 +837 +838 +839 +840 +841 +842 +843 +844 +845 +846 +847 +848 +849 +850 +851 +852 +853 +854 +855 +856 +857 +858 +859 +860 +861 +862 +863 +864 +865 +866 +867 +868 +869 +870 +871 +872 +873 +874 +875 +876 +877 +878 +879 +880 +881 +882 +883 +884 +885 +886 +887 +888 +889 +890 +891 +892 +893 +894 +895 +896 +897 +898 +899 +900 +901 +902 +903 +904 +905 +906 +907 +908 |
|
get_attr_name(attr_val)
+
+Get the name of an attribute that matches the value.
+ + +Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
+ attr_val
+ |
+
+ Any
+ |
+
+
+
+ The value of the attribute. + |
+ + required + | +
Returns:
+Type | +Description | +
---|---|
+ Union[str, int]
+ |
+
+
+
+ The name of the attribute. This can also be an int depending on the dict key + |
+
quam/core/quam_classes.py
818 +819 +820 +821 +822 +823 +824 +825 +826 +827 +828 +829 +830 +831 +832 +833 +834 +835 +836 +837 +838 |
|
get_unreferenced_value(attr)
+
+Get the value of an attribute without following references.
+ + +Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
+ attr
+ |
+
+ str
+ |
+
+
+
+ The name of the attribute. + |
+ + required + | +
Returns:
+Type | +Description | +
---|---|
+ bool
+ |
+
+
+
+ The value of the attribute. If the value is a reference, it returns the + |
+
+ bool
+ |
+
+
+
+ reference string instead of the value it is referencing. + |
+
quam/core/quam_classes.py
869 +870 +871 +872 +873 +874 +875 +876 +877 +878 +879 +880 +881 +882 +883 +884 +885 |
|
iterate_components(skip_elems=None)
+
+Iterate over all QuamBase objects in this object, including nested objects.
+ + +Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
+ skip_elems
+ |
+
+ Sequence[QuamBase]
+ |
+
+
+
+ A list of QuamBase objects to skip. +This is used to prevent infinite loops when iterating over nested +objects. + |
+
+ None
+ |
+
Returns:
+Type | +Description | +
---|---|
+ None
+ |
+
+
+
+ A generator of QuamBase objects. + |
+
quam/core/quam_classes.py
887 +888 +889 +890 +891 +892 +893 +894 +895 +896 +897 +898 +899 +900 +901 +902 +903 +904 +905 +906 +907 +908 |
|
QuamList
+
+
+
+ Bases: UserList
, QuamBase
A QuAM list class.
+Any list added to a QuamBase
object is automatically converted to a QuamList
.
+The QuamList
adds the following functionalities to a list:
+- Elements can be references (see below)
QuamList values can be references, which are strings that start with #
. See the
+documentation for details on references. An example is shown here:
+
d = QuamList([1, "#./0"]])
+assert d[1] == 1
+
This class is a subclass of QuamBase
, but also of UserList
. As a result,
+it can be used as a normal list, but it is not a subclass of list
.
quam/core/quam_classes.py
911 + 912 + 913 + 914 + 915 + 916 + 917 + 918 + 919 + 920 + 921 + 922 + 923 + 924 + 925 + 926 + 927 + 928 + 929 + 930 + 931 + 932 + 933 + 934 + 935 + 936 + 937 + 938 + 939 + 940 + 941 + 942 + 943 + 944 + 945 + 946 + 947 + 948 + 949 + 950 + 951 + 952 + 953 + 954 + 955 + 956 + 957 + 958 + 959 + 960 + 961 + 962 + 963 + 964 + 965 + 966 + 967 + 968 + 969 + 970 + 971 + 972 + 973 + 974 + 975 + 976 + 977 + 978 + 979 + 980 + 981 + 982 + 983 + 984 + 985 + 986 + 987 + 988 + 989 + 990 + 991 + 992 + 993 + 994 + 995 + 996 + 997 + 998 + 999 +1000 +1001 +1002 +1003 +1004 +1005 +1006 +1007 +1008 +1009 +1010 +1011 +1012 +1013 +1014 +1015 +1016 +1017 +1018 +1019 +1020 +1021 +1022 +1023 +1024 +1025 +1026 +1027 +1028 +1029 +1030 +1031 +1032 +1033 +1034 +1035 +1036 +1037 +1038 +1039 +1040 +1041 +1042 +1043 +1044 +1045 +1046 +1047 +1048 +1049 +1050 +1051 +1052 +1053 +1054 +1055 +1056 +1057 +1058 +1059 +1060 +1061 +1062 +1063 +1064 +1065 +1066 +1067 +1068 +1069 +1070 +1071 +1072 +1073 +1074 +1075 +1076 +1077 +1078 +1079 +1080 +1081 +1082 +1083 +1084 +1085 +1086 +1087 +1088 +1089 +1090 +1091 +1092 +1093 +1094 +1095 +1096 +1097 +1098 +1099 +1100 +1101 +1102 +1103 +1104 +1105 +1106 +1107 +1108 +1109 +1110 +1111 +1112 +1113 +1114 +1115 +1116 +1117 |
|
iterate_components(skip_elems=None)
+
+Iterate over all QuamBase objects in this object, including nested objects.
+ + +Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
+ skip_elems
+ |
+
+ List[QuamBase]
+ |
+
+
+
+ A list of QuamBase objects to skip. +This is used to prevent infinite loops when iterating over nested +objects. + |
+
+ None
+ |
+
Returns:
+Type | +Description | +
---|---|
+ None
+ |
+
+
+
+ A generator of QuamBase objects. + |
+
quam/core/quam_classes.py
1061 +1062 +1063 +1064 +1065 +1066 +1067 +1068 +1069 +1070 +1071 +1072 +1073 +1074 +1075 +1076 +1077 +1078 +1079 +1080 +1081 +1082 |
|
print_summary(indent=0)
+
+Print a summary of the QuamBase object.
+ + +Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
+ indent
+ |
+
+ int
+ |
+
+
+
+ The number of spaces to indent the summary. + |
+
+ 0
+ |
+
quam/core/quam_classes.py
1089 +1090 +1091 +1092 +1093 +1094 +1095 +1096 +1097 +1098 +1099 +1100 +1101 +1102 +1103 +1104 +1105 +1106 +1107 +1108 +1109 +1110 +1111 +1112 +1113 +1114 +1115 +1116 +1117 |
|
to_dict(follow_references=False, include_defaults=False)
+
+Convert this object to a list, usually as part of a dictionary representation.
+ + +Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
+ follow_references
+ |
+
+ bool
+ |
+
+
+
+ Whether to follow references when getting the value. +If False, the reference will be returned as a string. + |
+
+ False
+ |
+
+ include_defaults
+ |
+
+ bool
+ |
+
+
+
+ Whether to include attributes that have the default +value. + |
+
+ False
+ |
+
Returns:
+Type | +Description | +
---|---|
+ list
+ |
+
+
+
+ A list with the values of this object. Any QuamBase objects will be + |
+
+ list
+ |
+
+
+
+ recursively converted to dictionaries. + |
+
If the value of an attribute does not match the annotation of
+QuamList._value_annotation
, the "__class__"
key will be added to the
+dictionary. This is to ensure that the object can be reconstructed when
+loading from a file.
quam/core/quam_classes.py
1025 +1026 +1027 +1028 +1029 +1030 +1031 +1032 +1033 +1034 +1035 +1036 +1037 +1038 +1039 +1040 +1041 +1042 +1043 +1044 +1045 +1046 +1047 +1048 +1049 +1050 +1051 +1052 +1053 +1054 +1055 +1056 +1057 +1058 +1059 |
|
instantiate_attr(attr_val, expected_type, allow_none=False, fix_attrs=True, validate_type=True, str_repr='')
+
+Instantiate a single attribute which may be a QuamComponent
+ + +Note that references and None are not instantiated, nor validated.
+ + +Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
+ attr_val
+ |
+ + | +
+
+
+ The value of the to instantiate. + |
+ + required + | +
+ required_type
+ |
+ + | +
+
+
+ The required type of the attribute. + |
+ + required + | +
+ allow_none
+ |
+
+ bool
+ |
+
+
+
+ Whether None is allowed as a value even if it's the wrong type. + |
+
+ False
+ |
+
+ fix_attrs
+ |
+
+ bool
+ |
+
+
+
+ Whether to only allow attributes that have been defined in the class +Only included because it's passed on when instantiating QuamComponents. + |
+
+ True
+ |
+
+ validate_type
+ |
+
+ bool
+ |
+
+
+
+ Whether to validate the type of the attributes. +If True, a TypeError is raised if an attribute has the wrong type. + |
+
+ True
+ |
+
+ str_repr
+ |
+
+ str
+ |
+
+
+
+ A string representation of the object, used for error messages. + |
+
+ ''
+ |
+
Returns:
+Type | +Description | +
---|---|
+ | +
+
+
+ The instantiated attribute. + |
+
quam/core/quam_instantiation.py
121 +122 +123 +124 +125 +126 +127 +128 +129 +130 +131 +132 +133 +134 +135 +136 +137 +138 +139 +140 +141 +142 +143 +144 +145 +146 +147 +148 +149 +150 +151 +152 +153 +154 +155 +156 +157 +158 +159 +160 +161 +162 +163 +164 +165 +166 +167 +168 +169 +170 +171 +172 +173 +174 +175 +176 +177 +178 +179 +180 +181 +182 +183 +184 +185 +186 +187 +188 +189 +190 +191 +192 +193 +194 +195 +196 +197 +198 +199 +200 +201 +202 +203 +204 +205 +206 +207 +208 +209 +210 +211 +212 +213 +214 +215 +216 +217 +218 +219 +220 +221 +222 +223 +224 +225 +226 +227 +228 +229 +230 +231 +232 +233 +234 +235 +236 +237 +238 +239 +240 +241 +242 +243 +244 +245 |
|
instantiate_attrs(attr_annotations, contents, fix_attrs=True, validate_type=True, str_repr='')
+
+Instantiate attributes if they are or contain QuamComponents
+Dictionaries and lists are instantiated recursively
+ + +Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
+ attr_annotations
+ |
+
+ Dict[str, Dict[str, type]]
+ |
+
+
+
+ The attributes of the QuamComponent or QuamDict +together with their types. Grouped into "required", "optional" and "allowed" + |
+ + required + | +
+ contents
+ |
+
+ dict
+ |
+
+
+
+ The attr contents of the QuamRoot, QuamComponent or QuamDict. + |
+ + required + | +
+ fix_attrs
+ |
+
+ bool
+ |
+
+
+
+ Whether to only allow attributes that have been defined in the +class definition. If False, any attribute can be set. +QuamDicts are never fixed. + |
+
+ True
+ |
+
+ validate_type
+ |
+
+ bool
+ |
+
+
+
+ Whether to validate the type of the attributes. +A TypeError is raised if an attribute has the wrong type. + |
+
+ True
+ |
+
+ str_repr
+ |
+
+ str
+ |
+
+
+
+ A string representation of the object, used for error messages. + |
+
+ ''
+ |
+
Returns:
+Type | +Description | +
---|---|
+ Dict[str, Any]
+ |
+
+
+
+ A dictionary where each element has been instantiated if it is a QuamComponent + |
+
quam/core/quam_instantiation.py
248 +249 +250 +251 +252 +253 +254 +255 +256 +257 +258 +259 +260 +261 +262 +263 +264 +265 +266 +267 +268 +269 +270 +271 +272 +273 +274 +275 +276 +277 +278 +279 +280 +281 +282 +283 +284 +285 +286 +287 +288 +289 +290 +291 +292 +293 +294 +295 +296 +297 +298 +299 +300 +301 +302 +303 +304 +305 +306 +307 +308 +309 +310 |
|
instantiate_attrs_from_dict(attr_dict, required_type, fix_attrs=True, validate_type=True, str_repr='')
+
+Instantiate the QuamComponent attributes in a dict
+QuamComponents are only instantiated if required_type is typing.Dict and the value +subtype is a QuamComponent. In this case, the value is instantiated as a +QuamComponent. +Otherwise, no QuamComponents are instantiated.
+ + +Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
+ attr_dict
+ |
+
+ dict
+ |
+
+
+
+ The attributes to instantiate. + |
+ + required + | +
+ required_type
+ |
+
+ type
+ |
+
+
+
+ The required type of the attributes, either dict or typing.Dict. + |
+ + required + | +
+ fix_attrs
+ |
+
+ bool
+ |
+
+
+
+ Whether to only allow attributes that have been defined in the class +Only included because it's passed on when instantiating QuamComponents. + |
+
+ True
+ |
+
+ validate_type
+ |
+
+ bool
+ |
+
+
+
+ Whether to validate the type of the attributes. +A TypeError is raised if an attribute has the wrong type. + |
+
+ True
+ |
+
+ str_repr
+ |
+
+ str
+ |
+
+
+
+ A string representation of the object, used for error messages. + |
+
+ ''
+ |
+
Returns:
+Type | +Description | +
---|---|
+ dict
+ |
+
+
+
+ A dictionary with the instantiated attributes. + |
+
quam/core/quam_instantiation.py
27 +28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38 +39 +40 +41 +42 +43 +44 +45 +46 +47 +48 +49 +50 +51 +52 +53 +54 +55 +56 +57 +58 +59 +60 +61 +62 +63 +64 +65 +66 +67 +68 +69 +70 +71 |
|
instantiate_attrs_from_list(attr_list, required_type, fix_attrs=True, validate_type=True, str_repr='')
+
+Instantiate the QuamComponent attributes in a list
+QuamComponents are only instantiated if required_type is typing.List and the subtype +is a QuamComponent. In this case, the value is instantiated as a QuamComponent. +Otherwise, no QuamComponents are instantiated.
+ + +Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
+ attr_list
+ |
+
+ list
+ |
+
+
+
+ The attributes to instantiate. + |
+ + required + | +
+ required_type
+ |
+
+ type
+ |
+
+
+
+ The required type of the attributes, either list or typing.List. + |
+ + required + | +
+ fix_attrs
+ |
+
+ bool
+ |
+
+
+
+ Whether to only allow attributes that have been defined in the class +Only included because it's passed on when instantiating QuamComponents. + |
+
+ True
+ |
+
+ validate_type
+ |
+
+ bool
+ |
+
+
+
+ Whether to validate the type of the attributes. +A TypeError is raised if an attribute has the wrong type. + |
+
+ True
+ |
+
+ str_repr
+ |
+
+ str
+ |
+
+
+
+ A string representation of the object, used for error messages. + |
+
+ ''
+ |
+
Returns:
+Type | +Description | +
---|---|
+ list
+ |
+
+
+
+ A list with the instantiated attributes. + |
+
quam/core/quam_instantiation.py
74 + 75 + 76 + 77 + 78 + 79 + 80 + 81 + 82 + 83 + 84 + 85 + 86 + 87 + 88 + 89 + 90 + 91 + 92 + 93 + 94 + 95 + 96 + 97 + 98 + 99 +100 +101 +102 +103 +104 +105 +106 +107 +108 +109 +110 +111 +112 +113 +114 +115 +116 +117 +118 |
|
instantiate_quam_class(quam_class, contents, fix_attrs=True, validate_type=True, str_repr='')
+
+Instantiate a QuamBase from a dict
+Note that any nested QuamBases are instantiated recursively
+ + +Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
+ quam_class
+ |
+
+ type[QuamBase]
+ |
+
+
+
+ QuamBase class to instantiate + |
+ + required + | +
+ contents
+ |
+
+ dict
+ |
+
+
+
+ dict of attributes to instantiate the QuamBase with + |
+ + required + | +
+ fix_attrs
+ |
+
+ bool
+ |
+
+
+
+ Whether to only allow attributes that have been defined in the class +definition. If False, any attribute can be set. +QuamDicts are never fixed. + |
+
+ True
+ |
+
+ validate_type
+ |
+
+ bool
+ |
+
+
+
+ Whether to validate the type of the attributes. +A TypeError is raised if an attribute has the wrong type. + |
+
+ True
+ |
+
+ str_repr
+ |
+
+ str
+ |
+
+
+
+ A string representation of the object, used for error messages. + |
+
+ ''
+ |
+
Returns:
+Type | +Description | +
---|---|
+ QuamBase
+ |
+
+
+
+ QuamBase instance + |
+
quam/core/quam_instantiation.py
313 +314 +315 +316 +317 +318 +319 +320 +321 +322 +323 +324 +325 +326 +327 +328 +329 +330 +331 +332 +333 +334 +335 +336 +337 +338 +339 +340 +341 +342 +343 +344 +345 +346 +347 +348 +349 +350 +351 +352 +353 +354 +355 +356 +357 +358 +359 +360 +361 +362 +363 +364 +365 +366 +367 +368 +369 +370 +371 +372 +373 +374 +375 +376 +377 |
|
QuAM
+
+
+
+ Bases: QuamRoot
Example QuAM root component.
+ + + + + + +quam/examples/superconducting_qubits/components.py
27 +28 +29 +30 +31 +32 |
|
Transmon
+
+
+
+ Bases: QuamComponent
Example QuAM component for a transmon qubit.
+ + + + + + +quam/examples/superconducting_qubits/components.py
11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 |
|
create_quam_superconducting_referenced(num_qubits)
+
+Create a QuAM with a number of qubits.
+ + +Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
+ num_qubits
+ |
+
+ int
+ |
+
+
+
+ Number of qubits to create. + |
+ + required + | +
Returns:
+Name | Type | +Description | +
---|---|---|
QuamRoot |
+ QuamRoot
+ |
+
+
+
+ A QuAM with the specified number of qubits. + |
+
quam/examples/superconducting_qubits/generate_superconducting_quam.py
10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38 +39 +40 +41 +42 +43 +44 +45 +46 +47 +48 +49 +50 +51 +52 +53 +54 +55 +56 +57 +58 +59 +60 +61 +62 +63 +64 |
|
Welcome to the API Reference section of the Quantum Abstract Machine (QuAM) documentation. Here, you'll find comprehensive details on all components, classes, and methods that make up the QuAM framework. This documentation is designed to help developers understand and effectively utilize the powerful capabilities of QuAM for quantum computing applications.
+Core Components
+ Details on fundamental building blocks like QuamBase, QuamComponent and QuamRoot.
+ QuamBase
Channel Components
+ Learn about channel configurations and their operations within the QuAM framework.
Pulse Components
+ A detailed look at various pulse types and their properties used in quantum operations.
Hardware Components
+ Explore the hardware-related classes such as Mixer, LocalOscillator, and FrequencyConverter.
Octave Components
+ Documentation on the Octave
component and its associated up and down converters.
BasicQuAM Class
+ Details on the BasicQuAM
class, the root-level QuAM instance that serves as the entry point for QuAM configurations.
AbstractSerialiser
+
+
+Base class for serialisers.
+ + + + + + +quam/serialisation/base.py
9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 |
|
JSONSerialiser
+
+
+
+ Bases: AbstractSerialiser
Serialiser for QuAM objects to JSON files.
+ + +Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
+ default_filename
+ |
+ + | +
+
+
+ The default filename to save to when no filename is provided. + |
+ + required + | +
+ default_foldername
+ |
+ + | +
+
+
+ The default foldername to save to when no folder is
+provided. Only used when saving components to separate files, i.e. when
+ |
+ + required + | +
+ content_mapping
+ |
+ + | +
+
+
+ A dictionary mapping filenames to the keys of the contents +to be saved to that file. If not provided, all contents are saved to the +default file, otherwise a folder is created and the default file is saved +to that folder, and the contents are saved to the files specified in the +mapping. + |
+ + required + | +
quam/serialisation/json.py
12 + 13 + 14 + 15 + 16 + 17 + 18 + 19 + 20 + 21 + 22 + 23 + 24 + 25 + 26 + 27 + 28 + 29 + 30 + 31 + 32 + 33 + 34 + 35 + 36 + 37 + 38 + 39 + 40 + 41 + 42 + 43 + 44 + 45 + 46 + 47 + 48 + 49 + 50 + 51 + 52 + 53 + 54 + 55 + 56 + 57 + 58 + 59 + 60 + 61 + 62 + 63 + 64 + 65 + 66 + 67 + 68 + 69 + 70 + 71 + 72 + 73 + 74 + 75 + 76 + 77 + 78 + 79 + 80 + 81 + 82 + 83 + 84 + 85 + 86 + 87 + 88 + 89 + 90 + 91 + 92 + 93 + 94 + 95 + 96 + 97 + 98 + 99 +100 +101 +102 +103 +104 +105 +106 +107 +108 +109 +110 +111 +112 +113 +114 +115 +116 +117 +118 +119 +120 +121 +122 +123 +124 +125 +126 +127 +128 +129 +130 +131 +132 +133 +134 +135 +136 +137 +138 +139 +140 +141 +142 +143 +144 +145 +146 +147 +148 +149 +150 +151 +152 +153 +154 +155 +156 +157 +158 +159 +160 +161 +162 +163 +164 +165 +166 +167 +168 +169 +170 +171 +172 +173 +174 +175 +176 +177 +178 +179 +180 +181 +182 +183 +184 +185 |
|
load(path=None)
+
+Load a dictionary representation of a QuamRoot object from a JSON file.
+ + +Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
+ path
+ |
+
+ Union[Path, str]
+ |
+
+
+
+ The path to load from. If a folder is provided, the contents from all +JSON files in that folder are loaded and merged into a dictionary. +If a JSON file is provided, the contents of that file are loaded. + |
+
+ None
+ |
+
Returns:
+Type | +Description | +
---|---|
+ Dict[str, Any]
+ |
+
+
+
+ A dictionary representation of the QuamRoot object. + |
+
quam/serialisation/json.py
138 +139 +140 +141 +142 +143 +144 +145 +146 +147 +148 +149 +150 +151 +152 +153 +154 +155 +156 +157 +158 +159 +160 +161 +162 +163 +164 +165 +166 +167 +168 +169 +170 +171 +172 +173 +174 +175 +176 +177 +178 +179 +180 +181 +182 +183 +184 +185 |
|
save(quam_obj, path=None, content_mapping=None, include_defaults=False, ignore=None)
+
+Save a QuamRoot object to a JSON file.
+The save location depends on the path provided and the content_mapping. + No path, no component mapping -> save to default file + No path, component mapping -> Create folder, save to default file, + save components separately + JSON Path, no component mapping -> Save to json file + JSON Path, component mapping -> Save to json file, save components + separately + Folder Path, no component mapping -> Create folder, save to default file + Folder Path, component mapping -> Create folder, save to default file, + save components separately
+self.default_filename when content_mapping != None or no path provided
+self.default_foldername when content_mapping != None and path is not a
+ folder
+
+
+ quam/serialisation/json.py
78 + 79 + 80 + 81 + 82 + 83 + 84 + 85 + 86 + 87 + 88 + 89 + 90 + 91 + 92 + 93 + 94 + 95 + 96 + 97 + 98 + 99 +100 +101 +102 +103 +104 +105 +106 +107 +108 +109 +110 +111 +112 +113 +114 +115 +116 +117 +118 +119 +120 +121 +122 +123 +124 +125 +126 +127 +128 +129 +130 +131 +132 +133 +134 +135 +136 |
|
convert_int_keys(obj)
+
+Convert dictionary keys to integers if possible.
+ +quam/serialisation/json.py
188 +189 +190 +191 +192 +193 +194 +195 +196 +197 +198 +199 |
|
generate_config_final_actions(qua_config)
+
+Performs final actions on the generated qua config.
+This is called at the end of QuamRoot.generate_config()
.
+In this case it ensures that all analog outputs and inputs have a defined offset
Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
+ qua_config
+ |
+
+ dict
+ |
+
+
+
+ The generated qua config. + |
+ + required + | +
quam/utils/config.py
4 + 5 + 6 + 7 + 8 + 9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 |
|
REQUIRED
+
+
+Flag used by quam_dataclass
when a required dataclass arg needs a kwarg
quam/utils/dataclass.py
12 +13 +14 +15 |
|
dataclass_field_has_default(field)
+
+Check if a dataclass field has a default value
+ +quam/utils/dataclass.py
76 +77 +78 +79 +80 +81 +82 |
|
get_dataclass_attr_annotations(cls_or_obj)
+
+Get the attributes and annotations of a dataclass
+ + +Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
+ cls
+ |
+ + | +
+
+
+ The dataclass to get the attributes of. + |
+ + required + | +
Returns:
+Type | +Description | +
---|---|
+ Dict[str, Dict[str, type]]
+ |
+
+
+
+ A dictionary where the keys are "required", "optional" and "allowed". +- "required": Required attributes of the class. +- "optional": Optional attributes of the class, i.e. with a default value. +- "allowed": allowed attributes of the class := "required" + "optional". + |
+
+ Dict[str, Dict[str, type]]
+ |
+
+
+
+ For each key, the values are dictionaries with the attribute names as keys + |
+
+ Dict[str, Dict[str, type]]
+ |
+
+
+
+ and the attribute types as values. + |
+
quam/utils/dataclass.py
18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38 +39 +40 +41 +42 +43 +44 +45 +46 +47 +48 +49 +50 +51 +52 +53 +54 +55 +56 +57 +58 +59 +60 +61 +62 +63 +64 +65 +66 +67 +68 +69 +70 +71 +72 +73 |
|
handle_inherited_required_fields(cls)
+
+Adds a default REQUIRED flag for dataclass fields when necessary
+see quam_dataclass docs for details
+ +quam/utils/dataclass.py
85 + 86 + 87 + 88 + 89 + 90 + 91 + 92 + 93 + 94 + 95 + 96 + 97 + 98 + 99 +100 +101 +102 +103 +104 +105 +106 +107 +108 +109 +110 +111 +112 +113 |
|
patch_dataclass(module_name)
+
+Patch Python dataclass within a file to allow subclasses have args
+ + +Patch is only applied when Python < 3.10.
+This function should be called at the top of a file, before dataclasses are +defined: +
patch_dataclass(__name__) # Ensure dataclass "kw_only" also works with python < 3.10
+
Prior to Python 3.10, it was not possible for a dataclass to be a subclass of +another dataclass when +- the parent dataclass has an arg with default +- the child dataclass has a required arg
+From Python 3.10, this was fixed by including the flag @dataclass(kw_only=True). +To ensure QuAM remains compatible with Python <3.10, we include a method to patch +the dataclass such that it still works in the case described above.
+We achieve this by first checking if the above condition is met. If so, all the +args without a default value receive a default REQUIRED flag. The post_init method +is then overridden such that an error is raised whenever an attribute still has +the REQUIRED flag after instantiation.
+ + +The python dataclass is patched in a non-standard way by calling setattr
+on the module. This is done to ensure that the patch is not recognized by any
+static analysis tools, such as mypy. This is necessary as mypy otherwise will
+no longer recognize the dataclass as a dataclass.
quam/utils/dataclass.py
168 +169 +170 +171 +172 +173 +174 +175 +176 +177 +178 +179 +180 +181 +182 +183 +184 +185 +186 +187 +188 +189 +190 +191 +192 +193 +194 +195 +196 +197 +198 +199 +200 +201 +202 +203 +204 +205 +206 +207 |
|
get_class_from_path(class_str)
+
+Extract the class from a class path.
+ + +from quam.components import Mixer
+assert get_class_from_path("quam.components.hardware.Mixer") == Mixer
+
Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
+ class_str
+ |
+ + | +
+
+
+ The class path, e.g. "quam.components.hardware.Mixer" + |
+ + required + | +
Returns:
+Type | +Description | +
---|---|
+ type
+ |
+
+
+
+ Class object corresponding to the class path. + |
+
quam/utils/general.py
91 + 92 + 93 + 94 + 95 + 96 + 97 + 98 + 99 +100 +101 +102 +103 +104 +105 +106 +107 +108 +109 +110 +111 +112 +113 +114 +115 +116 |
|
get_full_class_path(cls_or_obj)
+
+Returns the full path of a class or object, including the module name.
+Example: +
from quam.components import Mixer
+assert get_full_class_path(Mixer) == "quam.components.hardware.Mixer"
+
Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
+ cls_or_obj
+ |
+
+ Union[type, object]
+ |
+
+
+
+ The class or object to get the path of. + |
+ + required + | +
Returns:
+Type | +Description | +
---|---|
+ str
+ |
+
+
+
+ The full path of the class or object. Generally this is of the form + |
+
+ str
+ |
+
+
+
+ "module_name.class_name". + |
+
quam/utils/general.py
13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38 +39 +40 +41 +42 +43 +44 +45 +46 |
|
validate_obj_type(elem, required_type, allow_none=True, str_repr='')
+
+Validate whether the object is an instance of the correct type
+References (strings starting with "#") are not checked. +None is always allowed.
+ + +Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
+ elem
+ |
+
+ Any
+ |
+
+
+
+ The object to validate the type of. + |
+ + required + | +
+ required_type
+ |
+
+ type
+ |
+
+
+
+ The required type of the object. + |
+ + required + | +
+ allow_none
+ |
+
+ bool
+ |
+
+
+
+ Whether None is allowed as a value even if it's the wrong type. + |
+
+ True
+ |
+
+ str_repr
+ |
+
+ str
+ |
+
+
+
+ A string representation of the object, used for error messages. + |
+
+ ''
+ |
+
Returns:
+Type | +Description | +
---|---|
+ None
+ |
+
+
+
+ None + |
+
quam/utils/general.py
49 +50 +51 +52 +53 +54 +55 +56 +57 +58 +59 +60 +61 +62 +63 +64 +65 +66 +67 +68 +69 +70 +71 +72 +73 +74 +75 +76 +77 +78 +79 +80 +81 +82 +83 +84 +85 +86 +87 +88 |
|
pulse_str_to_axis_axis_angle(pulse_str)
+
+Converts a pulse string to a tuple of axis and angle.
+ + +Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
+ pulse_str
+ |
+
+ str
+ |
+
+
+
+ A pulse string, e.g. 'X90'. + |
+ + required + | +
Returns:
+Name | Type | +Description | +
---|---|---|
axis |
+ str
+ |
+
+
+
+ The axis, one of "X", "Y" or "Z". + |
+
angle |
+ int
+ |
+
+
+
+ The rotation angle in degrees. + |
+
Raises:
+Type | +Description | +
---|---|
+ ValueError
+ |
+
+
+
+ If the pulse string is incorrect + |
+
quam/utils/pulse.py
7 + 8 + 9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31 |
|
ReferenceClass
+
+
+Class whose attributes can by references to other attributes
+ + + + + + +quam/utils/reference_class.py
7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + 15 + 16 + 17 + 18 + 19 + 20 + 21 + 22 + 23 + 24 + 25 + 26 + 27 + 28 + 29 + 30 + 31 + 32 + 33 + 34 + 35 + 36 + 37 + 38 + 39 + 40 + 41 + 42 + 43 + 44 + 45 + 46 + 47 + 48 + 49 + 50 + 51 + 52 + 53 + 54 + 55 + 56 + 57 + 58 + 59 + 60 + 61 + 62 + 63 + 64 + 65 + 66 + 67 + 68 + 69 + 70 + 71 + 72 + 73 + 74 + 75 + 76 + 77 + 78 + 79 + 80 + 81 + 82 + 83 + 84 + 85 + 86 + 87 + 88 + 89 + 90 + 91 + 92 + 93 + 94 + 95 + 96 + 97 + 98 + 99 +100 +101 +102 +103 +104 +105 |
|
__post_init__()
+
+Post init function
+ +quam/utils/reference_class.py
12 +13 +14 |
|
get_unreferenced_value(attr)
+
+Check if an attribute is a reference
+ +quam/utils/reference_class.py
30 +31 +32 |
|
get_referenced_value(obj, string, root=None)
+
+Get the value of a reference string
+A string reference is a string that starts with "#/", "#./" or "#../". +See documentation for details.
+ + +Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
+ string
+ |
+
+ str
+ |
+
+
+
+ The reference string + |
+ + required + | +
+ root
+ |
+ + | +
+
+
+ The root object to start the search from (default: None) +Only relevant if the string is an absolute reference. + |
+
+ None
+ |
+
Returns:
+Type | +Description | +
---|---|
+ Any
+ |
+
+
+
+ The value that the reference string points to + |
+
Raises:
+Type | +Description | +
---|---|
+ ValueError
+ |
+
+
+
+ If the string is not a valid reference + |
+
quam/utils/string_reference.py
94 + 95 + 96 + 97 + 98 + 99 +100 +101 +102 +103 +104 +105 +106 +107 +108 +109 +110 +111 +112 +113 +114 +115 +116 +117 +118 +119 +120 |
|
get_relative_reference_value(obj, string)
+
+Get the value of a reference string relative to an object
+Performs recursive calls to get the value of nested references
+ + +Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
+ string
+ |
+
+ str
+ |
+
+
+
+ The reference string + |
+ + required + | +
Returns:
+Type | +Description | +
---|---|
+ Any
+ |
+
+
+
+ The value of the reference string relative to the object + |
+
Raises:
+Type | +Description | +
---|---|
+ AttributeError
+ |
+
+
+
+ If the object does not have the attribute + |
+
quam/utils/string_reference.py
51 +52 +53 +54 +55 +56 +57 +58 +59 +60 +61 +62 +63 +64 +65 +66 +67 +68 +69 +70 +71 +72 +73 +74 +75 +76 +77 +78 +79 +80 +81 +82 +83 +84 +85 +86 +87 +88 +89 +90 +91 |
|
is_absolute_reference(string)
+
+Check if a string is an absolute reference
+A relative reference starts with "#./" or "#../" +An absolute reference starts with ":" but is not followed by "./" or "../"
+ +quam/utils/string_reference.py
18 +19 +20 +21 +22 +23 +24 +25 +26 |
|
is_reference(string)
+
+Check if a string is a reference,
+A reference should be a string that starts with "#/", "#./" or "#../"
+ +quam/utils/string_reference.py
8 + 9 +10 +11 +12 +13 +14 +15 |
|
split_next_attribute(string, splitter='/')
+
+Get the next attribute of a reference string, i.e. until a splitter (default: /)
+ + +Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
+ string
+ |
+
+ str
+ |
+
+
+
+ string to split + |
+ + required + | +
+ splitter
+ |
+
+ str
+ |
+
+
+
+ splitter to split the string at (default: "/") + |
+
+ '/'
+ |
+
Returns: + A tuple consisting of: + - A string of the next attribute, i.e. until the first splitter + - The remaining string from the first splitter
+ +quam/utils/string_reference.py
29 +30 +31 +32 +33 +34 +35 +36 +37 +38 +39 +40 +41 +42 +43 +44 +45 +46 +47 +48 |
|
type_is_optional(type_)
+
+Check if a type is Optional[T] for some type T.
+ + +Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
+ type_
+ |
+ + | +
+
+
+ The type to check. + |
+ + required + | +
Returns:
+Type | +Description | +
---|---|
+ bool
+ |
+
+
+
+ True if the type is Optional[T] for some type T, False otherwise. + |
+
This function does not check if the type is a Union of None and some other +type, only if it is a Union of exactly two types, one of which is None. +So Optional[Union[str, int]] will return False, but Optional[str] will return +True.
+quam/utils/type_checking.py
6 + 7 + 8 + 9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 |
|