microsoft/qdk

Public

mirrored from https://github.com/microsoft/qdkAvailable

CodeCommitsIssuesPull requestsActionsInsightsSecurity
v1.3.0

Branches

Tags

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

Clone

HTTPS

Download ZIP

katas/content/complex_arithmetic/complex_addition/Solution.qs

9lines · modepreview

namespace Kata {    
    open Microsoft.Quantum.Math;
     
    function ComplexAdd(x : Complex, y: Complex) : Complex {        
        let (a, b) = x!;
        let (c, d) = y!;
        return Complex(a + c, b + d);
    }
}