|
18 | 18 | "source": [ |
19 | 19 | "# Getting Started with OpenPulse\n", |
20 | 20 | "\n", |
21 | | - "Qiskit Pulse programs give you more control than [`QuantumCircuit`](https://qiskit.org/documentation/api/qiskit.circuit.QuantumCircuit.html). At this level, you can specify the exact time dynamics of the input signals across all input channels. Most quantum algorithm can be described with circuits alone using gate operations -- typically, it's when you want to apply error mitigation techniques or characterize a time-dependent quality of a quantum system that pulse-level control becomes useful.\n", |
| 21 | + "Qiskit Pulse programs give you more control than `QuantumCircuit`. At this level, you can specify the exact time dynamics of the input signals across all input channels. Most quantum algorithm can be described with circuits alone using gate operations -- typically, it's when you want to apply error mitigation techniques or characterize a time-dependent quality of a quantum system that pulse-level control becomes useful.\n", |
22 | 22 | "\n", |
23 | 23 | "On this page, we will discover how to build and execute a very basic Pulse program, which is called a schedule.\n", |
24 | 24 | "\n", |
25 | 25 | "### Initialize\n", |
26 | 26 | "\n", |
27 | | - "We import the [`Schedule`](https://qiskit.org/documentation/api/qiskit.pulse.Schedule.html#qiskit.pulse.Schedule) class from the [`qiskit.pulse`](https://qiskit.org/documentation/apidoc/pulse/pulse.html) module. To start, we are going to initialize a [`Schedule`](https://qiskit.org/documentation/api/qiskit.pulse.Schedule.html#qiskit.pulse.Schedule) with the name `\"getting_started\"`.</body></html>" |
| 27 | + "We import the `Schedule` class from the `qiskit.pulse` module. To start, we are going to initialize a `Schedule` with the name `\"getting_started\"`." |
28 | 28 | ] |
29 | 29 | }, |
30 | 30 | { |
|
48 | 48 | "\n", |
49 | 49 | "The next thing we will want to do is create some instructions to add to our schedule.\n", |
50 | 50 | "\n", |
51 | | - "Perhaps the most central instruction for building schedules is the [`SamplePulse`](https://qiskit.org/documentation/api/qiskit.pulse.SamplePulse.html#qiskit.pulse.SamplePulse). It is a pulse signal specified as an array of time-ordered complex amplitudes, or _samples_. Each sample is played for one cycle, a timestep `dt`, determined by the backend. If we want to know the real-time dynamics of our program, we need to know the value of `dt`. For now, let's focus on how to build the instruction." |
| 51 | + "Perhaps the most central instruction for building schedules is the `SamplePulse`. It is a pulse signal specified as an array of time-ordered complex amplitudes, or _samples_. Each sample is played for one cycle, a timestep `dt`, determined by the backend. If we want to know the real-time dynamics of our program, we need to know the value of `dt`. For now, let's focus on how to build the instruction." |
52 | 52 | ] |
53 | 53 | }, |
54 | 54 | { |
|
76 | 76 | "cell_type": "markdown", |
77 | 77 | "metadata": {}, |
78 | 78 | "source": [ |
79 | | - "There are multiple ways to build pulses, which you can learn about on later pages. This time, we've simply passed the exact amplitudes of the pulse envelope we want to play as an array. The array above is a Gaussian function evaluated at 64 points, with an amplitude of 1 and a standard deviation of 8. The (zero-indexed) $i^{th}$ sample will play from time `i*dt` up to `(i + 1)*dt`, modulated by the qubit frequency. Think of this like an arbitrary waveform generator (AWG), playing the samples you give to the [`SamplePulse`](https://qiskit.org/documentation/api/qiskit.pulse.SamplePulse.html#qiskit.pulse.SamplePulse), mixed with a continuous sine wave generator outputting a tone at the qubit frequency.\n", |
| 79 | + "There are multiple ways to build pulses, which you can learn about on later pages. This time, we've simply passed the exact amplitudes of the pulse envelope we want to play as an array. The array above is a Gaussian function evaluated at 64 points, with an amplitude of 1 and a standard deviation of 8. The (zero-indexed) $i^{th}$ sample will play from time `i*dt` up to `(i + 1)*dt`, modulated by the qubit frequency. Think of this like an arbitrary waveform generator (AWG), playing the samples you give to the `SamplePulse`, mixed with a continuous sine wave generator outputting a tone at the qubit frequency.\n", |
80 | 80 | "\n", |
81 | 81 | "The values above happen to be real, but they can also be complex. The amplitude norm of any pulse signal is arbitrarily limited to 1. Each backend system may also impose further constraints -- for instance, a minimum pulse size of 64.\n", |
82 | 82 | "\n", |
|
104 | 104 | "cell_type": "markdown", |
105 | 105 | "metadata": {}, |
106 | 106 | "source": [ |
107 | | - "Note that the pulse we defined operates on the [`DriveChannel`](https://qiskit.org/documentation/api/qiskit.pulse.DriveChannel.html#qiskit.pulse.DriveChannel), which in turn is initialized with the qubit index. We use [`Schedule.insert`](https://qiskit.org/documentation/api/qiskit.pulse.Schedule.html#qiskit.pulse.Schedule.insert) to play the pulse at timestep `t = 0`. \n", |
| 107 | + "Note that the pulse we defined operates on the `DriveChannel`, which in turn is initialized with the qubit index. We use `Schedule.insert` to play the pulse at timestep `t = 0`. \n", |
108 | 108 | "\n", |
109 | | - "Let's review what we've done, using [`Schedule.draw`](https://qiskit.org/documentation/api/qiskit.pulse.Schedule.html#qiskit.pulse.Schedule.draw):" |
| 109 | + "Let's review what we've done, using `Schedule.draw`:" |
110 | 110 | ] |
111 | 111 | }, |
112 | 112 | { |
|
207 | 207 | "cell_type": "markdown", |
208 | 208 | "metadata": {}, |
209 | 209 | "source": [ |
210 | | - "There is a new pulse on [`MeasureChannel`](https://qiskit.org/documentation/api/qiskit.pulse.MeasureChannel.html) `m0`, a shorthand name for `MeasureChannel(0)`. This channel stimulates readout on qubit 0. Likewise, `a0` is shorthand for [`AcquireChannel`](https://qiskit.org/documentation/api/qiskit.pulse.AcquireChannel.html)`(0)`. The [`Acquire`](https://qiskit.org/documentation/api/qiskit.pulse.Acquire.html) instruction on `a0` tells the measurement devices when to begin collecting data on their analog-to-digital converters (ADC), and for how long. It is drawn as an amplitude 1 constant pulse.\n", |
| 210 | + "There is a new pulse on `MeasureChannel` `m0`, a shorthand name for `MeasureChannel(0)`. This channel stimulates readout on qubit 0. Likewise, `a0` is shorthand for `AcquireChannel(0)`. The `Acquire` instruction on `a0` tells the measurement devices when to begin collecting data on their analog-to-digital converters (ADC), and for how long. It is drawn as an amplitude 1 constant pulse.\n", |
211 | 211 | "\n", |
212 | 212 | "### Execute\n", |
213 | 213 | "\n", |
|
0 commit comments