Skip to content

Commit

Permalink
Merge pull request #163 from madcpf/text
Browse files Browse the repository at this point in the history
Fix typos in conceptes.ipynb, where m0 should be m1.
  • Loading branch information
madcpf authored Oct 17, 2023
2 parents abcd518 + e8607e0 commit 1870709
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docs/quantum_chess/concepts.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -670,7 +670,7 @@
"\n",
"One way of resolving this is to use the method of \"post-selection\". Both simulators and real hardware have the ability to repeat an experiment many times. We can use this ability to pick the samples that match our expectations of the results. \n",
"\n",
"In the example above, we have two independent possibilities for the measurement of the king. Half of results will have 'm0' (the king was on the square preventing the queen move) and half will have 'm1' result (the king was not there and the queen move was possible). In our game, we know that 'm0' is what happened, so we can run the simulation multiple times and only take the results that are consistent with 'm0'.\n",
"In the example above, we have two independent possibilities for the measurement of the king. Half of results will have 'm0' (the king was on the square preventing the queen move) and half will have 'm1' result (the king was not there and the queen move was possible). In our game, we know that 'm1' is what happened, so we can run the simulation multiple times and only take the results that are consistent with 'm1'.\n",
"\n",
"This procedure is only needed since we need to run the simulation from the beginning of the board each time. If we could \"save\" the state vector from the last move, we would not need to do this. We could just apply the next move on the last state vector. While this is possible in a classical simulator, quantum states in a real device only stay coherent for mere microseconds and won't wait around while we ponder our next quantum chess move.\n",
"\n",
Expand All @@ -679,15 +679,15 @@
"We will transform our first algorithm from:\n",
"\n",
"* Make some non-measurement moves.\n",
"* Make a move that requires measurement and gets an outcome of 'm0'\n",
"* Make a move that requires measurement and gets an outcome of 'm1'\n",
"* Make a second set of non-measurement moves based on this outcome.\n",
"\n",
"Into the following new algorithm:\n",
"\n",
"* Make some non-measurement moves.\n",
"* Make the exclusion move but don't measure yet.\n",
"* Make the second set of moves.\n",
"* Measure the relevant qubits. Discard results that do not match our expected result of 'm0'\n",
"* Measure the relevant qubits. Discard results that do not match our expected result of 'm1'\n",
"\n",
"Note that we have to be careful when we do this. First, we have to track the qubits to perform the correct measurement. In our example above, the queen moved to the 'b2' square, regardless of whether the king was there. Executing that move swapped the qubits of 'b2' and 'a3'. So, when we measure the king's position at the end of the circuit, we need to measure its new position within the 'a3' qubit.\n",
"\n",
Expand Down

0 comments on commit 1870709

Please sign in to comment.