# How to model a quantum circuit

Let's say we have a system of 2 qubits, which are entangled in an unknown Bell basis configuration. Since the qubits are in a Bell configuration, each state is orthogonal to every other state, and thus must be distinguishable from each other.

My understanding is that there are 4 measurement operators (see below) that can be simultaneously applied to a single qubit (because they commute). And this is why we can unambiguously identify which Bell state the qubits are in, even if Bob and Alice measure their respective qubits with the 4 measurement operators, individually and concurrently with each other.

### Question

How does one come up with a quantum circuit for something like this? How do we go about mapping an arbitrary measurement to one of the well known quantum gates?

On a related note, let's say I have an arbitrary unitary matrix. How does one map that to a quantum gate?

### Bell configuration:

• $$\vert{T_1}\rangle = \frac{1}{\sqrt{2}} (\vert{10}\rangle - \vert{01}\rangle)$$
• $$\vert{T_2}\rangle = \frac{1}{\sqrt{2}} (\vert{10}\rangle + \vert{01}\rangle)$$
• $$\vert{T_3}\rangle = \frac{1}{\sqrt{2}} (\vert{00}\rangle + \vert{11}\rangle)$$
• $$\vert{T_4}\rangle = \frac{1}{\sqrt{2}} (\vert{00}\rangle - \vert{11}\rangle)$$

### Distinguishability:

• $$\langle T_i \vert T_j \rangle = \delta_{i,j}$$

### Measurement operators:

• $$M_{T_i} = \vert{T_i}\rangle\langle{T_i}\vert$$
• Commutation: $$[M_{T_i}, M_{T_j}] = 0$$

Measurement is usually just defined as a gate on it's own. The "well known gate" that measurement maps to is simply the measurement gate. Its one of the few places where some difficult, hard to model interactions with an environment are allowed in a quantum circuit, so we just separate that part out.

For example, in this circuit You can clearly see two measurement gates. The output of said gates is shown to be classical information (wires with two lines), and used later to determine whether or not a gate will be applied.

With that said, you can still simplify the measurement process. For your problem, if you apply a CNOT gate and a Hadamard gate, a Bell state will map onto a state in the 2-qubit computational basis, which turns an arbitrary measurement into a fairly standard one.

• Thank you for the answer. How did you know that a CNOT and a Hadamard gate is the right combination? What algorithm did you use to decide on that combination? May 3, 2020 at 19:48
• A CNOT and a Hadamard gate is what produces the Bell states in the first place, so the reverse combination of the gates puts it back into the computational basis, since unitary quantum computation is always reversible. This is just a commonly known fact. May 3, 2020 at 19:54
• Hmm.. Interesting. What if we have some other arbitrary basis? How do we model a quantum circuit then? May 3, 2020 at 20:01
• Any change of basis between two orthonormal bases (satisfies distinguishability) can be represented by a unitary. Applying the inverse of the gate before measurement will also allow you to measure that state in the computational basis. May 3, 2020 at 20:03

On a related note, let's say I have an arbitrary unitary matrix. How does one map that to a quantum gate?

There is a several quantum gates you can use for construction other more complex gates. See list of gates on Wikipedia.

Please also find other technique how to decompose arbitrary unitary gate in article Elementary gates for quantum computation.

Moreover, it is possible to approximate any quantum gate by proper combination of CNOT, Hadamard, phase gate (also called $$S$$ gate) and $$\pi/8$$ (also called $$T$$ gate).