Microsoft Q# Coding Contest - Summer 2020

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
1357 Microsoft Q# Coding Contest - Summer 2020 FINISHED False 259200 139240799 June 19, 2020, 4 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 304 ) C2 Prepare superposition of basis states with the same parity PROGRAMMING

B'You are given N qubits in the state |0...0 rangle , and an integer parity in {0, 1 } . Your task is to prepare an equal superposition of all basis states that have the given parity of the number of 1 s in their binary notation, i.e., the basis states that have an even number of 1 s if parity = 0 or the basis states that have an odd number of 1 s if parity = 1 . For example, for N = 2 the required state would be You are not allowed to use any gates except the Pauli gates (X, Y and Z), the Hadamard gate and the controlled versions of those (you are allowed to use multiple qubits as controls in the controlled versions of gates). However, you are allowed to use measurements. You have to implement an operation which takes an array of N qubits and an integer as an input and has no output. The "output" of your solution is the state in which it left the input qubits. Your code should have the following signature: '...

Tutorials

Microsoft Q# Coding Contest – Summer 2020: editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
84351497 arg_argon C2 June 19, 2020, 5:29 p.m. OK Q# TESTS 1 217 2252800
84389434 bajpaivaibhav09 C2 June 20, 2020, 7:09 a.m. OK Q# TESTS 1 217 2355200
84362415 olivialin C2 June 19, 2020, 7:52 p.m. OK Q# TESTS 1 217 2457600
84350922 eriksuenderhauf C2 June 19, 2020, 5:22 p.m. OK Q# TESTS 1 217 3072000
84369638 mpn C2 June 19, 2020, 10:50 p.m. OK Q# TESTS 1 218 2355200
84366021 Idontknow1 C2 June 19, 2020, 9:04 p.m. OK Q# TESTS 1 218 2355200
84355363 al13n C2 June 19, 2020, 6:15 p.m. OK Q# TESTS 1 218 2457600
84349126 _R_boukensha C2 June 19, 2020, 5:03 p.m. OK Q# TESTS 1 218 2764800
84617701 kfirsuli C2 June 21, 2020, 9:20 p.m. OK Q# TESTS 1 233 2252800
84393492 mbalsells C2 June 20, 2020, 8:04 a.m. OK Q# TESTS 1 233 2252800

remove filters

Back to search problems