Skip to content

Commit 7a5bc92

Browse files
committed
In 07_Variational_Circuits notebooks, remove unneeded variable n_iter
Also, in the Forest version set p=1 in the code.
1 parent 5dbde5c commit 7a5bc92

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

forest_version/07_Variational_Circuits.ipynb

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@
147147
"cell_type": "markdown",
148148
"metadata": {},
149149
"source": [
150-
"We set $p=2$ and initialize the $\\gamma_i$ and $\\nu_i$ parameters:"
150+
"We set the number of steps $p=2$ and initialize the $\\gamma_i$ and $\\nu_i$ parameters:"
151151
]
152152
},
153153
{
@@ -161,8 +161,7 @@
161161
},
162162
"outputs": [],
163163
"source": [
164-
"n_iter = 10 # number of iterations of the optimization procedure\n",
165-
"p = 1\n",
164+
"p = 2\n",
166165
"β = np.random.uniform(0, np.pi*2, p)\n",
167166
"γ = np.random.uniform(0, np.pi*2, p)"
168167
]

qiskit_version/07_Variational_Circuits.ipynb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@
162162
"cell_type": "markdown",
163163
"metadata": {},
164164
"source": [
165-
"We set $p=2$ and initialize the $\\beta_i$ and $\\gamma_i$ parameters:"
165+
"We set the number of steps $p=2$ and initialize the $\\beta_i$ and $\\gamma_i$ parameters:"
166166
]
167167
},
168168
{
@@ -176,7 +176,6 @@
176176
},
177177
"outputs": [],
178178
"source": [
179-
"n_iter = 10 # number of iterations of the optimization procedure\n",
180179
"p = 2\n",
181180
"beta = np.random.uniform(0, np.pi*2, p)\n",
182181
"gamma = np.random.uniform(0, np.pi*2, p)"

0 commit comments

Comments
 (0)