Skip to content

Commit

Permalink
Update katas/content/preparing_states/four_bitstrings/solution.md
Browse files Browse the repository at this point in the history
Co-authored-by: Mariia Mykhailova <[email protected]>
  • Loading branch information
SoniaLopezBravo and tcNickolas authored Aug 19, 2024
1 parent 956b675 commit 906dbd7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions katas/content/preparing_states/four_bitstrings/solution.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ The second qubit of the recursion follows similarly but depends on the first qub

The third qubit in this example will have three cases because it depends on the first two qubits; this follows naturally from the recursion.

1. If the first two qubits measure $\ket{00}$, then you need the third qubit to measure $\ket{0}$ with $100%$ probability.
2. If the first two qubits measure $\ket{10}$, then you need the third qubit to measure $\ket{1}$ with $100%$ probability.
1. If the first two qubits measure $\ket{00}$, then you need the third qubit to measure $\ket{0}$ with $100\%$ probability.
2. If the first two qubits measure $\ket{10}$, then you need the third qubit to measure $\ket{1}$ with $100\%$ probability.
3. If the first two qubits measure $\ket{11}$, then you need the third qubit to measure $\ket{0}$ with $\frac12$ probability and $\ket{1}$ with $\frac12$ probability. Just as with the second qubit, a controlled [`Ry`](https://learn.microsoft.com/qsharp/api/qsharp-lang/microsoft.quantum.intrinsic/ry) rotation on the third qubit will accomplish this goal.

> You'll use [`ApplyControlledOnBitString`](https://learn.microsoft.com/qsharp/api/qsharp-lang/microsoft.quantum.canon/applycontrolledonbitstring) operation to perform rotations depending on the state of several previous qubits.
Expand Down

0 comments on commit 906dbd7

Please sign in to comment.