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