PennyLane
Install
Install
Back to Devices

lightning.qubit

  • Included in PennyLane
  • Built by PennyLane
  • QJIT
  • Large Workloads
  • Distributed Simulation
  • Performance
  • CPU (simulator)
  • Linux
  • macOS
  • Windows

lightning.qubit is PennyLane’s performance-driven extension of the default.qubit device.

Recommended for:

  • State vector simulations with 20+ qubits.
  • Compatibility with just-in-time compilation with JAX-jit or Catalyst (qjit).
  • Fast differentiation via parallel adjoint differentiation.
  • All operating systems.

Documentation

To learn more, please visit the device documentation:

  • lightning.qubit documentation

See all Lightning devices:

  • lightning.gpu
  • lightning.kokkos
  • lightning.qubit
  • lightning.tensor

Installation

The lightning.qubit device is included in PennyLane. It can be installed with:

pip install pennylane

For more details on installation and dependencies, visit the Install PennyLane page.

Device Initialization

Initialize the device in PennyLane with:

import pennylane as qml
dev = qml.device('lightning.qubit', wires=20) 

For more details on device settings and keyword arguments, see the device documentation.


Related Content

Demo

Adjoint Differentiation

Demo

Basic tutorial: qubit rotation

PennyLane

PennyLane is a cross-platform Python library for quantum computing, quantum machine learning, and quantum chemistry. Built by researchers, for research. Created with ❤️ by Xanadu.

Research

  • Research
  • Performance
  • Hardware & Simulators
  • Demos
  • Quantum Compilation
  • Quantum Datasets

Education

  • Teach
  • Learn
  • Codebook
  • Coding Challenges
  • Videos
  • Glossary

Software

  • Install PennyLane
  • Features
  • Documentation
  • Catalyst Compilation Docs
  • Development Guide
  • API
  • GitHub
Stay updated with our newsletter

© Copyright 2025 | Xanadu | All rights reserved

TensorFlow, the TensorFlow logo and any related marks are trademarks of Google Inc.

Privacy Policy|Terms of Service|Cookie Policy|Code of Conduct