**Input:** A two-qubit system in the basis state $|00\rangle = \begin{bmatrix} 1 \\\ 0 \\\ 0 \\\ 0 \end{bmatrix}$.
**Goal:** Transform the system into the state $\frac{1}{\sqrt2}\big(|00\rangle - |01\rangle\big) = \frac{1}{\sqrt2}\begin{bmatrix} 1 \\\ -1 \\\ 0 \\\ 0 \end{bmatrix}$.
<details>
<summary><b>Need a hint?</b></summary>
Represent the target state as a tensor product $|0\rangle \otimes \frac{1}{\sqrt2}\big(|0\rangle - |1\rangle\big) = \begin{bmatrix} 1 \\\ 0 \end{bmatrix} \otimes \frac{1}{\sqrt2}\begin{bmatrix} 1 \\\ -1 \end{bmatrix}$.
</details>microsoft/qdk
Publicmirrored from https://github.com/microsoft/qdkAvailable
katas/content/multi_qubit_systems/prepare_superposition/index.md
8lines · modepreview