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