diff --git a/katas/content/single_qubit_gates/prepare_rotated_state/index.md b/katas/content/single_qubit_gates/prepare_rotated_state/index.md index 5d98b45d8c..12d1a5a576 100644 --- a/katas/content/single_qubit_gates/prepare_rotated_state/index.md +++ b/katas/content/single_qubit_gates/prepare_rotated_state/index.md @@ -5,6 +5,6 @@ **Goal:** Use a rotation gate to transform the qubit into state $\alpha|0\rangle -i\beta|1\rangle$. -> You will probably need functions from the Math namespace, specifically ArcTan2. +> You will probably need functions from the `Microsoft.Quantum.Math` namespace, specifically ArcTan2. > -> You can assign variables in Q# by using the `let` keyword: `let num = 3;` or `let result = Function(input);` \ No newline at end of file +> You can assign variables in Q# by using the `let` keyword: `let num = 3;` or `let result = Function(input);` diff --git a/katas/content/single_qubit_gates/prepare_rotated_state/solution.md b/katas/content/single_qubit_gates/prepare_rotated_state/solution.md index cff8e78f14..5c910cef49 100644 --- a/katas/content/single_qubit_gates/prepare_rotated_state/solution.md +++ b/katas/content/single_qubit_gates/prepare_rotated_state/solution.md @@ -3,7 +3,7 @@ This is similar to the state we need. We just need to find an angle $\theta$ suc Hence the required gate is $R_x(2\arctan\frac{\beta}{\alpha})$, which in matrix form is $\begin{bmatrix} \alpha & -i\beta \\\ -i\beta & \alpha \end{bmatrix}$. This gate turns $|0\rangle = \begin{bmatrix} 1 \\\ 0\end{bmatrix}$ into $\begin{bmatrix} \alpha & -i\beta \\\ -i\beta & \alpha \end{bmatrix} \begin{bmatrix} 1 \\\ 0\end{bmatrix} = \begin{bmatrix} \alpha \\\ -i\beta \end{bmatrix} = \alpha|0\rangle -i\beta|1\rangle$. -> Trigonometric functions are available in Q# via the Math namespace. In this case we will need ArcTan2. +> Trigonometric functions are available in Q# via the `Microsoft.Quantum.Math` namespace. In this case we will need ArcTan2. @[solution]({ "id": "single_qubit_gates__prepare_rotated_state_solution",