microsoft/qdk

Public

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

CodeCommitsIssuesPull requestsActionsInsightsSecurity
alex/pythontelem

Branches

Tags

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

Clone

HTTPS

Download ZIP

katas/content/distinguishing_unitaries/rz_ry/Verification.qs

14lines · modecode

1namespace Kata.Verification {
2 open Microsoft.Quantum.Katas;
3
4 @EntryPoint()
5 operation CheckSolution() : Bool {
6 for theta in [0.04, 0.1, 0.25, 0.31, 0.5, 0.87, 1.05, 1.41, 1.66, 1.75, 2.0, 2.16, 2.22, 2.51, 2.93, 3.0, 3.1] {
7 Message($"Testing theta = {theta}...");
8 if not DistinguishUnitaries_Framework([Rz(theta, _), Ry(theta, _)], Kata.DistinguishRzFromRy(theta, _), ["Rz", "Ry"], -1) {
9 return false;
10 }
11 }
12 return true;
13 }
14}
15