Pulses
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 |
Source code in quam/components/pulses.py
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 |
|
apply_to_config(config)
Adds this readout pulse to the QUA configuration.
See QuamComponent.apply_to_config
for details.
Source code in quam/components/pulses.py
349 350 351 352 353 354 355 356 |
|
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. |
Source code in quam/components/pulses.py
319 320 321 322 323 324 325 326 327 |
|
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 |
Source code in quam/components/pulses.py
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 |
|
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 |
Source code in quam/components/pulses.py
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 |
|
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 |
Source code in quam/components/pulses.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 |
|
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 |
Source code in quam/components/pulses.py
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 |
|
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 |
Note
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"
.
Source code in quam/components/pulses.py
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 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 |
|
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.
Source code in quam/components/pulses.py
273 274 275 276 277 278 279 280 281 282 283 284 285 286 |
|
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]]
|
|
Source code in quam/components/pulses.py
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 |
|
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]]]
|
|
Source code in quam/components/pulses.py
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 |
|
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 |
Source code in quam/components/pulses.py
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 |
|
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 |
Source code in quam/components/pulses.py
566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 |
|
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 |
Source code in quam/components/pulses.py
591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 |
|
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 |
Source code in quam/components/pulses.py
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 |
|