Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix typos in Complex Arithmetic kata #1440

Merged
merged 1 commit into from
Apr 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ $$ re^{i \theta} = r \cos \theta + i r \sin \theta $$

For two complex numbers to be equal, their real and imaginary parts have to be equal. This gives us the following system of equations:

$$ \begin{cases} a = r \cos \theta \\ b = r \sin \theta \end{cases} $$
$$ \begin{cases} a = r \cos \theta \\\\ b = r \sin \theta \end{cases} $$

To calculate $\theta$, we can divide the second equation by the first one to get

Expand Down
4 changes: 2 additions & 2 deletions katas/content/complex_arithmetic/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -259,9 +259,9 @@ Sometimes $\theta$ will be referred to as the number's **argument** or **phase**
> In Q#, complex numbers in polar form are represented as user-defined type `ComplexPolar` from the `Microsoft.Quantum.Math` namespace.
>
> You can convert a complex number $x = r \cdot e^{i\theta}$ into a tuple of two `Double` numbers using unwrap operator and tuple deconstruction: `let (r, theta) = x!;`,
> or access its real and imaginary parts using their names: `let (r, theta) = (x::Magnitude, x::Argument);`.
> or access its magnitude and phase using their names: `let (r, theta) = (x::Magnitude, x::Argument);`.
>
> You can construct a complex number from its real and imaginary parts as follows: `let x = ComplexPolar(r, theta);`.
> You can construct a complex number from its magnitude and phase as follows: `let x = ComplexPolar(r, theta);`.

@[exercise]({
"id": "complex_arithmetic__cartesian_to_polar",
Expand Down
Loading