# Teleportation

https://en.wikipedia.org/wiki/Quantum_teleportation

## Imports


```python
%matplotlib inline
```


```python
from sympy import init_printing
init_printing(use_latex=True)
```


```python
from sympy import sqrt, symbols, Rational
from sympy import expand, Eq, Symbol, simplify, exp, sin
from sympy.physics.quantum import *
from sympy.physics.quantum.qubit import *
from sympy.physics.quantum.gate import *
from sympy.physics.quantum.grover import *
from sympy.physics.quantum.qft import QFT, IQFT, Fourier
from sympy.physics.quantum.circuitplot import circuit_plot
```

## Teleportation


```python
a,b = symbols('a b', real=True)
state = Qubit('000')*a + Qubit('001')*b
state
```


```python
entangle1_2 = CNOT(1,2)*HadamardGate(1)
entangle1_2
```


```python
state = qapply(entangle1_2*state)
state
```


```python
entangle0_1 = HadamardGate(0)*CNOT(0,1)
entangle0_1
```


```python
circuit_plot(entangle0_1*entangle1_2, nqubits=3);
```


```python
state = qapply(entangle0_1*state)
state
```


```python
result = measure_partial(state, (0,1))
```


```python
state = (result[2][0]*2).expand()
state
```


```python
state = qapply(XGate(2)*state)
state
```

88416a23f392c34066a1944665aa24a0e07d3385
ipynb
Jupyter Notebook
notebooks/teleportation.ipynb
gvvynplaine/quantum_notebooks
58783823596465fe2d6c494c2cc3a53ae69a9752
BSD-3-Clause
2017-10-17T22:44:27.000Z
2022-03-28T06:26:46.000Z
notebooks/teleportation.ipynb
gvvynplaine/quantum_notebooks
58783823596465fe2d6c494c2cc3a53ae69a9752
BSD-3-Clause
2017-10-09T05:16:41.000Z
2018-09-22T03:08:29.000Z
notebooks/teleportation.ipynb
gvvynplaine/quantum_notebooks
58783823596465fe2d6c494c2cc3a53ae69a9752
BSD-3-Clause
2017-10-09T04:22:19.000Z
2022-03-28T06:25:21.000Z
Qwen/Qwen-72B
1. YES
2. YES