Microsoft Q# Coding Contest - Winter 2019 - 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
1115 Microsoft Q# Coding Contest - Winter 2019 - Warmup FINISHED False 259200 180968399 Feb. 22, 2019, 5 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 234 ) U2 Chessboard unitary PROGRAMMING *special 2200

B'Implement a unitary operation on N qubits which is represented by a square matrix of size 2^N in which zero and non-zero elements form a chessboard pattern with alternating 2x2 squares (top left square formed by non-zero elements). For example, for N = 3 the matrix of the operation should have the following shape: Here X denotes a "non-zero" element of the matrix (a complex number which has the square of the absolute value greater than or equal to 10^{-5} ), and . denotes a "zero" element of the matrix (a complex number which has the square of the absolute value less than 10^{-5} ). The row and column indices of the matrix follow little endian format: the least significant bit of the index is stored first in the qubit array. Thus, the first column of the matrix gives you the coefficients of the basis states you 'll get if you apply the unitary to the |00..0 rangle basis state, the second column - to the |10..0 rangle basis state etc. You can use the DumpUnitary tool to get the coefficients of the matrix your unitary implements (up to relative phases between columns) and the corresponding pattern of Xs and .s. You have to implement an operation which takes an array of N ( 2 <= N <= 5 ) qubits as an input and applies the unitary transformation with the matrix of the described shape to it. If there are multiple unitaries which satisfy the requirements, you can implement any of them. The "output" of your operation is the pattern of the matrix coefficients implemented by it; you can see the testing harness in the UnitaryPatterns kata. Your code should have the following signature: '...

Tutorials

Warmup editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
50425242 Thaid U2 Feb. 24, 2019, 11:10 a.m. OK Q# TESTS 4 467 0 2200
50330942 liouzhou_101 U2 Feb. 22, 2019, 6:31 p.m. OK Q# TESTS 4 467 0 2200
50637824 nejineji U2 March 1, 2019, 12:34 p.m. OK Q# TESTS 4 482 0 2200
50489388 chubakueno U2 Feb. 25, 2019, 12:49 p.m. OK Q# TESTS 4 482 0 2200
50478960 quantumshmontum U2 Feb. 25, 2019, 7:52 a.m. OK Q# TESTS 4 483 0 2200
50470932 zemen U2 Feb. 25, 2019, 12:25 a.m. OK Q# TESTS 4 483 0 2200
50423052 m4h U2 Feb. 24, 2019, 10:04 a.m. OK Q# TESTS 4 483 0 2200
50421542 ARegularCoder U2 Feb. 24, 2019, 9:20 a.m. OK Q# TESTS 4 483 0 2200
50352377 andrugh U2 Feb. 23, 2019, 9:07 a.m. OK Q# TESTS 4 483 0 2200
50333585 f4ded4k U2 Feb. 22, 2019, 7:39 p.m. OK Q# TESTS 4 483 0 2200

remove filters

Back to search problems