mac172

Posted on

# Understanding Bell Inequality of Quantum Computing

Quantum Mechanics/Physics is rising and intersting field, right?. When learning it you come across topic called Bell Inequality. This is little guide for it.

It is a test which depends on Quantum Mechanics to describe real world experiment.

So let's know what is it and how do we calculate it.

### Bell Inequality

John Stewart Bell is a Irish physicist. He devised an amazing test which distinguish between Bohr and Einstein models. Most amazing feature of this test is not only it is philosophies but also testable. So, let's take a look at it.

Before we start learning Bell Inequality, we have to learn it's basic ideas on which it depends. I hope you have basic knowledge about matrices and it's operations.

### Basic

Column vector represent as "ket" $\ket{\psi}$

Row vector represent as "bra"
$\bra{\psi}$

You can look at it like this

Also known as H gate. It is single qubit operation that map qubit into equal superposition.

Simply it convert basis state into equally superposition states like this

$\ket{0} = {\ket{0} + \ket{1} \above{2pt} \sqrt{2}}$
$\ket{1} = {\ket{0} - \ket{1} \above{2pt} \sqrt{2}}$

Matrix for this is

Simply every element is 1 with scalar multiple of ${1 \above{1pt} \sqrt{2}}$

example let's calculate hadamard matrix for $\ket{0}$

At top we write matrix for $\ket{0}$ , take look at it because it contains 1 at top and 0 and bottom describing it is at $\ket{0}$ state. Side of it is Hadamard matrix (H). Below is simply multiplication of 2x2 matrix and 2x1 matrix. After calculating we get 2x1 matrix containing 1 at each position indicating it has both $\ket{0} \ket{1}$ states
and at the end we can write it in simple form

$\ket{0} = {\ket{0} + \ket{1} \above{2pt} \sqrt{2}}$

### CNOT Gate

It is two qubit operation. So it take two qubit as input, label it as first is "control" qubit and second is "target" qubit. Main point to remember is,

• If control qubit is 1 then it perform Pauli-X gate on target qubit means convert 0 to 1 or vice-versa.
• If control qubit is 0, then target qubit remain unchanged.

You can consider this as classical NOT gate.
Example

$\ket{00} = \ket{00}$
$\ket{01} = \ket{01}$
$\ket{10} = \ket{11}$
$\ket{11} = \ket{10}$

#### Symbol

That's it we need to understand Bell Inequality, although you read EPR and Bell's story as additional resources to your knowledge.

### Bell Inequality

Before getting output from Bell circuit (similar to classical logic circuit) it first undergo Hadamard transformation and then CNOT gate act on it and give us output.

#### Process

Now we have hadamard gates and CNOT gate with us the circuit of Bell state is

So first hadamard gate act on it like

$\ket{0} = {\ket{0} + \ket{1} \above{2pt} \sqrt{2}}$

And after converting $\ket{0}$ to it's equally superposition states we apply CNOT gate. As CNOT gate require two qubits as input.

$\ket{00} = {(\ket{0} + \ket{1})\ket{0} \above{2pt} \sqrt{2}}$
$\ket{00} = {\ket{00} + \ket{10} \above{2pt} \sqrt{2}}$

We know CNOT gate will change target qubit if control qubit is 1 else it remains unchanged.

$\ket{00} = {\ket{00} + \ket{11} \above{2pt} \sqrt{2}}$

Similarly we get another 3 states.

for $\ket{01}$

$\ket{01} = {\ket{01} + \ket{10} \above{2pt} \sqrt{2}}$

for $\ket{10}$

$\ket{10} = {\ket{00} - \ket{11} \above{2pt} \sqrt{2}}$

for $\ket{11}$

$\ket{11} = {\ket{01} - \ket{10} \above{2pt} \sqrt{2}}$

And above are Bell's states/pairs

DEV Community

Timeless DEV post...

## Git Concepts I Wish I Knew Years Ago

The most used technology by developers is not Javascript.

It's not Python or HTML.

It hardly even gets mentioned in interviews or listed as a pre-requisite for jobs.

I'm talking about Git and version control of course.