{ "cells": [ { "cell_type": "code", "execution_count": 1, "id": "7371e260", "metadata": { "execution": { "iopub.execute_input": "2025-10-02T01:30:19.159112Z", "iopub.status.busy": "2025-10-02T01:30:19.158860Z", "iopub.status.idle": "2025-10-02T01:30:19.163093Z", "shell.execute_reply": "2025-10-02T01:30:19.162378Z" }, "nbsphinx": "hidden" }, "outputs": [], "source": [ "# Copyright 2025 Keysight Technologies Inc." ] }, { "cell_type": "raw", "id": "39d31d7e", "metadata": { "raw_mimetype": "text/restructuredtext" }, "source": [ "\n", ".. _envelopes:\n", "\n", "Introduction to pulse envelopes\n", "===============================\n", "\n", "This guide gives an overview of the types of pulse envelopes available in |QCS| and\n", "demonstrates how to initialize them, add them to waveforms in a programs, and plot\n", "them.\n", "\n", ".. note::\n", " :class: admonition-blue\n", "\n", " Throughout the examples in this tutorial we are using\n", " :py:class:`~keysight.qcs.channels.DCWaveform`\\s to demonstrate the\n", " envelopes. :ref:`rfwaveforms` shows how to generate the more commonly used\n", " :py:class:`~keysight.qcs.channels.RFWaveform`\\s with envelopes.\n" ] }, { "cell_type": "code", "execution_count": 2, "id": "efccca9d", "metadata": { "execution": { "iopub.execute_input": "2025-10-02T01:30:19.165101Z", "iopub.status.busy": "2025-10-02T01:30:19.164817Z", "iopub.status.idle": "2025-10-02T01:30:22.324220Z", "shell.execute_reply": "2025-10-02T01:30:22.323447Z" } }, "outputs": [], "source": [ "import keysight.qcs as qcs\n", "import numpy as np" ] }, { "cell_type": "raw", "id": "2d03f106", "metadata": { "raw_mimetype": "text/restructuredtext" }, "source": [ "\n", "Built-In Envelopes\n", "------------------\n", "\n", "Constant Envelope\n", "^^^^^^^^^^^^^^^^^\n", "\n", "A constant envelope is the simplest pulse shape. It realizes a constant amplitude for\n", "a duration. In this example we configure a program with one AWG channel and add a\n", "DC waveform with a constant envelope to it." ] }, { "cell_type": "code", "execution_count": 3, "id": "e362d6c7", "metadata": { "execution": { "iopub.execute_input": "2025-10-02T01:30:22.327556Z", "iopub.status.busy": "2025-10-02T01:30:22.327129Z", "iopub.status.idle": "2025-10-02T01:30:24.529874Z", "shell.execute_reply": "2025-10-02T01:30:24.528875Z" } }, "outputs": [ { "data": { "text/html": [ " \n", " " ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "application/vnd.plotly.v1+json": { "config": { "plotlyServerURL": "https://plot.ly" }, "data": [ { "dx": 1e-09, "legendgroup": "awg_channel, labels: (0,)", "legendgrouptitle": { "text": "awg_channel, labels: (0,)" }, "name": "Drive pulse for awg_channel, labels: (0,)", "type": "scatter", "x0": 0, "xaxis": "x", "y": [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ], "yaxis": "y" } ], "layout": { "annotations": [ { "font": { "size": 16 }, "showarrow": false, "text": "Waveforms for awg_channel, labels: (0,)", "x": 0.5, "xanchor": "center", "xref": "paper", "y": 1.0, "yanchor": "bottom", "yref": "paper" } ], "height": 500, "template": { "data": { "bar": [ { "marker": { "color": "#ad6aff", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "" } }, "type": "bar" }, { "marker": { "color": "#c97a88", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "" } }, "type": "bar" }, { "marker": { "color": "#ff005c", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "" } }, "type": "bar" }, { "marker": { "color": "#ff9000", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "" } }, "type": "bar" }, { "marker": { "color": "#00d539", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "" } }, "type": "bar" }, { "marker": { "color": "#00b287", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "" } }, "type": "bar" }, { "marker": { "color": "#ad6aff", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "/" } }, "type": "bar" }, { "marker": { "color": "#c97a88", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "/" } }, "type": "bar" }, { "marker": { "color": "#ff005c", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "/" } }, "type": "bar" }, { "marker": { "color": "#ff9000", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "/" } }, "type": "bar" }, { "marker": { "color": "#00d539", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "/" } }, "type": "bar" }, { "marker": { "color": "#00b287", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "/" } }, "type": "bar" }, { "marker": { "color": "#ad6aff", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "\\" } }, "type": "bar" }, { "marker": { "color": "#c97a88", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "\\" } }, "type": "bar" }, { "marker": { "color": "#ff005c", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "\\" } }, "type": "bar" }, { "marker": { "color": "#ff9000", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "\\" } }, "type": "bar" }, { "marker": { "color": "#00d539", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "\\" } }, "type": "bar" }, { "marker": { "color": "#00b287", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "\\" } }, "type": "bar" }, { "marker": { "color": "#ad6aff", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "x" } }, "type": "bar" }, { "marker": { "color": "#c97a88", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "x" } }, "type": "bar" }, { "marker": { "color": "#ff005c", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "x" } }, "type": "bar" }, { "marker": { "color": "#ff9000", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "x" } }, "type": "bar" }, { "marker": { "color": "#00d539", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "x" } }, "type": "bar" }, { "marker": { "color": "#00b287", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "x" } }, "type": "bar" }, { "marker": { "color": "#ad6aff", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "-" } }, "type": "bar" }, { "marker": { "color": "#c97a88", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "-" } }, "type": "bar" }, { "marker": { "color": "#ff005c", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "-" } }, "type": "bar" }, { "marker": { "color": "#ff9000", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "-" } }, "type": "bar" }, { "marker": { "color": "#00d539", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "-" } }, "type": "bar" }, { "marker": { "color": "#00b287", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "-" } }, "type": "bar" }, { "marker": { "color": "#ad6aff", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "|" } }, "type": "bar" }, { "marker": { "color": "#c97a88", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "|" } }, "type": "bar" }, { "marker": { "color": "#ff005c", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "|" } }, "type": "bar" }, { "marker": { "color": "#ff9000", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "|" } }, "type": "bar" }, { "marker": { "color": "#00d539", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "|" } }, "type": "bar" }, { "marker": { "color": "#00b287", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "|" } }, "type": "bar" }, { "marker": { "color": "#ad6aff", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "+" } }, "type": "bar" }, { "marker": { "color": "#c97a88", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "+" } }, "type": "bar" }, { "marker": { "color": "#ff005c", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "+" } }, "type": "bar" }, { "marker": { "color": "#ff9000", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "+" } }, "type": "bar" }, { "marker": { "color": "#00d539", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "+" } }, "type": "bar" }, { "marker": { "color": "#00b287", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "+" } }, "type": "bar" }, { "marker": { "color": "#ad6aff", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "." } }, "type": "bar" }, { "marker": { "color": "#c97a88", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "." } }, "type": "bar" }, { "marker": { "color": "#ff005c", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "." } }, "type": "bar" }, { "marker": { "color": "#ff9000", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "." } }, "type": "bar" }, { "marker": { "color": "#00d539", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "." } }, "type": "bar" }, { "marker": { "color": "#00b287", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "." } }, "type": "bar" } ], "scatter": [ { "line": { "color": "#ff005c" }, "marker": { "color": "#ff005c", "opacity": 0.5, "size": 8, "symbol": "circle" }, "type": "scatter" }, { "line": { "color": "#00d539" }, "marker": { "color": "#00d539", "opacity": 0.5, "size": 8, "symbol": "square" }, "type": "scatter" }, { "line": { "color": "#ad6aff" }, "marker": { "color": "#ad6aff", "opacity": 0.5, "size": 8, "symbol": "diamond" }, "type": "scatter" }, { "line": { "color": "#ff9000" }, "marker": { "color": "#ff9000", "opacity": 0.5, "size": 8, "symbol": "triangle-down" }, "type": "scatter" }, { "line": { "color": "#00b287" }, "marker": { "color": "#00b287", "opacity": 0.5, "size": 8, "symbol": "cross" }, "type": "scatter" }, { "line": { "color": "#c97a88" }, "marker": { "color": "#c97a88", "opacity": 0.5, "size": 8, "symbol": "hexagram" }, "type": "scatter" }, { "line": { "color": "#ff005c" }, "marker": { "color": "#ff005c", "opacity": 0.5, "size": 8, "symbol": "square" }, "type": "scatter" }, { "line": { "color": "#00d539" }, "marker": { "color": "#00d539", "opacity": 0.5, "size": 8, "symbol": "diamond" }, "type": "scatter" }, { "line": { "color": "#ad6aff" }, "marker": { "color": "#ad6aff", "opacity": 0.5, "size": 8, "symbol": "triangle-down" }, "type": "scatter" }, { "line": { "color": "#ff9000" }, "marker": { "color": "#ff9000", "opacity": 0.5, "size": 8, "symbol": "cross" }, "type": "scatter" }, { "line": { "color": "#00b287" }, "marker": { "color": "#00b287", "opacity": 0.5, "size": 8, "symbol": "hexagram" }, "type": "scatter" }, { "line": { "color": "#c97a88" }, "marker": { "color": "#c97a88", "opacity": 0.5, "size": 8, "symbol": "circle" }, "type": "scatter" }, { "line": { "color": "#ff005c" }, "marker": { "color": "#ff005c", "opacity": 0.5, "size": 8, "symbol": "diamond" }, "type": "scatter" }, { "line": { "color": "#00d539" }, "marker": { "color": "#00d539", "opacity": 0.5, "size": 8, "symbol": "triangle-down" }, "type": "scatter" }, { "line": { "color": "#ad6aff" }, "marker": { "color": "#ad6aff", "opacity": 0.5, "size": 8, "symbol": "cross" }, "type": "scatter" }, { "line": { "color": "#ff9000" }, "marker": { "color": "#ff9000", "opacity": 0.5, "size": 8, "symbol": "hexagram" }, "type": "scatter" }, { "line": { "color": "#00b287" }, "marker": { "color": "#00b287", "opacity": 0.5, "size": 8, "symbol": "circle" }, "type": "scatter" }, { "line": { "color": "#c97a88" }, "marker": { "color": "#c97a88", "opacity": 0.5, "size": 8, "symbol": "square" }, "type": "scatter" }, { "line": { "color": "#ff005c" }, "marker": { "color": "#ff005c", "opacity": 0.5, "size": 8, "symbol": "triangle-down" }, "type": "scatter" }, { "line": { "color": "#00d539" }, "marker": { "color": "#00d539", "opacity": 0.5, "size": 8, "symbol": "cross" }, "type": "scatter" }, { "line": { "color": "#ad6aff" }, "marker": { "color": "#ad6aff", "opacity": 0.5, "size": 8, "symbol": "hexagram" }, "type": "scatter" }, { "line": { "color": "#ff9000" }, "marker": { "color": "#ff9000", "opacity": 0.5, "size": 8, "symbol": "circle" }, "type": "scatter" }, { "line": { "color": "#00b287" }, "marker": { "color": "#00b287", "opacity": 0.5, "size": 8, "symbol": "square" }, "type": "scatter" }, { "line": { "color": "#c97a88" }, "marker": { "color": "#c97a88", "opacity": 0.5, "size": 8, "symbol": "diamond" }, "type": "scatter" }, { "line": { "color": "#ff005c" }, "marker": { "color": "#ff005c", "opacity": 0.5, "size": 8, "symbol": "cross" }, "type": "scatter" }, { "line": { "color": "#00d539" }, "marker": { "color": "#00d539", "opacity": 0.5, "size": 8, "symbol": "hexagram" }, "type": "scatter" }, { "line": { "color": "#ad6aff" }, "marker": { "color": "#ad6aff", "opacity": 0.5, "size": 8, "symbol": "circle" }, "type": "scatter" }, { "line": { "color": "#ff9000" }, "marker": { "color": "#ff9000", "opacity": 0.5, "size": 8, "symbol": "square" }, "type": "scatter" }, { "line": { "color": "#00b287" }, "marker": { "color": "#00b287", "opacity": 0.5, "size": 8, "symbol": "diamond" }, "type": "scatter" }, { "line": { "color": "#c97a88" }, "marker": { "color": "#c97a88", "opacity": 0.5, "size": 8, "symbol": "triangle-down" }, "type": "scatter" }, { "line": { "color": "#ff005c" }, "marker": { "color": "#ff005c", "opacity": 0.5, "size": 8, "symbol": "hexagram" }, "type": "scatter" }, { "line": { "color": "#00d539" }, "marker": { "color": "#00d539", "opacity": 0.5, "size": 8, "symbol": "circle" }, "type": "scatter" }, { "line": { "color": "#ad6aff" }, "marker": { "color": "#ad6aff", "opacity": 0.5, "size": 8, "symbol": "square" }, "type": "scatter" }, { "line": { "color": "#ff9000" }, "marker": { "color": "#ff9000", "opacity": 0.5, "size": 8, "symbol": "diamond" }, "type": "scatter" }, { "line": { "color": "#00b287" }, "marker": { "color": "#00b287", "opacity": 0.5, "size": 8, "symbol": "triangle-down" }, "type": "scatter" }, { "line": { "color": "#c97a88" }, "marker": { "color": "#c97a88", "opacity": 0.5, "size": 8, "symbol": "cross" }, "type": "scatter" } ], "violin": [ { "box": { "visible": true }, "line": { "color": "#ff005c" }, "marker": { "color": "#ff005c", "opacity": 0.5, "size": 8, "symbol": "circle" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#00d539" }, "marker": { "color": "#00d539", "opacity": 0.5, "size": 8, "symbol": "square" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ad6aff" }, "marker": { "color": "#ad6aff", "opacity": 0.5, "size": 8, "symbol": "diamond" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ff9000" }, "marker": { "color": "#ff9000", "opacity": 0.5, "size": 8, "symbol": "triangle-down" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#00b287" }, "marker": { "color": "#00b287", "opacity": 0.5, "size": 8, "symbol": "cross" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#c97a88" }, "marker": { "color": "#c97a88", "opacity": 0.5, "size": 8, "symbol": "hexagram" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ff005c" }, "marker": { "color": "#ff005c", "opacity": 0.5, "size": 8, "symbol": "square" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#00d539" }, "marker": { "color": "#00d539", "opacity": 0.5, "size": 8, "symbol": "diamond" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ad6aff" }, "marker": { "color": "#ad6aff", "opacity": 0.5, "size": 8, "symbol": "triangle-down" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ff9000" }, "marker": { "color": "#ff9000", "opacity": 0.5, "size": 8, "symbol": "cross" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#00b287" }, "marker": { "color": "#00b287", "opacity": 0.5, "size": 8, "symbol": "hexagram" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#c97a88" }, "marker": { "color": "#c97a88", "opacity": 0.5, "size": 8, "symbol": "circle" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ff005c" }, "marker": { "color": "#ff005c", "opacity": 0.5, "size": 8, "symbol": "diamond" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#00d539" }, "marker": { "color": "#00d539", "opacity": 0.5, "size": 8, "symbol": "triangle-down" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ad6aff" }, "marker": { "color": "#ad6aff", "opacity": 0.5, "size": 8, "symbol": "cross" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ff9000" }, "marker": { "color": "#ff9000", "opacity": 0.5, "size": 8, "symbol": "hexagram" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#00b287" }, "marker": { "color": "#00b287", "opacity": 0.5, "size": 8, "symbol": "circle" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#c97a88" }, "marker": { "color": "#c97a88", "opacity": 0.5, "size": 8, "symbol": "square" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ff005c" }, "marker": { "color": "#ff005c", "opacity": 0.5, "size": 8, "symbol": "triangle-down" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#00d539" }, "marker": { "color": "#00d539", "opacity": 0.5, "size": 8, "symbol": "cross" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ad6aff" }, "marker": { "color": "#ad6aff", "opacity": 0.5, "size": 8, "symbol": "hexagram" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ff9000" }, "marker": { "color": "#ff9000", "opacity": 0.5, "size": 8, "symbol": "circle" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#00b287" }, "marker": { "color": "#00b287", "opacity": 0.5, "size": 8, "symbol": "square" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#c97a88" }, "marker": { "color": "#c97a88", "opacity": 0.5, "size": 8, "symbol": "diamond" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ff005c" }, "marker": { "color": "#ff005c", "opacity": 0.5, "size": 8, "symbol": "cross" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#00d539" }, "marker": { "color": "#00d539", "opacity": 0.5, "size": 8, "symbol": "hexagram" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ad6aff" }, "marker": { "color": "#ad6aff", "opacity": 0.5, "size": 8, "symbol": "circle" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ff9000" }, "marker": { "color": "#ff9000", "opacity": 0.5, "size": 8, "symbol": "square" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#00b287" }, "marker": { "color": "#00b287", "opacity": 0.5, "size": 8, "symbol": "diamond" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#c97a88" }, "marker": { "color": "#c97a88", "opacity": 0.5, "size": 8, "symbol": "triangle-down" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ff005c" }, "marker": { "color": "#ff005c", "opacity": 0.5, "size": 8, "symbol": "hexagram" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#00d539" }, "marker": { "color": "#00d539", "opacity": 0.5, "size": 8, "symbol": "circle" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ad6aff" }, "marker": { "color": "#ad6aff", "opacity": 0.5, "size": 8, "symbol": "square" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ff9000" }, "marker": { "color": "#ff9000", "opacity": 0.5, "size": 8, "symbol": "diamond" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#00b287" }, "marker": { "color": "#00b287", "opacity": 0.5, "size": 8, "symbol": "triangle-down" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#c97a88" }, "marker": { "color": "#c97a88", "opacity": 0.5, "size": 8, "symbol": "cross" }, "meanline": { "visible": true }, "type": "violin" } ] }, "layout": { "annotationdefaults": { "font": { "size": 12 } }, "autotypenumbers": "strict", "hoverlabel": { "bgcolor": "white", "font": { "family": "Rockwell", "size": 14 } }, "hovermode": "x unified", "legend": { "bgcolor": "white", "bordercolor": "Black", "borderwidth": 1, "font": { "family": "Rockwell" } }, "xaxis": { "linecolor": "black", "linewidth": 1, "mirror": true, "showline": true }, "yaxis": { "linecolor": "black", "linewidth": 1, "mirror": true, "showline": true } } }, "width": 900, "xaxis": { "anchor": "y", "domain": [ 0.0, 1.0 ], "showticklabels": true, "title": { "text": "Time (s)" } }, "yaxis": { "anchor": "x", "domain": [ 0.0, 1.0 ], "title": { "text": "Fractional Voltage" } } } }, "text/html": [ "
" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "# initialize a constant envelope\n", "envelope = qcs.ConstantEnvelope()\n", "dc_wav = qcs.DCWaveform(duration=200e-9, envelope=envelope, amplitude=1)\n", "\n", "# instantiate an empty program\n", "program = qcs.Program()\n", "\n", "# instantiate an awg channel\n", "awg = qcs.Channels(range(1), \"awg_channel\")\n", "\n", "# add the envelope to the program\n", "program.add_waveform(dc_wav, awg, pre_delay=20e-9)\n", "program.add_delay(20e-9, awg)\n", "\n", "# render\n", "program.render()" ] }, { "cell_type": "raw", "id": "60514761", "metadata": { "raw_mimetype": "text/restructuredtext" }, "source": [ "Gaussian Envelope\n", "^^^^^^^^^^^^^^^^^\n", "\n", "In this example we define a DC waveform with a Gaussian envelope with a duration of\n", "320 ns and standard deviation of 80 ns." ] }, { "cell_type": "code", "execution_count": 4, "id": "23195d27", "metadata": { "execution": { "iopub.execute_input": "2025-10-02T01:30:24.552715Z", "iopub.status.busy": "2025-10-02T01:30:24.552329Z", "iopub.status.idle": "2025-10-02T01:30:24.620691Z", "shell.execute_reply": "2025-10-02T01:30:24.619611Z" } }, "outputs": [ { "data": { "application/vnd.plotly.v1+json": { "config": { "plotlyServerURL": "https://plot.ly" }, "data": [ { "dx": 1e-09, "legendgroup": "awg_channel, labels: (0,)", "legendgrouptitle": { "text": "awg_channel, labels: (0,)" }, "name": "Drive pulse for awg_channel, labels: (0,)", "type": "scatter", "x0": 0, "xaxis": "x", "y": [ 2.7755575615628914e-17, 0.003962223564722117, 0.007998881141035419, 0.012110559777094493, 0.016297825414133327, 0.020561221998657453, 0.024901270590024227, 0.029318468464147596, 0.03381328821408902, 0.038386176848316134, 0.0430375548874338, 0.04776781546021178, 0.052577323399756126, 0.05746641434069019, 0.06243539381822996, 0.0674845363700588, 0.07261408464192404, 0.07782424849789535, 0.08311520413624007, 0.08848709321188897, 0.09394002196647941, 0.09947406036697495, 0.10508924125387728, 0.11078555950005556, 0.11656297118122957, 0.12242139275915295, 0.12836070027855304, 0.1343807285788898, 0.14048127052200185, 0.14666207623671615, 0.15292285238149825, 0.1592632614262253, 0.16568292095416262, 0.17218140298522858, 0.17875823332162574, 0.1854128909169198, 0.1921448072696368, 0.19895336584245024, 0.20583790150801654, 0.212797700022512, 0.21983199752791524, 0.2269399800840625, 0.23412078323149735, 0.24137349158611301, 0.24869713846657795, 0.25609070555551017, 0.2635531225953508, 0.2710832671198642, 0.2786799642221718, 0.2863419863601987, 0.2940680532003914, 0.30185683150053233, 0.3097069350324546, 0.31761692454542234, 0.325585307770918, 0.3336105394695391, 0.34169102152067476, 0.34982510305559555, 0.35801108063455367, 0.3662471984684472, 0.3745316486855712, 0.38286257164392357, 0.3912380562895046, 0.3996561405609932, 0.4081148118411464, 0.4166120074552164, 0.4251456152166335, 0.43371347402015803, 0.44231337448264807, 0.450943059631546, 0.4596002256411317, 0.4682825226165367, 0.47698755542546833, 0.4857128845775245, 0.4944560271509457, 0.5032144577665741, 0.5119856096087535, 0.5207668754928334, 0.5295556089788949, 0.5383491255312535, 0.5471447037232373, 0.5559395864866898, 0.564730982405578, 0.5735160670530408, 0.5822919843711494, 0.5910558480925988, 0.599804743203489, 0.6085357274463059, 0.61724583286215, 0.6259320673712081, 0.6345914163904144, 0.6432208444871848, 0.6518172970680637, 0.6603777021010677, 0.6688989718704605, 0.6773780047626418, 0.6858116870817877, 0.6941968948938335, 0.702530495897337, 0.7108093513197237, 0.7190303178373703, 0.7271902495179361, 0.7352859997833202, 0.7433144233915755, 0.7512723784360819, 0.7591567283602397, 0.7669643439859156, 0.7746921055538407, 0.7823369047741315, 0.7898956468850766, 0.7973652527183118, 0.8047426607684751, 0.8120248292654227, 0.8192087382470595, 0.8262913916308293, 0.833269819281893, 0.8401410790760089, 0.8469022589551288, 0.8535504789737095, 0.8600828933337376, 0.8664966924064675, 0.8727891047388702, 0.8789573990427954, 0.8849988861648542, 0.8909109210350431, 0.8966909045921369, 0.9023362856838925, 0.9078445629401243, 0.9132132866167307, 0.9184400604087714, 0.9235225432307176, 0.928458450962031, 0.9332455581562468, 0.9378816997117753, 0.942364772502667, 0.9466927369676225, 0.9508636186555673, 0.9548755097261542, 0.9587265704035955, 0.9624150303822786, 0.9659391901826561, 0.9692974224559628, 0.9724881732363554, 0.9755099631391236, 0.978361388503686, 0.9810411224801278, 0.9835479160581068, 0.9858805990370104, 0.9880380809363086, 0.99001935184511, 0.9918234832099971, 0.9934496285602777, 0.9948970241698619, 0.9961649896550385, 0.9972529285074966, 0.9981603285620072, 0.9988867623982512, 0.9994318876763563, 0.9997954474057659, 0.9999772701471529, 0.9999772701471529, 0.9997954474057659, 0.9994318876763563, 0.9988867623982512, 0.9981603285620072, 0.9972529285074966, 0.9961649896550385, 0.9948970241698619, 0.9934496285602777, 0.9918234832099971, 0.99001935184511, 0.9880380809363086, 0.9858805990370104, 0.9835479160581068, 0.981041122480128, 0.978361388503686, 0.9755099631391236, 0.9724881732363554, 0.9692974224559628, 0.9659391901826561, 0.9624150303822786, 0.9587265704035955, 0.9548755097261542, 0.9508636186555673, 0.9466927369676225, 0.942364772502667, 0.937881699711775, 0.9332455581562468, 0.928458450962031, 0.9235225432307176, 0.9184400604087714, 0.9132132866167307, 0.9078445629401241, 0.9023362856838925, 0.8966909045921371, 0.8909109210350431, 0.8849988861648542, 0.8789573990427954, 0.8727891047388702, 0.8664966924064673, 0.8600828933337373, 0.8535504789737097, 0.8469022589551288, 0.8401410790760089, 0.833269819281893, 0.8262913916308293, 0.8192087382470594, 0.8120248292654226, 0.8047426607684752, 0.7973652527183118, 0.7898956468850766, 0.7823369047741315, 0.7746921055538407, 0.7669643439859155, 0.7591567283602398, 0.751272378436082, 0.7433144233915755, 0.7352859997833202, 0.7271902495179361, 0.7190303178373701, 0.7108093513197236, 0.7025304958973371, 0.6941968948938337, 0.6858116870817877, 0.6773780047626418, 0.6688989718704605, 0.6603777021010676, 0.6518172970680635, 0.6432208444871849, 0.6345914163904145, 0.6259320673712081, 0.61724583286215, 0.6085357274463059, 0.5998047432034888, 0.5910558480925987, 0.5822919843711496, 0.5735160670530408, 0.564730982405578, 0.5559395864866898, 0.5471447037232373, 0.5383491255312535, 0.529555608978895, 0.5207668754928334, 0.5119856096087535, 0.5032144577665741, 0.4944560271509457, 0.4857128845775245, 0.4769875554254681, 0.4682825226165368, 0.4596002256411317, 0.450943059631546, 0.44231337448264807, 0.43371347402015803, 0.4251456152166335, 0.4166120074552163, 0.4081148118411466, 0.3996561405609932, 0.3912380562895046, 0.38286257164392357, 0.3745316486855712, 0.3662471984684472, 0.35801108063455345, 0.34982510305559567, 0.34169102152067476, 0.3336105394695391, 0.325585307770918, 0.31761692454542234, 0.3097069350324546, 0.3018568315005322, 0.2940680532003914, 0.2863419863601987, 0.2786799642221718, 0.2710832671198642, 0.2635531225953508, 0.25609070555551017, 0.24869713846657812, 0.24137349158611301, 0.23412078323149735, 0.2269399800840625, 0.21983199752791524, 0.212797700022512, 0.20583790150801642, 0.1989533658424503, 0.1921448072696368, 0.1854128909169198, 0.17875823332162574, 0.17218140298522858, 0.16568292095416262, 0.15926326142622518, 0.15292285238149841, 0.14666207623671615, 0.14048127052200185, 0.1343807285788898, 0.12836070027855304, 0.12242139275915279, 0.11656297118122952, 0.11078555950005567, 0.10508924125387728, 0.09947406036697495, 0.09394002196647941, 0.08848709321188897, 0.08311520413623996, 0.07782424849789532, 0.07261408464192406, 0.0674845363700588, 0.06243539381822996, 0.05746641434069019, 0.052577323399756126, 0.04776781546021172, 0.04303755488743391, 0.03838617684831622, 0.03381328821408902, 0.029318468464147596, 0.024901270590024227, 0.020561221998657453, 0.016297825414133216, 0.012110559777094576, 0.007998881141035474, 0.003962223564722117, 2.7755575615628914e-17 ], "yaxis": "y" } ], "layout": { "annotations": [ { "font": { "size": 16 }, "showarrow": false, "text": "Waveforms for awg_channel, labels: (0,)", "x": 0.5, "xanchor": "center", "xref": "paper", "y": 1.0, "yanchor": "bottom", "yref": "paper" } ], "height": 500, "template": { "data": { "bar": [ { "marker": { "color": "#ad6aff", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "" } }, "type": "bar" }, { "marker": { "color": "#c97a88", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "" } }, "type": "bar" }, { "marker": { "color": "#ff005c", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "" } }, "type": "bar" }, { "marker": { "color": "#ff9000", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "" } }, "type": "bar" }, { "marker": { "color": "#00d539", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "" } }, "type": "bar" }, { "marker": { "color": "#00b287", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "" } }, "type": "bar" }, { "marker": { "color": "#ad6aff", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "/" } }, "type": "bar" }, { "marker": { "color": "#c97a88", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "/" } }, "type": "bar" }, { "marker": { "color": "#ff005c", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "/" } }, "type": "bar" }, { "marker": { "color": "#ff9000", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "/" } }, "type": "bar" }, { "marker": { "color": "#00d539", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "/" } }, "type": "bar" }, { "marker": { "color": "#00b287", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "/" } }, "type": "bar" }, { "marker": { "color": "#ad6aff", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "\\" } }, "type": "bar" }, { "marker": { "color": "#c97a88", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "\\" } }, "type": "bar" }, { "marker": { "color": "#ff005c", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "\\" } }, "type": "bar" }, { "marker": { "color": "#ff9000", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "\\" } }, "type": "bar" }, { "marker": { "color": "#00d539", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "\\" } }, "type": "bar" }, { "marker": { "color": "#00b287", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "\\" } }, "type": "bar" }, { "marker": { "color": "#ad6aff", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "x" } }, "type": "bar" }, { "marker": { "color": "#c97a88", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "x" } }, "type": "bar" }, { "marker": { "color": "#ff005c", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "x" } }, "type": "bar" }, { "marker": { "color": "#ff9000", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "x" } }, "type": "bar" }, { "marker": { "color": "#00d539", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "x" } }, "type": "bar" }, { "marker": { "color": "#00b287", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "x" } }, "type": "bar" }, { "marker": { "color": "#ad6aff", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "-" } }, "type": "bar" }, { "marker": { "color": "#c97a88", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "-" } }, "type": "bar" }, { "marker": { "color": "#ff005c", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "-" } }, "type": "bar" }, { "marker": { "color": "#ff9000", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "-" } }, "type": "bar" }, { "marker": { "color": "#00d539", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "-" } }, "type": "bar" }, { "marker": { "color": "#00b287", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "-" } }, "type": "bar" }, { "marker": { "color": "#ad6aff", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "|" } }, "type": "bar" }, { "marker": { "color": "#c97a88", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "|" } }, "type": "bar" }, { "marker": { "color": "#ff005c", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "|" } }, "type": "bar" }, { "marker": { "color": "#ff9000", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "|" } }, "type": "bar" }, { "marker": { "color": "#00d539", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "|" } }, "type": "bar" }, { "marker": { "color": "#00b287", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "|" } }, "type": "bar" }, { "marker": { "color": "#ad6aff", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "+" } }, "type": "bar" }, { "marker": { "color": "#c97a88", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "+" } }, "type": "bar" }, { "marker": { "color": "#ff005c", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "+" } }, "type": "bar" }, { "marker": { "color": "#ff9000", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "+" } }, "type": "bar" }, { "marker": { "color": "#00d539", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "+" } }, "type": "bar" }, { "marker": { "color": "#00b287", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "+" } }, "type": "bar" }, { "marker": { "color": "#ad6aff", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "." } }, "type": "bar" }, { "marker": { "color": "#c97a88", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "." } }, "type": "bar" }, { "marker": { "color": "#ff005c", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "." } }, "type": "bar" }, { "marker": { "color": "#ff9000", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "." } }, "type": "bar" }, { "marker": { "color": "#00d539", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "." } }, "type": "bar" }, { "marker": { "color": "#00b287", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "." } }, "type": "bar" } ], "scatter": [ { "line": { "color": "#ff005c" }, "marker": { "color": "#ff005c", "opacity": 0.5, "size": 8, "symbol": "circle" }, "type": "scatter" }, { "line": { "color": "#00d539" }, "marker": { "color": "#00d539", "opacity": 0.5, "size": 8, "symbol": "square" }, "type": "scatter" }, { "line": { "color": "#ad6aff" }, "marker": { "color": "#ad6aff", "opacity": 0.5, "size": 8, "symbol": "diamond" }, "type": "scatter" }, { "line": { "color": "#ff9000" }, "marker": { "color": "#ff9000", "opacity": 0.5, "size": 8, "symbol": "triangle-down" }, "type": "scatter" }, { "line": { "color": "#00b287" }, "marker": { "color": "#00b287", "opacity": 0.5, "size": 8, "symbol": "cross" }, "type": "scatter" }, { "line": { "color": "#c97a88" }, "marker": { "color": "#c97a88", "opacity": 0.5, "size": 8, "symbol": "hexagram" }, "type": "scatter" }, { "line": { "color": "#ff005c" }, "marker": { "color": "#ff005c", "opacity": 0.5, "size": 8, "symbol": "square" }, "type": "scatter" }, { "line": { "color": "#00d539" }, "marker": { "color": "#00d539", "opacity": 0.5, "size": 8, "symbol": "diamond" }, "type": "scatter" }, { "line": { "color": "#ad6aff" }, "marker": { "color": "#ad6aff", "opacity": 0.5, "size": 8, "symbol": "triangle-down" }, "type": "scatter" }, { "line": { "color": "#ff9000" }, "marker": { "color": "#ff9000", "opacity": 0.5, "size": 8, "symbol": "cross" }, "type": "scatter" }, { "line": { "color": "#00b287" }, "marker": { "color": "#00b287", "opacity": 0.5, "size": 8, "symbol": "hexagram" }, "type": "scatter" }, { "line": { "color": "#c97a88" }, "marker": { "color": "#c97a88", "opacity": 0.5, "size": 8, "symbol": "circle" }, "type": "scatter" }, { "line": { "color": "#ff005c" }, "marker": { "color": "#ff005c", "opacity": 0.5, "size": 8, "symbol": "diamond" }, "type": "scatter" }, { "line": { "color": "#00d539" }, "marker": { "color": "#00d539", "opacity": 0.5, "size": 8, "symbol": "triangle-down" }, "type": "scatter" }, { "line": { "color": "#ad6aff" }, "marker": { "color": "#ad6aff", "opacity": 0.5, "size": 8, "symbol": "cross" }, "type": "scatter" }, { "line": { "color": "#ff9000" }, "marker": { "color": "#ff9000", "opacity": 0.5, "size": 8, "symbol": "hexagram" }, "type": "scatter" }, { "line": { "color": "#00b287" }, "marker": { "color": "#00b287", "opacity": 0.5, "size": 8, "symbol": "circle" }, "type": "scatter" }, { "line": { "color": "#c97a88" }, "marker": { "color": "#c97a88", "opacity": 0.5, "size": 8, "symbol": "square" }, "type": "scatter" }, { "line": { "color": "#ff005c" }, "marker": { "color": "#ff005c", "opacity": 0.5, "size": 8, "symbol": "triangle-down" }, "type": "scatter" }, { "line": { "color": "#00d539" }, "marker": { "color": "#00d539", "opacity": 0.5, "size": 8, "symbol": "cross" }, "type": "scatter" }, { "line": { "color": "#ad6aff" }, "marker": { "color": "#ad6aff", "opacity": 0.5, "size": 8, "symbol": "hexagram" }, "type": "scatter" }, { "line": { "color": "#ff9000" }, "marker": { "color": "#ff9000", "opacity": 0.5, "size": 8, "symbol": "circle" }, "type": "scatter" }, { "line": { "color": "#00b287" }, "marker": { "color": "#00b287", "opacity": 0.5, "size": 8, "symbol": "square" }, "type": "scatter" }, { "line": { "color": "#c97a88" }, "marker": { "color": "#c97a88", "opacity": 0.5, "size": 8, "symbol": "diamond" }, "type": "scatter" }, { "line": { "color": "#ff005c" }, "marker": { "color": "#ff005c", "opacity": 0.5, "size": 8, "symbol": "cross" }, "type": "scatter" }, { "line": { "color": "#00d539" }, "marker": { "color": "#00d539", "opacity": 0.5, "size": 8, "symbol": "hexagram" }, "type": "scatter" }, { "line": { "color": "#ad6aff" }, "marker": { "color": "#ad6aff", "opacity": 0.5, "size": 8, "symbol": "circle" }, "type": "scatter" }, { "line": { "color": "#ff9000" }, "marker": { "color": "#ff9000", "opacity": 0.5, "size": 8, "symbol": "square" }, "type": "scatter" }, { "line": { "color": "#00b287" }, "marker": { "color": "#00b287", "opacity": 0.5, "size": 8, "symbol": "diamond" }, "type": "scatter" }, { "line": { "color": "#c97a88" }, "marker": { "color": "#c97a88", "opacity": 0.5, "size": 8, "symbol": "triangle-down" }, "type": "scatter" }, { "line": { "color": "#ff005c" }, "marker": { "color": "#ff005c", "opacity": 0.5, "size": 8, "symbol": "hexagram" }, "type": "scatter" }, { "line": { "color": "#00d539" }, "marker": { "color": "#00d539", "opacity": 0.5, "size": 8, "symbol": "circle" }, "type": "scatter" }, { "line": { "color": "#ad6aff" }, "marker": { "color": "#ad6aff", "opacity": 0.5, "size": 8, "symbol": "square" }, "type": "scatter" }, { "line": { "color": "#ff9000" }, "marker": { "color": "#ff9000", "opacity": 0.5, "size": 8, "symbol": "diamond" }, "type": "scatter" }, { "line": { "color": "#00b287" }, "marker": { "color": "#00b287", "opacity": 0.5, "size": 8, "symbol": "triangle-down" }, "type": "scatter" }, { "line": { "color": "#c97a88" }, "marker": { "color": "#c97a88", "opacity": 0.5, "size": 8, "symbol": "cross" }, "type": "scatter" } ], "violin": [ { "box": { "visible": true }, "line": { "color": "#ff005c" }, "marker": { "color": "#ff005c", "opacity": 0.5, "size": 8, "symbol": "circle" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#00d539" }, "marker": { "color": "#00d539", "opacity": 0.5, "size": 8, "symbol": "square" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ad6aff" }, "marker": { "color": "#ad6aff", "opacity": 0.5, "size": 8, "symbol": "diamond" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ff9000" }, "marker": { "color": "#ff9000", "opacity": 0.5, "size": 8, "symbol": "triangle-down" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#00b287" }, "marker": { "color": "#00b287", "opacity": 0.5, "size": 8, "symbol": "cross" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#c97a88" }, "marker": { "color": "#c97a88", "opacity": 0.5, "size": 8, "symbol": "hexagram" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ff005c" }, "marker": { "color": "#ff005c", "opacity": 0.5, "size": 8, "symbol": "square" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#00d539" }, "marker": { "color": "#00d539", "opacity": 0.5, "size": 8, "symbol": "diamond" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ad6aff" }, "marker": { "color": "#ad6aff", "opacity": 0.5, "size": 8, "symbol": "triangle-down" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ff9000" }, "marker": { "color": "#ff9000", "opacity": 0.5, "size": 8, "symbol": "cross" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#00b287" }, "marker": { "color": "#00b287", "opacity": 0.5, "size": 8, "symbol": "hexagram" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#c97a88" }, "marker": { "color": "#c97a88", "opacity": 0.5, "size": 8, "symbol": "circle" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ff005c" }, "marker": { "color": "#ff005c", "opacity": 0.5, "size": 8, "symbol": "diamond" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#00d539" }, "marker": { "color": "#00d539", "opacity": 0.5, "size": 8, "symbol": "triangle-down" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ad6aff" }, "marker": { "color": "#ad6aff", "opacity": 0.5, "size": 8, "symbol": "cross" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ff9000" }, "marker": { "color": "#ff9000", "opacity": 0.5, "size": 8, "symbol": "hexagram" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#00b287" }, "marker": { "color": "#00b287", "opacity": 0.5, "size": 8, "symbol": "circle" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#c97a88" }, "marker": { "color": "#c97a88", "opacity": 0.5, "size": 8, "symbol": "square" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ff005c" }, "marker": { "color": "#ff005c", "opacity": 0.5, "size": 8, "symbol": "triangle-down" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#00d539" }, "marker": { "color": "#00d539", "opacity": 0.5, "size": 8, "symbol": "cross" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ad6aff" }, "marker": { "color": "#ad6aff", "opacity": 0.5, "size": 8, "symbol": "hexagram" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ff9000" }, "marker": { "color": "#ff9000", "opacity": 0.5, "size": 8, "symbol": "circle" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#00b287" }, "marker": { "color": "#00b287", "opacity": 0.5, "size": 8, "symbol": "square" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#c97a88" }, "marker": { "color": "#c97a88", "opacity": 0.5, "size": 8, "symbol": "diamond" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ff005c" }, "marker": { "color": "#ff005c", "opacity": 0.5, "size": 8, "symbol": "cross" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#00d539" }, "marker": { "color": "#00d539", "opacity": 0.5, "size": 8, "symbol": "hexagram" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ad6aff" }, "marker": { "color": "#ad6aff", "opacity": 0.5, "size": 8, "symbol": "circle" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ff9000" }, "marker": { "color": "#ff9000", "opacity": 0.5, "size": 8, "symbol": "square" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#00b287" }, "marker": { "color": "#00b287", "opacity": 0.5, "size": 8, "symbol": "diamond" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#c97a88" }, "marker": { "color": "#c97a88", "opacity": 0.5, "size": 8, "symbol": "triangle-down" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ff005c" }, "marker": { "color": "#ff005c", "opacity": 0.5, "size": 8, "symbol": "hexagram" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#00d539" }, "marker": { "color": "#00d539", "opacity": 0.5, "size": 8, "symbol": "circle" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ad6aff" }, "marker": { "color": "#ad6aff", "opacity": 0.5, "size": 8, "symbol": "square" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ff9000" }, "marker": { "color": "#ff9000", "opacity": 0.5, "size": 8, "symbol": "diamond" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#00b287" }, "marker": { "color": "#00b287", "opacity": 0.5, "size": 8, "symbol": "triangle-down" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#c97a88" }, "marker": { "color": "#c97a88", "opacity": 0.5, "size": 8, "symbol": "cross" }, "meanline": { "visible": true }, "type": "violin" } ] }, "layout": { "annotationdefaults": { "font": { "size": 12 } }, "autotypenumbers": "strict", "hoverlabel": { "bgcolor": "white", "font": { "family": "Rockwell", "size": 14 } }, "hovermode": "x unified", "legend": { "bgcolor": "white", "bordercolor": "Black", "borderwidth": 1, "font": { "family": "Rockwell" } }, "xaxis": { "linecolor": "black", "linewidth": 1, "mirror": true, "showline": true }, "yaxis": { "linecolor": "black", "linewidth": 1, "mirror": true, "showline": true } } }, "width": 900, "xaxis": { "anchor": "y", "domain": [ 0.0, 1.0 ], "showticklabels": true, "title": { "text": "Time (s)" } }, "yaxis": { "anchor": "x", "domain": [ 0.0, 1.0 ], "title": { "text": "Fractional Voltage" } } } }, "text/html": [ "
" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "# initialize a Gaussian\n", "envelope = qcs.GaussianEnvelope(num_sigma=2)\n", "dc_wav = qcs.DCWaveform(320e-9, envelope, 1)\n", "\n", "# initialize the program and add the envelope\n", "program = qcs.Program()\n", "program.add_waveform(dc_wav, awg)\n", "\n", "# render\n", "program.render()" ] }, { "cell_type": "raw", "id": "948bdd9f", "metadata": { "raw_mimetype": "text/restructuredtext" }, "source": [ "Flat-Top Gaussian Envelope\n", "^^^^^^^^^^^^^^^^^^^^^^^^^^\n", "\n", "Here we demonstrate a flat-top Gaussian envelope. During the rise and fall\n", "times, the pulse is Gaussian. In the middle, for a time ``duration``, the envelope is\n", "constant and equal to its maximum value.\n", "\n", "In this example we make use of the built-in :py:class:`~keysight.qcs.variables.Scalar`\n", "class, which allows us to modify parameters after instantiation. We can render the\n", "waveform with different envelope parameters to visualize the varying waveforms used\n", "in a parameter-sweep program" ] }, { "cell_type": "code", "execution_count": 5, "id": "ff2c8437", "metadata": { "execution": { "iopub.execute_input": "2025-10-02T01:30:24.622752Z", "iopub.status.busy": "2025-10-02T01:30:24.622563Z", "iopub.status.idle": "2025-10-02T01:30:24.695038Z", "shell.execute_reply": "2025-10-02T01:30:24.693884Z" } }, "outputs": [ { "data": { "application/vnd.plotly.v1+json": { "config": { "plotlyServerURL": "https://plot.ly" }, "data": [ { "dx": 1e-09, "legendgroup": "awg_channel, labels: (0,)", "legendgrouptitle": { "text": "awg_channel, labels: (0,)" }, "name": "Drive pulse for awg_channel, labels: (0,)", "type": "scatter", "x0": 0, "xaxis": "x", "y": [ 2.2204460492503132e-17, 0.061376530635268295, 0.1407836196583527, 0.23754430355878045, 0.34805542416136914, 0.4654642952945192, 0.5800391945662352, 0.6803324674360671, 0.7549986798774428, 0.7948883328494819, 0.7948883328494819, 0.7948883328494819, 0.7948883328494819, 0.7948883328494819, 0.7948883328494819, 0.7948883328494819, 0.7948883328494819, 0.7948883328494819, 0.7948883328494819, 0.7948883328494819, 0.7948883328494819, 0.7948883328494819, 0.7948883328494819, 0.7948883328494819, 0.7948883328494819, 0.7948883328494819, 0.7948883328494819, 0.7948883328494819, 0.7948883328494819, 0.7948883328494819, 0.7948883328494819, 0.7948883328494819, 0.7948883328494819, 0.7948883328494819, 0.7948883328494819, 0.7948883328494819, 0.7948883328494819, 0.7948883328494819, 0.7948883328494819, 0.7948883328494819, 0.7948883328494819, 0.7948883328494819, 0.7948883328494819, 0.7948883328494819, 0.7948883328494819, 0.7948883328494819, 0.7948883328494819, 0.7948883328494819, 0.7948883328494819, 0.7948883328494819, 0.7948883328494819, 0.7549986798774428, 0.6803324674360671, 0.5800391945662352, 0.4654642952945193, 0.34805542416136914, 0.23754430355878065, 0.1407836196583527, 0.061376530635268406, 2.2204460492503132e-17 ], "yaxis": "y" } ], "layout": { "annotations": [ { "font": { "size": 16 }, "showarrow": false, "text": "Waveforms for awg_channel, labels: (0,)", "x": 0.5, "xanchor": "center", "xref": "paper", "y": 1.0, "yanchor": "bottom", "yref": "paper" } ], "height": 500, "template": { "data": { "bar": [ { "marker": { "color": "#ad6aff", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "" } }, "type": "bar" }, { "marker": { "color": "#c97a88", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "" } }, "type": "bar" }, { "marker": { "color": "#ff005c", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "" } }, "type": "bar" }, { "marker": { "color": "#ff9000", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "" } }, "type": "bar" }, { "marker": { "color": "#00d539", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "" } }, "type": "bar" }, { "marker": { "color": "#00b287", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "" } }, "type": "bar" }, { "marker": { "color": "#ad6aff", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "/" } }, "type": "bar" }, { "marker": { "color": "#c97a88", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "/" } }, "type": "bar" }, { "marker": { "color": "#ff005c", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "/" } }, "type": "bar" }, { "marker": { "color": "#ff9000", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "/" } }, "type": "bar" }, { "marker": { "color": "#00d539", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "/" } }, "type": "bar" }, { "marker": { "color": "#00b287", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "/" } }, "type": "bar" }, { "marker": { "color": "#ad6aff", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "\\" } }, "type": "bar" }, { "marker": { "color": "#c97a88", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "\\" } }, "type": "bar" }, { "marker": { "color": "#ff005c", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "\\" } }, "type": "bar" }, { "marker": { "color": "#ff9000", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "\\" } }, "type": "bar" }, { "marker": { "color": "#00d539", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "\\" } }, "type": "bar" }, { "marker": { "color": "#00b287", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "\\" } }, "type": "bar" }, { "marker": { "color": "#ad6aff", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "x" } }, "type": "bar" }, { "marker": { "color": "#c97a88", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "x" } }, "type": "bar" }, { "marker": { "color": "#ff005c", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "x" } }, "type": "bar" }, { "marker": { "color": "#ff9000", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "x" } }, "type": "bar" }, { "marker": { "color": "#00d539", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "x" } }, "type": "bar" }, { "marker": { "color": "#00b287", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "x" } }, "type": "bar" }, { "marker": { "color": "#ad6aff", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "-" } }, "type": "bar" }, { "marker": { "color": "#c97a88", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "-" } }, "type": "bar" }, { "marker": { "color": "#ff005c", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "-" } }, "type": "bar" }, { "marker": { "color": "#ff9000", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "-" } }, "type": "bar" }, { "marker": { "color": "#00d539", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "-" } }, "type": "bar" }, { "marker": { "color": "#00b287", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "-" } }, "type": "bar" }, { "marker": { "color": "#ad6aff", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "|" } }, "type": "bar" }, { "marker": { "color": "#c97a88", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "|" } }, "type": "bar" }, { "marker": { "color": "#ff005c", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "|" } }, "type": "bar" }, { "marker": { "color": "#ff9000", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "|" } }, "type": "bar" }, { "marker": { "color": "#00d539", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "|" } }, "type": "bar" }, { "marker": { "color": "#00b287", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "|" } }, "type": "bar" }, { "marker": { "color": "#ad6aff", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "+" } }, "type": "bar" }, { "marker": { "color": "#c97a88", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "+" } }, "type": "bar" }, { "marker": { "color": "#ff005c", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "+" } }, "type": "bar" }, { "marker": { "color": "#ff9000", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "+" } }, "type": "bar" }, { "marker": { "color": "#00d539", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "+" } }, "type": "bar" }, { "marker": { "color": "#00b287", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "+" } }, "type": "bar" }, { "marker": { "color": "#ad6aff", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "." } }, "type": "bar" }, { "marker": { "color": "#c97a88", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "." } }, "type": "bar" }, { "marker": { "color": "#ff005c", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "." } }, "type": "bar" }, { "marker": { "color": "#ff9000", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "." } }, "type": "bar" }, { "marker": { "color": "#00d539", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "." } }, "type": "bar" }, { "marker": { "color": "#00b287", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "." } }, "type": "bar" } ], "scatter": [ { "line": { "color": "#ff005c" }, "marker": { "color": "#ff005c", "opacity": 0.5, "size": 8, "symbol": "circle" }, "type": "scatter" }, { "line": { "color": "#00d539" }, "marker": { "color": "#00d539", "opacity": 0.5, "size": 8, "symbol": "square" }, "type": "scatter" }, { "line": { "color": "#ad6aff" }, "marker": { "color": "#ad6aff", "opacity": 0.5, "size": 8, "symbol": "diamond" }, "type": "scatter" }, { "line": { "color": "#ff9000" }, "marker": { "color": "#ff9000", "opacity": 0.5, "size": 8, "symbol": "triangle-down" }, "type": "scatter" }, { "line": { "color": "#00b287" }, "marker": { "color": "#00b287", "opacity": 0.5, "size": 8, "symbol": "cross" }, "type": "scatter" }, { "line": { "color": "#c97a88" }, "marker": { "color": "#c97a88", "opacity": 0.5, "size": 8, "symbol": "hexagram" }, "type": "scatter" }, { "line": { "color": "#ff005c" }, "marker": { "color": "#ff005c", "opacity": 0.5, "size": 8, "symbol": "square" }, "type": "scatter" }, { "line": { "color": "#00d539" }, "marker": { "color": "#00d539", "opacity": 0.5, "size": 8, "symbol": "diamond" }, "type": "scatter" }, { "line": { "color": "#ad6aff" }, "marker": { "color": "#ad6aff", "opacity": 0.5, "size": 8, "symbol": "triangle-down" }, "type": "scatter" }, { "line": { "color": "#ff9000" }, "marker": { "color": "#ff9000", "opacity": 0.5, "size": 8, "symbol": "cross" }, "type": "scatter" }, { "line": { "color": "#00b287" }, "marker": { "color": "#00b287", "opacity": 0.5, "size": 8, "symbol": "hexagram" }, "type": "scatter" }, { "line": { "color": "#c97a88" }, "marker": { "color": "#c97a88", "opacity": 0.5, "size": 8, "symbol": "circle" }, "type": "scatter" }, { "line": { "color": "#ff005c" }, "marker": { "color": "#ff005c", "opacity": 0.5, "size": 8, "symbol": "diamond" }, "type": "scatter" }, { "line": { "color": "#00d539" }, "marker": { "color": "#00d539", "opacity": 0.5, "size": 8, "symbol": "triangle-down" }, "type": "scatter" }, { "line": { "color": "#ad6aff" }, "marker": { "color": "#ad6aff", "opacity": 0.5, "size": 8, "symbol": "cross" }, "type": "scatter" }, { "line": { "color": "#ff9000" }, "marker": { "color": "#ff9000", "opacity": 0.5, "size": 8, "symbol": "hexagram" }, "type": "scatter" }, { "line": { "color": "#00b287" }, "marker": { "color": "#00b287", "opacity": 0.5, "size": 8, "symbol": "circle" }, "type": "scatter" }, { "line": { "color": "#c97a88" }, "marker": { "color": "#c97a88", "opacity": 0.5, "size": 8, "symbol": "square" }, "type": "scatter" }, { "line": { "color": "#ff005c" }, "marker": { "color": "#ff005c", "opacity": 0.5, "size": 8, "symbol": "triangle-down" }, "type": "scatter" }, { "line": { "color": "#00d539" }, "marker": { "color": "#00d539", "opacity": 0.5, "size": 8, "symbol": "cross" }, "type": "scatter" }, { "line": { "color": "#ad6aff" }, "marker": { "color": "#ad6aff", "opacity": 0.5, "size": 8, "symbol": "hexagram" }, "type": "scatter" }, { "line": { "color": "#ff9000" }, "marker": { "color": "#ff9000", "opacity": 0.5, "size": 8, "symbol": "circle" }, "type": "scatter" }, { "line": { "color": "#00b287" }, "marker": { "color": "#00b287", "opacity": 0.5, "size": 8, "symbol": "square" }, "type": "scatter" }, { "line": { "color": "#c97a88" }, "marker": { "color": "#c97a88", "opacity": 0.5, "size": 8, "symbol": "diamond" }, "type": "scatter" }, { "line": { "color": "#ff005c" }, "marker": { "color": "#ff005c", "opacity": 0.5, "size": 8, "symbol": "cross" }, "type": "scatter" }, { "line": { "color": "#00d539" }, "marker": { "color": "#00d539", "opacity": 0.5, "size": 8, "symbol": "hexagram" }, "type": "scatter" }, { "line": { "color": "#ad6aff" }, "marker": { "color": "#ad6aff", "opacity": 0.5, "size": 8, "symbol": "circle" }, "type": "scatter" }, { "line": { "color": "#ff9000" }, "marker": { "color": "#ff9000", "opacity": 0.5, "size": 8, "symbol": "square" }, "type": "scatter" }, { "line": { "color": "#00b287" }, "marker": { "color": "#00b287", "opacity": 0.5, "size": 8, "symbol": "diamond" }, "type": "scatter" }, { "line": { "color": "#c97a88" }, "marker": { "color": "#c97a88", "opacity": 0.5, "size": 8, "symbol": "triangle-down" }, "type": "scatter" }, { "line": { "color": "#ff005c" }, "marker": { "color": "#ff005c", "opacity": 0.5, "size": 8, "symbol": "hexagram" }, "type": "scatter" }, { "line": { "color": "#00d539" }, "marker": { "color": "#00d539", "opacity": 0.5, "size": 8, "symbol": "circle" }, "type": "scatter" }, { "line": { "color": "#ad6aff" }, "marker": { "color": "#ad6aff", "opacity": 0.5, "size": 8, "symbol": "square" }, "type": "scatter" }, { "line": { "color": "#ff9000" }, "marker": { "color": "#ff9000", "opacity": 0.5, "size": 8, "symbol": "diamond" }, "type": "scatter" }, { "line": { "color": "#00b287" }, "marker": { "color": "#00b287", "opacity": 0.5, "size": 8, "symbol": "triangle-down" }, "type": "scatter" }, { "line": { "color": "#c97a88" }, "marker": { "color": "#c97a88", "opacity": 0.5, "size": 8, "symbol": "cross" }, "type": "scatter" } ], "violin": [ { "box": { "visible": true }, "line": { "color": "#ff005c" }, "marker": { "color": "#ff005c", "opacity": 0.5, "size": 8, "symbol": "circle" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#00d539" }, "marker": { "color": "#00d539", "opacity": 0.5, "size": 8, "symbol": "square" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ad6aff" }, "marker": { "color": "#ad6aff", "opacity": 0.5, "size": 8, "symbol": "diamond" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ff9000" }, "marker": { "color": "#ff9000", "opacity": 0.5, "size": 8, "symbol": "triangle-down" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#00b287" }, "marker": { "color": "#00b287", "opacity": 0.5, "size": 8, "symbol": "cross" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#c97a88" }, "marker": { "color": "#c97a88", "opacity": 0.5, "size": 8, "symbol": "hexagram" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ff005c" }, "marker": { "color": "#ff005c", "opacity": 0.5, "size": 8, "symbol": "square" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#00d539" }, "marker": { "color": "#00d539", "opacity": 0.5, "size": 8, "symbol": "diamond" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ad6aff" }, "marker": { "color": "#ad6aff", "opacity": 0.5, "size": 8, "symbol": "triangle-down" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ff9000" }, "marker": { "color": "#ff9000", "opacity": 0.5, "size": 8, "symbol": "cross" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#00b287" }, "marker": { "color": "#00b287", "opacity": 0.5, "size": 8, "symbol": "hexagram" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#c97a88" }, "marker": { "color": "#c97a88", "opacity": 0.5, "size": 8, "symbol": "circle" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ff005c" }, "marker": { "color": "#ff005c", "opacity": 0.5, "size": 8, "symbol": "diamond" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#00d539" }, "marker": { "color": "#00d539", "opacity": 0.5, "size": 8, "symbol": "triangle-down" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ad6aff" }, "marker": { "color": "#ad6aff", "opacity": 0.5, "size": 8, "symbol": "cross" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ff9000" }, "marker": { "color": "#ff9000", "opacity": 0.5, "size": 8, "symbol": "hexagram" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#00b287" }, "marker": { "color": "#00b287", "opacity": 0.5, "size": 8, "symbol": "circle" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#c97a88" }, "marker": { "color": "#c97a88", "opacity": 0.5, "size": 8, "symbol": "square" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ff005c" }, "marker": { "color": "#ff005c", "opacity": 0.5, "size": 8, "symbol": "triangle-down" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#00d539" }, "marker": { "color": "#00d539", "opacity": 0.5, "size": 8, "symbol": "cross" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ad6aff" }, "marker": { "color": "#ad6aff", "opacity": 0.5, "size": 8, "symbol": "hexagram" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ff9000" }, "marker": { "color": "#ff9000", "opacity": 0.5, "size": 8, "symbol": "circle" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#00b287" }, "marker": { "color": "#00b287", "opacity": 0.5, "size": 8, "symbol": "square" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#c97a88" }, "marker": { "color": "#c97a88", "opacity": 0.5, "size": 8, "symbol": "diamond" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ff005c" }, "marker": { "color": "#ff005c", "opacity": 0.5, "size": 8, "symbol": "cross" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#00d539" }, "marker": { "color": "#00d539", "opacity": 0.5, "size": 8, "symbol": "hexagram" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ad6aff" }, "marker": { "color": "#ad6aff", "opacity": 0.5, "size": 8, "symbol": "circle" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ff9000" }, "marker": { "color": "#ff9000", "opacity": 0.5, "size": 8, "symbol": "square" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#00b287" }, "marker": { "color": "#00b287", "opacity": 0.5, "size": 8, "symbol": "diamond" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#c97a88" }, "marker": { "color": "#c97a88", "opacity": 0.5, "size": 8, "symbol": "triangle-down" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ff005c" }, "marker": { "color": "#ff005c", "opacity": 0.5, "size": 8, "symbol": "hexagram" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#00d539" }, "marker": { "color": "#00d539", "opacity": 0.5, "size": 8, "symbol": "circle" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ad6aff" }, "marker": { "color": "#ad6aff", "opacity": 0.5, "size": 8, "symbol": "square" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ff9000" }, "marker": { "color": "#ff9000", "opacity": 0.5, "size": 8, "symbol": "diamond" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#00b287" }, "marker": { "color": "#00b287", "opacity": 0.5, "size": 8, "symbol": "triangle-down" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#c97a88" }, "marker": { "color": "#c97a88", "opacity": 0.5, "size": 8, "symbol": "cross" }, "meanline": { "visible": true }, "type": "violin" } ] }, "layout": { "annotationdefaults": { "font": { "size": 12 } }, "autotypenumbers": "strict", "hoverlabel": { "bgcolor": "white", "font": { "family": "Rockwell", "size": 14 } }, "hovermode": "x unified", "legend": { "bgcolor": "white", "bordercolor": "Black", "borderwidth": 1, "font": { "family": "Rockwell" } }, "xaxis": { "linecolor": "black", "linewidth": 1, "mirror": true, "showline": true }, "yaxis": { "linecolor": "black", "linewidth": 1, "mirror": true, "showline": true } } }, "width": 900, "xaxis": { "anchor": "y", "domain": [ 0.0, 1.0 ], "showticklabels": true, "title": { "text": "Time (s)" } }, "yaxis": { "anchor": "x", "domain": [ 0.0, 1.0 ], "title": { "text": "Fractional Voltage" } } } }, "text/html": [ "
" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "# initialize parameters\n", "duration = qcs.Scalar(\"duration\", value=40e-9, dtype=float)\n", "amplitude = qcs.Scalar(\"amplitude\", value=0.8, dtype=float)\n", "rise = qcs.Scalar(\"rise\", value=10e-9, dtype=float)\n", "\n", "# initialize a Gaussian DC Waveform\n", "dc_wav = qcs.DCWaveform(\n", " duration=2 * rise, envelope=qcs.GaussianEnvelope(), amplitude=amplitude\n", ")\n", "\n", "# initialize the program and add the flattop using the create_dc_flattop method\n", "program = qcs.Program()\n", "program.add_waveform(\n", " qcs.DCWaveform.create_dc_flattop(\n", " rise_duration=rise,\n", " hold_duration=duration,\n", " fall_duration=rise,\n", " envelope=qcs.GaussianEnvelope(),\n", " amplitude=amplitude,\n", " ),\n", " awg,\n", ")\n", "\n", "# render\n", "program.render()" ] }, { "cell_type": "raw", "id": "474478c4", "metadata": { "raw_mimetype": "text/restructuredtext" }, "source": [ "We now change the parameters defining the envelope and re-render it." ] }, { "cell_type": "code", "execution_count": 6, "id": "bff0d917", "metadata": { "execution": { "iopub.execute_input": "2025-10-02T01:30:24.698324Z", "iopub.status.busy": "2025-10-02T01:30:24.698011Z", "iopub.status.idle": "2025-10-02T01:30:24.782465Z", "shell.execute_reply": "2025-10-02T01:30:24.781603Z" } }, "outputs": [ { "data": { "application/vnd.plotly.v1+json": { "config": { "plotlyServerURL": "https://plot.ly" }, "data": [ { "dx": 1e-09, "legendgroup": "awg_channel, labels: (0,)", "legendgrouptitle": { "text": "awg_channel, labels: (0,)" }, "name": "Drive pulse for awg_channel, labels: (0,)", "type": "scatter", "x0": 0, "xaxis": "x", "y": [ 1.6653345369377347e-17, 0.020776981143868133, 0.0446850687977305, 0.07182446790413725, 0.10220432622725792, 0.13572455389693636, 0.17216042525095726, 0.21115151610142513, 0.2521964607259581, 0.294654799146328, 0.3377568244176708, 0.38062184553633466, 0.4222846847589575, 0.4617295745599023, 0.49792996688477675, 0.5298921797688105, 0.5567003470237615, 0.5775598604896687, 0.5918364407668092, 0.5990881596770921, 0.5990881596770921, 0.5990881596770921, 0.5990881596770921, 0.5990881596770921, 0.5990881596770921, 0.5990881596770921, 0.5990881596770921, 0.5990881596770921, 0.5990881596770921, 0.5990881596770921, 0.5990881596770921, 0.5990881596770921, 0.5990881596770921, 0.5990881596770921, 0.5990881596770921, 0.5990881596770921, 0.5990881596770921, 0.5990881596770921, 0.5990881596770921, 0.5990881596770921, 0.5990881596770921, 0.5990881596770921, 0.5990881596770921, 0.5990881596770921, 0.5990881596770921, 0.5990881596770921, 0.5990881596770921, 0.5990881596770921, 0.5990881596770921, 0.5990881596770921, 0.5990881596770921, 0.5990881596770921, 0.5990881596770921, 0.5990881596770921, 0.5990881596770921, 0.5990881596770921, 0.5990881596770921, 0.5990881596770921, 0.5990881596770921, 0.5990881596770921, 0.5990881596770921, 0.5990881596770921, 0.5990881596770921, 0.5990881596770921, 0.5990881596770921, 0.5990881596770921, 0.5990881596770921, 0.5990881596770921, 0.5990881596770921, 0.5990881596770921, 0.5990881596770921, 0.5990881596770921, 0.5990881596770921, 0.5990881596770921, 0.5990881596770921, 0.5990881596770921, 0.5990881596770921, 0.5990881596770921, 0.5990881596770921, 0.5990881596770921, 0.5990881596770921, 0.5918364407668092, 0.5775598604896687, 0.5567003470237615, 0.5298921797688105, 0.49792996688477675, 0.4617295745599024, 0.4222846847589575, 0.38062184553633466, 0.3377568244176708, 0.2946547991463279, 0.2521964607259582, 0.21115151610142513, 0.17216042525095726, 0.13572455389693636, 0.10220432622725792, 0.0718244679041372, 0.04468506879773055, 0.020776981143868133, 1.6653345369377347e-17 ], "yaxis": "y" } ], "layout": { "annotations": [ { "font": { "size": 16 }, "showarrow": false, "text": "Waveforms for awg_channel, labels: (0,)", "x": 0.5, "xanchor": "center", "xref": "paper", "y": 1.0, "yanchor": "bottom", "yref": "paper" } ], "height": 500, "template": { "data": { "bar": [ { "marker": { "color": "#ad6aff", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "" } }, "type": "bar" }, { "marker": { "color": "#c97a88", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "" } }, "type": "bar" }, { "marker": { "color": "#ff005c", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "" } }, "type": "bar" }, { "marker": { "color": "#ff9000", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "" } }, "type": "bar" }, { "marker": { "color": "#00d539", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "" } }, "type": "bar" }, { "marker": { "color": "#00b287", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "" } }, "type": "bar" }, { "marker": { "color": "#ad6aff", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "/" } }, "type": "bar" }, { "marker": { "color": "#c97a88", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "/" } }, "type": "bar" }, { "marker": { "color": "#ff005c", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "/" } }, "type": "bar" }, { "marker": { "color": "#ff9000", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "/" } }, "type": "bar" }, { "marker": { "color": "#00d539", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "/" } }, "type": "bar" }, { "marker": { "color": "#00b287", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "/" } }, "type": "bar" }, { "marker": { "color": "#ad6aff", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "\\" } }, "type": "bar" }, { "marker": { "color": "#c97a88", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "\\" } }, "type": "bar" }, { "marker": { "color": "#ff005c", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "\\" } }, "type": "bar" }, { "marker": { "color": "#ff9000", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "\\" } }, "type": "bar" }, { "marker": { "color": "#00d539", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "\\" } }, "type": "bar" }, { "marker": { "color": "#00b287", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "\\" } }, "type": "bar" }, { "marker": { "color": "#ad6aff", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "x" } }, "type": "bar" }, { "marker": { "color": "#c97a88", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "x" } }, "type": "bar" }, { "marker": { "color": "#ff005c", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "x" } }, "type": "bar" }, { "marker": { "color": "#ff9000", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "x" } }, "type": "bar" }, { "marker": { "color": "#00d539", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "x" } }, "type": "bar" }, { "marker": { "color": "#00b287", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "x" } }, "type": "bar" }, { "marker": { "color": "#ad6aff", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "-" } }, "type": "bar" }, { "marker": { "color": "#c97a88", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "-" } }, "type": "bar" }, { "marker": { "color": "#ff005c", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "-" } }, "type": "bar" }, { "marker": { "color": "#ff9000", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "-" } }, "type": "bar" }, { "marker": { "color": "#00d539", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "-" } }, "type": "bar" }, { "marker": { "color": "#00b287", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "-" } }, "type": "bar" }, { "marker": { "color": "#ad6aff", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "|" } }, "type": "bar" }, { "marker": { "color": "#c97a88", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "|" } }, "type": "bar" }, { "marker": { "color": "#ff005c", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "|" } }, "type": "bar" }, { "marker": { "color": "#ff9000", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "|" } }, "type": "bar" }, { "marker": { "color": "#00d539", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "|" } }, "type": "bar" }, { "marker": { "color": "#00b287", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "|" } }, "type": "bar" }, { "marker": { "color": "#ad6aff", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "+" } }, "type": "bar" }, { "marker": { "color": "#c97a88", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "+" } }, "type": "bar" }, { "marker": { "color": "#ff005c", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "+" } }, "type": "bar" }, { "marker": { "color": "#ff9000", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "+" } }, "type": "bar" }, { "marker": { "color": "#00d539", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "+" } }, "type": "bar" }, { "marker": { "color": "#00b287", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "+" } }, "type": "bar" }, { "marker": { "color": "#ad6aff", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "." } }, "type": "bar" }, { "marker": { "color": "#c97a88", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "." } }, "type": "bar" }, { "marker": { "color": "#ff005c", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "." } }, "type": "bar" }, { "marker": { "color": "#ff9000", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "." } }, "type": "bar" }, { "marker": { "color": "#00d539", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "." } }, "type": "bar" }, { "marker": { "color": "#00b287", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "." } }, "type": "bar" } ], "scatter": [ { "line": { "color": "#ff005c" }, "marker": { "color": "#ff005c", "opacity": 0.5, "size": 8, "symbol": "circle" }, "type": "scatter" }, { "line": { "color": "#00d539" }, "marker": { "color": "#00d539", "opacity": 0.5, "size": 8, "symbol": "square" }, "type": "scatter" }, { "line": { "color": "#ad6aff" }, "marker": { "color": "#ad6aff", "opacity": 0.5, "size": 8, "symbol": "diamond" }, "type": "scatter" }, { "line": { "color": "#ff9000" }, "marker": { "color": "#ff9000", "opacity": 0.5, "size": 8, "symbol": "triangle-down" }, "type": "scatter" }, { "line": { "color": "#00b287" }, "marker": { "color": "#00b287", "opacity": 0.5, "size": 8, "symbol": "cross" }, "type": "scatter" }, { "line": { "color": "#c97a88" }, "marker": { "color": "#c97a88", "opacity": 0.5, "size": 8, "symbol": "hexagram" }, "type": "scatter" }, { "line": { "color": "#ff005c" }, "marker": { "color": "#ff005c", "opacity": 0.5, "size": 8, "symbol": "square" }, "type": "scatter" }, { "line": { "color": "#00d539" }, "marker": { "color": "#00d539", "opacity": 0.5, "size": 8, "symbol": "diamond" }, "type": "scatter" }, { "line": { "color": "#ad6aff" }, "marker": { "color": "#ad6aff", "opacity": 0.5, "size": 8, "symbol": "triangle-down" }, "type": "scatter" }, { "line": { "color": "#ff9000" }, "marker": { "color": "#ff9000", "opacity": 0.5, "size": 8, "symbol": "cross" }, "type": "scatter" }, { "line": { "color": "#00b287" }, "marker": { "color": "#00b287", "opacity": 0.5, "size": 8, "symbol": "hexagram" }, "type": "scatter" }, { "line": { "color": "#c97a88" }, "marker": { "color": "#c97a88", "opacity": 0.5, "size": 8, "symbol": "circle" }, "type": "scatter" }, { "line": { "color": "#ff005c" }, "marker": { "color": "#ff005c", "opacity": 0.5, "size": 8, "symbol": "diamond" }, "type": "scatter" }, { "line": { "color": "#00d539" }, "marker": { "color": "#00d539", "opacity": 0.5, "size": 8, "symbol": "triangle-down" }, "type": "scatter" }, { "line": { "color": "#ad6aff" }, "marker": { "color": "#ad6aff", "opacity": 0.5, "size": 8, "symbol": "cross" }, "type": "scatter" }, { "line": { "color": "#ff9000" }, "marker": { "color": "#ff9000", "opacity": 0.5, "size": 8, "symbol": "hexagram" }, "type": "scatter" }, { "line": { "color": "#00b287" }, "marker": { "color": "#00b287", "opacity": 0.5, "size": 8, "symbol": "circle" }, "type": "scatter" }, { "line": { "color": "#c97a88" }, "marker": { "color": "#c97a88", "opacity": 0.5, "size": 8, "symbol": "square" }, "type": "scatter" }, { "line": { "color": "#ff005c" }, "marker": { "color": "#ff005c", "opacity": 0.5, "size": 8, "symbol": "triangle-down" }, "type": "scatter" }, { "line": { "color": "#00d539" }, "marker": { "color": "#00d539", "opacity": 0.5, "size": 8, "symbol": "cross" }, "type": "scatter" }, { "line": { "color": "#ad6aff" }, "marker": { "color": "#ad6aff", "opacity": 0.5, "size": 8, "symbol": "hexagram" }, "type": "scatter" }, { "line": { "color": "#ff9000" }, "marker": { "color": "#ff9000", "opacity": 0.5, "size": 8, "symbol": "circle" }, "type": "scatter" }, { "line": { "color": "#00b287" }, "marker": { "color": "#00b287", "opacity": 0.5, "size": 8, "symbol": "square" }, "type": "scatter" }, { "line": { "color": "#c97a88" }, "marker": { "color": "#c97a88", "opacity": 0.5, "size": 8, "symbol": "diamond" }, "type": "scatter" }, { "line": { "color": "#ff005c" }, "marker": { "color": "#ff005c", "opacity": 0.5, "size": 8, "symbol": "cross" }, "type": "scatter" }, { "line": { "color": "#00d539" }, "marker": { "color": "#00d539", "opacity": 0.5, "size": 8, "symbol": "hexagram" }, "type": "scatter" }, { "line": { "color": "#ad6aff" }, "marker": { "color": "#ad6aff", "opacity": 0.5, "size": 8, "symbol": "circle" }, "type": "scatter" }, { "line": { "color": "#ff9000" }, "marker": { "color": "#ff9000", "opacity": 0.5, "size": 8, "symbol": "square" }, "type": "scatter" }, { "line": { "color": "#00b287" }, "marker": { "color": "#00b287", "opacity": 0.5, "size": 8, "symbol": "diamond" }, "type": "scatter" }, { "line": { "color": "#c97a88" }, "marker": { "color": "#c97a88", "opacity": 0.5, "size": 8, "symbol": "triangle-down" }, "type": "scatter" }, { "line": { "color": "#ff005c" }, "marker": { "color": "#ff005c", "opacity": 0.5, "size": 8, "symbol": "hexagram" }, "type": "scatter" }, { "line": { "color": "#00d539" }, "marker": { "color": "#00d539", "opacity": 0.5, "size": 8, "symbol": "circle" }, "type": "scatter" }, { "line": { "color": "#ad6aff" }, "marker": { "color": "#ad6aff", "opacity": 0.5, "size": 8, "symbol": "square" }, "type": "scatter" }, { "line": { "color": "#ff9000" }, "marker": { "color": "#ff9000", "opacity": 0.5, "size": 8, "symbol": "diamond" }, "type": "scatter" }, { "line": { "color": "#00b287" }, "marker": { "color": "#00b287", "opacity": 0.5, "size": 8, "symbol": "triangle-down" }, "type": "scatter" }, { "line": { "color": "#c97a88" }, "marker": { "color": "#c97a88", "opacity": 0.5, "size": 8, "symbol": "cross" }, "type": "scatter" } ], "violin": [ { "box": { "visible": true }, "line": { "color": "#ff005c" }, "marker": { "color": "#ff005c", "opacity": 0.5, "size": 8, "symbol": "circle" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#00d539" }, "marker": { "color": "#00d539", "opacity": 0.5, "size": 8, "symbol": "square" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ad6aff" }, "marker": { "color": "#ad6aff", "opacity": 0.5, "size": 8, "symbol": "diamond" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ff9000" }, "marker": { "color": "#ff9000", "opacity": 0.5, "size": 8, "symbol": "triangle-down" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#00b287" }, "marker": { "color": "#00b287", "opacity": 0.5, "size": 8, "symbol": "cross" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#c97a88" }, "marker": { "color": "#c97a88", "opacity": 0.5, "size": 8, "symbol": "hexagram" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ff005c" }, "marker": { "color": "#ff005c", "opacity": 0.5, "size": 8, "symbol": "square" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#00d539" }, "marker": { "color": "#00d539", "opacity": 0.5, "size": 8, "symbol": "diamond" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ad6aff" }, "marker": { "color": "#ad6aff", "opacity": 0.5, "size": 8, "symbol": "triangle-down" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ff9000" }, "marker": { "color": "#ff9000", "opacity": 0.5, "size": 8, "symbol": "cross" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#00b287" }, "marker": { "color": "#00b287", "opacity": 0.5, "size": 8, "symbol": "hexagram" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#c97a88" }, "marker": { "color": "#c97a88", "opacity": 0.5, "size": 8, "symbol": "circle" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ff005c" }, "marker": { "color": "#ff005c", "opacity": 0.5, "size": 8, "symbol": "diamond" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#00d539" }, "marker": { "color": "#00d539", "opacity": 0.5, "size": 8, "symbol": "triangle-down" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ad6aff" }, "marker": { "color": "#ad6aff", "opacity": 0.5, "size": 8, "symbol": "cross" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ff9000" }, "marker": { "color": "#ff9000", "opacity": 0.5, "size": 8, "symbol": "hexagram" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#00b287" }, "marker": { "color": "#00b287", "opacity": 0.5, "size": 8, "symbol": "circle" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#c97a88" }, "marker": { "color": "#c97a88", "opacity": 0.5, "size": 8, "symbol": "square" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ff005c" }, "marker": { "color": "#ff005c", "opacity": 0.5, "size": 8, "symbol": "triangle-down" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#00d539" }, "marker": { "color": "#00d539", "opacity": 0.5, "size": 8, "symbol": "cross" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ad6aff" }, "marker": { "color": "#ad6aff", "opacity": 0.5, "size": 8, "symbol": "hexagram" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ff9000" }, "marker": { "color": "#ff9000", "opacity": 0.5, "size": 8, "symbol": "circle" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#00b287" }, "marker": { "color": "#00b287", "opacity": 0.5, "size": 8, "symbol": "square" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#c97a88" }, "marker": { "color": "#c97a88", "opacity": 0.5, "size": 8, "symbol": "diamond" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ff005c" }, "marker": { "color": "#ff005c", "opacity": 0.5, "size": 8, "symbol": "cross" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#00d539" }, "marker": { "color": "#00d539", "opacity": 0.5, "size": 8, "symbol": "hexagram" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ad6aff" }, "marker": { "color": "#ad6aff", "opacity": 0.5, "size": 8, "symbol": "circle" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ff9000" }, "marker": { "color": "#ff9000", "opacity": 0.5, "size": 8, "symbol": "square" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#00b287" }, "marker": { "color": "#00b287", "opacity": 0.5, "size": 8, "symbol": "diamond" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#c97a88" }, "marker": { "color": "#c97a88", "opacity": 0.5, "size": 8, "symbol": "triangle-down" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ff005c" }, "marker": { "color": "#ff005c", "opacity": 0.5, "size": 8, "symbol": "hexagram" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#00d539" }, "marker": { "color": "#00d539", "opacity": 0.5, "size": 8, "symbol": "circle" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ad6aff" }, "marker": { "color": "#ad6aff", "opacity": 0.5, "size": 8, "symbol": "square" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ff9000" }, "marker": { "color": "#ff9000", "opacity": 0.5, "size": 8, "symbol": "diamond" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#00b287" }, "marker": { "color": "#00b287", "opacity": 0.5, "size": 8, "symbol": "triangle-down" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#c97a88" }, "marker": { "color": "#c97a88", "opacity": 0.5, "size": 8, "symbol": "cross" }, "meanline": { "visible": true }, "type": "violin" } ] }, "layout": { "annotationdefaults": { "font": { "size": 12 } }, "autotypenumbers": "strict", "hoverlabel": { "bgcolor": "white", "font": { "family": "Rockwell", "size": 14 } }, "hovermode": "x unified", "legend": { "bgcolor": "white", "bordercolor": "Black", "borderwidth": 1, "font": { "family": "Rockwell" } }, "xaxis": { "linecolor": "black", "linewidth": 1, "mirror": true, "showline": true }, "yaxis": { "linecolor": "black", "linewidth": 1, "mirror": true, "showline": true } } }, "width": 900, "xaxis": { "anchor": "y", "domain": [ 0.0, 1.0 ], "showticklabels": true, "title": { "text": "Time (s)" } }, "yaxis": { "anchor": "x", "domain": [ 0.0, 1.0 ], "title": { "text": "Fractional Voltage" } } } }, "text/html": [ "
" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "duration.value = 60e-9\n", "amplitude.value = 0.6\n", "rise.value = 20e-9\n", "\n", "# render\n", "program.render()" ] }, { "cell_type": "raw", "id": "89bd6524", "metadata": { "raw_mimetype": "text/restructuredtext" }, "source": [ "We can also create a flattop with different durations for the rise and\n", "fall times." ] }, { "cell_type": "code", "execution_count": 7, "id": "550c9528", "metadata": { "execution": { "iopub.execute_input": "2025-10-02T01:30:24.786804Z", "iopub.status.busy": "2025-10-02T01:30:24.786553Z", "iopub.status.idle": "2025-10-02T01:30:24.847194Z", "shell.execute_reply": "2025-10-02T01:30:24.846311Z" } }, "outputs": [ { "data": { "application/vnd.plotly.v1+json": { "config": { "plotlyServerURL": "https://plot.ly" }, "data": [ { "dx": 1e-09, "legendgroup": "awg_channel, labels: (0,)", "legendgrouptitle": { "text": "awg_channel, labels: (0,)" }, "name": "Drive pulse for awg_channel, labels: (0,)", "type": "scatter", "x0": 0, "xaxis": "x", "y": [ 1.6653345369377347e-17, 0.020776981143868133, 0.0446850687977305, 0.07182446790413725, 0.10220432622725792, 0.13572455389693636, 0.17216042525095726, 0.21115151610142513, 0.2521964607259581, 0.294654799146328, 0.3377568244176708, 0.38062184553633466, 0.4222846847589575, 0.4617295745599023, 0.49792996688477675, 0.5298921797688105, 0.5567003470237615, 0.5775598604896687, 0.5918364407668092, 0.5990881596770921, 0.5990881596770921, 0.5990881596770921, 0.5990881596770921, 0.5990881596770921, 0.5990881596770921, 0.5990881596770921, 0.5990881596770921, 0.5990881596770921, 0.5990881596770921, 0.5990881596770921, 0.5990881596770921, 0.5990881596770921, 0.5990881596770921, 0.5990881596770921, 0.5990881596770921, 0.5990881596770921, 0.5990881596770921, 0.5990881596770921, 0.5990881596770921, 0.5990881596770921, 0.5990881596770921, 0.5990881596770921, 0.5990881596770921, 0.5990881596770921, 0.5990881596770921, 0.5990881596770921, 0.5990881596770921, 0.5990881596770921, 0.5990881596770921, 0.5990881596770921, 0.5990881596770921, 0.5990881596770921, 0.5990881596770921, 0.5990881596770921, 0.5990881596770921, 0.5990881596770921, 0.5990881596770921, 0.5990881596770921, 0.5990881596770921, 0.5990881596770921, 0.5990881596770921, 0.5990881596770921, 0.5990881596770921, 0.5990881596770921, 0.5990881596770921, 0.5990881596770921, 0.5990881596770921, 0.5990881596770921, 0.5990881596770921, 0.5990881596770921, 0.5990881596770921, 0.5990881596770921, 0.5990881596770921, 0.5990881596770921, 0.5990881596770921, 0.5990881596770921, 0.5990881596770921, 0.5990881596770921, 0.5990881596770921, 0.5990881596770921, 0.5998584144902588, 0.5987267699251605, 0.5964690154460887, 0.5930961752649957, 0.5886246734880768, 0.5830762008933726, 0.5764775396646022, 0.5688603480627514, 0.5602609074576702, 0.5507198345476234, 0.5402817619598257, 0.5289949907445657, 0.5169111185454743, 0.5040846474456053, 0.4905725756508768, 0.47643397727771386, 0.4617295745599024, 0.44652130678121343, 0.4308719001766044, 0.4148444429279838, 0.398501969213658, 0.381907056057377, 0.36512143646778356, 0.3482056320669361, 0.33121860808282083, 0.314217453231086, 0.2972570866415446, 0.28038999360136047, 0.2636659914952711, 0.247132026929663, 0.23083200463753106, 0.21480664838073207, 0.19909339369957468, 0.18372631201222792, 0.1687360652418132, 0.15414988985085812, 0.13999160889399553, 0.12628167046270436, 0.11303721069218953, 0.10027213933129035, 0.08799724574202969, 0.07622032309598688, 0.06494630846943049, 0.05417743650692476, 0.043913404322342815, 0.034151545334852984, 0.024887009793195792, 0.016112949821801465, 0.007820706924221765, 1.6653345369377347e-17 ], "yaxis": "y" } ], "layout": { "annotations": [ { "font": { "size": 16 }, "showarrow": false, "text": "Waveforms for awg_channel, labels: (0,)", "x": 0.5, "xanchor": "center", "xref": "paper", "y": 1.0, "yanchor": "bottom", "yref": "paper" } ], "height": 500, "template": { "data": { "bar": [ { "marker": { "color": "#ad6aff", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "" } }, "type": "bar" }, { "marker": { "color": "#c97a88", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "" } }, "type": "bar" }, { "marker": { "color": "#ff005c", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "" } }, "type": "bar" }, { "marker": { "color": "#ff9000", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "" } }, "type": "bar" }, { "marker": { "color": "#00d539", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "" } }, "type": "bar" }, { "marker": { "color": "#00b287", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "" } }, "type": "bar" }, { "marker": { "color": "#ad6aff", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "/" } }, "type": "bar" }, { "marker": { "color": "#c97a88", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "/" } }, "type": "bar" }, { "marker": { "color": "#ff005c", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "/" } }, "type": "bar" }, { "marker": { "color": "#ff9000", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "/" } }, "type": "bar" }, { "marker": { "color": "#00d539", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "/" } }, "type": "bar" }, { "marker": { "color": "#00b287", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "/" } }, "type": "bar" }, { "marker": { "color": "#ad6aff", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "\\" } }, "type": "bar" }, { "marker": { "color": "#c97a88", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "\\" } }, "type": "bar" }, { "marker": { "color": "#ff005c", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "\\" } }, "type": "bar" }, { "marker": { "color": "#ff9000", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "\\" } }, "type": "bar" }, { "marker": { "color": "#00d539", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "\\" } }, "type": "bar" }, { "marker": { "color": "#00b287", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "\\" } }, "type": "bar" }, { "marker": { "color": "#ad6aff", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "x" } }, "type": "bar" }, { "marker": { "color": "#c97a88", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "x" } }, "type": "bar" }, { "marker": { "color": "#ff005c", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "x" } }, "type": "bar" }, { "marker": { "color": "#ff9000", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "x" } }, "type": "bar" }, { "marker": { "color": "#00d539", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "x" } }, "type": "bar" }, { "marker": { "color": "#00b287", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "x" } }, "type": "bar" }, { "marker": { "color": "#ad6aff", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "-" } }, "type": "bar" }, { "marker": { "color": "#c97a88", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "-" } }, "type": "bar" }, { "marker": { "color": "#ff005c", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "-" } }, "type": "bar" }, { "marker": { "color": "#ff9000", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "-" } }, "type": "bar" }, { "marker": { "color": "#00d539", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "-" } }, "type": "bar" }, { "marker": { "color": "#00b287", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "-" } }, "type": "bar" }, { "marker": { "color": "#ad6aff", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "|" } }, "type": "bar" }, { "marker": { "color": "#c97a88", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "|" } }, "type": "bar" }, { "marker": { "color": "#ff005c", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "|" } }, "type": "bar" }, { "marker": { "color": "#ff9000", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "|" } }, "type": "bar" }, { "marker": { "color": "#00d539", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "|" } }, "type": "bar" }, { "marker": { "color": "#00b287", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "|" } }, "type": "bar" }, { "marker": { "color": "#ad6aff", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "+" } }, "type": "bar" }, { "marker": { "color": "#c97a88", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "+" } }, "type": "bar" }, { "marker": { "color": "#ff005c", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "+" } }, "type": "bar" }, { "marker": { "color": "#ff9000", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "+" } }, "type": "bar" }, { "marker": { "color": "#00d539", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "+" } }, "type": "bar" }, { "marker": { "color": "#00b287", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "+" } }, "type": "bar" }, { "marker": { "color": "#ad6aff", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "." } }, "type": "bar" }, { "marker": { "color": "#c97a88", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "." } }, "type": "bar" }, { "marker": { "color": "#ff005c", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "." } }, "type": "bar" }, { "marker": { "color": "#ff9000", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "." } }, "type": "bar" }, { "marker": { "color": "#00d539", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "." } }, "type": "bar" }, { "marker": { "color": "#00b287", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "." } }, "type": "bar" } ], "scatter": [ { "line": { "color": "#ff005c" }, "marker": { "color": "#ff005c", "opacity": 0.5, "size": 8, "symbol": "circle" }, "type": "scatter" }, { "line": { "color": "#00d539" }, "marker": { "color": "#00d539", "opacity": 0.5, "size": 8, "symbol": "square" }, "type": "scatter" }, { "line": { "color": "#ad6aff" }, "marker": { "color": "#ad6aff", "opacity": 0.5, "size": 8, "symbol": "diamond" }, "type": "scatter" }, { "line": { "color": "#ff9000" }, "marker": { "color": "#ff9000", "opacity": 0.5, "size": 8, "symbol": "triangle-down" }, "type": "scatter" }, { "line": { "color": "#00b287" }, "marker": { "color": "#00b287", "opacity": 0.5, "size": 8, "symbol": "cross" }, "type": "scatter" }, { "line": { "color": "#c97a88" }, "marker": { "color": "#c97a88", "opacity": 0.5, "size": 8, "symbol": "hexagram" }, "type": "scatter" }, { "line": { "color": "#ff005c" }, "marker": { "color": "#ff005c", "opacity": 0.5, "size": 8, "symbol": "square" }, "type": "scatter" }, { "line": { "color": "#00d539" }, "marker": { "color": "#00d539", "opacity": 0.5, "size": 8, "symbol": "diamond" }, "type": "scatter" }, { "line": { "color": "#ad6aff" }, "marker": { "color": "#ad6aff", "opacity": 0.5, "size": 8, "symbol": "triangle-down" }, "type": "scatter" }, { "line": { "color": "#ff9000" }, "marker": { "color": "#ff9000", "opacity": 0.5, "size": 8, "symbol": "cross" }, "type": "scatter" }, { "line": { "color": "#00b287" }, "marker": { "color": "#00b287", "opacity": 0.5, "size": 8, "symbol": "hexagram" }, "type": "scatter" }, { "line": { "color": "#c97a88" }, "marker": { "color": "#c97a88", "opacity": 0.5, "size": 8, "symbol": "circle" }, "type": "scatter" }, { "line": { "color": "#ff005c" }, "marker": { "color": "#ff005c", "opacity": 0.5, "size": 8, "symbol": "diamond" }, "type": "scatter" }, { "line": { "color": "#00d539" }, "marker": { "color": "#00d539", "opacity": 0.5, "size": 8, "symbol": "triangle-down" }, "type": "scatter" }, { "line": { "color": "#ad6aff" }, "marker": { "color": "#ad6aff", "opacity": 0.5, "size": 8, "symbol": "cross" }, "type": "scatter" }, { "line": { "color": "#ff9000" }, "marker": { "color": "#ff9000", "opacity": 0.5, "size": 8, "symbol": "hexagram" }, "type": "scatter" }, { "line": { "color": "#00b287" }, "marker": { "color": "#00b287", "opacity": 0.5, "size": 8, "symbol": "circle" }, "type": "scatter" }, { "line": { "color": "#c97a88" }, "marker": { "color": "#c97a88", "opacity": 0.5, "size": 8, "symbol": "square" }, "type": "scatter" }, { "line": { "color": "#ff005c" }, "marker": { "color": "#ff005c", "opacity": 0.5, "size": 8, "symbol": "triangle-down" }, "type": "scatter" }, { "line": { "color": "#00d539" }, "marker": { "color": "#00d539", "opacity": 0.5, "size": 8, "symbol": "cross" }, "type": "scatter" }, { "line": { "color": "#ad6aff" }, "marker": { "color": "#ad6aff", "opacity": 0.5, "size": 8, "symbol": "hexagram" }, "type": "scatter" }, { "line": { "color": "#ff9000" }, "marker": { "color": "#ff9000", "opacity": 0.5, "size": 8, "symbol": "circle" }, "type": "scatter" }, { "line": { "color": "#00b287" }, "marker": { "color": "#00b287", "opacity": 0.5, "size": 8, "symbol": "square" }, "type": "scatter" }, { "line": { "color": "#c97a88" }, "marker": { "color": "#c97a88", "opacity": 0.5, "size": 8, "symbol": "diamond" }, "type": "scatter" }, { "line": { "color": "#ff005c" }, "marker": { "color": "#ff005c", "opacity": 0.5, "size": 8, "symbol": "cross" }, "type": "scatter" }, { "line": { "color": "#00d539" }, "marker": { "color": "#00d539", "opacity": 0.5, "size": 8, "symbol": "hexagram" }, "type": "scatter" }, { "line": { "color": "#ad6aff" }, "marker": { "color": "#ad6aff", "opacity": 0.5, "size": 8, "symbol": "circle" }, "type": "scatter" }, { "line": { "color": "#ff9000" }, "marker": { "color": "#ff9000", "opacity": 0.5, "size": 8, "symbol": "square" }, "type": "scatter" }, { "line": { "color": "#00b287" }, "marker": { "color": "#00b287", "opacity": 0.5, "size": 8, "symbol": "diamond" }, "type": "scatter" }, { "line": { "color": "#c97a88" }, "marker": { "color": "#c97a88", "opacity": 0.5, "size": 8, "symbol": "triangle-down" }, "type": "scatter" }, { "line": { "color": "#ff005c" }, "marker": { "color": "#ff005c", "opacity": 0.5, "size": 8, "symbol": "hexagram" }, "type": "scatter" }, { "line": { "color": "#00d539" }, "marker": { "color": "#00d539", "opacity": 0.5, "size": 8, "symbol": "circle" }, "type": "scatter" }, { "line": { "color": "#ad6aff" }, "marker": { "color": "#ad6aff", "opacity": 0.5, "size": 8, "symbol": "square" }, "type": "scatter" }, { "line": { "color": "#ff9000" }, "marker": { "color": "#ff9000", "opacity": 0.5, "size": 8, "symbol": "diamond" }, "type": "scatter" }, { "line": { "color": "#00b287" }, "marker": { "color": "#00b287", "opacity": 0.5, "size": 8, "symbol": "triangle-down" }, "type": "scatter" }, { "line": { "color": "#c97a88" }, "marker": { "color": "#c97a88", "opacity": 0.5, "size": 8, "symbol": "cross" }, "type": "scatter" } ], "violin": [ { "box": { "visible": true }, "line": { "color": "#ff005c" }, "marker": { "color": "#ff005c", "opacity": 0.5, "size": 8, "symbol": "circle" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#00d539" }, "marker": { "color": "#00d539", "opacity": 0.5, "size": 8, "symbol": "square" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ad6aff" }, "marker": { "color": "#ad6aff", "opacity": 0.5, "size": 8, "symbol": "diamond" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ff9000" }, "marker": { "color": "#ff9000", "opacity": 0.5, "size": 8, "symbol": "triangle-down" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#00b287" }, "marker": { "color": "#00b287", "opacity": 0.5, "size": 8, "symbol": "cross" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#c97a88" }, "marker": { "color": "#c97a88", "opacity": 0.5, "size": 8, "symbol": "hexagram" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ff005c" }, "marker": { "color": "#ff005c", "opacity": 0.5, "size": 8, "symbol": "square" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#00d539" }, "marker": { "color": "#00d539", "opacity": 0.5, "size": 8, "symbol": "diamond" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ad6aff" }, "marker": { "color": "#ad6aff", "opacity": 0.5, "size": 8, "symbol": "triangle-down" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ff9000" }, "marker": { "color": "#ff9000", "opacity": 0.5, "size": 8, "symbol": "cross" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#00b287" }, "marker": { "color": "#00b287", "opacity": 0.5, "size": 8, "symbol": "hexagram" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#c97a88" }, "marker": { "color": "#c97a88", "opacity": 0.5, "size": 8, "symbol": "circle" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ff005c" }, "marker": { "color": "#ff005c", "opacity": 0.5, "size": 8, "symbol": "diamond" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#00d539" }, "marker": { "color": "#00d539", "opacity": 0.5, "size": 8, "symbol": "triangle-down" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ad6aff" }, "marker": { "color": "#ad6aff", "opacity": 0.5, "size": 8, "symbol": "cross" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ff9000" }, "marker": { "color": "#ff9000", "opacity": 0.5, "size": 8, "symbol": "hexagram" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#00b287" }, "marker": { "color": "#00b287", "opacity": 0.5, "size": 8, "symbol": "circle" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#c97a88" }, "marker": { "color": "#c97a88", "opacity": 0.5, "size": 8, "symbol": "square" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ff005c" }, "marker": { "color": "#ff005c", "opacity": 0.5, "size": 8, "symbol": "triangle-down" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#00d539" }, "marker": { "color": "#00d539", "opacity": 0.5, "size": 8, "symbol": "cross" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ad6aff" }, "marker": { "color": "#ad6aff", "opacity": 0.5, "size": 8, "symbol": "hexagram" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ff9000" }, "marker": { "color": "#ff9000", "opacity": 0.5, "size": 8, "symbol": "circle" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#00b287" }, "marker": { "color": "#00b287", "opacity": 0.5, "size": 8, "symbol": "square" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#c97a88" }, "marker": { "color": "#c97a88", "opacity": 0.5, "size": 8, "symbol": "diamond" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ff005c" }, "marker": { "color": "#ff005c", "opacity": 0.5, "size": 8, "symbol": "cross" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#00d539" }, "marker": { "color": "#00d539", "opacity": 0.5, "size": 8, "symbol": "hexagram" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ad6aff" }, "marker": { "color": "#ad6aff", "opacity": 0.5, "size": 8, "symbol": "circle" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ff9000" }, "marker": { "color": "#ff9000", "opacity": 0.5, "size": 8, "symbol": "square" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#00b287" }, "marker": { "color": "#00b287", "opacity": 0.5, "size": 8, "symbol": "diamond" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#c97a88" }, "marker": { "color": "#c97a88", "opacity": 0.5, "size": 8, "symbol": "triangle-down" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ff005c" }, "marker": { "color": "#ff005c", "opacity": 0.5, "size": 8, "symbol": "hexagram" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#00d539" }, "marker": { "color": "#00d539", "opacity": 0.5, "size": 8, "symbol": "circle" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ad6aff" }, "marker": { "color": "#ad6aff", "opacity": 0.5, "size": 8, "symbol": "square" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ff9000" }, "marker": { "color": "#ff9000", "opacity": 0.5, "size": 8, "symbol": "diamond" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#00b287" }, "marker": { "color": "#00b287", "opacity": 0.5, "size": 8, "symbol": "triangle-down" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#c97a88" }, "marker": { "color": "#c97a88", "opacity": 0.5, "size": 8, "symbol": "cross" }, "meanline": { "visible": true }, "type": "violin" } ] }, "layout": { "annotationdefaults": { "font": { "size": 12 } }, "autotypenumbers": "strict", "hoverlabel": { "bgcolor": "white", "font": { "family": "Rockwell", "size": 14 } }, "hovermode": "x unified", "legend": { "bgcolor": "white", "bordercolor": "Black", "borderwidth": 1, "font": { "family": "Rockwell" } }, "xaxis": { "linecolor": "black", "linewidth": 1, "mirror": true, "showline": true }, "yaxis": { "linecolor": "black", "linewidth": 1, "mirror": true, "showline": true } } }, "width": 900, "xaxis": { "anchor": "y", "domain": [ 0.0, 1.0 ], "showticklabels": true, "title": { "text": "Time (s)" } }, "yaxis": { "anchor": "x", "domain": [ 0.0, 1.0 ], "title": { "text": "Fractional Voltage" } } } }, "text/html": [ "
" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "program = qcs.Program()\n", "program.add_waveform(\n", " qcs.DCWaveform.create_dc_flattop(\n", " rise_duration=rise,\n", " hold_duration=duration,\n", " fall_duration=50e-9,\n", " envelope=qcs.GaussianEnvelope(),\n", " amplitude=amplitude,\n", " ),\n", " awg,\n", ")\n", "\n", "# render\n", "program.render()" ] }, { "cell_type": "raw", "id": "62fa7d46", "metadata": { "raw_mimetype": "text/restructuredtext" }, "source": [ "Derivative Envelope\n", "^^^^^^^^^^^^^^^^^^^\n", "\n", "The derivative envelope is specified by a ``base_envelope`` and optional\n", "``step_size``. The ``base_envelope`` can be any envelope defined by |QCS|." ] }, { "cell_type": "code", "execution_count": 8, "id": "590bd886", "metadata": { "execution": { "iopub.execute_input": "2025-10-02T01:30:24.850711Z", "iopub.status.busy": "2025-10-02T01:30:24.850317Z", "iopub.status.idle": "2025-10-02T01:30:24.931469Z", "shell.execute_reply": "2025-10-02T01:30:24.930700Z" } }, "outputs": [ { "data": { "application/vnd.plotly.v1+json": { "config": { "plotlyServerURL": "https://plot.ly" }, "data": [ { "dx": 1e-09, "legendgroup": "awg_channel, labels: (0,)", "legendgrouptitle": { "text": "awg_channel, labels: (0,)" }, "name": "Drive pulse for awg_channel, labels: (0,)", "type": "scatter", "x0": 0, "xaxis": "x", "y": [ 2.1643959958818043e-05, 2.7316787818327465e-05, 3.4593182643130253e-05, 4.369380717103833e-05, 5.504486298108679e-05, 6.916402740330398e-05, 8.765586559062793e-05, 0.000109551361320242, 0.00013655826811436884, 0.00016977766147062778, 0.00021052529417677157, 0.000260368254786532, 0.00032116675226695403, 0.00039512150757161816, 0.000484827228581153, 0.0005933326274916227, 0.000731410309199519, 0.0008902673199826762, 0.0010807625118863687, 0.0013085461517063223, 0.0015801384350828222, 0.001903035438639869, 0.002285822609665309, 0.0027382952752120597, 0.003271585383178883, 0.0038982933790987994, 0.004632623773914585, 0.005536972554023045, 0.006543837362761106, 0.007712979081236574, 0.009066484962247637, 0.010628705532738056, 0.012426357227543148, 0.014488605891266328, 0.01684712593917207, 0.01953612952067054, 0.022592359636705753, 0.026239580784888843, 0.03017385686860743, 0.03460227579157773, 0.03957078150479806, 0.04512702986180305, 0.05132002504275949, 0.058199675641572135, 0.06581626594718729, 0.0742198390650831, 0.08345948989611238, 0.09358256761878576, 0.10521146954664412, 0.1172814111939348, 0.13035874838919295, 0.1444738425982421, 0.15965003649325013, 0.1759024251350558, 0.19323659936092663, 0.2116473811328612, 0.23111757327265509, 0.25161674848208454, 0.27419909521748365, 0.2966507334854799, 0.31994548013660606, 0.3439887727998464, 0.368668330055331, 0.3938538010818813, 0.41939666375838736, 0.4451303979467253, 0.4708709575653113, 0.49641756108773444, 0.5215538152878784, 0.547252817155451, 0.5708136665627842, 0.5932248249641591, 0.6142252265618472, 0.6335490483382059, 0.6509288005413589, 0.6660986638584633, 0.6787980302929618, 0.6887751976058307, 0.6957911607052355, 0.6997277572832215, 0.7, 0.6967000243708127, 0.6896786690557039, 0.6788177303860614, 0.6640329018927532, 0.6452763270474268, 0.6225387028333095, 0.5958508782687908, 0.5652849000639635, 0.5309544670447023, 0.49102638064765547, 0.44950846930374566, 0.40482504089721877, 0.35725019636850314, 0.30709239503556546, 0.2546911795112771, 0.20041337765672929, 0.14464884044614265, 0.08780578475749602, 0.030305818810461498, -0.030305818810461498, -0.08780578475749602, -0.1446488404461683, -0.20041337765675493, -0.2546911795113027, -0.30709239503559105, -0.35725019636852867, -0.40482504089726995, -0.44950846930379695, -0.49102638064770676, -0.5309544670447535, -0.5652849000640404, -0.5958508782688677, -0.6225387028333608, -0.6452763270474781, -0.6640329018928302, -0.6788177303861127, -0.6896786690557808, -0.6967000243708896, -0.6999999999999231, -0.6997277572831445, -0.6957911607053124, -0.6887751976059076, -0.678798030293026, -0.6660986638585402, -0.650928800541423, -0.6335490483382828, -0.614225226561924, -0.593224824964223, -0.5708136665628355, -0.5472528171555152, -0.5215538152879424, -0.4964175610877857, -0.4708709575653754, -0.4451303979467702, -0.4193966637584194, -0.39385380108193246, -0.36866833005529903, -0.34398877279980794, -0.31994548013656127, -0.29665073348542864, -0.2741990952174292, -0.2516167484821134, -0.2311175732726743, -0.2116473811328772, -0.19323659936094906, -0.17590242513506862, -0.15965003649326778, -0.14447384259825652, -0.13035874838919295, -0.1172814111939348, -0.10521146954664412, -0.09358256761879538, -0.08345948989612118, -0.07421983906509272, -0.06581626594717607, -0.058199675641568936, -0.05132002504275308, -0.04512702986179744, -0.03957078150479325, -0.03460227579157372, -0.03017385686860222, -0.026239580784888843, -0.022592359636705753, -0.01953612952067054, -0.01684712593917207, -0.014488605891266328, -0.012426357227543148, -0.010628705532738056, -0.009066484962247637, -0.007712979081236574, -0.006543837362761106, -0.005536972554023045, -0.004632623773913885, -0.0038982933790986246, -0.0032715853831787327, -0.002738295275211684, -0.002285822609665109, -0.0019030354386396064, -0.0015801384350824094, -0.001308546151706072, -0.001080762511886275, -0.0008902673199823633, -0.0007314103091993312, -0.0005933326274916227, -0.000484827228581153, -0.00039512150757161816, -0.00032116675226695403, -0.000260368254786532, -0.00021052529417677157, -0.00016977766147062778, -0.00013655826811436884, -0.000109551361320242, -8.765586559062793e-05, -6.916402740328326e-05, -5.5044862981074266e-05, -4.369380717102855e-05, -3.4593182643122617e-05, -2.7316787818321597e-05, -2.1643959958814912e-05 ], "yaxis": "y" } ], "layout": { "annotations": [ { "font": { "size": 16 }, "showarrow": false, "text": "Waveforms for awg_channel, labels: (0,)", "x": 0.5, "xanchor": "center", "xref": "paper", "y": 1.0, "yanchor": "bottom", "yref": "paper" } ], "height": 500, "template": { "data": { "bar": [ { "marker": { "color": "#ad6aff", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "" } }, "type": "bar" }, { "marker": { "color": "#c97a88", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "" } }, "type": "bar" }, { "marker": { "color": "#ff005c", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "" } }, "type": "bar" }, { "marker": { "color": "#ff9000", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "" } }, "type": "bar" }, { "marker": { "color": "#00d539", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "" } }, "type": "bar" }, { "marker": { "color": "#00b287", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "" } }, "type": "bar" }, { "marker": { "color": "#ad6aff", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "/" } }, "type": "bar" }, { "marker": { "color": "#c97a88", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "/" } }, "type": "bar" }, { "marker": { "color": "#ff005c", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "/" } }, "type": "bar" }, { "marker": { "color": "#ff9000", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "/" } }, "type": "bar" }, { "marker": { "color": "#00d539", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "/" } }, "type": "bar" }, { "marker": { "color": "#00b287", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "/" } }, "type": "bar" }, { "marker": { "color": "#ad6aff", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "\\" } }, "type": "bar" }, { "marker": { "color": "#c97a88", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "\\" } }, "type": "bar" }, { "marker": { "color": "#ff005c", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "\\" } }, "type": "bar" }, { "marker": { "color": "#ff9000", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "\\" } }, "type": "bar" }, { "marker": { "color": "#00d539", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "\\" } }, "type": "bar" }, { "marker": { "color": "#00b287", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "\\" } }, "type": "bar" }, { "marker": { "color": "#ad6aff", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "x" } }, "type": "bar" }, { "marker": { "color": "#c97a88", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "x" } }, "type": "bar" }, { "marker": { "color": "#ff005c", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "x" } }, "type": "bar" }, { "marker": { "color": "#ff9000", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "x" } }, "type": "bar" }, { "marker": { "color": "#00d539", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "x" } }, "type": "bar" }, { "marker": { "color": "#00b287", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "x" } }, "type": "bar" }, { "marker": { "color": "#ad6aff", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "-" } }, "type": "bar" }, { "marker": { "color": "#c97a88", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "-" } }, "type": "bar" }, { "marker": { "color": "#ff005c", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "-" } }, "type": "bar" }, { "marker": { "color": "#ff9000", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "-" } }, "type": "bar" }, { "marker": { "color": "#00d539", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "-" } }, "type": "bar" }, { "marker": { "color": "#00b287", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "-" } }, "type": "bar" }, { "marker": { "color": "#ad6aff", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "|" } }, "type": "bar" }, { "marker": { "color": "#c97a88", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "|" } }, "type": "bar" }, { "marker": { "color": "#ff005c", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "|" } }, "type": "bar" }, { "marker": { "color": "#ff9000", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "|" } }, "type": "bar" }, { "marker": { "color": "#00d539", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "|" } }, "type": "bar" }, { "marker": { "color": "#00b287", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "|" } }, "type": "bar" }, { "marker": { "color": "#ad6aff", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "+" } }, "type": "bar" }, { "marker": { "color": "#c97a88", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "+" } }, "type": "bar" }, { "marker": { "color": "#ff005c", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "+" } }, "type": "bar" }, { "marker": { "color": "#ff9000", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "+" } }, "type": "bar" }, { "marker": { "color": "#00d539", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "+" } }, "type": "bar" }, { "marker": { "color": "#00b287", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "+" } }, "type": "bar" }, { "marker": { "color": "#ad6aff", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "." } }, "type": "bar" }, { "marker": { "color": "#c97a88", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "." } }, "type": "bar" }, { "marker": { "color": "#ff005c", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "." } }, "type": "bar" }, { "marker": { "color": "#ff9000", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "." } }, "type": "bar" }, { "marker": { "color": "#00d539", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "." } }, "type": "bar" }, { "marker": { "color": "#00b287", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "." } }, "type": "bar" } ], "scatter": [ { "line": { "color": "#ff005c" }, "marker": { "color": "#ff005c", "opacity": 0.5, "size": 8, "symbol": "circle" }, "type": "scatter" }, { "line": { "color": "#00d539" }, "marker": { "color": "#00d539", "opacity": 0.5, "size": 8, "symbol": "square" }, "type": "scatter" }, { "line": { "color": "#ad6aff" }, "marker": { "color": "#ad6aff", "opacity": 0.5, "size": 8, "symbol": "diamond" }, "type": "scatter" }, { "line": { "color": "#ff9000" }, "marker": { "color": "#ff9000", "opacity": 0.5, "size": 8, "symbol": "triangle-down" }, "type": "scatter" }, { "line": { "color": "#00b287" }, "marker": { "color": "#00b287", "opacity": 0.5, "size": 8, "symbol": "cross" }, "type": "scatter" }, { "line": { "color": "#c97a88" }, "marker": { "color": "#c97a88", "opacity": 0.5, "size": 8, "symbol": "hexagram" }, "type": "scatter" }, { "line": { "color": "#ff005c" }, "marker": { "color": "#ff005c", "opacity": 0.5, "size": 8, "symbol": "square" }, "type": "scatter" }, { "line": { "color": "#00d539" }, "marker": { "color": "#00d539", "opacity": 0.5, "size": 8, "symbol": "diamond" }, "type": "scatter" }, { "line": { "color": "#ad6aff" }, "marker": { "color": "#ad6aff", "opacity": 0.5, "size": 8, "symbol": "triangle-down" }, "type": "scatter" }, { "line": { "color": "#ff9000" }, "marker": { "color": "#ff9000", "opacity": 0.5, "size": 8, "symbol": "cross" }, "type": "scatter" }, { "line": { "color": "#00b287" }, "marker": { "color": "#00b287", "opacity": 0.5, "size": 8, "symbol": "hexagram" }, "type": "scatter" }, { "line": { "color": "#c97a88" }, "marker": { "color": "#c97a88", "opacity": 0.5, "size": 8, "symbol": "circle" }, "type": "scatter" }, { "line": { "color": "#ff005c" }, "marker": { "color": "#ff005c", "opacity": 0.5, "size": 8, "symbol": "diamond" }, "type": "scatter" }, { "line": { "color": "#00d539" }, "marker": { "color": "#00d539", "opacity": 0.5, "size": 8, "symbol": "triangle-down" }, "type": "scatter" }, { "line": { "color": "#ad6aff" }, "marker": { "color": "#ad6aff", "opacity": 0.5, "size": 8, "symbol": "cross" }, "type": "scatter" }, { "line": { "color": "#ff9000" }, "marker": { "color": "#ff9000", "opacity": 0.5, "size": 8, "symbol": "hexagram" }, "type": "scatter" }, { "line": { "color": "#00b287" }, "marker": { "color": "#00b287", "opacity": 0.5, "size": 8, "symbol": "circle" }, "type": "scatter" }, { "line": { "color": "#c97a88" }, "marker": { "color": "#c97a88", "opacity": 0.5, "size": 8, "symbol": "square" }, "type": "scatter" }, { "line": { "color": "#ff005c" }, "marker": { "color": "#ff005c", "opacity": 0.5, "size": 8, "symbol": "triangle-down" }, "type": "scatter" }, { "line": { "color": "#00d539" }, "marker": { "color": "#00d539", "opacity": 0.5, "size": 8, "symbol": "cross" }, "type": "scatter" }, { "line": { "color": "#ad6aff" }, "marker": { "color": "#ad6aff", "opacity": 0.5, "size": 8, "symbol": "hexagram" }, "type": "scatter" }, { "line": { "color": "#ff9000" }, "marker": { "color": "#ff9000", "opacity": 0.5, "size": 8, "symbol": "circle" }, "type": "scatter" }, { "line": { "color": "#00b287" }, "marker": { "color": "#00b287", "opacity": 0.5, "size": 8, "symbol": "square" }, "type": "scatter" }, { "line": { "color": "#c97a88" }, "marker": { "color": "#c97a88", "opacity": 0.5, "size": 8, "symbol": "diamond" }, "type": "scatter" }, { "line": { "color": "#ff005c" }, "marker": { "color": "#ff005c", "opacity": 0.5, "size": 8, "symbol": "cross" }, "type": "scatter" }, { "line": { "color": "#00d539" }, "marker": { "color": "#00d539", "opacity": 0.5, "size": 8, "symbol": "hexagram" }, "type": "scatter" }, { "line": { "color": "#ad6aff" }, "marker": { "color": "#ad6aff", "opacity": 0.5, "size": 8, "symbol": "circle" }, "type": "scatter" }, { "line": { "color": "#ff9000" }, "marker": { "color": "#ff9000", "opacity": 0.5, "size": 8, "symbol": "square" }, "type": "scatter" }, { "line": { "color": "#00b287" }, "marker": { "color": "#00b287", "opacity": 0.5, "size": 8, "symbol": "diamond" }, "type": "scatter" }, { "line": { "color": "#c97a88" }, "marker": { "color": "#c97a88", "opacity": 0.5, "size": 8, "symbol": "triangle-down" }, "type": "scatter" }, { "line": { "color": "#ff005c" }, "marker": { "color": "#ff005c", "opacity": 0.5, "size": 8, "symbol": "hexagram" }, "type": "scatter" }, { "line": { "color": "#00d539" }, "marker": { "color": "#00d539", "opacity": 0.5, "size": 8, "symbol": "circle" }, "type": "scatter" }, { "line": { "color": "#ad6aff" }, "marker": { "color": "#ad6aff", "opacity": 0.5, "size": 8, "symbol": "square" }, "type": "scatter" }, { "line": { "color": "#ff9000" }, "marker": { "color": "#ff9000", "opacity": 0.5, "size": 8, "symbol": "diamond" }, "type": "scatter" }, { "line": { "color": "#00b287" }, "marker": { "color": "#00b287", "opacity": 0.5, "size": 8, "symbol": "triangle-down" }, "type": "scatter" }, { "line": { "color": "#c97a88" }, "marker": { "color": "#c97a88", "opacity": 0.5, "size": 8, "symbol": "cross" }, "type": "scatter" } ], "violin": [ { "box": { "visible": true }, "line": { "color": "#ff005c" }, "marker": { "color": "#ff005c", "opacity": 0.5, "size": 8, "symbol": "circle" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#00d539" }, "marker": { "color": "#00d539", "opacity": 0.5, "size": 8, "symbol": "square" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ad6aff" }, "marker": { "color": "#ad6aff", "opacity": 0.5, "size": 8, "symbol": "diamond" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ff9000" }, "marker": { "color": "#ff9000", "opacity": 0.5, "size": 8, "symbol": "triangle-down" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#00b287" }, "marker": { "color": "#00b287", "opacity": 0.5, "size": 8, "symbol": "cross" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#c97a88" }, "marker": { "color": "#c97a88", "opacity": 0.5, "size": 8, "symbol": "hexagram" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ff005c" }, "marker": { "color": "#ff005c", "opacity": 0.5, "size": 8, "symbol": "square" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#00d539" }, "marker": { "color": "#00d539", "opacity": 0.5, "size": 8, "symbol": "diamond" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ad6aff" }, "marker": { "color": "#ad6aff", "opacity": 0.5, "size": 8, "symbol": "triangle-down" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ff9000" }, "marker": { "color": "#ff9000", "opacity": 0.5, "size": 8, "symbol": "cross" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#00b287" }, "marker": { "color": "#00b287", "opacity": 0.5, "size": 8, "symbol": "hexagram" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#c97a88" }, "marker": { "color": "#c97a88", "opacity": 0.5, "size": 8, "symbol": "circle" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ff005c" }, "marker": { "color": "#ff005c", "opacity": 0.5, "size": 8, "symbol": "diamond" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#00d539" }, "marker": { "color": "#00d539", "opacity": 0.5, "size": 8, "symbol": "triangle-down" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ad6aff" }, "marker": { "color": "#ad6aff", "opacity": 0.5, "size": 8, "symbol": "cross" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ff9000" }, "marker": { "color": "#ff9000", "opacity": 0.5, "size": 8, "symbol": "hexagram" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#00b287" }, "marker": { "color": "#00b287", "opacity": 0.5, "size": 8, "symbol": "circle" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#c97a88" }, "marker": { "color": "#c97a88", "opacity": 0.5, "size": 8, "symbol": "square" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ff005c" }, "marker": { "color": "#ff005c", "opacity": 0.5, "size": 8, "symbol": "triangle-down" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#00d539" }, "marker": { "color": "#00d539", "opacity": 0.5, "size": 8, "symbol": "cross" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ad6aff" }, "marker": { "color": "#ad6aff", "opacity": 0.5, "size": 8, "symbol": "hexagram" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ff9000" }, "marker": { "color": "#ff9000", "opacity": 0.5, "size": 8, "symbol": "circle" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#00b287" }, "marker": { "color": "#00b287", "opacity": 0.5, "size": 8, "symbol": "square" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#c97a88" }, "marker": { "color": "#c97a88", "opacity": 0.5, "size": 8, "symbol": "diamond" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ff005c" }, "marker": { "color": "#ff005c", "opacity": 0.5, "size": 8, "symbol": "cross" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#00d539" }, "marker": { "color": "#00d539", "opacity": 0.5, "size": 8, "symbol": "hexagram" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ad6aff" }, "marker": { "color": "#ad6aff", "opacity": 0.5, "size": 8, "symbol": "circle" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ff9000" }, "marker": { "color": "#ff9000", "opacity": 0.5, "size": 8, "symbol": "square" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#00b287" }, "marker": { "color": "#00b287", "opacity": 0.5, "size": 8, "symbol": "diamond" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#c97a88" }, "marker": { "color": "#c97a88", "opacity": 0.5, "size": 8, "symbol": "triangle-down" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ff005c" }, "marker": { "color": "#ff005c", "opacity": 0.5, "size": 8, "symbol": "hexagram" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#00d539" }, "marker": { "color": "#00d539", "opacity": 0.5, "size": 8, "symbol": "circle" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ad6aff" }, "marker": { "color": "#ad6aff", "opacity": 0.5, "size": 8, "symbol": "square" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ff9000" }, "marker": { "color": "#ff9000", "opacity": 0.5, "size": 8, "symbol": "diamond" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#00b287" }, "marker": { "color": "#00b287", "opacity": 0.5, "size": 8, "symbol": "triangle-down" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#c97a88" }, "marker": { "color": "#c97a88", "opacity": 0.5, "size": 8, "symbol": "cross" }, "meanline": { "visible": true }, "type": "violin" } ] }, "layout": { "annotationdefaults": { "font": { "size": 12 } }, "autotypenumbers": "strict", "hoverlabel": { "bgcolor": "white", "font": { "family": "Rockwell", "size": 14 } }, "hovermode": "x unified", "legend": { "bgcolor": "white", "bordercolor": "Black", "borderwidth": 1, "font": { "family": "Rockwell" } }, "xaxis": { "linecolor": "black", "linewidth": 1, "mirror": true, "showline": true }, "yaxis": { "linecolor": "black", "linewidth": 1, "mirror": true, "showline": true } } }, "width": 900, "xaxis": { "anchor": "y", "domain": [ 0.0, 1.0 ], "showticklabels": true, "title": { "text": "Time (s)" } }, "yaxis": { "anchor": "x", "domain": [ 0.0, 1.0 ], "title": { "text": "Fractional Voltage" } } } }, "text/html": [ "
" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "base_envelope = qcs.GaussianEnvelope(num_sigma=5)\n", "envelope = qcs.DerivativeEnvelope(base_envelope)\n", "dc_wav = qcs.DCWaveform(200e-9, envelope, 0.7)\n", "\n", "# initialize the program and add the envelope\n", "program = qcs.Program()\n", "program.add_waveform(dc_wav, awg)\n", "\n", "# render\n", "program.render()" ] }, { "cell_type": "raw", "id": "a87faa8c", "metadata": { "raw_mimetype": "text/restructuredtext" }, "source": [ "DRAG Envelope\n", "^^^^^^^^^^^^^\n", "\n", "Derivative Removal by Adiabatic Gate (DRAG) envelopes were introduced in `Motzoi et\n", "al. `_ as a\n", "means of offsetting the noise introduced during the application of a pulse by applying\n", "another pulse in an orthogonal axis. The envelope applied orthogonal to the base\n", "envelope is described by the derivative of the base envelope scaled with some DRAG\n", "coefficient. Often, pulses applied simultaneously in different axes are stored in\n", "the real and imaginary parts of an envelope. We therefore describe the DRAG pulse of\n", "a base envelope :math:`E(t)` as\n", "\n", ".. math::\n", " E(t) + i\\beta E'(t),\n", "\n", "where :math:`\\beta` is the drag coefficient and :math:`E'(t)` is the derivative of\n", ":math:`E(t)` with respect to time.\n", "\n", "Most DRAG envelopes are not explicitly defined in |QCS|\\. However, a method that\n", "automatically constructs the relevant DRAG envelope given a base envelope using\n", "numerical differentiation is provided.\n", "\n", "In this example, we assemble a DRAG envelope with a Gaussian as the base shape. Here,\n", "the DRAG coefficient is :math:`\\beta=0.1`." ] }, { "cell_type": "code", "execution_count": 9, "id": "bbc27981", "metadata": { "execution": { "iopub.execute_input": "2025-10-02T01:30:24.934797Z", "iopub.status.busy": "2025-10-02T01:30:24.934585Z", "iopub.status.idle": "2025-10-02T01:30:25.008202Z", "shell.execute_reply": "2025-10-02T01:30:25.007353Z" } }, "outputs": [ { "data": { "application/vnd.plotly.v1+json": { "config": { "plotlyServerURL": "https://plot.ly" }, "data": [ { "dx": 1e-09, "legendgroup": "awg_channel, labels: (0,)", "legendgrouptitle": { "text": "awg_channel, labels: (0,)" }, "name": "Drive pulse for awg_channel, labels: (0,)", "type": "scatter", "x0": 0, "xaxis": "x", "y": [ 2.4392207060482055e-17, 0.0051099533030907005, 0.010373649764735296, 0.015792960558047003, 0.021369639693172675, 0.027105316444958043, 0.03300148773646057, 0.039059510495383525, 0.04528059400125317, 0.051665792241879484, 0.0582159962983321, 0.06493192677830742, 0.07181412631837707, 0.07886295217616944, 0.0860785689340523, 0.09346094133635047, 0.10100982728253881, 0.10872477099920122, 0.11660509641383328, 0.12464990075378507, 0.13285804839379642, 0.14122816497565213, 0.1497586318234942, 0.15844758067825437, 0.16729288877452042, 0.17629217428291544, 0.18544279214075585, 0.194741830293353, 0.20418610636783532, 0.21377216480079886, 0.22349627444042933, 0.2333544266429951, 0.24334233388277388, 0.2534554288935555, 0.26368886435885425, 0.27403751316687236, 0.28449596924508314, 0.2950585489880453, 0.3057192932907234, 0.31647197019818435, 0.3273100781810505, 0.3382268500445462, 0.34921525747735127, 0.36026801624480165, 0.3713775920292453, 0.38253620691857115, 0.39373584654210925, 0.4049682678512196, 0.4162250075399932, 0.4274973910995514, 0.43877654249747605, 0.4500533944719437, 0.4613186994281495, 0.4725630409226429, 0.4837768457192204, 0.49495039639806615, 0.5060738444979037, 0.5171372241690076, 0.5281304663130649, 0.539043413184046, 0.5498658334224739, 0.5605874374937676, 0.5711978934996865, 0.5816868433303293, 0.5920439191226475, 0.6022587599900242, 0.6123210289861605, 0.6222204302652938, 0.6319467263996666, 0.6414897558141723, 0.650839450297215, 0.6599858525460749, 0.6689191337044283, 0.6776296108491747, 0.6861077643833488, 0.6943442552916688, 0.7023299422151709, 0.7100558983014289, 0.7175134277870425, 0.7246940822694113, 0.7315896766252832, 0.7381923045341748, 0.7444943535655278, 0.7504885197893539, 0.7561678218711574, 0.7615256146130935, 0.7665556019046255, 0.7712518490473617, 0.7756087944203214, 0.7796212604535379, 0.7832844638796977, 0.7865940252354086, 0.7895459775856762, 0.792136774447268, 0.7943632968888061, 0.7962228597876991, 0.7977132172263338, 0.7988325670123572, 0.7995795543103023, 0.7999532743743245, 0.7999532743743245, 0.7995795543103023, 0.7988325670123572, 0.7977132172263338, 0.7962228597876991, 0.7943632968888061, 0.792136774447268, 0.7895459775856762, 0.7865940252354086, 0.7832844638796977, 0.7796212604535379, 0.7756087944203214, 0.7712518490473617, 0.7665556019046255, 0.7615256146130935, 0.7561678218711574, 0.7504885197893539, 0.7444943535655278, 0.7381923045341748, 0.7315896766252832, 0.7246940822694113, 0.7175134277870425, 0.7100558983014289, 0.7023299422151709, 0.6943442552916685, 0.6861077643833485, 0.6776296108491748, 0.6689191337044283, 0.6599858525460749, 0.6508394502972149, 0.6414897558141722, 0.6319467263996668, 0.6222204302652938, 0.6123210289861605, 0.6022587599900242, 0.5920439191226473, 0.5816868433303294, 0.5711978934996865, 0.5605874374937676, 0.5498658334224739, 0.5390434131840459, 0.5281304663130649, 0.5171372241690076, 0.5060738444979037, 0.49495039639806615, 0.4837768457192203, 0.47256304092264306, 0.4613186994281495, 0.4500533944719437, 0.43877654249747605, 0.4274973910995513, 0.41622500753999336, 0.4049682678512196, 0.39373584654210925, 0.38253620691857115, 0.37137759202924525, 0.36026801624480176, 0.34921525747735127, 0.3382268500445462, 0.3273100781810505, 0.31647197019818435, 0.30571929329072356, 0.2950585489880453, 0.28449596924508314, 0.27403751316687236, 0.26368886435885425, 0.25345542889355566, 0.24334233388277388, 0.2333544266429951, 0.22349627444042933, 0.21377216480079886, 0.2041861063678354, 0.194741830293353, 0.18544279214075585, 0.17629217428291544, 0.16729288877452042, 0.15844758067825418, 0.1497586318234942, 0.14122816497565213, 0.13285804839379642, 0.12464990075378507, 0.11660509641383315, 0.1087247709992013, 0.10100982728253881, 0.09346094133635047, 0.0860785689340523, 0.0788629521761694, 0.07181412631837714, 0.06493192677830742, 0.0582159962983321, 0.051665792241879484, 0.04528059400125309, 0.039059510495383615, 0.03300148773646057, 0.027105316444958037, 0.021369639693172668, 0.01579296055804693, 0.010373649764735359, 0.005109953303090695, 2.0016713924524792e-17 ], "yaxis": "y" }, { "dx": 1e-09, "legendgroup": "awg_channel, labels: (0,)", "legendgrouptitle": { "text": "awg_channel, labels: (0,)" }, "name": "Im(V) for awg_channel, labels: (0,)", "type": "scatter", "x0": 0, "xaxis": "x", "y": [ 0.035728612845795475, 0.036780174714539204, 0.0378720627536197, 0.03897670142694377, 0.04009324576064632, 0.04122079791867732, 0.04241553361235309, 0.04356262065389125, 0.04471764868179707, 0.04587950449290497, 0.047047022042289645, 0.04821898284999914, 0.04939411655103377, 0.05057110159229896, 0.051748566079848714, 0.052925088779489496, 0.05415781555137153, 0.05532776255402992, 0.056492141134941956, 0.057649343711281546, 0.058797720833032065, 0.05993558315097047, 0.06106120354684477, 0.06217281942473813, 0.0632686351624268, 0.06434682472092462, 0.06540553440958431, 0.06649415871960561, 0.06750703858623867, 0.06849464516760206, 0.06945504414784284, 0.07038628977101911, 0.0712864284619769, 0.07215350256897156, 0.07298555422063144, 0.07378062928953551, 0.07453678145424622, 0.07528673410470961, 0.0759570647818912, 0.07658262806134532, 0.07716155246691071, 0.07769199600528796, 0.07817215061517774, 0.07860024664167356, 0.07897455732387063, 0.07929340328320882, 0.07955515700006816, 0.07975824726533123, 0.07990670362929797, 0.0799848829410353, 0.08000000000000002, 0.07995075618431328, 0.0798359308063791, 0.07965438512914234, 0.07940506626283317, 0.07908701092884929, 0.0786993490774269, 0.07824130734643513, 0.07768388177341398, 0.07707956893798386, 0.07640314781511445, 0.07565426826428162, 0.07483269142754492, 0.07393829196929465, 0.07297106007630132, 0.0719311032088325, 0.0708186475939822, 0.06963403945349703, 0.0683777459585799, 0.06698213234811673, 0.06558085811119296, 0.06411007590637816, 0.06257074667167334, 0.060963952747018386, 0.059290897071010144, 0.05755290207752028, 0.05575140829244087, 0.053887972630665394, 0.05196426639580516, 0.04988146152058432, 0.04783989573830623, 0.04574383794250358, 0.04359539623786703, 0.04139677860302997, 0.03915028918286691, 0.036858324322966395, 0.03452336835572202, 0.03214798914809281, 0.02973483342236282, 0.027286621861647316, 0.024681324051110932, 0.02217003833968068, 0.01963239768953423, 0.017071368306320125, 0.014489962828069977, 0.0118912344212143, 0.009278270763642179, 0.006654187931578042, 0.0040221242071499025, 0.0013852338238779622, -0.0013852338238779622, -0.0040221242071499025, -0.006654187931578042, -0.009278270763642179, -0.0118912344212143, -0.014489962828069977, -0.017071368306320125, -0.01963239768953423, -0.02217003833968068, -0.024681324051123596, -0.027286621861647316, -0.029734833422375477, -0.03214798914809281, -0.03452336835572202, -0.03685832432297906, -0.03915028918286691, -0.04139677860302997, -0.04359539623787969, -0.045743837942516234, -0.04783989573829357, -0.04988146152058432, -0.05196426639580516, -0.053887972630665394, -0.05575140829244087, -0.057552902077532934, -0.059290897071010144, -0.06096395274703104, -0.062570746671686, -0.06411007590638448, -0.06558085811119928, -0.0669821323481294, -0.06837774595858623, -0.06963403945350968, -0.07081864759398852, -0.07193110320883883, -0.07297106007630765, -0.07393829196930098, -0.0748326914275386, -0.0756542682642753, -0.07640314781510178, -0.0770795689379712, -0.07768388177338867, -0.07824130734644778, -0.07869934907743323, -0.07908701092885562, -0.0794050662628395, -0.07965438512914867, -0.07983593080639177, -0.0799507561843196, -0.08000000000000002, -0.0799848829410353, -0.07990670362929797, -0.07975824726533756, -0.0795551570000745, -0.07929340328322147, -0.0789745573238643, -0.07860024664166723, -0.07817215061517141, -0.07769199600528164, -0.07716155246689804, -0.07658262806133266, -0.07595706478187854, -0.07528673410470961, -0.07453678145424622, -0.07378062928953551, -0.07298555422063144, -0.07215350256897156, -0.0712864284619769, -0.07038628977101911, -0.06945504414784284, -0.06849464516760206, -0.06750703858623867, -0.06649415871960561, -0.06540553440957482, -0.06434682472091831, -0.06326863516242047, -0.062172819424731796, -0.061061203546841615, -0.059935583150964145, -0.05879772083301624, -0.05764934371127205, -0.0564921411349293, -0.05532776255401094, -0.054157815551358866, -0.052925088779489496, -0.051748566079848714, -0.05057110159229896, -0.04939411655103377, -0.04821898284999914, -0.047047022042289645, -0.04587950449290497, -0.04471764868179707, -0.04356262065389125, -0.04241553361235309, -0.04122079791866782, -0.04009324576063683, -0.038976701426934275, -0.03787206275361337, -0.0367801747145313, -0.03572861284578598 ], "yaxis": "y" } ], "layout": { "annotations": [ { "font": { "size": 16 }, "showarrow": false, "text": "Waveforms for awg_channel, labels: (0,)", "x": 0.5, "xanchor": "center", "xref": "paper", "y": 1.0, "yanchor": "bottom", "yref": "paper" } ], "height": 500, "template": { "data": { "bar": [ { "marker": { "color": "#ad6aff", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "" } }, "type": "bar" }, { "marker": { "color": "#c97a88", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "" } }, "type": "bar" }, { "marker": { "color": "#ff005c", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "" } }, "type": "bar" }, { "marker": { "color": "#ff9000", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "" } }, "type": "bar" }, { "marker": { "color": "#00d539", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "" } }, "type": "bar" }, { "marker": { "color": "#00b287", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "" } }, "type": "bar" }, { "marker": { "color": "#ad6aff", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "/" } }, "type": "bar" }, { "marker": { "color": "#c97a88", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "/" } }, "type": "bar" }, { "marker": { "color": "#ff005c", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "/" } }, "type": "bar" }, { "marker": { "color": "#ff9000", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "/" } }, "type": "bar" }, { "marker": { "color": "#00d539", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "/" } }, "type": "bar" }, { "marker": { "color": "#00b287", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "/" } }, "type": "bar" }, { "marker": { "color": "#ad6aff", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "\\" } }, "type": "bar" }, { "marker": { "color": "#c97a88", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "\\" } }, "type": "bar" }, { "marker": { "color": "#ff005c", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "\\" } }, "type": "bar" }, { "marker": { "color": "#ff9000", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "\\" } }, "type": "bar" }, { "marker": { "color": "#00d539", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "\\" } }, "type": "bar" }, { "marker": { "color": "#00b287", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "\\" } }, "type": "bar" }, { "marker": { "color": "#ad6aff", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "x" } }, "type": "bar" }, { "marker": { "color": "#c97a88", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "x" } }, "type": "bar" }, { "marker": { "color": "#ff005c", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "x" } }, "type": "bar" }, { "marker": { "color": "#ff9000", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "x" } }, "type": "bar" }, { "marker": { "color": "#00d539", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "x" } }, "type": "bar" }, { "marker": { "color": "#00b287", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "x" } }, "type": "bar" }, { "marker": { "color": "#ad6aff", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "-" } }, "type": "bar" }, { "marker": { "color": "#c97a88", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "-" } }, "type": "bar" }, { "marker": { "color": "#ff005c", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "-" } }, "type": "bar" }, { "marker": { "color": "#ff9000", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "-" } }, "type": "bar" }, { "marker": { "color": "#00d539", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "-" } }, "type": "bar" }, { "marker": { "color": "#00b287", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "-" } }, "type": "bar" }, { "marker": { "color": "#ad6aff", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "|" } }, "type": "bar" }, { "marker": { "color": "#c97a88", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "|" } }, "type": "bar" }, { "marker": { "color": "#ff005c", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "|" } }, "type": "bar" }, { "marker": { "color": "#ff9000", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "|" } }, "type": "bar" }, { "marker": { "color": "#00d539", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "|" } }, "type": "bar" }, { "marker": { "color": "#00b287", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "|" } }, "type": "bar" }, { "marker": { "color": "#ad6aff", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "+" } }, "type": "bar" }, { "marker": { "color": "#c97a88", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "+" } }, "type": "bar" }, { "marker": { "color": "#ff005c", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "+" } }, "type": "bar" }, { "marker": { "color": "#ff9000", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "+" } }, "type": "bar" }, { "marker": { "color": "#00d539", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "+" } }, "type": "bar" }, { "marker": { "color": "#00b287", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "+" } }, "type": "bar" }, { "marker": { "color": "#ad6aff", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "." } }, "type": "bar" }, { "marker": { "color": "#c97a88", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "." } }, "type": "bar" }, { "marker": { "color": "#ff005c", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "." } }, "type": "bar" }, { "marker": { "color": "#ff9000", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "." } }, "type": "bar" }, { "marker": { "color": "#00d539", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "." } }, "type": "bar" }, { "marker": { "color": "#00b287", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "." } }, "type": "bar" } ], "scatter": [ { "line": { "color": "#ff005c" }, "marker": { "color": "#ff005c", "opacity": 0.5, "size": 8, "symbol": "circle" }, "type": "scatter" }, { "line": { "color": "#00d539" }, "marker": { "color": "#00d539", "opacity": 0.5, "size": 8, "symbol": "square" }, "type": "scatter" }, { "line": { "color": "#ad6aff" }, "marker": { "color": "#ad6aff", "opacity": 0.5, "size": 8, "symbol": "diamond" }, "type": "scatter" }, { "line": { "color": "#ff9000" }, "marker": { "color": "#ff9000", "opacity": 0.5, "size": 8, "symbol": "triangle-down" }, "type": "scatter" }, { "line": { "color": "#00b287" }, "marker": { "color": "#00b287", "opacity": 0.5, "size": 8, "symbol": "cross" }, "type": "scatter" }, { "line": { "color": "#c97a88" }, "marker": { "color": "#c97a88", "opacity": 0.5, "size": 8, "symbol": "hexagram" }, "type": "scatter" }, { "line": { "color": "#ff005c" }, "marker": { "color": "#ff005c", "opacity": 0.5, "size": 8, "symbol": "square" }, "type": "scatter" }, { "line": { "color": "#00d539" }, "marker": { "color": "#00d539", "opacity": 0.5, "size": 8, "symbol": "diamond" }, "type": "scatter" }, { "line": { "color": "#ad6aff" }, "marker": { "color": "#ad6aff", "opacity": 0.5, "size": 8, "symbol": "triangle-down" }, "type": "scatter" }, { "line": { "color": "#ff9000" }, "marker": { "color": "#ff9000", "opacity": 0.5, "size": 8, "symbol": "cross" }, "type": "scatter" }, { "line": { "color": "#00b287" }, "marker": { "color": "#00b287", "opacity": 0.5, "size": 8, "symbol": "hexagram" }, "type": "scatter" }, { "line": { "color": "#c97a88" }, "marker": { "color": "#c97a88", "opacity": 0.5, "size": 8, "symbol": "circle" }, "type": "scatter" }, { "line": { "color": "#ff005c" }, "marker": { "color": "#ff005c", "opacity": 0.5, "size": 8, "symbol": "diamond" }, "type": "scatter" }, { "line": { "color": "#00d539" }, "marker": { "color": "#00d539", "opacity": 0.5, "size": 8, "symbol": "triangle-down" }, "type": "scatter" }, { "line": { "color": "#ad6aff" }, "marker": { "color": "#ad6aff", "opacity": 0.5, "size": 8, "symbol": "cross" }, "type": "scatter" }, { "line": { "color": "#ff9000" }, "marker": { "color": "#ff9000", "opacity": 0.5, "size": 8, "symbol": "hexagram" }, "type": "scatter" }, { "line": { "color": "#00b287" }, "marker": { "color": "#00b287", "opacity": 0.5, "size": 8, "symbol": "circle" }, "type": "scatter" }, { "line": { "color": "#c97a88" }, "marker": { "color": "#c97a88", "opacity": 0.5, "size": 8, "symbol": "square" }, "type": "scatter" }, { "line": { "color": "#ff005c" }, "marker": { "color": "#ff005c", "opacity": 0.5, "size": 8, "symbol": "triangle-down" }, "type": "scatter" }, { "line": { "color": "#00d539" }, "marker": { "color": "#00d539", "opacity": 0.5, "size": 8, "symbol": "cross" }, "type": "scatter" }, { "line": { "color": "#ad6aff" }, "marker": { "color": "#ad6aff", "opacity": 0.5, "size": 8, "symbol": "hexagram" }, "type": "scatter" }, { "line": { "color": "#ff9000" }, "marker": { "color": "#ff9000", "opacity": 0.5, "size": 8, "symbol": "circle" }, "type": "scatter" }, { "line": { "color": "#00b287" }, "marker": { "color": "#00b287", "opacity": 0.5, "size": 8, "symbol": "square" }, "type": "scatter" }, { "line": { "color": "#c97a88" }, "marker": { "color": "#c97a88", "opacity": 0.5, "size": 8, "symbol": "diamond" }, "type": "scatter" }, { "line": { "color": "#ff005c" }, "marker": { "color": "#ff005c", "opacity": 0.5, "size": 8, "symbol": "cross" }, "type": "scatter" }, { "line": { "color": "#00d539" }, "marker": { "color": "#00d539", "opacity": 0.5, "size": 8, "symbol": "hexagram" }, "type": "scatter" }, { "line": { "color": "#ad6aff" }, "marker": { "color": "#ad6aff", "opacity": 0.5, "size": 8, "symbol": "circle" }, "type": "scatter" }, { "line": { "color": "#ff9000" }, "marker": { "color": "#ff9000", "opacity": 0.5, "size": 8, "symbol": "square" }, "type": "scatter" }, { "line": { "color": "#00b287" }, "marker": { "color": "#00b287", "opacity": 0.5, "size": 8, "symbol": "diamond" }, "type": "scatter" }, { "line": { "color": "#c97a88" }, "marker": { "color": "#c97a88", "opacity": 0.5, "size": 8, "symbol": "triangle-down" }, "type": "scatter" }, { "line": { "color": "#ff005c" }, "marker": { "color": "#ff005c", "opacity": 0.5, "size": 8, "symbol": "hexagram" }, "type": "scatter" }, { "line": { "color": "#00d539" }, "marker": { "color": "#00d539", "opacity": 0.5, "size": 8, "symbol": "circle" }, "type": "scatter" }, { "line": { "color": "#ad6aff" }, "marker": { "color": "#ad6aff", "opacity": 0.5, "size": 8, "symbol": "square" }, "type": "scatter" }, { "line": { "color": "#ff9000" }, "marker": { "color": "#ff9000", "opacity": 0.5, "size": 8, "symbol": "diamond" }, "type": "scatter" }, { "line": { "color": "#00b287" }, "marker": { "color": "#00b287", "opacity": 0.5, "size": 8, "symbol": "triangle-down" }, "type": "scatter" }, { "line": { "color": "#c97a88" }, "marker": { "color": "#c97a88", "opacity": 0.5, "size": 8, "symbol": "cross" }, "type": "scatter" } ], "violin": [ { "box": { "visible": true }, "line": { "color": "#ff005c" }, "marker": { "color": "#ff005c", "opacity": 0.5, "size": 8, "symbol": "circle" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#00d539" }, "marker": { "color": "#00d539", "opacity": 0.5, "size": 8, "symbol": "square" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ad6aff" }, "marker": { "color": "#ad6aff", "opacity": 0.5, "size": 8, "symbol": "diamond" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ff9000" }, "marker": { "color": "#ff9000", "opacity": 0.5, "size": 8, "symbol": "triangle-down" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#00b287" }, "marker": { "color": "#00b287", "opacity": 0.5, "size": 8, "symbol": "cross" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#c97a88" }, "marker": { "color": "#c97a88", "opacity": 0.5, "size": 8, "symbol": "hexagram" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ff005c" }, "marker": { "color": "#ff005c", "opacity": 0.5, "size": 8, "symbol": "square" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#00d539" }, "marker": { "color": "#00d539", "opacity": 0.5, "size": 8, "symbol": "diamond" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ad6aff" }, "marker": { "color": "#ad6aff", "opacity": 0.5, "size": 8, "symbol": "triangle-down" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ff9000" }, "marker": { "color": "#ff9000", "opacity": 0.5, "size": 8, "symbol": "cross" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#00b287" }, "marker": { "color": "#00b287", "opacity": 0.5, "size": 8, "symbol": "hexagram" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#c97a88" }, "marker": { "color": "#c97a88", "opacity": 0.5, "size": 8, "symbol": "circle" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ff005c" }, "marker": { "color": "#ff005c", "opacity": 0.5, "size": 8, "symbol": "diamond" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#00d539" }, "marker": { "color": "#00d539", "opacity": 0.5, "size": 8, "symbol": "triangle-down" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ad6aff" }, "marker": { "color": "#ad6aff", "opacity": 0.5, "size": 8, "symbol": "cross" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ff9000" }, "marker": { "color": "#ff9000", "opacity": 0.5, "size": 8, "symbol": "hexagram" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#00b287" }, "marker": { "color": "#00b287", "opacity": 0.5, "size": 8, "symbol": "circle" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#c97a88" }, "marker": { "color": "#c97a88", "opacity": 0.5, "size": 8, "symbol": "square" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ff005c" }, "marker": { "color": "#ff005c", "opacity": 0.5, "size": 8, "symbol": "triangle-down" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#00d539" }, "marker": { "color": "#00d539", "opacity": 0.5, "size": 8, "symbol": "cross" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ad6aff" }, "marker": { "color": "#ad6aff", "opacity": 0.5, "size": 8, "symbol": "hexagram" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ff9000" }, "marker": { "color": "#ff9000", "opacity": 0.5, "size": 8, "symbol": "circle" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#00b287" }, "marker": { "color": "#00b287", "opacity": 0.5, "size": 8, "symbol": "square" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#c97a88" }, "marker": { "color": "#c97a88", "opacity": 0.5, "size": 8, "symbol": "diamond" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ff005c" }, "marker": { "color": "#ff005c", "opacity": 0.5, "size": 8, "symbol": "cross" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#00d539" }, "marker": { "color": "#00d539", "opacity": 0.5, "size": 8, "symbol": "hexagram" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ad6aff" }, "marker": { "color": "#ad6aff", "opacity": 0.5, "size": 8, "symbol": "circle" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ff9000" }, "marker": { "color": "#ff9000", "opacity": 0.5, "size": 8, "symbol": "square" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#00b287" }, "marker": { "color": "#00b287", "opacity": 0.5, "size": 8, "symbol": "diamond" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#c97a88" }, "marker": { "color": "#c97a88", "opacity": 0.5, "size": 8, "symbol": "triangle-down" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ff005c" }, "marker": { "color": "#ff005c", "opacity": 0.5, "size": 8, "symbol": "hexagram" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#00d539" }, "marker": { "color": "#00d539", "opacity": 0.5, "size": 8, "symbol": "circle" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ad6aff" }, "marker": { "color": "#ad6aff", "opacity": 0.5, "size": 8, "symbol": "square" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ff9000" }, "marker": { "color": "#ff9000", "opacity": 0.5, "size": 8, "symbol": "diamond" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#00b287" }, "marker": { "color": "#00b287", "opacity": 0.5, "size": 8, "symbol": "triangle-down" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#c97a88" }, "marker": { "color": "#c97a88", "opacity": 0.5, "size": 8, "symbol": "cross" }, "meanline": { "visible": true }, "type": "violin" } ] }, "layout": { "annotationdefaults": { "font": { "size": 12 } }, "autotypenumbers": "strict", "hoverlabel": { "bgcolor": "white", "font": { "family": "Rockwell", "size": 14 } }, "hovermode": "x unified", "legend": { "bgcolor": "white", "bordercolor": "Black", "borderwidth": 1, "font": { "family": "Rockwell" } }, "xaxis": { "linecolor": "black", "linewidth": 1, "mirror": true, "showline": true }, "yaxis": { "linecolor": "black", "linewidth": 1, "mirror": true, "showline": true } } }, "width": 900, "xaxis": { "anchor": "y", "domain": [ 0.0, 1.0 ], "showticklabels": true, "title": { "text": "Time (s)" } }, "yaxis": { "anchor": "x", "domain": [ 0.0, 1.0 ], "title": { "text": "Fractional Voltage" } } } }, "text/html": [ "
" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "# initialize a 200ns Gaussian RF Waveform.\n", "# We use a frequency of zero to highlight the shape of the envelope.\n", "gauss = qcs.RFWaveform(\n", " duration=200e-9, envelope=qcs.GaussianEnvelope(), amplitude=0.8, rf_frequency=0\n", ")\n", "\n", "# initialize the program and add the drag pulse with a coefficient of 0.1\n", "program = qcs.Program()\n", "program.add_waveform(gauss.drag(0.1), awg)\n", "\n", "# render\n", "program.render(plot_imaginary=True)" ] }, { "cell_type": "raw", "id": "c70976eb", "metadata": { "raw_mimetype": "text/restructuredtext" }, "source": [ "Arbitrary envelopes\n", "-------------------\n", "An arbitrary envelope allows a user to specify any shape of pulse.\n", "\n", "Example 1: linear interpolation\n", "^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", "\n", "Arbitrary envelopes can be specified with a list of sample times and corresponding\n", "amplitudes. When rendering the envelope, linear interpolation is applied between\n", "specified points. In this example we implement an envelope that ramps from zero to\n", "the maximum value during the interval ``[0, 0.2]``. The amplitude then falls back\n", "to zero on the interval ``[0.7, 1]``. This example uses a scale from 0 to 1 for\n", "both sample times and amplitudes. The final duration and amplitude is then\n", "determined by the `duration` and `amplitude` parameters used when constructing\n", "the waveform.\n" ] }, { "cell_type": "code", "execution_count": 10, "id": "c3dd6d96", "metadata": { "execution": { "iopub.execute_input": "2025-10-02T01:30:25.012032Z", "iopub.status.busy": "2025-10-02T01:30:25.011828Z", "iopub.status.idle": "2025-10-02T01:30:25.083439Z", "shell.execute_reply": "2025-10-02T01:30:25.082762Z" } }, "outputs": [ { "data": { "application/vnd.plotly.v1+json": { "config": { "plotlyServerURL": "https://plot.ly" }, "data": [ { "dx": 1e-09, "legendgroup": "awg_channel, labels: (0,)", "legendgrouptitle": { "text": "awg_channel, labels: (0,)" }, "name": "Drive pulse for awg_channel, labels: (0,)", "type": "scatter", "x0": 0, "xaxis": "x", "y": [ 0.0, 0.030303030303030304, 0.06060606060606061, 0.09090909090909091, 0.12121212121212122, 0.15151515151515152, 0.18181818181818182, 0.21212121212121215, 0.24242424242424243, 0.27272727272727276, 0.30303030303030304, 0.3333333333333333, 0.36363636363636365, 0.3939393939393939, 0.4242424242424243, 0.45454545454545453, 0.48484848484848486, 0.5151515151515151, 0.5454545454545455, 0.5757575757575758, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.5858585858585855, 0.5656565656565654, 0.5454545454545453, 0.525252525252525, 0.5050505050505049, 0.48484848484848453, 0.4646464646464644, 0.44444444444444436, 0.42424242424242403, 0.4040404040404039, 0.38383838383838353, 0.3636363636363634, 0.34343434343434315, 0.32323232323232304, 0.3030303030303029, 0.2828282828282826, 0.2626262626262625, 0.2424242424242421, 0.22222222222222207, 0.20202020202020168, 0.18181818181818157, 0.16161616161616146, 0.14141414141414116, 0.12121212121212105, 0.10101010101010074, 0.08080808080808063, 0.060606060606060524, 0.04040404040404015, 0.020202020202020044, 0.0 ], "yaxis": "y" } ], "layout": { "annotations": [ { "font": { "size": 16 }, "showarrow": false, "text": "Waveforms for awg_channel, labels: (0,)", "x": 0.5, "xanchor": "center", "xref": "paper", "y": 1.0, "yanchor": "bottom", "yref": "paper" } ], "height": 500, "template": { "data": { "bar": [ { "marker": { "color": "#ad6aff", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "" } }, "type": "bar" }, { "marker": { "color": "#c97a88", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "" } }, "type": "bar" }, { "marker": { "color": "#ff005c", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "" } }, "type": "bar" }, { "marker": { "color": "#ff9000", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "" } }, "type": "bar" }, { "marker": { "color": "#00d539", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "" } }, "type": "bar" }, { "marker": { "color": "#00b287", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "" } }, "type": "bar" }, { "marker": { "color": "#ad6aff", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "/" } }, "type": "bar" }, { "marker": { "color": "#c97a88", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "/" } }, "type": "bar" }, { "marker": { "color": "#ff005c", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "/" } }, "type": "bar" }, { "marker": { "color": "#ff9000", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "/" } }, "type": "bar" }, { "marker": { "color": "#00d539", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "/" } }, "type": "bar" }, { "marker": { "color": "#00b287", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "/" } }, "type": "bar" }, { "marker": { "color": "#ad6aff", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "\\" } }, "type": "bar" }, { "marker": { "color": "#c97a88", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "\\" } }, "type": "bar" }, { "marker": { "color": "#ff005c", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "\\" } }, "type": "bar" }, { "marker": { "color": "#ff9000", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "\\" } }, "type": "bar" }, { "marker": { "color": "#00d539", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "\\" } }, "type": "bar" }, { "marker": { "color": "#00b287", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "\\" } }, "type": "bar" }, { "marker": { "color": "#ad6aff", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "x" } }, "type": "bar" }, { "marker": { "color": "#c97a88", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "x" } }, "type": "bar" }, { "marker": { "color": "#ff005c", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "x" } }, "type": "bar" }, { "marker": { "color": "#ff9000", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "x" } }, "type": "bar" }, { "marker": { "color": "#00d539", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "x" } }, "type": "bar" }, { "marker": { "color": "#00b287", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "x" } }, "type": "bar" }, { "marker": { "color": "#ad6aff", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "-" } }, "type": "bar" }, { "marker": { "color": "#c97a88", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "-" } }, "type": "bar" }, { "marker": { "color": "#ff005c", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "-" } }, "type": "bar" }, { "marker": { "color": "#ff9000", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "-" } }, "type": "bar" }, { "marker": { "color": "#00d539", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "-" } }, "type": "bar" }, { "marker": { "color": "#00b287", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "-" } }, "type": "bar" }, { "marker": { "color": "#ad6aff", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "|" } }, "type": "bar" }, { "marker": { "color": "#c97a88", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "|" } }, "type": "bar" }, { "marker": { "color": "#ff005c", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "|" } }, "type": "bar" }, { "marker": { "color": "#ff9000", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "|" } }, "type": "bar" }, { "marker": { "color": "#00d539", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "|" } }, "type": "bar" }, { "marker": { "color": "#00b287", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "|" } }, "type": "bar" }, { "marker": { "color": "#ad6aff", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "+" } }, "type": "bar" }, { "marker": { "color": "#c97a88", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "+" } }, "type": "bar" }, { "marker": { "color": "#ff005c", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "+" } }, "type": "bar" }, { "marker": { "color": "#ff9000", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "+" } }, "type": "bar" }, { "marker": { "color": "#00d539", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "+" } }, "type": "bar" }, { "marker": { "color": "#00b287", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "+" } }, "type": "bar" }, { "marker": { "color": "#ad6aff", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "." } }, "type": "bar" }, { "marker": { "color": "#c97a88", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "." } }, "type": "bar" }, { "marker": { "color": "#ff005c", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "." } }, "type": "bar" }, { "marker": { "color": "#ff9000", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "." } }, "type": "bar" }, { "marker": { "color": "#00d539", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "." } }, "type": "bar" }, { "marker": { "color": "#00b287", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "." } }, "type": "bar" } ], "scatter": [ { "line": { "color": "#ff005c" }, "marker": { "color": "#ff005c", "opacity": 0.5, "size": 8, "symbol": "circle" }, "type": "scatter" }, { "line": { "color": "#00d539" }, "marker": { "color": "#00d539", "opacity": 0.5, "size": 8, "symbol": "square" }, "type": "scatter" }, { "line": { "color": "#ad6aff" }, "marker": { "color": "#ad6aff", "opacity": 0.5, "size": 8, "symbol": "diamond" }, "type": "scatter" }, { "line": { "color": "#ff9000" }, "marker": { "color": "#ff9000", "opacity": 0.5, "size": 8, "symbol": "triangle-down" }, "type": "scatter" }, { "line": { "color": "#00b287" }, "marker": { "color": "#00b287", "opacity": 0.5, "size": 8, "symbol": "cross" }, "type": "scatter" }, { "line": { "color": "#c97a88" }, "marker": { "color": "#c97a88", "opacity": 0.5, "size": 8, "symbol": "hexagram" }, "type": "scatter" }, { "line": { "color": "#ff005c" }, "marker": { "color": "#ff005c", "opacity": 0.5, "size": 8, "symbol": "square" }, "type": "scatter" }, { "line": { "color": "#00d539" }, "marker": { "color": "#00d539", "opacity": 0.5, "size": 8, "symbol": "diamond" }, "type": "scatter" }, { "line": { "color": "#ad6aff" }, "marker": { "color": "#ad6aff", "opacity": 0.5, "size": 8, "symbol": "triangle-down" }, "type": "scatter" }, { "line": { "color": "#ff9000" }, "marker": { "color": "#ff9000", "opacity": 0.5, "size": 8, "symbol": "cross" }, "type": "scatter" }, { "line": { "color": "#00b287" }, "marker": { "color": "#00b287", "opacity": 0.5, "size": 8, "symbol": "hexagram" }, "type": "scatter" }, { "line": { "color": "#c97a88" }, "marker": { "color": "#c97a88", "opacity": 0.5, "size": 8, "symbol": "circle" }, "type": "scatter" }, { "line": { "color": "#ff005c" }, "marker": { "color": "#ff005c", "opacity": 0.5, "size": 8, "symbol": "diamond" }, "type": "scatter" }, { "line": { "color": "#00d539" }, "marker": { "color": "#00d539", "opacity": 0.5, "size": 8, "symbol": "triangle-down" }, "type": "scatter" }, { "line": { "color": "#ad6aff" }, "marker": { "color": "#ad6aff", "opacity": 0.5, "size": 8, "symbol": "cross" }, "type": "scatter" }, { "line": { "color": "#ff9000" }, "marker": { "color": "#ff9000", "opacity": 0.5, "size": 8, "symbol": "hexagram" }, "type": "scatter" }, { "line": { "color": "#00b287" }, "marker": { "color": "#00b287", "opacity": 0.5, "size": 8, "symbol": "circle" }, "type": "scatter" }, { "line": { "color": "#c97a88" }, "marker": { "color": "#c97a88", "opacity": 0.5, "size": 8, "symbol": "square" }, "type": "scatter" }, { "line": { "color": "#ff005c" }, "marker": { "color": "#ff005c", "opacity": 0.5, "size": 8, "symbol": "triangle-down" }, "type": "scatter" }, { "line": { "color": "#00d539" }, "marker": { "color": "#00d539", "opacity": 0.5, "size": 8, "symbol": "cross" }, "type": "scatter" }, { "line": { "color": "#ad6aff" }, "marker": { "color": "#ad6aff", "opacity": 0.5, "size": 8, "symbol": "hexagram" }, "type": "scatter" }, { "line": { "color": "#ff9000" }, "marker": { "color": "#ff9000", "opacity": 0.5, "size": 8, "symbol": "circle" }, "type": "scatter" }, { "line": { "color": "#00b287" }, "marker": { "color": "#00b287", "opacity": 0.5, "size": 8, "symbol": "square" }, "type": "scatter" }, { "line": { "color": "#c97a88" }, "marker": { "color": "#c97a88", "opacity": 0.5, "size": 8, "symbol": "diamond" }, "type": "scatter" }, { "line": { "color": "#ff005c" }, "marker": { "color": "#ff005c", "opacity": 0.5, "size": 8, "symbol": "cross" }, "type": "scatter" }, { "line": { "color": "#00d539" }, "marker": { "color": "#00d539", "opacity": 0.5, "size": 8, "symbol": "hexagram" }, "type": "scatter" }, { "line": { "color": "#ad6aff" }, "marker": { "color": "#ad6aff", "opacity": 0.5, "size": 8, "symbol": "circle" }, "type": "scatter" }, { "line": { "color": "#ff9000" }, "marker": { "color": "#ff9000", "opacity": 0.5, "size": 8, "symbol": "square" }, "type": "scatter" }, { "line": { "color": "#00b287" }, "marker": { "color": "#00b287", "opacity": 0.5, "size": 8, "symbol": "diamond" }, "type": "scatter" }, { "line": { "color": "#c97a88" }, "marker": { "color": "#c97a88", "opacity": 0.5, "size": 8, "symbol": "triangle-down" }, "type": "scatter" }, { "line": { "color": "#ff005c" }, "marker": { "color": "#ff005c", "opacity": 0.5, "size": 8, "symbol": "hexagram" }, "type": "scatter" }, { "line": { "color": "#00d539" }, "marker": { "color": "#00d539", "opacity": 0.5, "size": 8, "symbol": "circle" }, "type": "scatter" }, { "line": { "color": "#ad6aff" }, "marker": { "color": "#ad6aff", "opacity": 0.5, "size": 8, "symbol": "square" }, "type": "scatter" }, { "line": { "color": "#ff9000" }, "marker": { "color": "#ff9000", "opacity": 0.5, "size": 8, "symbol": "diamond" }, "type": "scatter" }, { "line": { "color": "#00b287" }, "marker": { "color": "#00b287", "opacity": 0.5, "size": 8, "symbol": "triangle-down" }, "type": "scatter" }, { "line": { "color": "#c97a88" }, "marker": { "color": "#c97a88", "opacity": 0.5, "size": 8, "symbol": "cross" }, "type": "scatter" } ], "violin": [ { "box": { "visible": true }, "line": { "color": "#ff005c" }, "marker": { "color": "#ff005c", "opacity": 0.5, "size": 8, "symbol": "circle" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#00d539" }, "marker": { "color": "#00d539", "opacity": 0.5, "size": 8, "symbol": "square" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ad6aff" }, "marker": { "color": "#ad6aff", "opacity": 0.5, "size": 8, "symbol": "diamond" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ff9000" }, "marker": { "color": "#ff9000", "opacity": 0.5, "size": 8, "symbol": "triangle-down" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#00b287" }, "marker": { "color": "#00b287", "opacity": 0.5, "size": 8, "symbol": "cross" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#c97a88" }, "marker": { "color": "#c97a88", "opacity": 0.5, "size": 8, "symbol": "hexagram" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ff005c" }, "marker": { "color": "#ff005c", "opacity": 0.5, "size": 8, "symbol": "square" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#00d539" }, "marker": { "color": "#00d539", "opacity": 0.5, "size": 8, "symbol": "diamond" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ad6aff" }, "marker": { "color": "#ad6aff", "opacity": 0.5, "size": 8, "symbol": "triangle-down" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ff9000" }, "marker": { "color": "#ff9000", "opacity": 0.5, "size": 8, "symbol": "cross" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#00b287" }, "marker": { "color": "#00b287", "opacity": 0.5, "size": 8, "symbol": "hexagram" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#c97a88" }, "marker": { "color": "#c97a88", "opacity": 0.5, "size": 8, "symbol": "circle" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ff005c" }, "marker": { "color": "#ff005c", "opacity": 0.5, "size": 8, "symbol": "diamond" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#00d539" }, "marker": { "color": "#00d539", "opacity": 0.5, "size": 8, "symbol": "triangle-down" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ad6aff" }, "marker": { "color": "#ad6aff", "opacity": 0.5, "size": 8, "symbol": "cross" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ff9000" }, "marker": { "color": "#ff9000", "opacity": 0.5, "size": 8, "symbol": "hexagram" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#00b287" }, "marker": { "color": "#00b287", "opacity": 0.5, "size": 8, "symbol": "circle" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#c97a88" }, "marker": { "color": "#c97a88", "opacity": 0.5, "size": 8, "symbol": "square" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ff005c" }, "marker": { "color": "#ff005c", "opacity": 0.5, "size": 8, "symbol": "triangle-down" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#00d539" }, "marker": { "color": "#00d539", "opacity": 0.5, "size": 8, "symbol": "cross" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ad6aff" }, "marker": { "color": "#ad6aff", "opacity": 0.5, "size": 8, "symbol": "hexagram" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ff9000" }, "marker": { "color": "#ff9000", "opacity": 0.5, "size": 8, "symbol": "circle" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#00b287" }, "marker": { "color": "#00b287", "opacity": 0.5, "size": 8, "symbol": "square" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#c97a88" }, "marker": { "color": "#c97a88", "opacity": 0.5, "size": 8, "symbol": "diamond" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ff005c" }, "marker": { "color": "#ff005c", "opacity": 0.5, "size": 8, "symbol": "cross" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#00d539" }, "marker": { "color": "#00d539", "opacity": 0.5, "size": 8, "symbol": "hexagram" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ad6aff" }, "marker": { "color": "#ad6aff", "opacity": 0.5, "size": 8, "symbol": "circle" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ff9000" }, "marker": { "color": "#ff9000", "opacity": 0.5, "size": 8, "symbol": "square" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#00b287" }, "marker": { "color": "#00b287", "opacity": 0.5, "size": 8, "symbol": "diamond" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#c97a88" }, "marker": { "color": "#c97a88", "opacity": 0.5, "size": 8, "symbol": "triangle-down" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ff005c" }, "marker": { "color": "#ff005c", "opacity": 0.5, "size": 8, "symbol": "hexagram" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#00d539" }, "marker": { "color": "#00d539", "opacity": 0.5, "size": 8, "symbol": "circle" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ad6aff" }, "marker": { "color": "#ad6aff", "opacity": 0.5, "size": 8, "symbol": "square" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ff9000" }, "marker": { "color": "#ff9000", "opacity": 0.5, "size": 8, "symbol": "diamond" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#00b287" }, "marker": { "color": "#00b287", "opacity": 0.5, "size": 8, "symbol": "triangle-down" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#c97a88" }, "marker": { "color": "#c97a88", "opacity": 0.5, "size": 8, "symbol": "cross" }, "meanline": { "visible": true }, "type": "violin" } ] }, "layout": { "annotationdefaults": { "font": { "size": 12 } }, "autotypenumbers": "strict", "hoverlabel": { "bgcolor": "white", "font": { "family": "Rockwell", "size": 14 } }, "hovermode": "x unified", "legend": { "bgcolor": "white", "bordercolor": "Black", "borderwidth": 1, "font": { "family": "Rockwell" } }, "xaxis": { "linecolor": "black", "linewidth": 1, "mirror": true, "showline": true }, "yaxis": { "linecolor": "black", "linewidth": 1, "mirror": true, "showline": true } } }, "width": 900, "xaxis": { "anchor": "y", "domain": [ 0.0, 1.0 ], "showticklabels": true, "title": { "text": "Time (s)" } }, "yaxis": { "anchor": "x", "domain": [ 0.0, 1.0 ], "title": { "text": "Fractional Voltage" } } } }, "text/html": [ "
" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "\n", "\n", "# specify the samples for linear interpolation\n", "times = [0, 0.2, 0.7, 1]\n", "samples = [0, 1, 1, 0]\n", "\n", "# initialize the envelope\n", "envelope = qcs.ArbitraryEnvelope(times, samples)\n", "\n", "# Initialize the waveform\n", "duration = qcs.Scalar(\"duration\", 100e-9, dtype=float, unit=\"s\")\n", "amplitude = 0.6\n", "dc_wav = qcs.DCWaveform(duration, envelope, amplitude)\n", "\n", "# initialize the program and add the waveform\n", "program = qcs.Program()\n", "program.add_waveform(dc_wav, awg)\n", "\n", "# render\n", "program.render()" ] }, { "cell_type": "raw", "id": "0f3b34a8", "metadata": { "lines_to_next_cell": 2, "raw_mimetype": "text/restructuredtext" }, "source": [ "Note that this arbitrary envelope will keep the same shape even if we used a different\n", "duration for the waveform. That is, the relative proportions between the rise, hold,\n", "and fall times will remain constant." ] }, { "cell_type": "code", "execution_count": 11, "id": "e2ba1f3c", "metadata": { "execution": { "iopub.execute_input": "2025-10-02T01:30:25.085875Z", "iopub.status.busy": "2025-10-02T01:30:25.085652Z", "iopub.status.idle": "2025-10-02T01:30:25.144101Z", "shell.execute_reply": "2025-10-02T01:30:25.143251Z" }, "lines_to_next_cell": 0 }, "outputs": [ { "data": { "application/vnd.plotly.v1+json": { "config": { "plotlyServerURL": "https://plot.ly" }, "data": [ { "dx": 1e-09, "legendgroup": "awg_channel, labels: (0,)", "legendgrouptitle": { "text": "awg_channel, labels: (0,)" }, "name": "Drive pulse for awg_channel, labels: (0,)", "type": "scatter", "x0": 0, "xaxis": "x", "y": [ 0.0, 0.01507537688442211, 0.03015075376884422, 0.045226130653266326, 0.06030150753768844, 0.07537688442211056, 0.09045226130653265, 0.10552763819095476, 0.12060301507537688, 0.135678391959799, 0.15075376884422112, 0.16582914572864324, 0.1809045226130653, 0.19597989949748745, 0.21105527638190952, 0.22613065326633167, 0.24120603015075376, 0.2562814070351758, 0.271356783919598, 0.28643216080402006, 0.30150753768844224, 0.3165829145728643, 0.3316582914572865, 0.3467336683417085, 0.3618090452261306, 0.37688442211055273, 0.3919597989949749, 0.407035175879397, 0.42211055276381904, 0.43718592964824116, 0.45226130653266333, 0.46733668341708545, 0.4824120603015075, 0.4974874371859296, 0.5125628140703516, 0.5276381909547738, 0.542713567839196, 0.5577889447236181, 0.5728643216080401, 0.5879396984924624, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.5929648241206028, 0.5829145728643216, 0.5728643216080401, 0.5628140703517587, 0.5527638190954772, 0.5427135678391958, 0.5326633165829145, 0.5226130653266331, 0.5125628140703516, 0.5025125628140702, 0.49246231155778875, 0.48241206030150735, 0.47236180904522607, 0.46231155778894467, 0.45226130653266317, 0.4422110552763817, 0.4321608040201003, 0.42211055276381904, 0.41206030150753764, 0.4020100502512562, 0.3919597989949747, 0.3819095477386933, 0.371859296482412, 0.3618090452261306, 0.35175879396984916, 0.34170854271356765, 0.33165829145728626, 0.321608040201005, 0.3115577889447236, 0.30150753768844213, 0.2914572864321606, 0.2814070351758792, 0.27135678391959794, 0.26130653266331655, 0.2512562814070351, 0.2412060301507536, 0.2311557788944722, 0.221105527638191, 0.21105527638190952, 0.20100502512562804, 0.19095477386934664, 0.18090452261306517, 0.17085427135678397, 0.1608040201005025, 0.150753768844221, 0.1407035175879396, 0.13065326633165814, 0.12060301507537693, 0.11055276381909547, 0.10050251256281399, 0.09045226130653258, 0.08040201005025112, 0.0703517587939699, 0.06030150753768843, 0.05025125628140696, 0.04020100502512556, 0.030150753768844085, 0.020100502512562613, 0.010050251256281405, 0.0 ], "yaxis": "y" } ], "layout": { "annotations": [ { "font": { "size": 16 }, "showarrow": false, "text": "Waveforms for awg_channel, labels: (0,)", "x": 0.5, "xanchor": "center", "xref": "paper", "y": 1.0, "yanchor": "bottom", "yref": "paper" } ], "height": 500, "template": { "data": { "bar": [ { "marker": { "color": "#ad6aff", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "" } }, "type": "bar" }, { "marker": { "color": "#c97a88", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "" } }, "type": "bar" }, { "marker": { "color": "#ff005c", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "" } }, "type": "bar" }, { "marker": { "color": "#ff9000", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "" } }, "type": "bar" }, { "marker": { "color": "#00d539", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "" } }, "type": "bar" }, { "marker": { "color": "#00b287", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "" } }, "type": "bar" }, { "marker": { "color": "#ad6aff", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "/" } }, "type": "bar" }, { "marker": { "color": "#c97a88", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "/" } }, "type": "bar" }, { "marker": { "color": "#ff005c", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "/" } }, "type": "bar" }, { "marker": { "color": "#ff9000", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "/" } }, "type": "bar" }, { "marker": { "color": "#00d539", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "/" } }, "type": "bar" }, { "marker": { "color": "#00b287", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "/" } }, "type": "bar" }, { "marker": { "color": "#ad6aff", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "\\" } }, "type": "bar" }, { "marker": { "color": "#c97a88", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "\\" } }, "type": "bar" }, { "marker": { "color": "#ff005c", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "\\" } }, "type": "bar" }, { "marker": { "color": "#ff9000", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "\\" } }, "type": "bar" }, { "marker": { "color": "#00d539", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "\\" } }, "type": "bar" }, { "marker": { "color": "#00b287", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "\\" } }, "type": "bar" }, { "marker": { "color": "#ad6aff", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "x" } }, "type": "bar" }, { "marker": { "color": "#c97a88", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "x" } }, "type": "bar" }, { "marker": { "color": "#ff005c", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "x" } }, "type": "bar" }, { "marker": { "color": "#ff9000", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "x" } }, "type": "bar" }, { "marker": { "color": "#00d539", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "x" } }, "type": "bar" }, { "marker": { "color": "#00b287", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "x" } }, "type": "bar" }, { "marker": { "color": "#ad6aff", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "-" } }, "type": "bar" }, { "marker": { "color": "#c97a88", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "-" } }, "type": "bar" }, { "marker": { "color": "#ff005c", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "-" } }, "type": "bar" }, { "marker": { "color": "#ff9000", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "-" } }, "type": "bar" }, { "marker": { "color": "#00d539", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "-" } }, "type": "bar" }, { "marker": { "color": "#00b287", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "-" } }, "type": "bar" }, { "marker": { "color": "#ad6aff", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "|" } }, "type": "bar" }, { "marker": { "color": "#c97a88", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "|" } }, "type": "bar" }, { "marker": { "color": "#ff005c", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "|" } }, "type": "bar" }, { "marker": { "color": "#ff9000", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "|" } }, "type": "bar" }, { "marker": { "color": "#00d539", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "|" } }, "type": "bar" }, { "marker": { "color": "#00b287", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "|" } }, "type": "bar" }, { "marker": { "color": "#ad6aff", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "+" } }, "type": "bar" }, { "marker": { "color": "#c97a88", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "+" } }, "type": "bar" }, { "marker": { "color": "#ff005c", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "+" } }, "type": "bar" }, { "marker": { "color": "#ff9000", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "+" } }, "type": "bar" }, { "marker": { "color": "#00d539", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "+" } }, "type": "bar" }, { "marker": { "color": "#00b287", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "+" } }, "type": "bar" }, { "marker": { "color": "#ad6aff", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "." } }, "type": "bar" }, { "marker": { "color": "#c97a88", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "." } }, "type": "bar" }, { "marker": { "color": "#ff005c", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "." } }, "type": "bar" }, { "marker": { "color": "#ff9000", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "." } }, "type": "bar" }, { "marker": { "color": "#00d539", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "." } }, "type": "bar" }, { "marker": { "color": "#00b287", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "." } }, "type": "bar" } ], "scatter": [ { "line": { "color": "#ff005c" }, "marker": { "color": "#ff005c", "opacity": 0.5, "size": 8, "symbol": "circle" }, "type": "scatter" }, { "line": { "color": "#00d539" }, "marker": { "color": "#00d539", "opacity": 0.5, "size": 8, "symbol": "square" }, "type": "scatter" }, { "line": { "color": "#ad6aff" }, "marker": { "color": "#ad6aff", "opacity": 0.5, "size": 8, "symbol": "diamond" }, "type": "scatter" }, { "line": { "color": "#ff9000" }, "marker": { "color": "#ff9000", "opacity": 0.5, "size": 8, "symbol": "triangle-down" }, "type": "scatter" }, { "line": { "color": "#00b287" }, "marker": { "color": "#00b287", "opacity": 0.5, "size": 8, "symbol": "cross" }, "type": "scatter" }, { "line": { "color": "#c97a88" }, "marker": { "color": "#c97a88", "opacity": 0.5, "size": 8, "symbol": "hexagram" }, "type": "scatter" }, { "line": { "color": "#ff005c" }, "marker": { "color": "#ff005c", "opacity": 0.5, "size": 8, "symbol": "square" }, "type": "scatter" }, { "line": { "color": "#00d539" }, "marker": { "color": "#00d539", "opacity": 0.5, "size": 8, "symbol": "diamond" }, "type": "scatter" }, { "line": { "color": "#ad6aff" }, "marker": { "color": "#ad6aff", "opacity": 0.5, "size": 8, "symbol": "triangle-down" }, "type": "scatter" }, { "line": { "color": "#ff9000" }, "marker": { "color": "#ff9000", "opacity": 0.5, "size": 8, "symbol": "cross" }, "type": "scatter" }, { "line": { "color": "#00b287" }, "marker": { "color": "#00b287", "opacity": 0.5, "size": 8, "symbol": "hexagram" }, "type": "scatter" }, { "line": { "color": "#c97a88" }, "marker": { "color": "#c97a88", "opacity": 0.5, "size": 8, "symbol": "circle" }, "type": "scatter" }, { "line": { "color": "#ff005c" }, "marker": { "color": "#ff005c", "opacity": 0.5, "size": 8, "symbol": "diamond" }, "type": "scatter" }, { "line": { "color": "#00d539" }, "marker": { "color": "#00d539", "opacity": 0.5, "size": 8, "symbol": "triangle-down" }, "type": "scatter" }, { "line": { "color": "#ad6aff" }, "marker": { "color": "#ad6aff", "opacity": 0.5, "size": 8, "symbol": "cross" }, "type": "scatter" }, { "line": { "color": "#ff9000" }, "marker": { "color": "#ff9000", "opacity": 0.5, "size": 8, "symbol": "hexagram" }, "type": "scatter" }, { "line": { "color": "#00b287" }, "marker": { "color": "#00b287", "opacity": 0.5, "size": 8, "symbol": "circle" }, "type": "scatter" }, { "line": { "color": "#c97a88" }, "marker": { "color": "#c97a88", "opacity": 0.5, "size": 8, "symbol": "square" }, "type": "scatter" }, { "line": { "color": "#ff005c" }, "marker": { "color": "#ff005c", "opacity": 0.5, "size": 8, "symbol": "triangle-down" }, "type": "scatter" }, { "line": { "color": "#00d539" }, "marker": { "color": "#00d539", "opacity": 0.5, "size": 8, "symbol": "cross" }, "type": "scatter" }, { "line": { "color": "#ad6aff" }, "marker": { "color": "#ad6aff", "opacity": 0.5, "size": 8, "symbol": "hexagram" }, "type": "scatter" }, { "line": { "color": "#ff9000" }, "marker": { "color": "#ff9000", "opacity": 0.5, "size": 8, "symbol": "circle" }, "type": "scatter" }, { "line": { "color": "#00b287" }, "marker": { "color": "#00b287", "opacity": 0.5, "size": 8, "symbol": "square" }, "type": "scatter" }, { "line": { "color": "#c97a88" }, "marker": { "color": "#c97a88", "opacity": 0.5, "size": 8, "symbol": "diamond" }, "type": "scatter" }, { "line": { "color": "#ff005c" }, "marker": { "color": "#ff005c", "opacity": 0.5, "size": 8, "symbol": "cross" }, "type": "scatter" }, { "line": { "color": "#00d539" }, "marker": { "color": "#00d539", "opacity": 0.5, "size": 8, "symbol": "hexagram" }, "type": "scatter" }, { "line": { "color": "#ad6aff" }, "marker": { "color": "#ad6aff", "opacity": 0.5, "size": 8, "symbol": "circle" }, "type": "scatter" }, { "line": { "color": "#ff9000" }, "marker": { "color": "#ff9000", "opacity": 0.5, "size": 8, "symbol": "square" }, "type": "scatter" }, { "line": { "color": "#00b287" }, "marker": { "color": "#00b287", "opacity": 0.5, "size": 8, "symbol": "diamond" }, "type": "scatter" }, { "line": { "color": "#c97a88" }, "marker": { "color": "#c97a88", "opacity": 0.5, "size": 8, "symbol": "triangle-down" }, "type": "scatter" }, { "line": { "color": "#ff005c" }, "marker": { "color": "#ff005c", "opacity": 0.5, "size": 8, "symbol": "hexagram" }, "type": "scatter" }, { "line": { "color": "#00d539" }, "marker": { "color": "#00d539", "opacity": 0.5, "size": 8, "symbol": "circle" }, "type": "scatter" }, { "line": { "color": "#ad6aff" }, "marker": { "color": "#ad6aff", "opacity": 0.5, "size": 8, "symbol": "square" }, "type": "scatter" }, { "line": { "color": "#ff9000" }, "marker": { "color": "#ff9000", "opacity": 0.5, "size": 8, "symbol": "diamond" }, "type": "scatter" }, { "line": { "color": "#00b287" }, "marker": { "color": "#00b287", "opacity": 0.5, "size": 8, "symbol": "triangle-down" }, "type": "scatter" }, { "line": { "color": "#c97a88" }, "marker": { "color": "#c97a88", "opacity": 0.5, "size": 8, "symbol": "cross" }, "type": "scatter" } ], "violin": [ { "box": { "visible": true }, "line": { "color": "#ff005c" }, "marker": { "color": "#ff005c", "opacity": 0.5, "size": 8, "symbol": "circle" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#00d539" }, "marker": { "color": "#00d539", "opacity": 0.5, "size": 8, "symbol": "square" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ad6aff" }, "marker": { "color": "#ad6aff", "opacity": 0.5, "size": 8, "symbol": "diamond" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ff9000" }, "marker": { "color": "#ff9000", "opacity": 0.5, "size": 8, "symbol": "triangle-down" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#00b287" }, "marker": { "color": "#00b287", "opacity": 0.5, "size": 8, "symbol": "cross" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#c97a88" }, "marker": { "color": "#c97a88", "opacity": 0.5, "size": 8, "symbol": "hexagram" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ff005c" }, "marker": { "color": "#ff005c", "opacity": 0.5, "size": 8, "symbol": "square" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#00d539" }, "marker": { "color": "#00d539", "opacity": 0.5, "size": 8, "symbol": "diamond" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ad6aff" }, "marker": { "color": "#ad6aff", "opacity": 0.5, "size": 8, "symbol": "triangle-down" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ff9000" }, "marker": { "color": "#ff9000", "opacity": 0.5, "size": 8, "symbol": "cross" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#00b287" }, "marker": { "color": "#00b287", "opacity": 0.5, "size": 8, "symbol": "hexagram" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#c97a88" }, "marker": { "color": "#c97a88", "opacity": 0.5, "size": 8, "symbol": "circle" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ff005c" }, "marker": { "color": "#ff005c", "opacity": 0.5, "size": 8, "symbol": "diamond" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#00d539" }, "marker": { "color": "#00d539", "opacity": 0.5, "size": 8, "symbol": "triangle-down" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ad6aff" }, "marker": { "color": "#ad6aff", "opacity": 0.5, "size": 8, "symbol": "cross" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ff9000" }, "marker": { "color": "#ff9000", "opacity": 0.5, "size": 8, "symbol": "hexagram" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#00b287" }, "marker": { "color": "#00b287", "opacity": 0.5, "size": 8, "symbol": "circle" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#c97a88" }, "marker": { "color": "#c97a88", "opacity": 0.5, "size": 8, "symbol": "square" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ff005c" }, "marker": { "color": "#ff005c", "opacity": 0.5, "size": 8, "symbol": "triangle-down" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#00d539" }, "marker": { "color": "#00d539", "opacity": 0.5, "size": 8, "symbol": "cross" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ad6aff" }, "marker": { "color": "#ad6aff", "opacity": 0.5, "size": 8, "symbol": "hexagram" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ff9000" }, "marker": { "color": "#ff9000", "opacity": 0.5, "size": 8, "symbol": "circle" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#00b287" }, "marker": { "color": "#00b287", "opacity": 0.5, "size": 8, "symbol": "square" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#c97a88" }, "marker": { "color": "#c97a88", "opacity": 0.5, "size": 8, "symbol": "diamond" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ff005c" }, "marker": { "color": "#ff005c", "opacity": 0.5, "size": 8, "symbol": "cross" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#00d539" }, "marker": { "color": "#00d539", "opacity": 0.5, "size": 8, "symbol": "hexagram" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ad6aff" }, "marker": { "color": "#ad6aff", "opacity": 0.5, "size": 8, "symbol": "circle" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ff9000" }, "marker": { "color": "#ff9000", "opacity": 0.5, "size": 8, "symbol": "square" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#00b287" }, "marker": { "color": "#00b287", "opacity": 0.5, "size": 8, "symbol": "diamond" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#c97a88" }, "marker": { "color": "#c97a88", "opacity": 0.5, "size": 8, "symbol": "triangle-down" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ff005c" }, "marker": { "color": "#ff005c", "opacity": 0.5, "size": 8, "symbol": "hexagram" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#00d539" }, "marker": { "color": "#00d539", "opacity": 0.5, "size": 8, "symbol": "circle" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ad6aff" }, "marker": { "color": "#ad6aff", "opacity": 0.5, "size": 8, "symbol": "square" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ff9000" }, "marker": { "color": "#ff9000", "opacity": 0.5, "size": 8, "symbol": "diamond" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#00b287" }, "marker": { "color": "#00b287", "opacity": 0.5, "size": 8, "symbol": "triangle-down" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#c97a88" }, "marker": { "color": "#c97a88", "opacity": 0.5, "size": 8, "symbol": "cross" }, "meanline": { "visible": true }, "type": "violin" } ] }, "layout": { "annotationdefaults": { "font": { "size": 12 } }, "autotypenumbers": "strict", "hoverlabel": { "bgcolor": "white", "font": { "family": "Rockwell", "size": 14 } }, "hovermode": "x unified", "legend": { "bgcolor": "white", "bordercolor": "Black", "borderwidth": 1, "font": { "family": "Rockwell" } }, "xaxis": { "linecolor": "black", "linewidth": 1, "mirror": true, "showline": true }, "yaxis": { "linecolor": "black", "linewidth": 1, "mirror": true, "showline": true } } }, "width": 900, "xaxis": { "anchor": "y", "domain": [ 0.0, 1.0 ], "showticklabels": true, "title": { "text": "Time (s)" } }, "yaxis": { "anchor": "x", "domain": [ 0.0, 1.0 ], "title": { "text": "Fractional Voltage" } } } }, "text/html": [ "
" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "duration.value = 200e-9\n", "\n", "# render\n", "program.render()" ] }, { "cell_type": "raw", "id": "8a2f7eb5", "metadata": { "lines_to_next_cell": 2, "raw_mimetype": "text/restructuredtext" }, "source": [ "Alternatively, we could control the relative proportions of the rise, hold and fall\n", "times by constructing a flat-top waveform that uses an Arbitrary envelope." ] }, { "cell_type": "code", "execution_count": 12, "id": "a3c083e4", "metadata": { "execution": { "iopub.execute_input": "2025-10-02T01:30:25.147064Z", "iopub.status.busy": "2025-10-02T01:30:25.146825Z", "iopub.status.idle": "2025-10-02T01:30:25.218116Z", "shell.execute_reply": "2025-10-02T01:30:25.217446Z" }, "lines_to_next_cell": 2 }, "outputs": [ { "data": { "application/vnd.plotly.v1+json": { "config": { "plotlyServerURL": "https://plot.ly" }, "data": [ { "dx": 1e-09, "legendgroup": "awg_channel, labels: (0,)", "legendgrouptitle": { "text": "awg_channel, labels: (0,)" }, "name": "Drive pulse for awg_channel, labels: (0,)", "type": "scatter", "x0": 0, "xaxis": "x", "y": [ 0.0, 0.012121212121212121, 0.024242424242424242, 0.03636363636363636, 0.048484848484848485, 0.06060606060606061, 0.07272727272727272, 0.08484848484848485, 0.09696969696969697, 0.10909090909090909, 0.12121212121212122, 0.13333333333333333, 0.14545454545454545, 0.1575757575757576, 0.1696969696969697, 0.18181818181818182, 0.19393939393939394, 0.20606060606060608, 0.21818181818181817, 0.23030303030303031, 0.24242424242424243, 0.2545454545454545, 0.26666666666666666, 0.2787878787878788, 0.2909090909090909, 0.30303030303030304, 0.3151515151515152, 0.3272727272727273, 0.3393939393939394, 0.3515151515151515, 0.36363636363636365, 0.3757575757575758, 0.3878787878787879, 0.4, 0.41212121212121217, 0.4242424242424243, 0.43636363636363634, 0.4484848484848485, 0.46060606060606063, 0.4727272727272728, 0.48484848484848486, 0.496969696969697, 0.509090909090909, 0.5212121212121212, 0.5333333333333333, 0.5454545454545455, 0.5575757575757576, 0.5696969696969697, 0.5818181818181818, 0.593939393939394, 0.593939393939394, 0.593939393939394, 0.593939393939394, 0.593939393939394, 0.593939393939394, 0.593939393939394, 0.593939393939394, 0.593939393939394, 0.593939393939394, 0.593939393939394, 0.593939393939394, 0.593939393939394, 0.593939393939394, 0.593939393939394, 0.593939393939394, 0.593939393939394, 0.593939393939394, 0.593939393939394, 0.593939393939394, 0.593939393939394, 0.593939393939394, 0.593939393939394, 0.593939393939394, 0.593939393939394, 0.593939393939394, 0.593939393939394, 0.593939393939394, 0.593939393939394, 0.593939393939394, 0.593939393939394, 0.593939393939394, 0.593939393939394, 0.593939393939394, 0.593939393939394, 0.593939393939394, 0.593939393939394, 0.593939393939394, 0.593939393939394, 0.593939393939394, 0.593939393939394, 0.593939393939394, 0.593939393939394, 0.593939393939394, 0.593939393939394, 0.593939393939394, 0.593939393939394, 0.593939393939394, 0.593939393939394, 0.593939393939394, 0.593939393939394, 0.593939393939394, 0.593939393939394, 0.593939393939394, 0.593939393939394, 0.593939393939394, 0.593939393939394, 0.593939393939394, 0.593939393939394, 0.593939393939394, 0.593939393939394, 0.593939393939394, 0.593939393939394, 0.593939393939394, 0.593939393939394, 0.593939393939394, 0.593939393939394, 0.593939393939394, 0.593939393939394, 0.593939393939394, 0.593939393939394, 0.593939393939394, 0.593939393939394, 0.593939393939394, 0.593939393939394, 0.593939393939394, 0.593939393939394, 0.593939393939394, 0.593939393939394, 0.593939393939394, 0.593939393939394, 0.593939393939394, 0.593939393939394, 0.593939393939394, 0.593939393939394, 0.593939393939394, 0.593939393939394, 0.593939393939394, 0.593939393939394, 0.593939393939394, 0.593939393939394, 0.593939393939394, 0.593939393939394, 0.593939393939394, 0.593939393939394, 0.593939393939394, 0.593939393939394, 0.593939393939394, 0.593939393939394, 0.593939393939394, 0.593939393939394, 0.5846153846153846, 0.5538461538461539, 0.5230769230769231, 0.4923076923076923, 0.46153846153846145, 0.43076923076923085, 0.4, 0.36923076923076925, 0.3384615384615384, 0.30769230769230765, 0.276923076923077, 0.2461538461538462, 0.21538461538461542, 0.18461538461538463, 0.15384615384615383, 0.12307692307692317, 0.09230769230769238, 0.061538461538461584, 0.030769230769230792, 0.0 ], "yaxis": "y" } ], "layout": { "annotations": [ { "font": { "size": 16 }, "showarrow": false, "text": "Waveforms for awg_channel, labels: (0,)", "x": 0.5, "xanchor": "center", "xref": "paper", "y": 1.0, "yanchor": "bottom", "yref": "paper" } ], "height": 500, "template": { "data": { "bar": [ { "marker": { "color": "#ad6aff", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "" } }, "type": "bar" }, { "marker": { "color": "#c97a88", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "" } }, "type": "bar" }, { "marker": { "color": "#ff005c", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "" } }, "type": "bar" }, { "marker": { "color": "#ff9000", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "" } }, "type": "bar" }, { "marker": { "color": "#00d539", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "" } }, "type": "bar" }, { "marker": { "color": "#00b287", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "" } }, "type": "bar" }, { "marker": { "color": "#ad6aff", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "/" } }, "type": "bar" }, { "marker": { "color": "#c97a88", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "/" } }, "type": "bar" }, { "marker": { "color": "#ff005c", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "/" } }, "type": "bar" }, { "marker": { "color": "#ff9000", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "/" } }, "type": "bar" }, { "marker": { "color": "#00d539", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "/" } }, "type": "bar" }, { "marker": { "color": "#00b287", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "/" } }, "type": "bar" }, { "marker": { "color": "#ad6aff", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "\\" } }, "type": "bar" }, { "marker": { "color": "#c97a88", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "\\" } }, "type": "bar" }, { "marker": { "color": "#ff005c", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "\\" } }, "type": "bar" }, { "marker": { "color": "#ff9000", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "\\" } }, "type": "bar" }, { "marker": { "color": "#00d539", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "\\" } }, "type": "bar" }, { "marker": { "color": "#00b287", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "\\" } }, "type": "bar" }, { "marker": { "color": "#ad6aff", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "x" } }, "type": "bar" }, { "marker": { "color": "#c97a88", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "x" } }, "type": "bar" }, { "marker": { "color": "#ff005c", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "x" } }, "type": "bar" }, { "marker": { "color": "#ff9000", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "x" } }, "type": "bar" }, { "marker": { "color": "#00d539", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "x" } }, "type": "bar" }, { "marker": { "color": "#00b287", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "x" } }, "type": "bar" }, { "marker": { "color": "#ad6aff", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "-" } }, "type": "bar" }, { "marker": { "color": "#c97a88", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "-" } }, "type": "bar" }, { "marker": { "color": "#ff005c", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "-" } }, "type": "bar" }, { "marker": { "color": "#ff9000", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "-" } }, "type": "bar" }, { "marker": { "color": "#00d539", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "-" } }, "type": "bar" }, { "marker": { "color": "#00b287", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "-" } }, "type": "bar" }, { "marker": { "color": "#ad6aff", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "|" } }, "type": "bar" }, { "marker": { "color": "#c97a88", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "|" } }, "type": "bar" }, { "marker": { "color": "#ff005c", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "|" } }, "type": "bar" }, { "marker": { "color": "#ff9000", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "|" } }, "type": "bar" }, { "marker": { "color": "#00d539", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "|" } }, "type": "bar" }, { "marker": { "color": "#00b287", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "|" } }, "type": "bar" }, { "marker": { "color": "#ad6aff", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "+" } }, "type": "bar" }, { "marker": { "color": "#c97a88", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "+" } }, "type": "bar" }, { "marker": { "color": "#ff005c", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "+" } }, "type": "bar" }, { "marker": { "color": "#ff9000", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "+" } }, "type": "bar" }, { "marker": { "color": "#00d539", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "+" } }, "type": "bar" }, { "marker": { "color": "#00b287", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "+" } }, "type": "bar" }, { "marker": { "color": "#ad6aff", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "." } }, "type": "bar" }, { "marker": { "color": "#c97a88", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "." } }, "type": "bar" }, { "marker": { "color": "#ff005c", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "." } }, "type": "bar" }, { "marker": { "color": "#ff9000", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "." } }, "type": "bar" }, { "marker": { "color": "#00d539", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "." } }, "type": "bar" }, { "marker": { "color": "#00b287", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "." } }, "type": "bar" } ], "scatter": [ { "line": { "color": "#ff005c" }, "marker": { "color": "#ff005c", "opacity": 0.5, "size": 8, "symbol": "circle" }, "type": "scatter" }, { "line": { "color": "#00d539" }, "marker": { "color": "#00d539", "opacity": 0.5, "size": 8, "symbol": "square" }, "type": "scatter" }, { "line": { "color": "#ad6aff" }, "marker": { "color": "#ad6aff", "opacity": 0.5, "size": 8, "symbol": "diamond" }, "type": "scatter" }, { "line": { "color": "#ff9000" }, "marker": { "color": "#ff9000", "opacity": 0.5, "size": 8, "symbol": "triangle-down" }, "type": "scatter" }, { "line": { "color": "#00b287" }, "marker": { "color": "#00b287", "opacity": 0.5, "size": 8, "symbol": "cross" }, "type": "scatter" }, { "line": { "color": "#c97a88" }, "marker": { "color": "#c97a88", "opacity": 0.5, "size": 8, "symbol": "hexagram" }, "type": "scatter" }, { "line": { "color": "#ff005c" }, "marker": { "color": "#ff005c", "opacity": 0.5, "size": 8, "symbol": "square" }, "type": "scatter" }, { "line": { "color": "#00d539" }, "marker": { "color": "#00d539", "opacity": 0.5, "size": 8, "symbol": "diamond" }, "type": "scatter" }, { "line": { "color": "#ad6aff" }, "marker": { "color": "#ad6aff", "opacity": 0.5, "size": 8, "symbol": "triangle-down" }, "type": "scatter" }, { "line": { "color": "#ff9000" }, "marker": { "color": "#ff9000", "opacity": 0.5, "size": 8, "symbol": "cross" }, "type": "scatter" }, { "line": { "color": "#00b287" }, "marker": { "color": "#00b287", "opacity": 0.5, "size": 8, "symbol": "hexagram" }, "type": "scatter" }, { "line": { "color": "#c97a88" }, "marker": { "color": "#c97a88", "opacity": 0.5, "size": 8, "symbol": "circle" }, "type": "scatter" }, { "line": { "color": "#ff005c" }, "marker": { "color": "#ff005c", "opacity": 0.5, "size": 8, "symbol": "diamond" }, "type": "scatter" }, { "line": { "color": "#00d539" }, "marker": { "color": "#00d539", "opacity": 0.5, "size": 8, "symbol": "triangle-down" }, "type": "scatter" }, { "line": { "color": "#ad6aff" }, "marker": { "color": "#ad6aff", "opacity": 0.5, "size": 8, "symbol": "cross" }, "type": "scatter" }, { "line": { "color": "#ff9000" }, "marker": { "color": "#ff9000", "opacity": 0.5, "size": 8, "symbol": "hexagram" }, "type": "scatter" }, { "line": { "color": "#00b287" }, "marker": { "color": "#00b287", "opacity": 0.5, "size": 8, "symbol": "circle" }, "type": "scatter" }, { "line": { "color": "#c97a88" }, "marker": { "color": "#c97a88", "opacity": 0.5, "size": 8, "symbol": "square" }, "type": "scatter" }, { "line": { "color": "#ff005c" }, "marker": { "color": "#ff005c", "opacity": 0.5, "size": 8, "symbol": "triangle-down" }, "type": "scatter" }, { "line": { "color": "#00d539" }, "marker": { "color": "#00d539", "opacity": 0.5, "size": 8, "symbol": "cross" }, "type": "scatter" }, { "line": { "color": "#ad6aff" }, "marker": { "color": "#ad6aff", "opacity": 0.5, "size": 8, "symbol": "hexagram" }, "type": "scatter" }, { "line": { "color": "#ff9000" }, "marker": { "color": "#ff9000", "opacity": 0.5, "size": 8, "symbol": "circle" }, "type": "scatter" }, { "line": { "color": "#00b287" }, "marker": { "color": "#00b287", "opacity": 0.5, "size": 8, "symbol": "square" }, "type": "scatter" }, { "line": { "color": "#c97a88" }, "marker": { "color": "#c97a88", "opacity": 0.5, "size": 8, "symbol": "diamond" }, "type": "scatter" }, { "line": { "color": "#ff005c" }, "marker": { "color": "#ff005c", "opacity": 0.5, "size": 8, "symbol": "cross" }, "type": "scatter" }, { "line": { "color": "#00d539" }, "marker": { "color": "#00d539", "opacity": 0.5, "size": 8, "symbol": "hexagram" }, "type": "scatter" }, { "line": { "color": "#ad6aff" }, "marker": { "color": "#ad6aff", "opacity": 0.5, "size": 8, "symbol": "circle" }, "type": "scatter" }, { "line": { "color": "#ff9000" }, "marker": { "color": "#ff9000", "opacity": 0.5, "size": 8, "symbol": "square" }, "type": "scatter" }, { "line": { "color": "#00b287" }, "marker": { "color": "#00b287", "opacity": 0.5, "size": 8, "symbol": "diamond" }, "type": "scatter" }, { "line": { "color": "#c97a88" }, "marker": { "color": "#c97a88", "opacity": 0.5, "size": 8, "symbol": "triangle-down" }, "type": "scatter" }, { "line": { "color": "#ff005c" }, "marker": { "color": "#ff005c", "opacity": 0.5, "size": 8, "symbol": "hexagram" }, "type": "scatter" }, { "line": { "color": "#00d539" }, "marker": { "color": "#00d539", "opacity": 0.5, "size": 8, "symbol": "circle" }, "type": "scatter" }, { "line": { "color": "#ad6aff" }, "marker": { "color": "#ad6aff", "opacity": 0.5, "size": 8, "symbol": "square" }, "type": "scatter" }, { "line": { "color": "#ff9000" }, "marker": { "color": "#ff9000", "opacity": 0.5, "size": 8, "symbol": "diamond" }, "type": "scatter" }, { "line": { "color": "#00b287" }, "marker": { "color": "#00b287", "opacity": 0.5, "size": 8, "symbol": "triangle-down" }, "type": "scatter" }, { "line": { "color": "#c97a88" }, "marker": { "color": "#c97a88", "opacity": 0.5, "size": 8, "symbol": "cross" }, "type": "scatter" } ], "violin": [ { "box": { "visible": true }, "line": { "color": "#ff005c" }, "marker": { "color": "#ff005c", "opacity": 0.5, "size": 8, "symbol": "circle" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#00d539" }, "marker": { "color": "#00d539", "opacity": 0.5, "size": 8, "symbol": "square" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ad6aff" }, "marker": { "color": "#ad6aff", "opacity": 0.5, "size": 8, "symbol": "diamond" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ff9000" }, "marker": { "color": "#ff9000", "opacity": 0.5, "size": 8, "symbol": "triangle-down" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#00b287" }, "marker": { "color": "#00b287", "opacity": 0.5, "size": 8, "symbol": "cross" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#c97a88" }, "marker": { "color": "#c97a88", "opacity": 0.5, "size": 8, "symbol": "hexagram" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ff005c" }, "marker": { "color": "#ff005c", "opacity": 0.5, "size": 8, "symbol": "square" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#00d539" }, "marker": { "color": "#00d539", "opacity": 0.5, "size": 8, "symbol": "diamond" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ad6aff" }, "marker": { "color": "#ad6aff", "opacity": 0.5, "size": 8, "symbol": "triangle-down" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ff9000" }, "marker": { "color": "#ff9000", "opacity": 0.5, "size": 8, "symbol": "cross" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#00b287" }, "marker": { "color": "#00b287", "opacity": 0.5, "size": 8, "symbol": "hexagram" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#c97a88" }, "marker": { "color": "#c97a88", "opacity": 0.5, "size": 8, "symbol": "circle" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ff005c" }, "marker": { "color": "#ff005c", "opacity": 0.5, "size": 8, "symbol": "diamond" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#00d539" }, "marker": { "color": "#00d539", "opacity": 0.5, "size": 8, "symbol": "triangle-down" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ad6aff" }, "marker": { "color": "#ad6aff", "opacity": 0.5, "size": 8, "symbol": "cross" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ff9000" }, "marker": { "color": "#ff9000", "opacity": 0.5, "size": 8, "symbol": "hexagram" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#00b287" }, "marker": { "color": "#00b287", "opacity": 0.5, "size": 8, "symbol": "circle" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#c97a88" }, "marker": { "color": "#c97a88", "opacity": 0.5, "size": 8, "symbol": "square" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ff005c" }, "marker": { "color": "#ff005c", "opacity": 0.5, "size": 8, "symbol": "triangle-down" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#00d539" }, "marker": { "color": "#00d539", "opacity": 0.5, "size": 8, "symbol": "cross" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ad6aff" }, "marker": { "color": "#ad6aff", "opacity": 0.5, "size": 8, "symbol": "hexagram" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ff9000" }, "marker": { "color": "#ff9000", "opacity": 0.5, "size": 8, "symbol": "circle" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#00b287" }, "marker": { "color": "#00b287", "opacity": 0.5, "size": 8, "symbol": "square" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#c97a88" }, "marker": { "color": "#c97a88", "opacity": 0.5, "size": 8, "symbol": "diamond" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ff005c" }, "marker": { "color": "#ff005c", "opacity": 0.5, "size": 8, "symbol": "cross" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#00d539" }, "marker": { "color": "#00d539", "opacity": 0.5, "size": 8, "symbol": "hexagram" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ad6aff" }, "marker": { "color": "#ad6aff", "opacity": 0.5, "size": 8, "symbol": "circle" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ff9000" }, "marker": { "color": "#ff9000", "opacity": 0.5, "size": 8, "symbol": "square" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#00b287" }, "marker": { "color": "#00b287", "opacity": 0.5, "size": 8, "symbol": "diamond" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#c97a88" }, "marker": { "color": "#c97a88", "opacity": 0.5, "size": 8, "symbol": "triangle-down" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ff005c" }, "marker": { "color": "#ff005c", "opacity": 0.5, "size": 8, "symbol": "hexagram" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#00d539" }, "marker": { "color": "#00d539", "opacity": 0.5, "size": 8, "symbol": "circle" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ad6aff" }, "marker": { "color": "#ad6aff", "opacity": 0.5, "size": 8, "symbol": "square" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ff9000" }, "marker": { "color": "#ff9000", "opacity": 0.5, "size": 8, "symbol": "diamond" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#00b287" }, "marker": { "color": "#00b287", "opacity": 0.5, "size": 8, "symbol": "triangle-down" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#c97a88" }, "marker": { "color": "#c97a88", "opacity": 0.5, "size": 8, "symbol": "cross" }, "meanline": { "visible": true }, "type": "violin" } ] }, "layout": { "annotationdefaults": { "font": { "size": 12 } }, "autotypenumbers": "strict", "hoverlabel": { "bgcolor": "white", "font": { "family": "Rockwell", "size": 14 } }, "hovermode": "x unified", "legend": { "bgcolor": "white", "bordercolor": "Black", "borderwidth": 1, "font": { "family": "Rockwell" } }, "xaxis": { "linecolor": "black", "linewidth": 1, "mirror": true, "showline": true }, "yaxis": { "linecolor": "black", "linewidth": 1, "mirror": true, "showline": true } } }, "width": 900, "xaxis": { "anchor": "y", "domain": [ 0.0, 1.0 ], "showticklabels": true, "title": { "text": "Time (s)" } }, "yaxis": { "anchor": "x", "domain": [ 0.0, 1.0 ], "title": { "text": "Fractional Voltage" } } } }, "text/html": [ "
" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "\n", "# specify the samples for linear interpolation\n", "times = [0, 0.5, 1]\n", "samples = [0, 1, 0]\n", "\n", "# initialize the arbitrary envelope\n", "envelope = qcs.ArbitraryEnvelope(times, samples)\n", "\n", "# Create a flattop waveform,\n", "# This splits the envelope in half, and specifies times for rise, hold, and fall.\n", "flattop_wav = qcs.DCWaveform.create_dc_flattop(\n", " 50e-9, 100e-9, 20e-9, envelope, amplitude\n", ")\n", "\n", "program = qcs.Program()\n", "program.add_waveform(flattop_wav, awg)\n", "\n", "program.render()" ] }, { "cell_type": "raw", "id": "1247e156", "metadata": { "lines_to_next_cell": 2, "raw_mimetype": "text/restructuredtext" }, "source": [ "Example 2: functional definition with sech envelope\n", "^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", "Rather than specifying an envelope with a collection of discrete points, an envelope\n", "can be specified with a function that defines the envelope's shape.\n", "\n", "In this example we implement a sech envelope. The envelope :math:`E(t)` is given by\n", "\n", ".. math::\n", " E(t) = A\\text{sech}\\left(\\frac{t-\\mu}{\\sigma}\\right)\n", "\n", "where :math:`A` is the scaling parameter, :math:`\\mu` is the mean and :math:`\\sigma`\n", "is the standard deviation." ] }, { "cell_type": "code", "execution_count": 13, "id": "045d01e1", "metadata": { "execution": { "iopub.execute_input": "2025-10-02T01:30:25.221875Z", "iopub.status.busy": "2025-10-02T01:30:25.221590Z", "iopub.status.idle": "2025-10-02T01:30:25.301319Z", "shell.execute_reply": "2025-10-02T01:30:25.300311Z" } }, "outputs": [ { "data": { "application/vnd.plotly.v1+json": { "config": { "plotlyServerURL": "https://plot.ly" }, "data": [ { "dx": 1e-09, "legendgroup": "awg_channel, labels: (0,)", "legendgrouptitle": { "text": "awg_channel, labels: (0,)" }, "name": "Drive pulse for awg_channel, labels: (0,)", "type": "scatter", "x0": 0, "xaxis": "x", "y": [ 0.07129769723358907, 0.076250263468014, 0.08154470005496178, 0.08720412530608214, 0.09325311316932539, 0.09971776040577784, 0.10662575095408736, 0.11400641567637608, 0.1218907852196285, 0.1303116331700834, 0.1393035060079447, 0.14890273556648365, 0.15914742874221757, 0.17007742806882256, 0.18173423543379905, 0.19416088966169986, 0.20740178689230765, 0.22150243063466724, 0.23650909607828768, 0.2524683907098727, 0.2694266905648117, 0.2874294286256647, 0.30652020911104594, 0.3267397189019284, 0.348124405455872, 0.3707048897217128, 0.3945040834073301, 0.41953498327853633, 0.4457981219901104, 0.4732786664843786, 0.5019431726141141, 0.531736029794619, 0.5625756634876665, 0.5943506070825001, 0.6269156083509915, 0.6600879978132321, 0.6936446137104393, 0.7273196447895528, 0.7608038084944165, 0.7937453158854139, 0.825753070529122, 0.8564024907478416, 0.8852442192783587, 0.9118157843267938, 0.935656005250891, 0.9563216140303749, 0.9734052267188512, 0.9865534982489712, 0.9954840874370041, 1.0, 1.0, 0.9954840874370039, 0.9865534982489712, 0.9734052267188512, 0.9563216140303747, 0.935656005250891, 0.9118157843267937, 0.8852442192783584, 0.8564024907478411, 0.8257530705291217, 0.7937453158854135, 0.7608038084944161, 0.7273196447895527, 0.693644613710439, 0.6600879978132318, 0.6269156083509912, 0.5943506070824998, 0.5625756634876665, 0.5317360297946185, 0.5019431726141139, 0.4732786664843784, 0.4457981219901101, 0.41953498327853617, 0.39450408340732984, 0.37070488972171267, 0.34812440545587164, 0.32673971890192816, 0.30652020911104594, 0.28742942862566445, 0.26942669056481156, 0.25246839070987265, 0.2365090960782876, 0.2215024306346671, 0.20740178689230748, 0.19416088966169986, 0.1817342354337989, 0.17007742806882245, 0.1591474287422175, 0.1489027355664836, 0.13930350600794456, 0.13031163317008326, 0.12189078521962846, 0.11400641567637598, 0.10662575095408731, 0.09971776040577778, 0.09325311316932534, 0.08720412530608214, 0.0815447000549617, 0.07625026346801397, 0.07129769723358907 ], "yaxis": "y" } ], "layout": { "annotations": [ { "font": { "size": 16 }, "showarrow": false, "text": "Waveforms for awg_channel, labels: (0,)", "x": 0.5, "xanchor": "center", "xref": "paper", "y": 1.0, "yanchor": "bottom", "yref": "paper" } ], "height": 500, "template": { "data": { "bar": [ { "marker": { "color": "#ad6aff", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "" } }, "type": "bar" }, { "marker": { "color": "#c97a88", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "" } }, "type": "bar" }, { "marker": { "color": "#ff005c", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "" } }, "type": "bar" }, { "marker": { "color": "#ff9000", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "" } }, "type": "bar" }, { "marker": { "color": "#00d539", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "" } }, "type": "bar" }, { "marker": { "color": "#00b287", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "" } }, "type": "bar" }, { "marker": { "color": "#ad6aff", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "/" } }, "type": "bar" }, { "marker": { "color": "#c97a88", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "/" } }, "type": "bar" }, { "marker": { "color": "#ff005c", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "/" } }, "type": "bar" }, { "marker": { "color": "#ff9000", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "/" } }, "type": "bar" }, { "marker": { "color": "#00d539", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "/" } }, "type": "bar" }, { "marker": { "color": "#00b287", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "/" } }, "type": "bar" }, { "marker": { "color": "#ad6aff", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "\\" } }, "type": "bar" }, { "marker": { "color": "#c97a88", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "\\" } }, "type": "bar" }, { "marker": { "color": "#ff005c", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "\\" } }, "type": "bar" }, { "marker": { "color": "#ff9000", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "\\" } }, "type": "bar" }, { "marker": { "color": "#00d539", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "\\" } }, "type": "bar" }, { "marker": { "color": "#00b287", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "\\" } }, "type": "bar" }, { "marker": { "color": "#ad6aff", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "x" } }, "type": "bar" }, { "marker": { "color": "#c97a88", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "x" } }, "type": "bar" }, { "marker": { "color": "#ff005c", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "x" } }, "type": "bar" }, { "marker": { "color": "#ff9000", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "x" } }, "type": "bar" }, { "marker": { "color": "#00d539", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "x" } }, "type": "bar" }, { "marker": { "color": "#00b287", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "x" } }, "type": "bar" }, { "marker": { "color": "#ad6aff", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "-" } }, "type": "bar" }, { "marker": { "color": "#c97a88", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "-" } }, "type": "bar" }, { "marker": { "color": "#ff005c", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "-" } }, "type": "bar" }, { "marker": { "color": "#ff9000", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "-" } }, "type": "bar" }, { "marker": { "color": "#00d539", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "-" } }, "type": "bar" }, { "marker": { "color": "#00b287", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "-" } }, "type": "bar" }, { "marker": { "color": "#ad6aff", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "|" } }, "type": "bar" }, { "marker": { "color": "#c97a88", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "|" } }, "type": "bar" }, { "marker": { "color": "#ff005c", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "|" } }, "type": "bar" }, { "marker": { "color": "#ff9000", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "|" } }, "type": "bar" }, { "marker": { "color": "#00d539", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "|" } }, "type": "bar" }, { "marker": { "color": "#00b287", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "|" } }, "type": "bar" }, { "marker": { "color": "#ad6aff", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "+" } }, "type": "bar" }, { "marker": { "color": "#c97a88", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "+" } }, "type": "bar" }, { "marker": { "color": "#ff005c", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "+" } }, "type": "bar" }, { "marker": { "color": "#ff9000", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "+" } }, "type": "bar" }, { "marker": { "color": "#00d539", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "+" } }, "type": "bar" }, { "marker": { "color": "#00b287", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "+" } }, "type": "bar" }, { "marker": { "color": "#ad6aff", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "." } }, "type": "bar" }, { "marker": { "color": "#c97a88", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "." } }, "type": "bar" }, { "marker": { "color": "#ff005c", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "." } }, "type": "bar" }, { "marker": { "color": "#ff9000", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "." } }, "type": "bar" }, { "marker": { "color": "#00d539", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "." } }, "type": "bar" }, { "marker": { "color": "#00b287", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "." } }, "type": "bar" } ], "scatter": [ { "line": { "color": "#ff005c" }, "marker": { "color": "#ff005c", "opacity": 0.5, "size": 8, "symbol": "circle" }, "type": "scatter" }, { "line": { "color": "#00d539" }, "marker": { "color": "#00d539", "opacity": 0.5, "size": 8, "symbol": "square" }, "type": "scatter" }, { "line": { "color": "#ad6aff" }, "marker": { "color": "#ad6aff", "opacity": 0.5, "size": 8, "symbol": "diamond" }, "type": "scatter" }, { "line": { "color": "#ff9000" }, "marker": { "color": "#ff9000", "opacity": 0.5, "size": 8, "symbol": "triangle-down" }, "type": "scatter" }, { "line": { "color": "#00b287" }, "marker": { "color": "#00b287", "opacity": 0.5, "size": 8, "symbol": "cross" }, "type": "scatter" }, { "line": { "color": "#c97a88" }, "marker": { "color": "#c97a88", "opacity": 0.5, "size": 8, "symbol": "hexagram" }, "type": "scatter" }, { "line": { "color": "#ff005c" }, "marker": { "color": "#ff005c", "opacity": 0.5, "size": 8, "symbol": "square" }, "type": "scatter" }, { "line": { "color": "#00d539" }, "marker": { "color": "#00d539", "opacity": 0.5, "size": 8, "symbol": "diamond" }, "type": "scatter" }, { "line": { "color": "#ad6aff" }, "marker": { "color": "#ad6aff", "opacity": 0.5, "size": 8, "symbol": "triangle-down" }, "type": "scatter" }, { "line": { "color": "#ff9000" }, "marker": { "color": "#ff9000", "opacity": 0.5, "size": 8, "symbol": "cross" }, "type": "scatter" }, { "line": { "color": "#00b287" }, "marker": { "color": "#00b287", "opacity": 0.5, "size": 8, "symbol": "hexagram" }, "type": "scatter" }, { "line": { "color": "#c97a88" }, "marker": { "color": "#c97a88", "opacity": 0.5, "size": 8, "symbol": "circle" }, "type": "scatter" }, { "line": { "color": "#ff005c" }, "marker": { "color": "#ff005c", "opacity": 0.5, "size": 8, "symbol": "diamond" }, "type": "scatter" }, { "line": { "color": "#00d539" }, "marker": { "color": "#00d539", "opacity": 0.5, "size": 8, "symbol": "triangle-down" }, "type": "scatter" }, { "line": { "color": "#ad6aff" }, "marker": { "color": "#ad6aff", "opacity": 0.5, "size": 8, "symbol": "cross" }, "type": "scatter" }, { "line": { "color": "#ff9000" }, "marker": { "color": "#ff9000", "opacity": 0.5, "size": 8, "symbol": "hexagram" }, "type": "scatter" }, { "line": { "color": "#00b287" }, "marker": { "color": "#00b287", "opacity": 0.5, "size": 8, "symbol": "circle" }, "type": "scatter" }, { "line": { "color": "#c97a88" }, "marker": { "color": "#c97a88", "opacity": 0.5, "size": 8, "symbol": "square" }, "type": "scatter" }, { "line": { "color": "#ff005c" }, "marker": { "color": "#ff005c", "opacity": 0.5, "size": 8, "symbol": "triangle-down" }, "type": "scatter" }, { "line": { "color": "#00d539" }, "marker": { "color": "#00d539", "opacity": 0.5, "size": 8, "symbol": "cross" }, "type": "scatter" }, { "line": { "color": "#ad6aff" }, "marker": { "color": "#ad6aff", "opacity": 0.5, "size": 8, "symbol": "hexagram" }, "type": "scatter" }, { "line": { "color": "#ff9000" }, "marker": { "color": "#ff9000", "opacity": 0.5, "size": 8, "symbol": "circle" }, "type": "scatter" }, { "line": { "color": "#00b287" }, "marker": { "color": "#00b287", "opacity": 0.5, "size": 8, "symbol": "square" }, "type": "scatter" }, { "line": { "color": "#c97a88" }, "marker": { "color": "#c97a88", "opacity": 0.5, "size": 8, "symbol": "diamond" }, "type": "scatter" }, { "line": { "color": "#ff005c" }, "marker": { "color": "#ff005c", "opacity": 0.5, "size": 8, "symbol": "cross" }, "type": "scatter" }, { "line": { "color": "#00d539" }, "marker": { "color": "#00d539", "opacity": 0.5, "size": 8, "symbol": "hexagram" }, "type": "scatter" }, { "line": { "color": "#ad6aff" }, "marker": { "color": "#ad6aff", "opacity": 0.5, "size": 8, "symbol": "circle" }, "type": "scatter" }, { "line": { "color": "#ff9000" }, "marker": { "color": "#ff9000", "opacity": 0.5, "size": 8, "symbol": "square" }, "type": "scatter" }, { "line": { "color": "#00b287" }, "marker": { "color": "#00b287", "opacity": 0.5, "size": 8, "symbol": "diamond" }, "type": "scatter" }, { "line": { "color": "#c97a88" }, "marker": { "color": "#c97a88", "opacity": 0.5, "size": 8, "symbol": "triangle-down" }, "type": "scatter" }, { "line": { "color": "#ff005c" }, "marker": { "color": "#ff005c", "opacity": 0.5, "size": 8, "symbol": "hexagram" }, "type": "scatter" }, { "line": { "color": "#00d539" }, "marker": { "color": "#00d539", "opacity": 0.5, "size": 8, "symbol": "circle" }, "type": "scatter" }, { "line": { "color": "#ad6aff" }, "marker": { "color": "#ad6aff", "opacity": 0.5, "size": 8, "symbol": "square" }, "type": "scatter" }, { "line": { "color": "#ff9000" }, "marker": { "color": "#ff9000", "opacity": 0.5, "size": 8, "symbol": "diamond" }, "type": "scatter" }, { "line": { "color": "#00b287" }, "marker": { "color": "#00b287", "opacity": 0.5, "size": 8, "symbol": "triangle-down" }, "type": "scatter" }, { "line": { "color": "#c97a88" }, "marker": { "color": "#c97a88", "opacity": 0.5, "size": 8, "symbol": "cross" }, "type": "scatter" } ], "violin": [ { "box": { "visible": true }, "line": { "color": "#ff005c" }, "marker": { "color": "#ff005c", "opacity": 0.5, "size": 8, "symbol": "circle" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#00d539" }, "marker": { "color": "#00d539", "opacity": 0.5, "size": 8, "symbol": "square" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ad6aff" }, "marker": { "color": "#ad6aff", "opacity": 0.5, "size": 8, "symbol": "diamond" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ff9000" }, "marker": { "color": "#ff9000", "opacity": 0.5, "size": 8, "symbol": "triangle-down" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#00b287" }, "marker": { "color": "#00b287", "opacity": 0.5, "size": 8, "symbol": "cross" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#c97a88" }, "marker": { "color": "#c97a88", "opacity": 0.5, "size": 8, "symbol": "hexagram" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ff005c" }, "marker": { "color": "#ff005c", "opacity": 0.5, "size": 8, "symbol": "square" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#00d539" }, "marker": { "color": "#00d539", "opacity": 0.5, "size": 8, "symbol": "diamond" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ad6aff" }, "marker": { "color": "#ad6aff", "opacity": 0.5, "size": 8, "symbol": "triangle-down" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ff9000" }, "marker": { "color": "#ff9000", "opacity": 0.5, "size": 8, "symbol": "cross" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#00b287" }, "marker": { "color": "#00b287", "opacity": 0.5, "size": 8, "symbol": "hexagram" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#c97a88" }, "marker": { "color": "#c97a88", "opacity": 0.5, "size": 8, "symbol": "circle" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ff005c" }, "marker": { "color": "#ff005c", "opacity": 0.5, "size": 8, "symbol": "diamond" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#00d539" }, "marker": { "color": "#00d539", "opacity": 0.5, "size": 8, "symbol": "triangle-down" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ad6aff" }, "marker": { "color": "#ad6aff", "opacity": 0.5, "size": 8, "symbol": "cross" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ff9000" }, "marker": { "color": "#ff9000", "opacity": 0.5, "size": 8, "symbol": "hexagram" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#00b287" }, "marker": { "color": "#00b287", "opacity": 0.5, "size": 8, "symbol": "circle" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#c97a88" }, "marker": { "color": "#c97a88", "opacity": 0.5, "size": 8, "symbol": "square" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ff005c" }, "marker": { "color": "#ff005c", "opacity": 0.5, "size": 8, "symbol": "triangle-down" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#00d539" }, "marker": { "color": "#00d539", "opacity": 0.5, "size": 8, "symbol": "cross" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ad6aff" }, "marker": { "color": "#ad6aff", "opacity": 0.5, "size": 8, "symbol": "hexagram" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ff9000" }, "marker": { "color": "#ff9000", "opacity": 0.5, "size": 8, "symbol": "circle" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#00b287" }, "marker": { "color": "#00b287", "opacity": 0.5, "size": 8, "symbol": "square" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#c97a88" }, "marker": { "color": "#c97a88", "opacity": 0.5, "size": 8, "symbol": "diamond" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ff005c" }, "marker": { "color": "#ff005c", "opacity": 0.5, "size": 8, "symbol": "cross" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#00d539" }, "marker": { "color": "#00d539", "opacity": 0.5, "size": 8, "symbol": "hexagram" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ad6aff" }, "marker": { "color": "#ad6aff", "opacity": 0.5, "size": 8, "symbol": "circle" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ff9000" }, "marker": { "color": "#ff9000", "opacity": 0.5, "size": 8, "symbol": "square" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#00b287" }, "marker": { "color": "#00b287", "opacity": 0.5, "size": 8, "symbol": "diamond" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#c97a88" }, "marker": { "color": "#c97a88", "opacity": 0.5, "size": 8, "symbol": "triangle-down" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ff005c" }, "marker": { "color": "#ff005c", "opacity": 0.5, "size": 8, "symbol": "hexagram" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#00d539" }, "marker": { "color": "#00d539", "opacity": 0.5, "size": 8, "symbol": "circle" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ad6aff" }, "marker": { "color": "#ad6aff", "opacity": 0.5, "size": 8, "symbol": "square" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ff9000" }, "marker": { "color": "#ff9000", "opacity": 0.5, "size": 8, "symbol": "diamond" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#00b287" }, "marker": { "color": "#00b287", "opacity": 0.5, "size": 8, "symbol": "triangle-down" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#c97a88" }, "marker": { "color": "#c97a88", "opacity": 0.5, "size": 8, "symbol": "cross" }, "meanline": { "visible": true }, "type": "violin" } ] }, "layout": { "annotationdefaults": { "font": { "size": 12 } }, "autotypenumbers": "strict", "hoverlabel": { "bgcolor": "white", "font": { "family": "Rockwell", "size": 14 } }, "hovermode": "x unified", "legend": { "bgcolor": "white", "bordercolor": "Black", "borderwidth": 1, "font": { "family": "Rockwell" } }, "xaxis": { "linecolor": "black", "linewidth": 1, "mirror": true, "showline": true }, "yaxis": { "linecolor": "black", "linewidth": 1, "mirror": true, "showline": true } } }, "width": 900, "xaxis": { "anchor": "y", "domain": [ 0.0, 1.0 ], "showticklabels": true, "title": { "text": "Time (s)" } }, "yaxis": { "anchor": "x", "domain": [ 0.0, 1.0 ], "title": { "text": "Fractional Voltage" } } } }, "text/html": [ "
" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "# define the sech envelope\n", "def sech(times, A, sigma):\n", " return A / np.cosh((times - times[-1] / 2) / sigma)\n", "\n", "\n", "A = 0.45\n", "sigma = 0.15\n", "\n", "# initialize the envelope\n", "envelope = qcs.ArbitraryEnvelope.sample(lambda t: sech(t, A, sigma), n_samples=100)\n", "\n", "duration = 100e-9\n", "dc_wav = qcs.DCWaveform(duration, envelope, 1)\n", "\n", "# initialize the program and add the envelope\n", "program = qcs.Program()\n", "program.add_waveform(dc_wav, awg)\n", "\n", "program.render()" ] }, { "cell_type": "raw", "id": "d6d47b16", "metadata": { "lines_to_next_cell": 2, "raw_mimetype": "text/restructuredtext" }, "source": [ "Example 3: functional definition with sine envelope\n", "^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", "In this example we implement a sinusoidal envelope. The envelope :math:`E(t)` is\n", "given by\n", "\n", ".. math::\n", " E(t) = A\\sin(2\\pi f_{\\mathrm{int}} t + \\phi)\n", "\n", "where :math:`A` is the amplitude, :math:`f_{\\mathrm{int}}` is the frequency, and\n", ":math:`\\phi` is the phase of the envelope. Note that as envelopes do not explicitly\n", "depend on time, parameters such as the frequency are unitless and can be specified as\n", "integer multiples of periods. Here we specify a sine wave that covers half a period:" ] }, { "cell_type": "code", "execution_count": 14, "id": "22e1bf84", "metadata": { "execution": { "iopub.execute_input": "2025-10-02T01:30:25.304125Z", "iopub.status.busy": "2025-10-02T01:30:25.303788Z", "iopub.status.idle": "2025-10-02T01:30:25.387012Z", "shell.execute_reply": "2025-10-02T01:30:25.386189Z" } }, "outputs": [ { "data": { "application/vnd.plotly.v1+json": { "config": { "plotlyServerURL": "https://plot.ly" }, "data": [ { "dx": 1e-09, "legendgroup": "awg_channel, labels: (0,)", "legendgrouptitle": { "text": "awg_channel, labels: (0,)" }, "name": "Drive pulse for awg_channel, labels: (0,)", "type": "scatter", "x0": 0, "xaxis": "x", "y": [ 0.0, 0.012692771067846343, 0.025372761591147493, 0.03802720389428327, 0.050643356026525546, 0.06320851459210257, 0.07571002754144171, 0.08813530691071086, 0.10047184149683096, 0.11270720945519706, 0.12482909080742284, 0.1368252798465145, 0.148683697426983, 0.16039240312751993, 0.17193960727398927, 0.18331368281063007, 0.19450317700751613, 0.20549682299248395, 0.21628355109591801, 0.2268524999969702, 0.2371930276599884, 0.24729472205014497, 0.25714741161747307, 0.26674117553875504, 0.2760663537069507, 0.2851135564581064, 0.2938736740259499, 0.3023378857146539, 0.3104976687805286, 0.31834480701370144, 0.3258713990111455, 0.3330698661327209, 0.3399329601322241, 0.34645377045575754, 0.3526257312000705, 0.35844262772386837, 0.3638986029054287, 0.368988163040227, 0.37370618337263106, 0.37804791325609566, 0.3820089809366607, 0.3855853979549373, 0.38877356316214784, 0.39157026634617786, 0.39397269146398756, 0.3959784194771279, 0.39758543078750824, 0.3987921072709595, 0.3995972339065481, 0.4, 0.4, 0.3995972339065481, 0.3987921072709595, 0.39758543078750824, 0.3959784194771279, 0.3939726914639875, 0.39157026634617786, 0.38877356316214784, 0.3855853979549373, 0.3820089809366607, 0.37804791325609566, 0.37370618337263106, 0.368988163040227, 0.36389860290542864, 0.35844262772386837, 0.3526257312000705, 0.3464537704557574, 0.3399329601322241, 0.3330698661327207, 0.3258713990111455, 0.3183448070137014, 0.31049766878052854, 0.3023378857146539, 0.2938736740259497, 0.2851135564581062, 0.2760663537069507, 0.26674117553875504, 0.2571474116174731, 0.2472947220501449, 0.23719302765998834, 0.22685249999697008, 0.216283551095918, 0.2054968229924839, 0.19450317700751613, 0.18331368281063012, 0.17193960727398916, 0.1603924031275199, 0.14868369742698284, 0.13682527984651438, 0.12482909080742277, 0.11270720945519706, 0.10047184149683097, 0.08813530691071075, 0.07571002754144167, 0.0632085145921024, 0.05064335602652558, 0.03802720389428336, 0.025372761591147448, 0.012692771067846343, 4.9960036108132046e-17 ], "yaxis": "y" } ], "layout": { "annotations": [ { "font": { "size": 16 }, "showarrow": false, "text": "Waveforms for awg_channel, labels: (0,)", "x": 0.5, "xanchor": "center", "xref": "paper", "y": 1.0, "yanchor": "bottom", "yref": "paper" } ], "height": 500, "template": { "data": { "bar": [ { "marker": { "color": "#ad6aff", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "" } }, "type": "bar" }, { "marker": { "color": "#c97a88", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "" } }, "type": "bar" }, { "marker": { "color": "#ff005c", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "" } }, "type": "bar" }, { "marker": { "color": "#ff9000", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "" } }, "type": "bar" }, { "marker": { "color": "#00d539", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "" } }, "type": "bar" }, { "marker": { "color": "#00b287", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "" } }, "type": "bar" }, { "marker": { "color": "#ad6aff", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "/" } }, "type": "bar" }, { "marker": { "color": "#c97a88", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "/" } }, "type": "bar" }, { "marker": { "color": "#ff005c", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "/" } }, "type": "bar" }, { "marker": { "color": "#ff9000", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "/" } }, "type": "bar" }, { "marker": { "color": "#00d539", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "/" } }, "type": "bar" }, { "marker": { "color": "#00b287", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "/" } }, "type": "bar" }, { "marker": { "color": "#ad6aff", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "\\" } }, "type": "bar" }, { "marker": { "color": "#c97a88", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "\\" } }, "type": "bar" }, { "marker": { "color": "#ff005c", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "\\" } }, "type": "bar" }, { "marker": { "color": "#ff9000", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "\\" } }, "type": "bar" }, { "marker": { "color": "#00d539", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "\\" } }, "type": "bar" }, { "marker": { "color": "#00b287", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "\\" } }, "type": "bar" }, { "marker": { "color": "#ad6aff", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "x" } }, "type": "bar" }, { "marker": { "color": "#c97a88", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "x" } }, "type": "bar" }, { "marker": { "color": "#ff005c", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "x" } }, "type": "bar" }, { "marker": { "color": "#ff9000", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "x" } }, "type": "bar" }, { "marker": { "color": "#00d539", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "x" } }, "type": "bar" }, { "marker": { "color": "#00b287", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "x" } }, "type": "bar" }, { "marker": { "color": "#ad6aff", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "-" } }, "type": "bar" }, { "marker": { "color": "#c97a88", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "-" } }, "type": "bar" }, { "marker": { "color": "#ff005c", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "-" } }, "type": "bar" }, { "marker": { "color": "#ff9000", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "-" } }, "type": "bar" }, { "marker": { "color": "#00d539", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "-" } }, "type": "bar" }, { "marker": { "color": "#00b287", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "-" } }, "type": "bar" }, { "marker": { "color": "#ad6aff", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "|" } }, "type": "bar" }, { "marker": { "color": "#c97a88", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "|" } }, "type": "bar" }, { "marker": { "color": "#ff005c", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "|" } }, "type": "bar" }, { "marker": { "color": "#ff9000", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "|" } }, "type": "bar" }, { "marker": { "color": "#00d539", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "|" } }, "type": "bar" }, { "marker": { "color": "#00b287", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "|" } }, "type": "bar" }, { "marker": { "color": "#ad6aff", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "+" } }, "type": "bar" }, { "marker": { "color": "#c97a88", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "+" } }, "type": "bar" }, { "marker": { "color": "#ff005c", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "+" } }, "type": "bar" }, { "marker": { "color": "#ff9000", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "+" } }, "type": "bar" }, { "marker": { "color": "#00d539", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "+" } }, "type": "bar" }, { "marker": { "color": "#00b287", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "+" } }, "type": "bar" }, { "marker": { "color": "#ad6aff", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "." } }, "type": "bar" }, { "marker": { "color": "#c97a88", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "." } }, "type": "bar" }, { "marker": { "color": "#ff005c", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "." } }, "type": "bar" }, { "marker": { "color": "#ff9000", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "." } }, "type": "bar" }, { "marker": { "color": "#00d539", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "." } }, "type": "bar" }, { "marker": { "color": "#00b287", "line": { "color": "black", "width": 1.5 }, "opacity": 0.8, "pattern": { "shape": "." } }, "type": "bar" } ], "scatter": [ { "line": { "color": "#ff005c" }, "marker": { "color": "#ff005c", "opacity": 0.5, "size": 8, "symbol": "circle" }, "type": "scatter" }, { "line": { "color": "#00d539" }, "marker": { "color": "#00d539", "opacity": 0.5, "size": 8, "symbol": "square" }, "type": "scatter" }, { "line": { "color": "#ad6aff" }, "marker": { "color": "#ad6aff", "opacity": 0.5, "size": 8, "symbol": "diamond" }, "type": "scatter" }, { "line": { "color": "#ff9000" }, "marker": { "color": "#ff9000", "opacity": 0.5, "size": 8, "symbol": "triangle-down" }, "type": "scatter" }, { "line": { "color": "#00b287" }, "marker": { "color": "#00b287", "opacity": 0.5, "size": 8, "symbol": "cross" }, "type": "scatter" }, { "line": { "color": "#c97a88" }, "marker": { "color": "#c97a88", "opacity": 0.5, "size": 8, "symbol": "hexagram" }, "type": "scatter" }, { "line": { "color": "#ff005c" }, "marker": { "color": "#ff005c", "opacity": 0.5, "size": 8, "symbol": "square" }, "type": "scatter" }, { "line": { "color": "#00d539" }, "marker": { "color": "#00d539", "opacity": 0.5, "size": 8, "symbol": "diamond" }, "type": "scatter" }, { "line": { "color": "#ad6aff" }, "marker": { "color": "#ad6aff", "opacity": 0.5, "size": 8, "symbol": "triangle-down" }, "type": "scatter" }, { "line": { "color": "#ff9000" }, "marker": { "color": "#ff9000", "opacity": 0.5, "size": 8, "symbol": "cross" }, "type": "scatter" }, { "line": { "color": "#00b287" }, "marker": { "color": "#00b287", "opacity": 0.5, "size": 8, "symbol": "hexagram" }, "type": "scatter" }, { "line": { "color": "#c97a88" }, "marker": { "color": "#c97a88", "opacity": 0.5, "size": 8, "symbol": "circle" }, "type": "scatter" }, { "line": { "color": "#ff005c" }, "marker": { "color": "#ff005c", "opacity": 0.5, "size": 8, "symbol": "diamond" }, "type": "scatter" }, { "line": { "color": "#00d539" }, "marker": { "color": "#00d539", "opacity": 0.5, "size": 8, "symbol": "triangle-down" }, "type": "scatter" }, { "line": { "color": "#ad6aff" }, "marker": { "color": "#ad6aff", "opacity": 0.5, "size": 8, "symbol": "cross" }, "type": "scatter" }, { "line": { "color": "#ff9000" }, "marker": { "color": "#ff9000", "opacity": 0.5, "size": 8, "symbol": "hexagram" }, "type": "scatter" }, { "line": { "color": "#00b287" }, "marker": { "color": "#00b287", "opacity": 0.5, "size": 8, "symbol": "circle" }, "type": "scatter" }, { "line": { "color": "#c97a88" }, "marker": { "color": "#c97a88", "opacity": 0.5, "size": 8, "symbol": "square" }, "type": "scatter" }, { "line": { "color": "#ff005c" }, "marker": { "color": "#ff005c", "opacity": 0.5, "size": 8, "symbol": "triangle-down" }, "type": "scatter" }, { "line": { "color": "#00d539" }, "marker": { "color": "#00d539", "opacity": 0.5, "size": 8, "symbol": "cross" }, "type": "scatter" }, { "line": { "color": "#ad6aff" }, "marker": { "color": "#ad6aff", "opacity": 0.5, "size": 8, "symbol": "hexagram" }, "type": "scatter" }, { "line": { "color": "#ff9000" }, "marker": { "color": "#ff9000", "opacity": 0.5, "size": 8, "symbol": "circle" }, "type": "scatter" }, { "line": { "color": "#00b287" }, "marker": { "color": "#00b287", "opacity": 0.5, "size": 8, "symbol": "square" }, "type": "scatter" }, { "line": { "color": "#c97a88" }, "marker": { "color": "#c97a88", "opacity": 0.5, "size": 8, "symbol": "diamond" }, "type": "scatter" }, { "line": { "color": "#ff005c" }, "marker": { "color": "#ff005c", "opacity": 0.5, "size": 8, "symbol": "cross" }, "type": "scatter" }, { "line": { "color": "#00d539" }, "marker": { "color": "#00d539", "opacity": 0.5, "size": 8, "symbol": "hexagram" }, "type": "scatter" }, { "line": { "color": "#ad6aff" }, "marker": { "color": "#ad6aff", "opacity": 0.5, "size": 8, "symbol": "circle" }, "type": "scatter" }, { "line": { "color": "#ff9000" }, "marker": { "color": "#ff9000", "opacity": 0.5, "size": 8, "symbol": "square" }, "type": "scatter" }, { "line": { "color": "#00b287" }, "marker": { "color": "#00b287", "opacity": 0.5, "size": 8, "symbol": "diamond" }, "type": "scatter" }, { "line": { "color": "#c97a88" }, "marker": { "color": "#c97a88", "opacity": 0.5, "size": 8, "symbol": "triangle-down" }, "type": "scatter" }, { "line": { "color": "#ff005c" }, "marker": { "color": "#ff005c", "opacity": 0.5, "size": 8, "symbol": "hexagram" }, "type": "scatter" }, { "line": { "color": "#00d539" }, "marker": { "color": "#00d539", "opacity": 0.5, "size": 8, "symbol": "circle" }, "type": "scatter" }, { "line": { "color": "#ad6aff" }, "marker": { "color": "#ad6aff", "opacity": 0.5, "size": 8, "symbol": "square" }, "type": "scatter" }, { "line": { "color": "#ff9000" }, "marker": { "color": "#ff9000", "opacity": 0.5, "size": 8, "symbol": "diamond" }, "type": "scatter" }, { "line": { "color": "#00b287" }, "marker": { "color": "#00b287", "opacity": 0.5, "size": 8, "symbol": "triangle-down" }, "type": "scatter" }, { "line": { "color": "#c97a88" }, "marker": { "color": "#c97a88", "opacity": 0.5, "size": 8, "symbol": "cross" }, "type": "scatter" } ], "violin": [ { "box": { "visible": true }, "line": { "color": "#ff005c" }, "marker": { "color": "#ff005c", "opacity": 0.5, "size": 8, "symbol": "circle" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#00d539" }, "marker": { "color": "#00d539", "opacity": 0.5, "size": 8, "symbol": "square" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ad6aff" }, "marker": { "color": "#ad6aff", "opacity": 0.5, "size": 8, "symbol": "diamond" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ff9000" }, "marker": { "color": "#ff9000", "opacity": 0.5, "size": 8, "symbol": "triangle-down" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#00b287" }, "marker": { "color": "#00b287", "opacity": 0.5, "size": 8, "symbol": "cross" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#c97a88" }, "marker": { "color": "#c97a88", "opacity": 0.5, "size": 8, "symbol": "hexagram" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ff005c" }, "marker": { "color": "#ff005c", "opacity": 0.5, "size": 8, "symbol": "square" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#00d539" }, "marker": { "color": "#00d539", "opacity": 0.5, "size": 8, "symbol": "diamond" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ad6aff" }, "marker": { "color": "#ad6aff", "opacity": 0.5, "size": 8, "symbol": "triangle-down" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ff9000" }, "marker": { "color": "#ff9000", "opacity": 0.5, "size": 8, "symbol": "cross" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#00b287" }, "marker": { "color": "#00b287", "opacity": 0.5, "size": 8, "symbol": "hexagram" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#c97a88" }, "marker": { "color": "#c97a88", "opacity": 0.5, "size": 8, "symbol": "circle" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ff005c" }, "marker": { "color": "#ff005c", "opacity": 0.5, "size": 8, "symbol": "diamond" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#00d539" }, "marker": { "color": "#00d539", "opacity": 0.5, "size": 8, "symbol": "triangle-down" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ad6aff" }, "marker": { "color": "#ad6aff", "opacity": 0.5, "size": 8, "symbol": "cross" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ff9000" }, "marker": { "color": "#ff9000", "opacity": 0.5, "size": 8, "symbol": "hexagram" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#00b287" }, "marker": { "color": "#00b287", "opacity": 0.5, "size": 8, "symbol": "circle" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#c97a88" }, "marker": { "color": "#c97a88", "opacity": 0.5, "size": 8, "symbol": "square" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ff005c" }, "marker": { "color": "#ff005c", "opacity": 0.5, "size": 8, "symbol": "triangle-down" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#00d539" }, "marker": { "color": "#00d539", "opacity": 0.5, "size": 8, "symbol": "cross" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ad6aff" }, "marker": { "color": "#ad6aff", "opacity": 0.5, "size": 8, "symbol": "hexagram" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ff9000" }, "marker": { "color": "#ff9000", "opacity": 0.5, "size": 8, "symbol": "circle" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#00b287" }, "marker": { "color": "#00b287", "opacity": 0.5, "size": 8, "symbol": "square" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#c97a88" }, "marker": { "color": "#c97a88", "opacity": 0.5, "size": 8, "symbol": "diamond" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ff005c" }, "marker": { "color": "#ff005c", "opacity": 0.5, "size": 8, "symbol": "cross" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#00d539" }, "marker": { "color": "#00d539", "opacity": 0.5, "size": 8, "symbol": "hexagram" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ad6aff" }, "marker": { "color": "#ad6aff", "opacity": 0.5, "size": 8, "symbol": "circle" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ff9000" }, "marker": { "color": "#ff9000", "opacity": 0.5, "size": 8, "symbol": "square" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#00b287" }, "marker": { "color": "#00b287", "opacity": 0.5, "size": 8, "symbol": "diamond" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#c97a88" }, "marker": { "color": "#c97a88", "opacity": 0.5, "size": 8, "symbol": "triangle-down" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ff005c" }, "marker": { "color": "#ff005c", "opacity": 0.5, "size": 8, "symbol": "hexagram" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#00d539" }, "marker": { "color": "#00d539", "opacity": 0.5, "size": 8, "symbol": "circle" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ad6aff" }, "marker": { "color": "#ad6aff", "opacity": 0.5, "size": 8, "symbol": "square" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#ff9000" }, "marker": { "color": "#ff9000", "opacity": 0.5, "size": 8, "symbol": "diamond" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#00b287" }, "marker": { "color": "#00b287", "opacity": 0.5, "size": 8, "symbol": "triangle-down" }, "meanline": { "visible": true }, "type": "violin" }, { "box": { "visible": true }, "line": { "color": "#c97a88" }, "marker": { "color": "#c97a88", "opacity": 0.5, "size": 8, "symbol": "cross" }, "meanline": { "visible": true }, "type": "violin" } ] }, "layout": { "annotationdefaults": { "font": { "size": 12 } }, "autotypenumbers": "strict", "hoverlabel": { "bgcolor": "white", "font": { "family": "Rockwell", "size": 14 } }, "hovermode": "x unified", "legend": { "bgcolor": "white", "bordercolor": "Black", "borderwidth": 1, "font": { "family": "Rockwell" } }, "xaxis": { "linecolor": "black", "linewidth": 1, "mirror": true, "showline": true }, "yaxis": { "linecolor": "black", "linewidth": 1, "mirror": true, "showline": true } } }, "width": 900, "xaxis": { "anchor": "y", "domain": [ 0.0, 1.0 ], "showticklabels": true, "title": { "text": "Time (s)" } }, "yaxis": { "anchor": "x", "domain": [ 0.0, 1.0 ], "title": { "text": "Fractional Voltage" } } } }, "text/html": [ "
" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "# define the sine envelope\n", "def sine(input_times, amplitude, freq, phase):\n", " return amplitude * np.sin(2 * np.pi * freq * input_times + phase)\n", "\n", "\n", "amplitude = 0.4\n", "phase = 0\n", "freq = 0.5\n", "\n", "# initialize the envelope\n", "envelope = qcs.ArbitraryEnvelope.sample(\n", " lambda t: sine(t, amplitude, freq, phase), n_samples=100\n", ")\n", "\n", "duration = 100e-9\n", "dc_wav = qcs.DCWaveform(duration, envelope, amplitude)\n", "\n", "# initialize the program and add the envelope\n", "program = qcs.Program()\n", "program.add_waveform(dc_wav, awg)\n", "\n", "program.render()" ] } ], "metadata": { "jupytext": { "cell_metadata_filter": "raw_mimetype,nbsphinx,-all", "main_language": "python", "notebook_metadata_filter": "-all", "text_representation": { "extension": ".py", "format_name": "percent" } }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.10.12" } }, "nbformat": 4, "nbformat_minor": 5 }