Project 11: Quantum Computing (15 pts)

What you need

Purpose

To practice using a quantum computer for very basic operations.

Background

Here is a quick introduction to quantum mechanics and quantum computing. Click any of the three images below for a web page explaining each topic in more detail.

The Feynman Double Slit Experiment

Quantum mechanical objects, such as electrons, are not localized when they are not observed. They move as waves, smeared across space, but when observed, the wave function collapses and they are only seen to be at one location. Here is a famous explanation of that phenomenon.

Shor's algorithm

This can be used to construct a network of qubits that factors compound numbers into their prime factors very quickly, as explained here:

Qubits

In Quantum Computing, the fundamental element is the Qubit, an object that has many possible states, as shown below.

At the top is the pure state |0> and at the bottom is the pure state |1>. Normal computers use bits with only these two states: 0 and 1.

Quantum computers use the whole range of states, including the intermediate states that are "superpositions" of |0> and |1>.


Task 11.1: Classical Computation (5 pts.)

Getting Started

In a Web browser, go to

https://quantumexperience.ng.bluemix.net/qx/experience

At the top right, click "Sign in". A login box pops up, as shown below. Log in with a social network, or create an IBM Q account and log in with that.

When the IBM Q Experience page reloads, at the top center, click Composer.

The next page shows the "Composer". Here we'll program a quantum computer, using the chart at the bottom with five lines, like a music composer's score.

At the top is the Internals section, showing the details of IBM's actual quantum computer, which has superconducting magnets cooled to 0.015 degrees K. Ignore it for this project.

At the lower left is the Score where you will create your programs, by dragging Gates from the right and dropping them.

The pink icon with a white umbrella-looking figure on it is called a "Measurement Gate". Drag a measurement gate onto the score and drop it there, as indicated by the pink arrow in the figure below.

Classical Measurement

At the center right, click the Simulate button.

A box pops up asking you to "Name your experiment". Click OK.

"Your Quantum Results" appear, including the "Quantum State: Computation Basis" chart shown below.

This chart shows the results of running your experiment 100 times. Every time, the result was the same: 00000, as shown at the bottom of the purple bar.

All the qubits started in the |0> state, and all we did was measure one bit. Measuring a bit makes no difference when the bit is in a certain state, so the result was 00000.

Classical Bit-Flipping

Close the "Your Quantum Results" box.

Compose the experiment shown below, with one X gate and two Measurement Gates.

Click the Simulate button. The result is now 00010, as shown at the bottom right in the image below.

The X gate rotated a qubit around the X-axis, as shown by the orange arrow in the figure below. |0> flipped into |1>.

Both of these are certain states -- this is normal digital computing, not using any quantum effects.

A Classical Computation

Compose the experiment below and simulate it. Put the resulting pattern of bits into the form below.

11.1: Recording Your Success (5 pts)

Use the form below to record your success.

Name:
Result:

Task 11.2: Quantum Uncertainty (5 pts.)

To put a qubit into an uncertain state, we'll use the H gate. This gate rotates the qubit around an axis at a 45-degree angle, so that the certain state |0> becomes an uncertain state in between |0> and |1>, as shown by the orange arrow in the figure below.

Creating Uncertainty ("Superposition")

Close the "Your Quantum Results" box.

Compose the experiment shown below.

Simulate it. There are two possible results, as shown below. The lowest bit is sometimes 0 and sometimes 1.

Three Qubits in Superposition States

Close the "Your Quantum Results" box.

Compose the experiment shown below.

Simulate it. There are now eight possibilities, as shown below.

Several Uncertain Bits

Compose the experiment below.

Simulate it. There are four possible results, as shown below. Find the result with the largest number of 1 bits and enter it into the form below.

11.2: Recording Your Success (5 pts)

Use the form below to record your success.

Name:
Result:

Task 11.3: Quantum Entanglement (5 pts.)

Entanglement with a Certain State

The + gate connects two qubits together, so they are always the same.

Close the "Your Quantum Results" box.

Compose the experiment shown below.

Simulate it. The result is always the same: the lower two bits are both 1, as shown below.

The X gate flipped one bit, and the + gate entangled that bit with another bit, so they both flipped together.

Entangling Uncertain States

Close the "Your Quantum Results" box.

Compose the experiment shown below.

Simulate it. There are two possible results: the lowest two bits are either 00 or 11, as shown below.

Both bits are uncertain, but they are entangled together so they are always the same.

Four Entangled Bits

Compose the experiment below.

Simulate it. There are four possible results, as shown below. Find the two results with the largest number of 1 bits and enter them into the form below.

11.3: Recording Your Success (5 pts)

Use the form below to record your success.

Name:
Resulting ten bits, like this 1000000001:

Posted 3-24-19