The following languages are only available languages for the problems from the contest

Microsoft Q# Coding Contest - Summer 2020 - Warmup:

- Microsoft Q#

Virtual contest is a way to take part in past contest, as close as possible to participation on time. It is supported only ICPC mode for virtual contests.
If you've seen these problems, a virtual contest is not for you - solve these problems in the archive.
If you just want to solve some problem from a contest, a virtual contest is not for you - solve this problem in the archive.
Never use someone else's code, read the tutorials or communicate with other person during a virtual contest.

No tag edit access

The problem statement has recently been changed. View the changes.

×
C. Prepare state |01⟩ + |10⟩ + |11⟩

time limit per test

1 secondmemory limit per test

256 megabytesinput

standard inputoutput

standard outputYou are given two qubits in state $$$|00 \rangle$$$. Your task is to prepare the following state on them:

$$$$$$\frac{1}{\sqrt{3}} \big( |01 \rangle + |10 \rangle + |11 \rangle)$$$$$$

This task is very similar to problem A1 of the Winter 2019 contest, but this time 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. However, you are allowed to use measurements.

You have to implement an operation which takes an array of 2 qubits 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:

namespace Solution {

open Microsoft.Quantum.Intrinsic;

operation Solve (qs : Qubit[]) : Unit {

// your code here

}

}

Codeforces (c) Copyright 2010-2021 Mike Mirzayanov

The only programming contests Web 2.0 platform

Server time: Apr/23/2021 04:47:13 (i1).

Desktop version, switch to mobile version.

Supported by

User lists

Name |
---|