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

Commit ff8bfe4

Browse files
authored
Merge pull request #801 from mrossinek/minor-fixes-p3
Minor fixes - Part 3 of 8
2 parents e33b35d + 86d32fd commit ff8bfe4

4 files changed

Lines changed: 10 additions & 10 deletions

File tree

qiskit/advanced/aqua/Aqua_how_to_build_a_pluggable_algorithm_components.ipynb

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,17 +40,17 @@
4040
"\n",
4141
"**Note: you can use the developed algorithm directly in Python without any issue.**\n",
4242
"\n",
43-
"1. Register it permentally. \n",
43+
"1. Register it permanently. \n",
4444
"2. Register it on-the-fly.\n",
4545
"\n",
4646
"\n",
47-
"#### Register it permentally\n",
48-
"If you complete the pluggable algorithm/components as a Python package, you can refer to this [instruction](https://qiskit.org/documentation/aqua/extending.html#extending-aqua) to prepare the `setup.py` file to register the pluggable algorithm/component, which will be discovered in Qiskit-Aqua. We prepare a [setup.py](evolutionfidelity/setup.py) example for this tutorial. \n",
47+
"#### Register it permanently\n",
48+
"If you complete the pluggable algorithm/components as a Python package, you can refer to this [instruction](https://qiskit.org/documentation/aqua/extending.html#extending-aqua) to prepare the `setup.py` file to register the pluggable algorithm/component, which will be discovered in Qiskit-Aqua. We prepared a [setup.py](evolutionfidelity/setup.py) example for this tutorial. \n",
4949
"\n",
50-
"Go to the `qiskit/aqua/general/evolutionfidelity` folder, and then do `python3 setup.py install` to install the package.\n",
50+
"Go to the `qiskit/advanced/aqua/evolutionfidelity` folder, and then do `python3 setup.py install` to install the package.\n",
5151
"\n",
5252
"#### Register it on-the-fly\n",
53-
"You can also register it on-the-fly, Aqua provides a function to register your pluggable algorithm/compomenet easily. The following cell shows how to do that."
53+
"You can also register it on-the-fly. Aqua provides a function to register your pluggable algorithm/component easily. The following cell shows how to do that."
5454
]
5555
},
5656
{
@@ -102,7 +102,7 @@
102102
"cell_type": "markdown",
103103
"metadata": {},
104104
"source": [
105-
"List all registered algorithms, and we will find `EvolutionFidelity` in the list if you registered."
105+
"List all registered algorithms, and we will find `EvolutionFidelity` in the list if you registered it."
106106
]
107107
},
108108
{

qiskit/advanced/aqua/amplitude_estimation.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
"source": [
2929
"### Introduction\n",
3030
"<br>\n",
31-
"This notebook illustrates amplitude estimation in the simplest case, where the (assumed to be unkown) success probability $p$ of a Bernoulli random variable is estimated.\n",
31+
"This notebook illustrates amplitude estimation in the simplest case, where the (assumed to be unknown) success probability $p$ of a Bernoulli random variable is estimated.\n",
3232
"In other words, we assume a qubit is prepared in a state $\\sqrt{1-p}\\,\\big|0\\rangle + \\sqrt{p}\\,\\big|1\\rangle$, i.e., the probability of measuring $\\big|1\\rangle$ equals $p$.\n",
3333
"This matches the results that have been demonstrated on real hardware in [1].\n",
3434
"<br>\n",

qiskit/advanced/aqua/generating_random_variates.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
"For example, the measurement of a quantum superposition is intrinsically random,\n",
3535
"as suggested by Born's rule.\n",
3636
"Consequently, some of the\n",
37-
"best random-number generators are based on such quantum-mechanical effects. (See the \n",
37+
"best random-number generators are based on such quantum-mechanical effects.\n",
3838
"Further, with a logarithmic amount of random bits, quantum computers can produce\n",
3939
"linearly many more bits, which is known as \n",
4040
"randomness expansion protocols. \n",
@@ -46,7 +46,7 @@
4646
"\n",
4747
"## Random Bits and the Bernoulli distribution\n",
4848
"\n",
49-
"It is clear that there are many options for generating random bits (i.e., Bernoulli-distributed scalars, taking values either 0 or 1). Starting from a simple circuit such as a Hadamard gate followed by measurement, one can progress to vectors of Bernoulli-distributed elements. By addition of such random variates, we could get binomial distributions. By multiplication we could get geometric distributions, although perhaps leading to a circuit depth that may be impratical at the moment, though.\n",
49+
"It is clear that there are many options for generating random bits (i.e., Bernoulli-distributed scalars, taking values either 0 or 1). Starting from a simple circuit such as a Hadamard gate followed by measurement, one can progress to vectors of Bernoulli-distributed elements. By addition of such random variates, we could get binomial distributions. By multiplication we could get geometric distributions, although perhaps leading to a circuit depth that may be impractical at the moment, though.\n",
5050
"\n",
5151
"Let us start by importing the basic modules and creating a quantum circuit for generating random bits:"
5252
]

qiskit/advanced/aqua/linear_systems_of_equations.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
"The HHL algorithm (after the author’s surnames Harrow-Hassidim-Lloyd) [1] is a quantum algorithm to solve systems of linear equations $A \\vec{x} = \\vec{b}$. To perform this calculation quantum mechanically, we need in general 4 main steps requiring three qubit registers:\n",
2828
"<ol>\n",
2929
"<li>First, we have to express the vector $\\vec{b}$ as a quantum state $|b\\rangle$ on a quantum register.</li>\n",
30-
"<li>Now, we have to decompose $\\vec{b}$ into a superposition of eigenvectors of A remembering on the linear combination of the vector $\\vec{b}$. We achieve this using the Quantum Phase Estimation algorithm (Quantum Phase Estimation (QPE)). Since the matrix is hereby diagonalized wherefore $A$ is easily invertible.</li>\n",
30+
"<li>Now, we have to decompose $\\vec{b}$ into a superposition of eigenvectors of $A$ remembering on the linear combination of the vector $\\vec{b}$. We achieve this using the Quantum Phase Estimation algorithm (Quantum Phase Estimation (QPE)). Since the matrix is hereby diagonalized wherefore $A$ is easily invertible.</li>\n",
3131
"<li>The inversion of the eigenvector base of $A$ is achieved by rotating an ancillary qubit by an angle $\\arcsin \\left( \\frac{C}{\\lambda _{\\text{i}}} \\right)$ around the y-axis where $\\lambda_{\\text{i}}$ are the eigenvalues of $A$. Now, we obtain the state $A^{-1}|b\\rangle = |x \\rangle$.</li>\n",
3232
"<li>We need to uncompute the register storing the eigenvalues using the inverse QPE. We measure the ancillary qubit whereby the measurement of 1 indicates that the matrix inversion was successful. The inverse QPE leaves the system in a state proportional to the solution vector $|x\\rangle$. In many cases one is not interested in the single vector elements of $|x\\rangle$ but only on certain properties. These are accessible by applying a problem-specific operator $M$ to the state $|x\\rangle$. Another use-case of the HHL algorithm is the implementation in a larger quantum program.</li>\n",
3333
"</ol>\n",

0 commit comments

Comments
 (0)