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

Commit a50437f

Browse files
committed
Fix typos in advanced/aqua/optimization tutorials
1 parent d2a79d6 commit a50437f

3 files changed

Lines changed: 10 additions & 10 deletions

File tree

qiskit/advanced/aqua/optimization/docplex.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
"There has been a growing interest in using quantum computers to find solutions of combinatorial problems. A heuristic approach for finding solutions of combinatorial problems on quantum computers is the quantum variational approach, such as the Variational Quantum \n",
31-
"Eigensolver (VQE) algorithm (see https://arxiv.org/abs/1802.00171 and the Quantum Approximate Optimization Algorithm (QAOA) (see https://arxiv.org/abs/1411.4028). In order to use a quantum variational approach on quantum computers, first, we need to map a combinatorial problem to an Ising Hamiltonian. However Ising Hamiltonians are complicated and unintuitive. Mapping a combinatorial problem to Ising Hamiltonians can be a difficult and time-consuming task, requiring specialized knowledge.\n",
31+
"Eigensolver (VQE) algorithm (see https://arxiv.org/abs/1802.00171 and the Quantum Approximate Optimization Algorithm (QAOA) (see https://arxiv.org/abs/1411.4028). In order to use a quantum variational approach on quantum computers, first, we need to map a combinatorial problem to an Ising Hamiltonian. However, Ising Hamiltonians are complicated and unintuitive. Mapping a combinatorial problem to Ising Hamiltonians can be a difficult and time-consuming task, requiring specialized knowledge.\n",
3232
"\n",
3333
"In this tutorial, we introduce a translator to automatically generate Ising Hamiltonians from classical optimization models. We will explain about classical optimization models later. The translator dramatically simplifies the task of designing and implementing quantum-computing-based solutions, for optimization problems, by automatically generating Ising Hamiltonians for different optimization problems. With the translator, all a user has to do is to write optimization models using DOcplex (see https://cdn.rawgit.com/IBMDecisionOptimization/docplex-doc/master/docs/index.html). DOcplex is a python library for optimization problems.\n",
3434
"Then the translator will automatically generate Ising Hamiltonians from the models. Optimization models are short and intuitive. It is much easier to write optimization models compared to writing Ising Hamiltonians manually. \n",

qiskit/advanced/aqua/optimization/max_cut_and_tsp.ipynb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
"source": [
2929
"## Introduction\n",
3030
"\n",
31-
"Many problems in quantitative fields such as finance and engineering are optimization problems. Optimization problems lay at the core of complex decision-making and definition of strategies. \n",
31+
"Many problems in quantitative fields such as finance and engineering are optimization problems. Optimization problems lie at the core of complex decision-making and definition of strategies. \n",
3232
"\n",
3333
"Optimization (or combinatorial optimization) means searching for an optimal solution in a finite or countably infinite set of potential solutions. Optimality is defined with respect to some criterion function, which is to be minimized or maximized. This is typically called cost function or objective function. \n",
3434
"\n",
@@ -38,7 +38,7 @@
3838
"\n",
3939
"Maximization: profit, value, output, return, yield, utility, efficiency, capacity, number of objects \n",
4040
"\n",
41-
"We consider here max-cut problem of practical interest in many fields, and show how they can mapped on quantum computers.\n",
41+
"We consider here max-cut problems of practical interest in many fields, and show how they can be nmapped on quantum computers.\n",
4242
"\n",
4343
"\n",
4444
"### Weighted Max-Cut\n",
@@ -129,7 +129,7 @@
129129
"metadata": {},
130130
"source": [
131131
"### [Optional] Setup token to run the experiment on a real device\n",
132-
"If you would like to run the experiement on a real device, you need to setup your account first.\n",
132+
"If you would like to run the experiment on a real device, you need to setup your account first.\n",
133133
"\n",
134134
"Note: If you do not store your token yet, use `IBMQ.save_account('MY_API_TOKEN')` to store it first."
135135
]
@@ -623,7 +623,7 @@
623623
"\n",
624624
"$$\\sum_{i,j\\notin E}\\sum_{p} x_{i,p}x_{j,p+1}>0,$$ \n",
625625
"\n",
626-
"where it is assumed the boundary condition of the Hamiltonian cycle $(p=N)\\equiv (p=0)$. However, here it will be assumed a fully connected graph and not include this term. The distance that needs to be minimized is \n",
626+
"where it is assumed the boundary condition of the Hamiltonian cycles $(p=N)\\equiv (p=0)$. However, here it will be assumed a fully connected graph and not include this term. The distance that needs to be minimized is \n",
627627
"\n",
628628
"$$C(\\textbf{x})=\\sum_{i,j}w_{ij}\\sum_{p} x_{i,p}x_{j,p+1}.$$\n",
629629
"\n",

qiskit/advanced/aqua/optimization/vehicle_routing.ipynb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
"\n",
2727
"## The Introduction\n",
2828
"\n",
29-
"Logistics is a major industry, with some estimates valuing it at USD 8183 billion globally in 2015. Most service providers operate a number of vehicles (e.g., trucks and container ships), a number of depots, where the vehicles are based overnight, and serve a number of client locations with each vehicle during each day. There are many optimisation and control problems that consider these parameters. Computationally, the key challenge is how to design routes from depots to a number of client locations and back to the depot, so as to minimise vehicle-miles travelled, time spent, or similar objective functions. In this notebook we formalise an idealised version of the problem and showcase its solution using the quantum approximate optimization approach of Farhi, Goldstone, and Gutman (2014). \n",
29+
"Logistics is a major industry, with some estimates valuing it at USD 8183 billion globally in 2015. Most service providers operate a number of vehicles (e.g., trucks and container ships), a number of depots, where the vehicles are based overnight, and serve a number of client locations with each vehicle during each day. There are many optimization and control problems that consider these parameters. Computationally, the key challenge is how to design routes from depots to a number of client locations and back to the depot, so as to minimize vehicle-miles traveled, time spent, or similar objective functions. In this notebook we formalize an idealized version of the problem and showcase its solution using the quantum approximate optimization approach of Farhi, Goldstone, and Gutman (2014). \n",
3030
"\n",
3131
"The overall workflow we demonstrate comprises:\n",
3232
"\n",
@@ -36,13 +36,13 @@
3636
"\n",
3737
"4. compute the actual routes. This step is run twice, actually. First, we obtain a reference value by a run of a classical solver (IBM CPLEX) on the classical computer. Second, we run an alternative, hybrid algorithm partly on the quantum computer.\n",
3838
"\n",
39-
"5. visualisation of the results. In our case, this is again a simplistic plot.\n",
39+
"5. visualization of the results. In our case, this is again a simplistic plot.\n",
4040
"\n",
4141
"In the following, we first explain the model, before we proceed with the installation of the pre-requisites and the data loading.\n",
4242
"\n",
4343
"## The Model \n",
4444
"\n",
45-
"Mathematically speaking, the vehicle routing problem (VRP) is a combinatorial problem, wherein the best routes from a depot to a number of clients and back to the depot are sought, given a number of available vehicles. There are a number of formulations possible, extending a number of formulations of the travelling salesman problem [Applegate et al, 2006]. Here, we present a formulation known as MTZ [Miller, Tucker, Zemlin, 1960]. \n",
45+
"Mathematically speaking, the vehicle routing problem (VRP) is a combinatorial problem, wherein the best routes from a depot to a number of clients and back to the depot are sought, given a number of available vehicles. There are a number of formulations possible, extending a number of formulations of the traveling salesman problem [Applegate et al, 2006]. Here, we present a formulation known as MTZ [Miller, Tucker, Zemlin, 1960]. \n",
4646
"\n",
4747
"Let $n$ be the number of clients (indexed as $1,\\dots,n$), and $K$ be the number of available vehicles. Let $x_{ij} = \\{0,1\\}$ be the binary decision variable which, if it is $1$, activates the segment from node $i$ to node $j$. The node index runs from $0$ to $n$, where $0$ is (by convention) the depot. There are twice as many distinct decision variables as edges. For example, in a fully connected graph, there are $n(n+1)$ binary decision variables. \n",
4848
"\n",
@@ -97,7 +97,7 @@
9797
"\n",
9898
"Here, we demonstrate an approach that combines classical and quantum computing steps, following the quantum approximate optimization approach of Farhi, Goldstone, and Gutman (2014). In particular, we use the variational quantum eigensolver (VQE). We stress that given the use of limited depth of the quantum circuits employed (variational forms), it is hard to discuss the speed-up of the algorithm, as the solution obtained is heuristic in nature. At the same time, due to the nature and importance of the target problems, it is worth investigating heuristic approaches, which may be worthwhile for some problem classes. \n",
9999
"\n",
100-
"Following [5], the algorithm can be summarised as follows:\n",
100+
"Following [5], the algorithm can be summarized as follows:\n",
101101
"- Preparation steps: \n",
102102
"\t- Transform the combinatorial problem into a binary polynomial optimization problem with equality constraints only;\n",
103103
"\t- Map the resulting problem into an Ising Hamiltonian ($H$) for variables ${\\bf z}$ and basis $Z$, via penalty methods if necessary;\n",
@@ -807,7 +807,7 @@
807807
"source": [
808808
"### Step 4\n",
809809
"\n",
810-
"Solve the problem via VQE. N.B. Depending on the number of qubits, the state-vector simulation can can take a while; for example with 12 qubits, it takes more than 12 hours. Logging useful to see what the program is doing."
810+
"Solve the problem via VQE. N.B. Depending on the number of qubits, the state-vector simulation can can take a while; for example with 12 qubits, it takes more than 12 hours. Logging is useful to see what the program is doing."
811811
]
812812
},
813813
{

0 commit comments

Comments
 (0)