Skip to content

Commit

Permalink
scrubbing LaTeX
Browse files Browse the repository at this point in the history
  • Loading branch information
SoniaLopezBravo committed Aug 13, 2024
1 parent b02f563 commit 9decb7c
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 6 deletions.
3 changes: 1 addition & 2 deletions katas/content/multi_qubit_measurements/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -407,8 +407,7 @@ For certain multi-qubit systems prepared in a superposition state, it's possible

Any multi-qubit state can be prepared from the $\ket{0...0}$ state using an appropriate combination of quantum gates.
However, sometimes it's easier and more efficient to prepare a state using partial measurements.
You could prepare a simpler state involving additional qubits, which, when measured, result in a collapse of the remaining qubits to the desired state with a high probability. This is called **post-selection**, and is particularly useful if it'
s easier to prepare the pre-measurement state with the extra qubits than to prepare the desired state directly using unitary gates alone. This is demonstrated by the following exercise.
You could prepare a simpler state involving additional qubits, which, when measured, result in a collapse of the remaining qubits to the desired state with a high probability. This is called **post-selection**, and is particularly useful if it's easier to prepare the pre-measurement state with the extra qubits than to prepare the desired state directly using unitary gates alone. This is demonstrated by the following exercise.

@[exercise]({
"id": "multi_qubit_measurements__state_preparation_using_partial_measurements",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
If you weren't asked to maintain the state of the qubits, one approach would be to measure both the qubits separately in the computational basis, and check if the result is the same for both the measurements. If the measurement results are equal, the input state must have been a superposition of $\ket{00}$ and $\ket{11}$, while different measurement outcomes will imply that the input state must have been a superposition of $\ket{01}$ and $\ket{10}$. However, in these measurements we will lose the information about the original superposition states: a state $\alpha \ket{00} + \beta \ket{11}$ will collapse to either $\ket{00}$ or $\ket{11}$, and you won't be able to recover the information about the coefficients $\alpha$ and $\beta$.
If you weren't asked to maintain the state of the qubits, one approach would be to measure both the qubits separately in the computational basis, and check if the result is the same for both the measurements. If the measurement results are equal, the input state must have been a superposition of $\ket{00}$ and $\ket{11}$, while different measurement outcomes will imply that the input state must have been a superposition of $\ket{01}$ and $\ket{10}$. However, in these measurements you'll lose the information about the original superposition states: a state $\alpha \ket{00} + \beta \ket{11}$ will collapse to either $\ket{00}$ or $\ket{11}$, and you won't be able to recover the information about the coefficients $\alpha$ and $\beta$.

You need to measure the *parity* of the state without collapsing it all the way to the basis states. Pauli measurements can be used for joint measurements involving multiple qubits. For this task we need to do the $Z \otimes Z$ measurement on both qubits.

A joint measurement using $Z \otimes Z$ operator can be thought of as projecting the measured state to one of the two eigenspaces of $Z \otimes Z$ with $+1$ and $-1$ as the corresponding eigenvalues. The measurement returns `Zero` if the measured state is projected to the space with an eigenvalue of $+1$, and a result of `One` if projected to the space with an eigenvalue of $-1$.

As you've seen in the tutorial, the state $\alpha \ket{00} + \beta \ket{11}$ is an eigenstate of the $Z \otimes Z$ operator with the eigenvalue $+1$, and the state $\alpha \ket{01} + \beta \ket{10}$ is an eigenstate with the eigenvalue $-1$.
Hence, you can use this joint measurement to recognize which of the superposition states we were given while preserving the initial superposition state.
Hence, you can use this joint measurement to recognize which of the superposition states you were given while preserving the initial superposition state.

In Q#, the operation `Measure` can be used to measure multiple qubits using an array of `Pauli` constants (`PauliI`, `PauliX`, `PauliY`, or `PauliZ`) that define the basis for measurement.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
<details>
<summary><b>Need a hint?</b></summary>
Consider a 3-qubit state $\frac{1}{2}(\ket{00} + \ket{01} + \ket{11}) \otimes \ket{0} + \frac{1}{2} \ket{11} \otimes \ket{1}$.
What happens when one measures the third qubit?
What happens when you measure the third qubit?
</details>
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
While it's possible to prepare the state $\ket \psi$ directly using unitary rotations, it's simpler to use post-selection for preparing it.

Initially, you prepare an equal superposition of all basis states on the first two qubits by applying the **H** gate to each of them, and allocate an extra qubit in the $\ket{0}$ state:
Initially, you prepare an equal superposition of all basis states on the first two qubits by applying the $H$ gate to each of them, and allocate an extra qubit in the $\ket{0}$ state:
$$\frac{1}{2} \big(\ket{00} + \ket{01} + \ket{10} + \ket{11}\big) \otimes \ket 0$$

The state of the first two qubits is a superposition of the state you want to prepare and the $\ket{11}$ state that you want to discard.
Expand Down

0 comments on commit 9decb7c

Please sign in to comment.