|
13 | 13 | "source": [ |
14 | 14 | "# Qiskit Aer: Simulators\n", |
15 | 15 | "\n", |
16 | | - "The latest version of this notebook is available on https://github.com/Qiskit/qiskit-tutorials." |
| 16 | + "The latest version of this notebook is available on https://github.com/Qiskit/qiskit-iqx-tutorials." |
17 | 17 | ] |
18 | 18 | }, |
19 | 19 | { |
|
55 | 55 | "* `StatevectorSimulator`: Allows ideal single-shot execution of qiskit circuits and returns the final statevector of the simulator after application\n", |
56 | 56 | "* `UnitarySimulator`: Allows ideal single-shot execution of qiskit circuits and returns the final unitary matrix of the circuit itself. Note that the circuit cannot contain measure or reset operations for this backend\n", |
57 | 57 | "\n", |
58 | | - "These backends are found in the `Aer` provider with the names `qasm_simulstor`, `statevector_simulator` and `unitary_simulator` respectively" |
| 58 | + "These backends are found in the `Aer` provider with the names `qasm_simulator`, `statevector_simulator` and `unitary_simulator`, respectively." |
59 | 59 | ] |
60 | 60 | }, |
61 | 61 | { |
|
90 | 90 | "cell_type": "markdown", |
91 | 91 | "metadata": {}, |
92 | 92 | "source": [ |
93 | | - "The simulator backends can also be directly and may be imported from `qiskit.providers.aer`" |
| 93 | + "The simulator backends can also be directly imported from `qiskit.providers.aer`" |
94 | 94 | ] |
95 | 95 | }, |
96 | 96 | { |
|
113 | 113 | "source": [ |
114 | 114 | "## QasmSimulator\n", |
115 | 115 | "\n", |
116 | | - "The `QasmSimulator` backend is designed to mimic an actual device. It executes a Qiskit `QuantumCircuit` and returns a count dictionary containing the final values of any classical registers in the circuit. The circuit may contain *gates*\n", |
117 | | - "*measure*, *reset*, *conditionals*, and other advanced simulator options that will be discussed in another notebook.\n", |
| 116 | + "The `QasmSimulator` backend is designed to mimic an actual device. It executes a Qiskit `QuantumCircuit` and returns a count dictionary containing the final values of any classical registers in the circuit. The circuit may contain *gates*,\n", |
| 117 | + "*measurements*, *resets*, *conditionals*, and other advanced simulator options that will be discussed in another notebook.\n", |
118 | 118 | "\n", |
119 | 119 | "### Simulating a quantum circuit\n", |
120 | 120 | "\n", |
|
163 | 163 | "cell_type": "markdown", |
164 | 164 | "metadata": {}, |
165 | 165 | "source": [ |
166 | | - "### Returning measurements outcomes for each shot\n", |
| 166 | + "### Returning measurement outcomes for each shot\n", |
167 | 167 | "\n", |
168 | 168 | "The `QasmSimulator` also supports returning a list of measurement outcomes for each individual shot. This is enabled by setting the keyword argument `memory=True` in the `assemble` or `execute` function." |
169 | 169 | ] |
|
211 | 211 | "The `QasmSimulator` allows setting a custom initial statevector for the simulation. This means that all experiments in a Qobj will be executed starting in a state $|\\psi\\rangle$ rather than the all zero state $|0,0,..0\\rangle$. The custom state may be set in the circuit using the `initialize` method.\n", |
212 | 212 | "\n", |
213 | 213 | "**Note:**\n", |
214 | | - "* The initial statevector must be a valid quantum state $|\\langle\\psi|\\psi\\rangle|=1$. If not an exception will be raised. \n", |
| 214 | + "* The initial statevector must be a valid quantum state $|\\langle\\psi|\\psi\\rangle|=1$. If not, an exception will be raised. \n", |
215 | 215 | "* The simulator supports this option directly for efficiency, but it can also be unrolled to standard gates for execution on actual devices.\n", |
216 | 216 | "\n", |
217 | | - "We now demonstate this functionality by setting the simulator to be initialized in the the final Bell-state of the previous example:" |
| 217 | + "We now demonstrate this functionality by setting the simulator to be initialized in the the final Bell-state of the previous example:" |
218 | 218 | ] |
219 | 219 | }, |
220 | 220 | { |
|
261 | 261 | "## StatevectorSimulator\n", |
262 | 262 | "\n", |
263 | 263 | "\n", |
264 | | - "The `StatevectorSimulator` executes a single shot of a Qiskit `QuantumCircuit` and returns the final quantum statevector of the simulation. The circuit may contain *gates*, and also *measure*, *reset*, and *conditional* operations.\n", |
| 264 | + "The `StatevectorSimulator` executes a single shot of a Qiskit `QuantumCircuit` and returns the final quantum statevector of the simulation. The circuit may contain *gates*, and also *measurements*, *resets*, and *conditional* operations.\n", |
265 | 265 | "\n", |
266 | 266 | "### Simulating a quantum circuit\n", |
267 | 267 | "\n", |
|
453 | 453 | "source": [ |
454 | 454 | "### Setting a custom initial unitary\n", |
455 | 455 | "\n", |
456 | | - "we may also set an initial state for the `UnitarySimulator`, however this state is an initial *unitary matrix* $U_i$, not a statevector. In this case the return unitary will be $U.U_i$ given by applying the circuit unitary to the initial unitary matrix.\n", |
| 456 | + "We may also set an initial state for the `UnitarySimulator`, however this state is an initial *unitary matrix* $U_i$, not a statevector. In this case the returned unitary will be $U.U_i$ given by applying the circuit unitary to the initial unitary matrix.\n", |
457 | 457 | "\n", |
458 | 458 | "**Note:**\n", |
459 | | - "* The initial unitary must be a valid unitary matrix $U^\\dagger.U =\\mathbb{1}$. If not an exception will be raised. \n", |
460 | | - "* If a Qobj contains multiple experiments, the initial unitary must be the correct size fo *all* experiments in the Qobj, otherwise an exception will be raised.\n", |
| 459 | + "* The initial unitary must be a valid unitary matrix $U^\\dagger.U =\\mathbb{1}$. If not, an exception will be raised. \n", |
| 460 | + "* If a `Qobj` contains multiple experiments, the initial unitary must be the correct size for *all* experiments in the `Qobj`, otherwise an exception will be raised.\n", |
461 | 461 | "\n", |
462 | 462 | "Let us consider preparing the output unitary of the previous circuit as the initial state for the simulator:" |
463 | 463 | ] |
|
0 commit comments