### What's Up

### Most Read Articles

#### 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

If you like this content, you can help maintaining this website with a small tip on my tipeee page

## Quantum teleportation implemented in Java

- Details
- Category: Quantum Mechanics
- Hits: 175

In this article, our goal is to implement the teleportation quantum algorithm as exposed in our last article The quantum teleportation algorithm with the java Strange API already used to implement the entanglement state in this article Java quantum program to entanglement.

As a reminder, that is how our teleportation quantum circuit looks like:

If you have read carefully our previous article, you will notice that we have placed **an initial gate P auli-X before the teleportation circuit**, so that the qubit to be teleported, at the left of the top ligne is **in the |1> state** (X|0> = 1).

So once our program run, the expected result should be for Bob (bottom line of the circuit) to get a |1> qubit.

Let's go through our circuit step by step:

First we initialize our quantum simulator (yes we still don't have a personal quantum computer.. ;), and start with 3 qubits all in initial state |0>. Keep in mind that in Strange API each qubit will be indexed respectively at postion 0,1 and 2.

`QuantumExecutionEnvironment simulator = new SimpleQuantumExecutionEnvironment();`

`Program program = new Program(`

**3**);

Than we switch our first qubit (top line, index=0), the one to be teleported to |1> by applying the Pauli-X gate

`Step step0 = new Step();`

`step0.addGate(`

**new X**(**0**));`program.addStep(step0);`

Next we create the entangled pair shared by the second and third qubits. We should know how to do that by know: we apply the H Hadamard gate to the second qubit (index=1) and apply the C-Not gate to the second (index=1) and third gate (index=2)

`Step step1 = new Step();`

`step1.addGate(`

**new Hadamard**(**1**));`Step step2 = new Step();`

`step2.addGate(`

**new Cnot**(**1**,**2**));

## The No-cloning theorem

- Details
- Category: Dictionary
- Hits: 168

Suppose that Alice has some unknown qubit that she wants to send to Bob. She can not measure the qubit to see what it was, for that this would inherently modify the qubit by collapsing its state. This is obviously not what we want.

Why don’t we just make a copy of it? Unfortunately this is what **the no-cloning theorem** forbids. Formally, it states that we cannot clone arbitrary quantum states by unitary evolution.

**Theorem**: It is impossible to create an identical copy of an arbitrary unknown quantum state.

**Proof** (by contradiction):

Suppose that there exists a unitary operator C that copies an arbitrary unknown q-state. That is C is a two-qubit operator that copies or clones the first qubit into the second qubit

Since the theorem is about the ability of C to clone any arbitrary state, let’s write down the copy for two random states |Ψ_{1}> and |Ψ_{2}> that should be copied into the state |ρ>

Taking the inner product of these two expressions we get:

As the C operator is unitary, by definition CC*=I (identity matrix) so that

This result in the form of X = X^{2} leads to the conclusion that we can copy the state |Ψ_{1}> and |Ψ_{2}> only if <Ψ_{1} |Ψ_{2}>=0 or <Ψ_{1} |Ψ_{2}>=1, on other words only and only if the states |Ψ_{1}> and |Ψ_{2}> are either **parallel or orthogonal**.

Which is in contradiction with our initial assumption to be able to copy any arbitrary state.

CQFD

### Login Form

### Breadcrumbs

### Quotes

### RSS Feed

### Who is online

We have 52 guests and no members online