Codeforces will not be available in the period 01:00-05:00 May, 30 (MSK, UTC +3) because of maintenance.
×

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

Microsoft Q# Coding Contest - Summer 2018 - 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

B. Generate Bell state

time limit per test

1 secondmemory limit per test

256 megabytesinput

standard inputoutput

standard outputYou are given two qubits in state and an integer *index*. Your task is to create one of the Bell states on them according to the *index*:

Input

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

namespace Solution {

open Microsoft.Quantum.Primitive;

open Microsoft.Quantum.Canon;

operation Solve (qs : Qubit[], index : Int) : ()

{

body

{

// your code here

}

}

}

Codeforces (c) Copyright 2010-2020 Mike Mirzayanov

The only programming contests Web 2.0 platform

Server time: May/29/2020 20:41:20 (h2).

Desktop version, switch to mobile version.

Supported by

User lists

Name |
---|