Skip to content

Commit 9e8dcf5

Browse files
author
Patrick Huembeli
committed
added arguments to description
1 parent c1a7ec0 commit 9e8dcf5

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

Notebooks/pytorch-qiskit-0.1-u3.ipynb

+5-3
Original file line numberDiff line numberDiff line change
@@ -115,15 +115,15 @@
115115
"### N_qubit_expectation_Z()\n",
116116
"This is a function that allows to take the measurements and translate them to Z-expectation values for every single qubit.\n",
117117
"\n",
118-
"### bind()\n",
118+
"### bind( parameters )\n",
119119
"Takes the Neural Network parameters and puts them into a format that can be fed into the QIKSIT unitaries.\n",
120120
"\n",
121121
"To generalze this code we would have to write a function that replaces the line `self.circuit.data[2][0]._params`.\n",
122122
"Because the `self.circuit.data` is a list of all the gates of the circuit. And the indices direct to the correct gate, where the parameters have to go.\n",
123123
"\n",
124124
"At some point we would need a better scheme here.\n",
125125
"\n",
126-
"### run()\n",
126+
"### run( parameters )\n",
127127
"This function puts the circuit with the given parameters on a quantum simulater or hardware and returns the measurements of every qubit in Z-basis"
128128
]
129129
},
@@ -277,7 +277,9 @@
277277
"\n",
278278
"We define a cost function and a target expectation value (here -1). The cost is the square distance from the target value.\n",
279279
"\n",
280-
"`x` is the initialization of the parameters. Here again, this was hard coded such that every angle starts at $\\pi / 4$."
280+
"`x` is the initialization of the parameters. Here again, this was hard coded such that every angle starts at $\\pi / 4$.\n",
281+
"\n",
282+
"The rest is standard pytorch optimization"
281283
]
282284
},
283285
{

0 commit comments

Comments
 (0)