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.
Problems
B'Implement a unitary operation on a register of N qubits that increments 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}}(|11 rangle + |10 rangle) = frac{1}{ sqrt{2}}(|3 rangle + |1 rangle) , they should be transformed to the state frac{1}{ sqrt{2}}(|(3+1) mod 2^2 rangle + |(1+1) mod 2^2 rangle) = frac{1}{ sqrt{2}}(|0 rangle + |2 rangle) = frac{1}{ sqrt{2}}(|00 rangle + |01 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
Submissions
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
83610215 |
emoseW |
B1 |
June 13, 2020, 12:20 p.m. |
OK |
Q# |
TESTS |
1 |
124 |
819200 |
|
|
83553543 |
acegikmoqsuwy2000 |
B1 |
June 12, 2020, 6:08 p.m. |
OK |
Q# |
TESTS |
1 |
124 |
1126400 |
|
|
83683436 |
nirani |
B1 |
June 13, 2020, 5:19 p.m. |
OK |
Q# |
TESTS |
1 |
139 |
921600 |
|
|
83559932 |
kadora |
B1 |
June 12, 2020, 7:45 p.m. |
OK |
Q# |
TESTS |
1 |
139 |
1126400 |
|
|
83579762 |
rsnytsar |
B1 |
June 13, 2020, 5:38 a.m. |
OK |
Q# |
TESTS |
1 |
140 |
716800 |
|
|
83589931 |
VasuJain |
B1 |
June 13, 2020, 7:59 a.m. |
OK |
Q# |
TESTS |
1 |
140 |
921600 |
|
|
83870519 |
rpankovich |
B1 |
June 15, 2020, 6:39 p.m. |
OK |
Q# |
TESTS |
1 |
155 |
614400 |
|
|
83593956 |
achilleus |
B1 |
June 13, 2020, 8:53 a.m. |
OK |
Q# |
TESTS |
1 |
155 |
614400 |
|
|
83564964 |
codelegend |
B1 |
June 12, 2020, 9:35 p.m. |
OK |
Q# |
TESTS |
1 |
155 |
614400 |
|
|
83862402 |
abht |
B1 |
June 15, 2020, 4:47 p.m. |
OK |
Q# |
TESTS |
1 |
155 |
716800 |
|
|
remove filters
Back to search problems