Speed Reading a Gate’s Operation from Its Matrix

In Classifying Quantum Gates, you saw that single-qubit quantum gates can be classified by how they affect qubelets. In this section, you’ll learn to infer a gate’s matrix and understand how it affects the qubelets. We’ll not be concerned with whether the given matrix is unitary. Our interest is merely to figure out how the gate acts on the pentagon images/_pragprog/svg-17.png and triangle images/_pragprog/svg-18.png qubelets. Thus, we’ll assume valid gate matrices.

Single-Qubit Gate Matrices

To fix these ideas in your mind, consider the following images/_pragprog/svg-186.png matrix:

images/_pragprog/svg-block-255.png

The letters images/_pragprog/svg-88.png, images/_pragprog/svg-89.png, images/_pragprog/svg-154.png, and images/_pragprog/svg-156.png denote complex numbers. Their complex conjugates are images/_pragprog/svg-323.png, images/_pragprog/svg-324.png, images/_pragprog/svg-325.png, and images/_pragprog/svg-326.png, respectively. So, if images/_pragprog/svg-88.png is images/_pragprog/svg-327.png, then images/_pragprog/svg-328.png. Equivalently, in polar coordinates using Euler’s formula:

images/_pragprog/svg-block-256.png

Even though this matrix encodes how any quantum state, including blended ones, are modified by the corresponding gate, we’ll determine how the gate affects the qubelets by focusing on how the matrix affects the idealized states images/_pragprog/svg-17.png and images/_pragprog/svg-18.png, respectively.

To this end, as described in Quantum Gates as Matrices, the first column lists the amplitudes of the quantum state obtained when the gate operates on images/_pragprog/svg-17.png.

In other words, when the gate corresponding to this matrix acts on images/_pragprog/svg-17.png, the gate puts the qubelet in the quantum state defined by the first column, as shown here:

images/_pragprog/svg-block-257.png

Similarly, when the gate acts on the images/_pragprog/svg-18.png qubelet, the gate puts the qubelet in the quantum state defined by the second column, as follows:

images/_pragprog/svg-block-258.png

Let’s now cover how to look at the entries of the gate matrix and reason out the following ways that the gate changes the qubelets:

Leave Qubelets Alone

When a gate acts on the pentagon images/_pragprog/svg-17.png qubelets only and doesn’t affect the triangle images/_pragprog/svg-18.png qubelets, the element corresponding to the amplitude of images/_pragprog/svg-18.png in the first column is zero. That is, the second element in the first column is zero:

images/_pragprog/svg-block-259.png

If the gate acts on the triangle images/_pragprog/svg-18.png qubelets only and leaves the pentagon images/_pragprog/svg-17.png qubelets alone, then the amplitude for images/_pragprog/svg-17.png is zero. That is, the first element in the second column is zero:

images/_pragprog/svg-block-260.png

Switch Qubelets

When a gate switches a qubelet, it “changes” it to the other type. For example, a pentagon images/_pragprog/svg-17.png qubelet is switched to a triangle images/_pragprog/svg-18.png qubelet. The entry for the amplitude of images/_pragprog/svg-17.png becomes zero and the one for the amplitude of images/_pragprog/svg-18.png is nonzero:

images/_pragprog/svg-block-261.png

In the same way, when a triangle images/_pragprog/svg-18.png qubelet is switched to a pentagon images/_pragprog/svg-17.png qubelet, the second element in the second column is zero:

images/_pragprog/svg-block-262.png

For instance, the NOT gate, which switches a pentagon images/_pragprog/svg-17.png qubelet with a triangle images/_pragprog/svg-18.png qubelet, and a a triangle images/_pragprog/svg-18.png qubelet with a pentagon images/_pragprog/svg-17.png qubelet, has the following matrix:

images/_pragprog/svg-block-263.png

Split Qubelets

When a gate splits either a pentagon images/_pragprog/svg-17.png or a triangle images/_pragprog/svg-18.png qubelet, it creates qubelets of both types. For example, splitting a pentagon images/_pragprog/svg-17.png qubelet creates both a pentagon images/_pragprog/svg-17.png and a triangle images/_pragprog/svg-18.png qubelet. In other words, both entries in the respective column are nonzero.

If a gate splits both pentagon images/_pragprog/svg-17.png and triangle images/_pragprog/svg-18.png qubelets, then the matrix has all nonzero entries like the H gate:

images/_pragprog/svg-block-264.png

Rotate Qubelets

When a gate rotates a qubelet, it shows up as a complex number in the entry associated with that qubelet. For example, when a gate acts on a triangle images/_pragprog/svg-18.png qubelet and rotates it by, say, images/_pragprog/svg-114.png radians or 45° anticlockwise (and leaves the pentagon images/_pragprog/svg-17.png qubelet alone), the quantum state is expressed as:

images/_pragprog/svg-block-265.png

Using Euler’s formula, write the previous equation as:

images/_pragprog/svg-block-266.png

Write this operation in the bottom right element of the matrix:

images/_pragprog/svg-block-267.png

Thus, any time you see a complex number as an entry in the gate matrix, it means the corresponding qubelet is rotated.

Compound Operations on Qubelets

Knowing how to recognize the basic operations we’ve listed will let you infer when a gate combines them when modifying the qubelets. For example, consider the gate matrix associated with the Y Gate, as follows:

images/_pragprog/svg-block-268.png

Looking at the first column associated with the gate acting on the images/_pragprog/svg-17.png qubit, the complex number images/_pragprog/svg-106.png in the bottom element indicates that the pentagon images/_pragprog/svg-17.png qubelet is switched to the triangle images/_pragprog/svg-18.png qubelet and is rotated.

You can calculate the exact angle of rotation by noticing that images/_pragprog/svg-106.png can be expressed as follows, again using Euler’s formula:

images/_pragprog/svg-block-269.png

Thus, the triangle images/_pragprog/svg-18.png qubelet is rotated images/_pragprog/svg-148.png radians, or a quarter turn anticlockwise.

You can reason out the action on the images/_pragprog/svg-18.png qubit in a similar way by looking at the second column.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.138.113.188