1001B.md (1303B)
1 Source: https://codeforces.com/problemset/problem/1001/B 2 3 B. Generate Bell state 4 5 time limit per test 6 7 1 second 8 9 memory limit per test 10 11 256 megabytes 12 13 input 14 15 standard input 16 17 output 18 19 standard output 20 21 You are given two qubits in state  and an integer *index*. Your task is to create one of the [Bell states](https://en.wikipedia.org/wiki/Bell_state) on them according to the *index*: 22 23 *  24 *  25 *  26 *  27 28 Input 29 30 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. 31 32 Your code should have the following signature: 33 34 ``` 35 namespace Solution { 36 open Microsoft.Quantum.Primitive; 37 open Microsoft.Quantum.Canon; 38 39 operation Solve (qs : Qubit[], index : Int) : () 40 { 41 body 42 { 43 // your code here 44 } 45 } 46 } 47 ```