Skip to content
This repository was archived by the owner on Aug 21, 2023. It is now read-only.

Commit ba0eaba

Browse files
Fix spelling in several simulator tutorials and math mode of opflow and grover tutorials (#1163)
* Fix spelling in simulator tutorials and math mode of opflow tutorial * Fix math mode and list of Grover tutorial Co-authored-by: SooluThomas <[email protected]>
1 parent 2313fa3 commit ba0eaba

File tree

5 files changed

+22
-20
lines changed

5 files changed

+22
-20
lines changed

tutorials/algorithms/07_grover.ipynb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@
267267
"### State preparation\n",
268268
"\n",
269269
"A `state_preparation` argument is used to specify a quantum circuit that prepares a quantum state for the start point of the amplitude amplification.\n",
270-
"By default, a circuit with $H^{\\otimes n} $ is used to prepare uniform superposition (so it will be Grover's search). The diffusion circuit of the amplitude amplification reflects `state_preparation` automatically."
270+
"By default, a circuit with $H^{\\otimes n}$ is used to prepare uniform superposition (so it will be Grover's search). The diffusion circuit of the amplitude amplification reflects `state_preparation` automatically."
271271
]
272272
},
273273
{
@@ -350,7 +350,8 @@
350350
"For more advanced use, it is also possible to specify the entire Grover operator by setting the `grover_operator` argument. This might be useful if you know more efficient implementation for $\\mathcal{Q}$ than the default construction via zero reflection, oracle and state preparation.\n",
351351
"\n",
352352
"The `qiskit.circuit.library.GroverOperator` can be a good starting point and offers more options for an automated construction of the Grover operator. You can for instance \n",
353-
"* set the `mcx_mode` \n",
353+
"\n",
354+
"* set the `mcx_mode`\n",
354355
"* ignore qubits in the zero reflection by setting `reflection_qubits`\n",
355356
"* explicitly exchange the $\\mathcal{S_f}, \\mathcal{S_0}$ and $\\mathcal{A}$ operations using the `oracle`, `zero_reflection` and `state_preparation` arguments"
356357
]

tutorials/operators/02_gradients_framework.ipynb

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -678,16 +678,17 @@
678678
"## Hessians (Second Order Gradients)\n",
679679
"\n",
680680
"Four types of second order gradients are supported by the gradient framework.\n",
681+
"\n",
681682
"1. Gradient of an expectation value w.r.t. a coefficient of the measurement operator respectively observable $\\hat{O}\\left(\\omega\\right)$, i.e.\n",
682-
" $ \\frac{\\partial^2\\langle\\psi\\left(\\theta\\right)|\\hat{O}\\left(\\omega\\right)|\\psi\\left(\\theta\\right)\\rangle}{\\partial\\omega^2} $\n",
683-
"2. Gradient of an expectation value w.r.t. a state $|\\psi\\left(\\theta\\right)\\rangle$ parameter, i.e.\n",
684-
" $ \\frac{\\partial^2\\langle\\psi\\left(\\theta\\right)|\\hat{O}\\left(\\omega\\right)|\\psi\\left(\\theta\\right)\\rangle}{\\partial\\theta^2} $\n",
685-
"3. Gradient of sampling probabilities w.r.t. a state $|\\psi\\left(\\theta\\right)\\rangle$ parameter, i.e.\n",
686-
" $ \\frac{\\partial^2 p_i}{\\partial\\theta^2} = \\frac{\\partial^2\\langle\\psi\\left(\\theta\\right)|i\\rangle\\langle i|\\psi\\left(\\theta\\right)\\rangle}{\\partial\\theta^2} $\n",
687-
"4. Gradient of an expectation value w.r.t. a state $|\\psi\\left(\\theta\\right)\\rangle$ parameter and a coefficient of the measurement operator respectively observable $\\hat{O}\\left(\\omega\\right)$, i.e.\n",
688-
" $ \\frac{\\partial^2\\langle\\psi\\left(\\theta\\right)|\\hat{O}\\left(\\omega\\right)|\\psi\\left(\\theta\\right)\\rangle}{\\partial\\theta\\partial\\omega} $\n",
689-
" \n",
690-
" In the following examples are given for the first two Hessian types. The remaining Hessians are evaluated analogously."
683+
"$\\frac{\\partial^2\\langle\\psi\\left(\\theta\\right)|\\hat{O}\\left(\\omega\\right)|\\psi\\left(\\theta\\right)\\rangle}{\\partial\\omega^2}$\n",
684+
"2. Gradient of an expectation value w.r.t. a state $|\\psi\\left(\\theta\\right)\\rangle$ parameter, i.e.\n",
685+
"$\\frac{\\partial^2\\langle\\psi\\left(\\theta\\right)|\\hat{O}\\left(\\omega\\right)|\\psi\\left(\\theta\\right)\\rangle}{\\partial\\theta^2}$\n",
686+
"3. Gradient of sampling probabilities w.r.t. a state $|\\psi\\left(\\theta\\right)\\rangle$ parameter, i.e.\n",
687+
"$\\frac{\\partial^2 p_i}{\\partial\\theta^2} = \\frac{\\partial^2\\langle\\psi\\left(\\theta\\right)|i\\rangle\\langle i|\\psi\\left(\\theta\\right)\\rangle}{\\partial\\theta^2}$\n",
688+
"4. Gradient of an expectation value w.r.t. a state $|\\psi\\left(\\theta\\right)\\rangle$ parameter and a coefficient of the measurement operator respectively observable $\\hat{O}\\left(\\omega\\right)$, i.e.\n",
689+
"$\\frac{\\partial^2\\langle\\psi\\left(\\theta\\right)|\\hat{O}\\left(\\omega\\right)|\\psi\\left(\\theta\\right)\\rangle}{\\partial\\theta\\partial\\omega}$\n",
690+
"\n",
691+
"In the following examples are given for the first two Hessian types. The remaining Hessians are evaluated analogously."
691692
]
692693
},
693694
{

tutorials/simulators/1_aer_provider.ipynb

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@
250250
"metadata": {},
251251
"source": [
252252
"#### Automatic Simulation Method\n",
253-
"The default simulation method is `automatic` which will automatically select a one of the other simulation methods for each circuit based on the instructions in those circuits. A fixed simualtion method can be specified by by adding the method name when getting the backend, or by setting the `method` option on the backend."
253+
"The default simulation method is `automatic` which will automatically select a one of the other simulation methods for each circuit based on the instructions in those circuits. A fixed simulation method can be specified by by adding the method name when getting the backend, or by setting the `method` option on the backend."
254254
]
255255
},
256256
{
@@ -292,7 +292,7 @@
292292
"cell_type": "markdown",
293293
"metadata": {},
294294
"source": [
295-
"The `Aer` provider will also contain preconfigured GPU simulator backends if Qiskit Aer was installed with GPU support on a complatible system:\n",
295+
"The `Aer` provider will also contain preconfigured GPU simulator backends if Qiskit Aer was installed with GPU support on a compatible system:\n",
296296
"\n",
297297
"* `aer_simulator_statevector_gpu`\n",
298298
"* `aer_simulator_density_matrix_gpu`\n",
@@ -338,7 +338,7 @@
338338
"cell_type": "markdown",
339339
"metadata": {},
340340
"source": [
341-
"Setting the simulation precesion applies to both CPU and GPU simulation devices. Single precision will halve the requried memeory and may provide performance improvements on certain systems."
341+
"Setting the simulation precision applies to both CPU and GPU simulation devices. Single precision will halve the required memory and may provide performance improvements on certain systems."
342342
]
343343
},
344344
{
@@ -419,7 +419,7 @@
419419
"source": [
420420
"#### Saving the circuit unitary\n",
421421
"\n",
422-
"To save the unitary matrix for a `QuantumCircuit` we can append the circuit with the `save_unitary` instruction. Note that this circuit cannot contain any measurements or resets since these instructions are not suppored on for the `\"unitary\"` simulation method"
422+
"To save the unitary matrix for a `QuantumCircuit` we can append the circuit with the `save_unitary` instruction. Note that this circuit cannot contain any measurements or resets since these instructions are not supported on for the `\"unitary\"` simulation method"
423423
]
424424
},
425425
{
@@ -524,8 +524,8 @@
524524
"\n",
525525
"**Notes:**\n",
526526
"* These instructions must be applied to all qubits in a circuit, otherwise an exception will be raised.\n",
527-
"* The input state must also be a valid state (statevector, denisty matrix, unitary etc) otherwise an exception will be raised.\n",
528-
"* These instructions can be applied at any location in a circuit and will override the current state with the specified one. Any classical register values (eg from preceeding measurements) will be unaffected\n",
527+
"* The input state must also be a valid state (statevector, density matrix, unitary etc) otherwise an exception will be raised.\n",
528+
"* These instructions can be applied at any location in a circuit and will override the current state with the specified one. Any classical register values (e.g. from preceding measurements) will be unaffected\n",
529529
"* Set state instructions are only supported by the Aer simulator and will result in an error if a circuit containing them is run on a non-simulator backend such as an IBM Quantum device."
530530
]
531531
},

tutorials/simulators/2_device_noise_simulation.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@
153153
"cell_type": "markdown",
154154
"metadata": {},
155155
"source": [
156-
"#### Running a noise simulation\n",
156+
"### Running a noise simulation\n",
157157
"\n",
158158
"Once we have created a noisy simulator backend based on a real device we can use it to run noisy simulations.\n",
159159
"\n",
@@ -200,7 +200,7 @@
200200
"cell_type": "markdown",
201201
"metadata": {},
202202
"source": [
203-
"If transpilation is skipped noise from the device noise model will not be applied to gates in the circuit that are supported by the simulator, but not supported by the mimiced backend."
203+
"If transpilation is skipped noise from the device noise model will not be applied to gates in the circuit that are supported by the simulator, but not supported by the mimicked backend."
204204
]
205205
},
206206
{

tutorials/simulators/7_matrix_product_state_method.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@
100100
"cell_type": "markdown",
101101
"metadata": {},
102102
"source": [
103-
"To see the internal state vector of the circuit we can use the `save_statevector` instruction. To return the full interal MPS structure we can also use the `save_matrix_product_state` instruction."
103+
"To see the internal state vector of the circuit we can use the `save_statevector` instruction. To return the full internal MPS structure we can also use the `save_matrix_product_state` instruction."
104104
]
105105
},
106106
{

0 commit comments

Comments
 (0)