microsoft/qdk

Public

mirrored fromhttps://github.com/microsoft/qdkAvailable

CodeCommitsIssuesPull requestsActionsInsightsSecurity
alex/pythontelem

Branches

Tags

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

Clone

HTTPS

Download ZIP

katas/content/complex_arithmetic/polar_to_cartesian/index.md

14lines · modepreview

**Input:**
A complex number in polar form $x = re^{i\theta}$.

**Goal:**
Return the Cartesian representation of $x = a + bi$ as a `Complex`.

<details>
  <summary><b>Need a hint?</b></summary>
  
A video explanation of this conversion can be found [here](https://www.youtube.com/watch?v=auywa7dydAk).

</details>

> Q# function `ComplexPolarAsComplex` from `Microsoft.Quantum.Math` namespace converts a complex number of type `ComplexPolar` to a complex number of type `Complex`. For educational purposes, try to do this task by hand.