microsoft/qdk

Public

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

CodeCommitsIssuesPull requestsActionsInsightsSecurity
billt/revert-mimalloc

Branches

Tags

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

Clone

HTTPS

Download ZIP

katas/content/random_numbers/random_two_bits/Placeholder.qs

15lines · modecode

1namespace Kata {
2 open Microsoft.Quantum.Measurement;
3 operation RandomTwoBits() : Int {
4 // Implement your solution here...
5
6 return -1;
7 }
8
9 // You can use the operation defined in the previous exercise to implement your solution.
10 operation RandomBit() : Int {
11 use q = Qubit();
12 H(q);
13 return MResetZ(q) == Zero ? 0 | 1;
14 }
15}
16