namespace Kata {
open Microsoft.Quantum.Math;
function ComplexModulus(x : Complex) : Double {
let (a, b) = x!;
return Sqrt(a * a + b * b);
}
}microsoft/qdk
Publicmirrored fromhttps://github.com/microsoft/qdkAvailable
katas/content/complex_arithmetic/complex_modulus/Solution.qs
8lines · modepreview