Mode:
Duration:
1
Coding works best on desktop or with an external keyboard.
Coding works best on desktop or with an external keyboard.
Implements the quantum teleportation protocol.
import pennylane as qml
from pennylane import numpy as np
dev = qml.device('default.qubit', wires=3)
@qml.qnode(dev)
def teleport(msg_state):
qml.QubitStateVector(msg_state, wires=0)
qml.Hadamard(wires=1)
qml.CNOT(wires=[1,2])
qml.CNOT(wires=[0,1])
qml.Hadamard(wires=0)
return qml.state()
msg_state = [1,0]
print(teleport(msg_state))PennyLane is an open-source Python library for differentiable programming of quantum computers. It enables hybrid quantum-classical machine learning workflows, automatic differentiation, and optimization across multiple quantum hardware platforms.
Origin & Creator
PennyLane is developed by Xanadu, a Canadian quantum computing company focused on photonic quantum technologies and software for quantum machine learning.
Industrial Note
PennyLane is widely used in research on quantum machine learning, variational algorithms, optimization, and differentiable quantum programming. It is suitable for prototyping hybrid quantum-classical workflows in academia and industry.