Skip to content
This repository was archived by the owner on Jan 10, 2025. It is now read-only.

Commit 4a5efd4

Browse files
author
kephircheek
authored
Merge pull request #36 from kephircheek/text-improvements
Fix measurement result dependence on ancila qubit #17
2 parents a7165c2 + 5ea27a4 commit 4a5efd4

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@
55

66
### Changed
77
- Figure `qcircuit`: add stages, removed measurements and initialization.
8-
8+
- Measurement result explanation

manuscript.tex

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -377,6 +377,7 @@ \subsection{Optimized quantum scheme for Hamming distance calculation}
377377
At this stage, the information regarding the differences between pairs of $\{X\}$ and $\{Y\}$ \hl{encoded in the amplitudes, in order to extract the Hamming distances between the relevant $\left| x_i \right\rangle$, $\left| y_j \right\rangle$ we return to our initial basis} for register $\left| X \right\rangle$ by applying pairwise CNOT gates:
378378
%
379379
\begin{multline}
380+
\label{eq:final_state}
380381
\left| \psi_f \right\rangle =
381382
\frac{1}{\sqrt{kl}}\sum\limits_{i, j=1}^{k}
382383
\left[
@@ -401,10 +402,12 @@ \subsection{Optimized quantum scheme for Hamming distance calculation}
401402
This makes $\{X\}$ store the input vectors again, as in the initial step
402403
and preserves the amplitudes of the auxiliary qubit which are proportional to how different each pairs of $\{X\}$ and $\{Y\}$ are.
403404

404-
We thus have the Hamming distances encoded into the amplitudes of the final state.
405-
From the statistics of the measurement outcomes, the distance matrix between two data sets of binary vectors can be obtained (Fig.~\ref{fig:distance_matrix}).
406-
In this case, the biggest amplitude of the measurement result coincides with the smallest Hamming distance when the measurement result of the ancilla qubit is 0.
407-
If the ancilla qubit is 1, the smallest amplitude of the measurement result coincides with the smallest Hamming distance.
405+
From the statistics of the measurement outcomes of final state~(\ref{eq:final_state}) we recreate the amplitudes of ancilla qubit states.
406+
From those amplitudes estimations we are able to plot the distance matrix between two data sets of binary vectors.
407+
The probability amplitude of the ancilla qubit outcomes captures the exact Hamming distance as the result of the preprocessing function.
408+
There are two possible outcomes of measurement of the ancilla qubit, each has own probability amplitude and own interpretation of that amplitude.
409+
For instance, for the \left| 0 \right\rangle outcome, the larger the amplitude the smaller the Hamming distance,
410+
and for the \left| 1 \right\rangle outcome it is the other way around, magnitude of the amplitude of that outcome is proportional to the Hamming distance.
408411

409412
Measuring the Hamming distance of a particular pair of input vectors $\left| x_i \right\rangle$ and cluster vector $\left| y_j \right\rangle$ consists of extracting the relevant amplitude from the subspace that those states form,
410413
this can be done using the following projection operator

0 commit comments

Comments
 (0)