microsoft/qdk

Public

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

CodeCommitsIssuesPull requestsActionsInsightsSecurity
copilot/replace-qsharp-with-qdk-python-tests

Branches

Tags

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

Clone

HTTPS

Download ZIP

katas/content/complex_arithmetic/cartesian_to_polar/Solution.qs

8lines · modecode

1namespace Kata {
2 import Std.Math.*;
3
4 function ComplexToComplexPolar(x : Complex) : ComplexPolar {
5 let (a, b) = (x.Real, x.Imag);
6 return ComplexPolar(Sqrt(a * a + b * b), ArcTan2(b, a));
7 }
8}
9