microsoft/qdk

Public

mirrored from https://github.com/microsoft/qdkAvailable

CodeCommitsIssuesPull requestsActionsInsightsSecurity
alex/second-api-refactor

Branches

Tags

  • No tags available.
0Branches0Tags
Go to file
Add file
Code

Clone

HTTPS

Download ZIP

katas/content/multi_qubit_systems/prepare_superposition/index.md

8lines · modepreview

**Input:** A two-qubit system in the basis state $\ket{00} = \begin{bmatrix} 1 \\ 0 \\ 0 \\ 0 \end{bmatrix}$.

**Goal:** Transform the system into the state $\frac{1}{\sqrt2}\big(\ket{00} - \ket{01}\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 $\ket{0} \otimes \frac{1}{\sqrt2}\big(\ket{0} - \ket{1}\big) = \begin{bmatrix} 1 \\ 0 \end{bmatrix} \otimes \frac{1}{\sqrt2}\begin{bmatrix} 1 \\ -1 \end{bmatrix}$.
</details>