microsoft/qdk
Publicmirrored fromhttps://github.com/microsoft/qdkAvailable
katas/content/multi_qubit_systems/prepare_superposition/Verification.qs
14lines · modecode
| 1 | namespace Kata.Verification { |
| 2 | open Microsoft.Quantum.Katas; |
| 3 | |
| 4 | operation PrepareSuperposition_Reference(qs : Qubit[]) : Unit is Adj + Ctl { |
| 5 | X(qs[1]); |
| 6 | H(qs[1]); |
| 7 | } |
| 8 | |
| 9 | @EntryPoint() |
| 10 | operation CheckSolution() : Bool { |
| 11 | CheckOperationsEquivalenceOnZeroStateWithFeedback(Kata.PrepareSuperposition, |
| 12 | PrepareSuperposition_Reference, 2) |
| 13 | } |
| 14 | } |
| 15 | |