Esta página se muestra en inglés. Una traducción al español está en curso.
ScriptsJul 26, 2026·3 min de lectura

PennyLane — Quantum Machine Learning Framework

An open-source library for quantum machine learning, quantum chemistry, and quantum computing that supports automatic differentiation across quantum and classical computations.

Listo para agents

Instalación lista para agent

Este activo puede instalarse después de elegir el runtime, revisar el plan y ejecutar el comando correspondiente.

Native · 98/100Política: permitir
Superficie agent
Cualquier agent MCP/CLI
Tipo
Skill
Instalación
Single
Confianza
Confianza: Established
Entrada
PennyLane Overview
Comando de instalación directa
npx -y tokrepo@latest install 09ea01fd-888c-11f1-9bc6-00163e2b0d79 --target codex

Ejecutar después de confirmar el plan con dry-run.

Introduction

PennyLane is a Python library for quantum machine learning and quantum computing that bridges quantum circuits with classical ML frameworks. It enables automatic differentiation of quantum computations, allowing researchers to train variational quantum algorithms using gradient-based optimization with PyTorch, TensorFlow, or JAX.

What PennyLane Does

  • Defines parameterized quantum circuits as differentiable computational graphs
  • Computes gradients of quantum circuits using parameter-shift rules and backpropagation
  • Integrates with PyTorch, TensorFlow, JAX, and NumPy for hybrid quantum-classical workflows
  • Runs circuits on simulators and real hardware from IBM, Amazon Braket, IonQ, and others
  • Provides built-in templates for common variational circuits and quantum chemistry methods

Architecture Overview

PennyLane uses QNodes as its core abstraction: a quantum circuit bound to a device that acts as a differentiable function. The autograd engine applies quantum-specific differentiation methods (parameter-shift or backprop). Device plugins connect QNodes to simulators or hardware backends.

Self-Hosting & Configuration

  • Install via pip: pip install pennylane (pure Python, no compilation needed)
  • Add hardware plugins: pip install pennylane-qiskit, pennylane-braket, etc.
  • Default simulator (default.qubit) works immediately with no setup
  • Configure devices by specifying backend name, wire count, and shot count
  • Use pennylane.about() to verify installed plugins and versions

Key Features

  • Automatic differentiation of quantum circuits with multiple gradient methods
  • Hardware-agnostic design supporting 20+ quantum devices and simulators
  • Native integration with PyTorch, TensorFlow, JAX, and Autograd
  • Built-in circuit templates for VQE, QAOA, and quantum neural networks
  • Quantum chemistry module for molecular simulation and ground-state energy estimation

Comparison with Similar Tools

  • Cirq — Lower-level circuit framework; PennyLane adds autodiff and ML framework integration
  • Qiskit — Broader quantum SDK; PennyLane specializes in differentiable quantum computing
  • TensorFlow Quantum — TF-only; PennyLane supports PyTorch, JAX, and TF equally
  • Amazon Braket SDK — AWS-focused hardware access; PennyLane is backend-agnostic with a plugin system

FAQ

Q: Can PennyLane run on real quantum hardware? A: Yes. Through plugins it connects to IBM Quantum, Amazon Braket, IonQ, Rigetti, and other providers.

Q: How does PennyLane compute gradients of quantum circuits? A: It uses the parameter-shift rule by default. Simulators can also use backpropagation for faster training.

Q: Is PennyLane only for machine learning? A: No. It supports quantum chemistry (VQE, molecular simulation) and general variational algorithms beyond ML.

Q: What classical ML frameworks does PennyLane integrate with? A: PyTorch, TensorFlow, JAX, and NumPy/Autograd, allowing hybrid models that mix quantum and classical layers.

Sources

Discusión

Inicia sesión para unirte a la discusión.
Aún no hay comentarios. Sé el primero en compartir tus ideas.

Activos relacionados