microsoft/qdk

Public

mirrored from https://github.com/microsoft/qdkAvailable

CodeCommitsIssuesPull requestsActionsInsightsSecurity
dmitryv/select-updated

Branches

Tags

  • No tags available.
0Branches0Tags
Go to file
Add file
Code

Clone

HTTPS

Download ZIP

katas/content/multi_qubit_systems/prepare_with_complex/verification.qs

19lines · modecode

1namespace Kata.Verification {
2 operation PrepareWithComplex_Reference(qs : Qubit[]) : Unit is Adj + Ctl {
3 H(qs[0]);
4 H(qs[1]);
5 S(qs[0]);
6 T(qs[1]);
7 }
8
9 @EntryPoint()
10 operation CheckSolution() : Bool {
11 let isCorrect = AssertEqualOnZeroState(Kata.PrepareWithComplex, PrepareWithComplex_Reference);
12 if isCorrect {
13 Message("Correct!");
14 } else {
15 Message("Incorrect.");
16 }
17 return isCorrect;
18 }
19}
20