# 5.4.3 Activity

This activity is in two parts. In the first, you are given a quantum circuit and input qubits. Your task is to work out the output qubits and to determine whether the final output states, before measurements are taken, are entangled. In the second task you will design your own circuit for given input and output qubits.

Part 1

Consider the quantum circuit shown in Figure 14. The input qubits are both . Determine if the output two-qubit state, before measurements are taken, is entangled. Calculate the possible measurements and the probability of each possibility.

Figure 14 A circuit to be analysed for the Activity

### Answer

Writing the sequence of operations applied to the input qubits and using subscripts to label the qubits and the operations to show which qubit the gates are operating on, gives

acts on and acts on . So looking first at

So is now in a superposition state. The effect on is similar,

and is also in a superposition state. So now we have

Note that for the first CNOT gate, is the control qubit and is the target qubit. Consequently, when operates on , look at to decide whether is flipped. Again, adding subscripts to identify the qubits,

The result is an entangled state. Next the NOT gate acts on qubit to give

So we now have

The second CNOT gate acts on as the control qubit and as the target qubit, so this time look at to decide whether is flipped.

So we finally have the following,

This is the final state which is measured. It is an entangled state. There are four possible outcomes; either is measured as and is measured as or is measured as and is measured as or is measured as and is measured as or is measured as and is measured as . From the coefficients, the conclusion is that each outcome has a probability of 1/4.

Part 2

Design a circuit to convert the two-qubit input state into the (non-entangled) superposition two qubit output state comprising and with equal probability.

### Answer

There are various ways to achieve this. Once such circuit is shown in Figure 15.

Figure 15 A circuit to convert the two-qubit input state into the two qubit output state or with equal probability

The circuit can be described as

Starting with input the circuit applies a NOT gate to qubit , resulting in , so we have

A Hadamard gate is then applied to qubit to create a superposition for this qubit,

This gives

The output state is therefore a state whose non-entangled two qubit output state is a superposition of and with equal probability, as required.

OpenLearn - Introduction to quantum computing
Except for third party materials and otherwise, this content is made available under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 Licence, full copyright detail can be found in the acknowledgements section. Please see full copyright statement for details.