microsoft/qdk
Publicmirrored fromhttps://github.com/microsoft/qdkAvailable
katas/content/linear_algebra/outer_product/Verification.qs
13lines · modecode
| 1 | namespace Kata.Verification { |
| 2 | open Microsoft.Quantum.Math; |
| 3 | |
| 4 | function OuterProduct_Reference() : Complex[][] { |
| 5 | return [[Complex(-27., 0.), Complex(0., -6.)], |
| 6 | [Complex(0., -81.), Complex(18., 0.)]]; |
| 7 | } |
| 8 | |
| 9 | @EntryPoint() |
| 10 | operation CheckSolution() : Bool { |
| 11 | ArraysEqualC(Kata.OuterProduct(), OuterProduct_Reference()) |
| 12 | } |
| 13 | } |
| 14 | |