Skip to content

Commit

Permalink
Fix typos in Complex Arithmetic kata (#1440)
Browse files Browse the repository at this point in the history
- Fix a LaTeX error in Cartesian to Polar Conversion solution.
- Fix a mistake in Polar Coordinates.

Hope that helps! 😊
  • Loading branch information
Piwakk authored Apr 29, 2024
1 parent 2220aee commit f0b4713
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
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

0 comments on commit f0b4713

Please sign in to comment.