### What's Up

### Most Read Articles

- Christoffel symbol exercise: calculation in polar coordinates part II
- Riemann curvature tensor and Ricci tensor for the 2-d surface of a sphere
- Christoffel Symbol or Connection coefficient
- Riemann curvature tensor part I: derivation from covariant derivative commutator
- Metric tensor exercise: calculation for the surface of a sphere

#### Welcome to Einstein Relatively Easy!

This web site is aimed at the general reader who is keen to discover Einstein's theories of special and general relativity, and who may also like to tackle the essential underlying mathematics.

Einstein's Relativity is too beautiful and too engaging to be restricted to the professionals!

Have fun!

*"I have no special talents*

* I am only passionately curious" *

Albert Einstein

## C-NOT gate, Bell State and Entanglement

- Details
- Category: Quantum Mechanics
- Hits: 170

Quantum computers are built on top of single-qubit and 2-qubit operators. In the last two articles, we covered few single-qubit gates, and especially the Hadamard gate which puts a qubit into superposition.

Here, we will explore the 2-qubit operators and more precisely we will look at putting qubits into **entanglement** with **the C-NOT gate**.

##### Classical XOR gate

The Controlled-Not gate (CNOT) is analogous to the XOR gate (Exclusive OR) in classical computing. We have already presented in our previous article Introduction to quantum logic gates the **XOR gate** table truth: it gives a true (1 or HIGH) output when the number of true inputs is odd.

##### Quantum C-NOT gate

The quantum CNOT gate has two inputs, and thus two outputs. **The target input is negated only if the control input is set to 1**. If the control input is 0, the gate has no effect. The control qubit is not changed by the gate.

Below is a snapshot of both classical and quantum diagrams. We verify easily that they mirror each other: the quantum Target output column matches the y+x column of the classical XOR gate.

As we already know, each gate/operator can be expressed as a matrix. As the C-NOT gate takes two qubits as inputs and two qubits as output it will be a **4x4 matrix**.

There is a useful technique to transform a truth table to a matrix. tarting at row 0 column 0, you label the columns and rows consecutively in binary, from 00 to 11 for example. You then place a 1 in a cell if the input maps to the output; 0 otherwise. That's it, you're left with a matrix for your gate.

Let's try to apply the CNOT-gate by example to the |00> state, by multiplying the CNOT matrix to the basis state vector

We observe that it is the expected result ;-)

If we now try to apply the CNOT gate to the |10> state, by definition as the control qubit is |1>, the second qubit should be flipped from |0> to |1>. Let's observe it:

As expected, we get |11>.

##### Bell State

Let's try now to prepare a two-qubit system by example in |00> state, and then:

- apply **the Hadamard gate** to the first one so we get a 50/50 superposition state as detailed in Introduction to quantum logic gates

- then apply **the C-NOT gate** with the second qubit |0> acting as the control qubit

## Parallel superposition and Hadamard gates

- Details
- Category: Quantum Mechanics
- Hits: 226

In the previous article, we looked at single-qubit quantum gates, like the fundamental **Hadamard gate**.

We have detailed the way it was applying to one qubit. But let's see how it could operate on two qubits, by example on |00>.

As we know already from our previous article Expectation value of a product state, the final state will be the tensor product of the two transformed single-qubit states.

which can be developed to:

So by applying the Hadamard gate to two qubits, we generate **the superposition of all four basis states** of the tensor product of the sub-states, with **an equiprobability** of (1/2)^{2} = 0.25 of the computational basis states |0> and |1>.

Below is this quantum circuit visualized in the Quirk browser. Quirk confirms that the probability that the result state collapses to one of the four basis vectors equals to 25%.

**Remark 1**: More generally, starting with a state of n qubits |0...0_{n}⟩, if we apply the Hadamard gate to each qubit it results in the following state:

We end up with 2^{n} observable basis states. Many quantum algorithms use the Hadamard transform as an initial step, since it maps n qubits initialized with |0> to a superposition of all 2^{n} orthogonal states in the |0>,|1> basis with equal weight.

### Login Form

### Breadcrumbs

### Quotes

### RSS Feed

### Who is online

We have 36 guests and no members online