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