3.2.3 Parallel operations

If we apply one operation on the first qubit and another on the second qubit then the order of these two operations does not matter. That is, if UU and VV are arbitrary single-qubit operations then

U1V2=V2U1.\displaystyle U_{1}V_{2}=V_{2}U_{1}. (3.58)

We can verify this intuitive fact by using Eqs. 3.56 and 3.57. For every basis state |a,b\left|a,b\right\rangle where a,b{0,1}a,b\in\{0,1\},

U1V2|a,b=U1(|aV|b)=U|aV|b=V2(U|a|b)=V2U1|a,b,\displaystyle U_{1}V_{2}\left|a,b\right\rangle=U_{1}\left(\left|a\right\rangle% \otimes V\left|b\right\rangle\right)=U\left|a\right\rangle\otimes V\left|b% \right\rangle=V_{2}\left(U\left|a\right\rangle\otimes\left|b\right\rangle% \right)=V_{2}U_{1}\left|a,b\right\rangle,

so Eq. 3.58 follows by linearity.

In fact, since the two operations act on different qubits, we could even do them in parallel! This suggests introducing a new notation for the operation in Eq. 3.58:

UV.\displaystyle U\otimes V.

We are re-using the tensor product symbol that we originally introduced for combining two independent single-qubit states into a two-qubit state. The same meaning extends also to quantum operations: UVU\otimes V denotes the combined operation that consists of applying UU and VV to two different subsystems of a larger system. This notation is particularly convenient since it interplays nicely with the original tensor product for states:

(UV)(|α|β)=U|αV|β.\displaystyle(U\otimes V)(\left|\alpha\right\rangle\otimes\left|\beta\right% \rangle)=U\left|\alpha\right\rangle\otimes V\left|\beta\right\rangle. (3.59)

This equation simply says that if you have two independent states and you apply an operation that acts independently on each of the two states, then you just end up applying each of the two operations on the corresponding state. We will call UVU\otimes V a tensor product of two quantum operations or a parallel operation.

Quirky allows us to apply local quantum operations in parallel. For example, we could have written the sequence of operations in Eq. 3.54 as

[Uncaptioned image]

where the NOT\mathrm{NOT} operation and the Hadamard operation are now applied in parallel.

Let us discuss another example. What happens if we apply HH to both qubits? This operation is denoted by HHH\otimes H and according to Eqs. 2.34 and 3.59 acts as follows:

(HH)|00\displaystyle(H\otimes H)\left|00\right\rangle =(H|0)(H|0)\displaystyle=(H\left|0\right\rangle)\otimes(H\left|0\right\rangle)
=(12|0+12|1))(12|0+12|1))\displaystyle=\left\lparen\frac{1}{\sqrt{2}}\left|0\right\rangle+\frac{1}{% \sqrt{2}}\left|1\right\rangle)\right\rparen\otimes\left\lparen\frac{1}{\sqrt{2% }}\left|0\right\rangle+\frac{1}{\sqrt{2}}\left|1\right\rangle)\right\rparen
=12|0|0+12|0|1+12|1|0+12|1|1\displaystyle=\frac{1}{2}\left|0\right\rangle\otimes\left|0\right\rangle+\frac% {1}{2}\left|0\right\rangle\otimes\left|1\right\rangle+\frac{1}{2}\left|1\right% \rangle\otimes\left|0\right\rangle+\frac{1}{2}\left|1\right\rangle\otimes\left% |1\right\rangle
=12(|00+|01+|10+|11).\displaystyle=\frac{1}{2}\left\lparen\left|00\right\rangle+\left|01\right% \rangle+\left|10\right\rangle+\left|11\right\rangle\right\rparen.

The resulting state is called the uniform superposition on two qubits since it contains each of the two-qubit basis vectors with an equal amplitude. If we perform a measurement on this state we obtain all four outcomes with equal probability. We can readily verify this using Quirky:

[Uncaptioned image]

Exercise 3.10 (Constructing a product state).
  1. 1.

    Write 12(|00+|01|10|11)\frac{1}{2}\left(\left|00\right\rangle+\left|01\right\rangle-\left|10\right% \rangle-\left|11\right\rangle\right) as a tensor product of two single-qubit states.

  2. 2.

    How can you construct this state by applying a sequence of local operations to |00\left|00\right\rangle?

  3. 3.

    Implement the sequence of operations from step 2 in Quirky.

Solution.
  1. 1.

    The state can be written as

    12(|00+|01|10|11)=12(|0|1)12(|0+|1).\displaystyle\frac{1}{2}\left(\left|00\right\rangle+\left|01\right\rangle-% \left|10\right\rangle-\left|11\right\rangle\right)=\frac{1}{\sqrt{2}}\left(% \left|0\right\rangle-\left|1\right\rangle\right)\otimes\frac{1}{\sqrt{2}}\left% (\left|0\right\rangle+\left|1\right\rangle\right).
  2. 2.

    This is equal to

    H|1H|0=HNOT|0H|0=(HNOTH)|00.\displaystyle H\left|1\right\rangle\otimes H\left|0\right\rangle=H\,\mathrm{% NOT}\left|0\right\rangle\otimes H\left|0\right\rangle=(H\,\mathrm{NOT}\otimes H% )\left|00\right\rangle.
  3. 3.

    [Uncaptioned image]

Eq. 3.59 shows that if we apply a parallel operation to a product state then we get another product state. In fact, starting from |00\left|00\right\rangle we can get any product state in this way. This gives an intuitive interpretation to the product states: they are exactly those states that we can get by applying an arbitrary parallel operation to two qubits initialized in state |00\left|00\right\rangle.

Homework 3.5 (Product states from parallel operations).

Show that every product state can be constructed by applying some parallel quantum rotations (i.e., an operation of the form U(θ)U(ϕ)U(\theta)\otimes U(\phi)) to |00\left|00\right\rangle. Recall from Eq. 2.27 that U(θ)U(\theta) denotes a rotation by angle θ\theta.

Hint: Recall from Eq. 2.5 that the most general one-qubit state is of the from |ψ(θ)\left|\psi(\theta)\right\rangle.

Hack.

We can write the two target states as |α=|ψ(θ)\left|\alpha\right\rangle=\left|\psi(\theta)\right\rangle and |β=|ψ(θ)\left|\beta\right\rangle=\left|\psi(\theta^{\prime})\right\rangle, for some angles θ\theta and θ\theta^{\prime}. Thus:

(U(θ)U(θ))|00=U(θ)|0U(θ)|0=|α|β.\displaystyle\big{\lparen}U(\theta)\otimes U(\theta^{\prime})\big{\rparen}% \left|00\right\rangle=U(\theta)\left|0\right\rangle\otimes U(\theta^{\prime})% \left|0\right\rangle=\left|\alpha\right\rangle\otimes\left|\beta\right\rangle.

The first step is Eq. 3.59 and the second is Eq. 2.27.

We close our discussion of local operations with some general remarks. First, it is not hard to check that

(UV)(UV)=UUVV,\displaystyle(U\otimes V)(U^{\prime}\otimes V^{\prime})=UU^{\prime}\otimes VV^% {\prime}, (3.60)

for any four single-qubit operations UU, UU^{\prime}, VV, VV^{\prime}. Can you draw a picture to visualize what is going on here?

We can now make use of the identity operation II from Eq. 2.32 which acts as I|ψ=|ψI\left|\psi\right\rangle=\left|\psi\right\rangle (this trivially extends to I1I_{1} and I2I_{2} on two qubits). It is rather useless on its own, but can be conveniently used in tensor product notation. For example, it allows us to write

U1=UIandV2=IV,\displaystyle U_{1}=U\otimes I\qquad\text{and}\qquad V_{2}=I\otimes V,

which makes it very clear that, e.g., U1U_{1} applies the UU-operation on the first qubit and nothing on the second qubit. For example, the identity U1V2=V2U1U_{1}V_{2}=V_{2}U_{1} from Eq. 3.58 now becomes

(UI)(IV)=UV=(IV)(UI)(U\otimes I)(I\otimes V)=U\otimes V=(I\otimes V)(U\otimes I) (3.61)

which is rather intuitive.

You might wonder if the order of operations actually matters if we apply them to the same qubit? If we consider two rotations then it follows from Eq. 2.29 that their order is not important since

U(θ)U(θ)=U(θ+θ)=U(θ+θ)=U(θ)U(θ).\displaystyle U(\theta)U(\theta^{\prime})=U(\theta+\theta^{\prime})=U(\theta^{% \prime}+\theta)=U(\theta^{\prime})U(\theta).

However, if UU and VV are two arbitrary single-qubit operations (in particular, one of them is a reflection) then their composition generally depends on the order (see 3.11 below). That is,

UVVU.UV\neq VU.

This issue of course persists also when you have another qubit around, but are still acting with both operations on the same qubit. For example,

(UI)(VI)=UVIVUI=(VI)(UI).(U\otimes I)(V\otimes I)=UV\otimes I\neq VU\otimes I=(V\otimes I)(U\otimes I). (3.62)

We can also write this as U1V1V1U1U_{1}V_{1}\neq V_{1}U_{1} (and similarly when we apply both operations to the second qubit).

To understand intuitively the difference between Eqs. 3.61 and 3.62, imagine that UU means “putting on a sock” and VV means “putting on a shoe”. Clearly, when UU and VV are applied to the same foot, you will get different results depending on the order! However, if you apply UU and VV to different feet (e.g., you use UIU\otimes I and IVI\otimes V) then you will get the same result irrespectively of the order of the two operations. Either way, if you want to be properly dressed, you should apply (UU)(U\otimes U) and then (VV)(V\otimes V).

Exercise 3.11 (The order is important).

Show that HZZHHZ\neq ZH.

Solution. To show that HZZHHZ\neq ZH it is enough to verify that they give different results when applied to the |0\left|0\right\rangle state. Indeed:
HZ|0\displaystyle HZ\left|0\right\rangle =H|0=12|0+12|1,\displaystyle=H\left|0\right\rangle=\frac{1}{\sqrt{2}}\left|0\right\rangle+% \frac{1}{\sqrt{2}}\left|1\right\rangle,
ZH|0\displaystyle ZH\left|0\right\rangle =Z(12|0+12|1)=12|012|1.\displaystyle=Z\left(\frac{1}{\sqrt{2}}\left|0\right\rangle+\frac{1}{\sqrt{2}}% \left|1\right\rangle\right)=\frac{1}{\sqrt{2}}\left|0\right\rangle-\frac{1}{% \sqrt{2}}\left|1\right\rangle.