Microsoft Q# Coding Contest - Summer 2020 - Warmup

Solutions are presented as using the least memory and the fastest execution time. It also takes the top 10 most recent solutions from each language. If you want to limit to a specific index, click the "Solved" button and go to that problem.

ContestId
Name
Phase
Frozen
Duration (Seconds)
Relative Time
Start Time
1356 Microsoft Q# Coding Contest - Summer 2020 - Warmup FINISHED False 259200 139845599 June 12, 2020, 4 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 283 ) B2 Decrement PROGRAMMING *special

B'Implement a unitary operation on a register of N qubits that decrements the number written in the register modulo 2^N . Your operation should take a register of type LittleEndian - an array of qubits that encodes an unsigned integer in little-endian format, with the least significant bit written first (corresponding to the array element with index 0). The "output" of your solution is the state in which it left the input qubits. For example, if the qubits passed to your operation are in the state frac{1}{ sqrt{2}}(|00 rangle + |01 rangle) = frac{1}{ sqrt{2}}(|0 rangle + |2 rangle) , they should be transformed to the state frac{1}{ sqrt{2}}(|(0-1) mod 2^2 rangle + |(2-1) mod 2^2 rangle) = frac{1}{ sqrt{2}}(|3 rangle + |1 rangle) = frac{1}{ sqrt{2}}(|11 rangle + |10 rangle) . Your code should have the following signature (note that your operation should have Adjoint and Controlled variants defined for it; is Adj+Ctl in the operation signature will generate them automatically based on your code): Your code is not allowed to use measurements or arbitrary rotation gates (so, for example, using the library operation IncrementByInteger will cause runtime error). This operation can be implemented using just the X gate and its controlled variants. '...

Tutorials

Microsoft Q# Coding Contest – Summer 2020 — Warmup: editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
83615846 TexanElite B2 June 13, 2020, 1:36 p.m. OK Q# TESTS 1 124 716800
83604061 BestPyroblastHunterEU B2 June 13, 2020, 11:03 a.m. OK Q# TESTS 1 124 716800
83774294 natsugiri B2 June 14, 2020, 6:22 p.m. OK Q# TESTS 1 139 716800
83591876 Spheniscine B2 June 13, 2020, 8:25 a.m. OK Q# TESTS 1 139 716800
83856802 meooow B2 June 15, 2020, 3:41 p.m. OK Q# TESTS 1 139 819200
83556386 kousikr26 B2 June 12, 2020, 6:47 p.m. OK Q# TESTS 1 140 819200
83782045 Pranjal2041 B2 June 14, 2020, 9:19 p.m. OK Q# TESTS 1 140 921600
83697538 Hennkka B2 June 13, 2020, 8:08 p.m. OK Q# TESTS 1 140 921600
83880845 lucifer1004 B2 June 15, 2020, 11 p.m. OK Q# TESTS 1 140 1024000
83562628 Parsa84 B2 June 12, 2020, 8:37 p.m. OK Q# TESTS 1 140 1126400

remove filters

Back to search problems