Skip to content

Guide · Agent skill

How to use the PennyLane Quantum Circuits agent skill

Updated · written with AI from the project's own documentation and checked against our catalogue data

The PennyLane skill is a set of instructions and reference files that teaches an AI agent to build, check and train PennyLane quantum circuits. It is aimed at researchers, students and developers who want an agent to follow a careful workflow for variational quantum algorithms, hybrid quantum-classical models and molecular energy estimates. After this guide you will know how to install the skill, how to ask for work in plain language, and what checks the agent should run before trusting a result.

PennyLane Quantum CircuitsK-Dense-AI/scientific-agent-skills · MIT

Quick start

  1. 1Download the ZIP. Get the PennyLane skill ZIP from the skill page on this site.
  2. 2Unzip into a skills folder. Extract it into ~/.claude/skills/ for personal use, or into .claude/skills/ inside a project.
  3. 3Or upload it in the Claude apps. Go to Settings, then Capabilities, then Skills, and upload the ZIP.
  4. 4Create a Python environment. Set up a dedicated environment with Python 3.11 or newer, NumPy 2 or newer, and the pinned PennyLane version.
  5. 5Ask for a task in plain language. Describe the circuit, algorithm or model you want and ask for checks against known values and classical baselines.
  6. 6Review the checks. Look at the value and gradient checks, the recorded seeds and versions, and the validation results before using any number.

What the PennyLane skill makes the agent do

Once installed, the agent follows a structured PennyLane workflow. It designs small parameterized quantum circuits, checks them against known analytic values and gradients, trains them with classical optimizers, and compares the results with classical baselines.

The skill also covers molecular energy estimates (VQE), QAOA optimization, and hybrid PyTorch or JAX models. It explains how to move a validated circuit to hardware provider plugins. It is a guide for doing this correctly, not a quantum computer, and its bundled examples use small synthetic problems.

Install the PennyLane skill in Claude

Download the ZIP file from the skill page on this site. Then choose one of these options.

For a personal setup, unzip the folder into ~/.claude/skills/. For a single project, unzip it into the .claude/skills/ folder inside that project. You can also upload the ZIP in the Claude apps under Settings, then Capabilities, then Skills.

The skill folder contains SKILL.md and seven reference files covering getting started, circuits, ML, chemistry, devices, optimization and advanced features.

  • Personal: ~/.claude/skills/
  • Project: .claude/skills/ inside your project
  • Claude apps: Settings, then Capabilities, then Skills, then upload the ZIP

Set up a Python environment for PennyLane

The skill recommends a dedicated environment so PennyLane and its dependencies do not mix with unrelated scientific packages. The source shows this setup using uv. You need Python 3.11 or newer and NumPy 2 or newer.

PyTorch or JAX is optional and only needed for the machine learning examples. Hardware provider plugins should be installed in separate environments, and they require provider credentials.

  • Python 3.11 or newer and NumPy 2 or newer are required
  • PyTorch or JAX is optional, for ML examples only
  • Hardware plugins need separate environments and provider credentials
uv venv --python 3.13 .venv-pennylane uv pip install --python .venv-pennylane/bin/python "pennylane==0.45.1"

Trigger the skill with natural requests

You do not need special syntax. Describe the task in plain language and say what you want checked. The skill is meant for variational quantum algorithms, quantum machine learning, simulator validation, and moving validated circuits to provider plugins.

If you ask for hardware-specific compilation or transpilation, the skill says to use qiskit or cirq instead. For open-system dynamics, it points to qutip.

  • Build a one-qubit PennyLane circuit, check its expectation value against cos(theta), then train it with gradient descent.
  • Set up a VQE workflow for a small molecule, and check particle number against a classical reference.
  • Solve a small MaxCut problem with QAOA and compare the result with enumerated small instances.
  • Build a hybrid PyTorch model with a PennyLane layer and evaluate it on held-out data against a classical baseline.
  • Take this validated circuit and tell me what would change before running it on a provider backend.

Know what the agent checks before trusting results

The workflow asks the agent to fix conventions first, such as feature ordering, Hamiltonian sign, or units and basis for chemistry. It then checks a known value and a gradient before training, and records the objective, seeds, ansatz shape and package versions.

Results are validated independently. For ML that means held-out examples and classical baselines, for VQE a particle-number check and a classical reference, and for QAOA enumerated small instances. The skill also warns that successful optimization on small local examples does not establish quantum advantage, molecular accuracy or hardware fidelity.

  • Fix conventions: feature ordering, Hamiltonian sign, units, charge, basis
  • Check a known value and gradient before training
  • Record seeds, ansatz shape and package versions
  • Validate against classical baselines and enumerated instances

Safety notes: scripts, network and credentials

The skill runs scripts and uses the network. Its allowed tools are Read, Bash and Python. Local simulation needs no credentials. Hardware jobs need provider credentials and network access.

The skill notes that authenticated hardware jobs were not executed during its review, so treat any hardware step as something to verify yourself. Read the scripts the agent proposes to run, and keep provider keys out of shared projects.

  • Local simulation: no credentials needed
  • Hardware: provider credentials and network access required
  • Review scripts before running them, especially anything that submits jobs

What people use it for

  • Teaching variational quantum algorithms with small, checkable one-qubit or two-qubit circuits.
  • Estimating a molecular energy with a VQE workflow and checking particle number against a classical reference.
  • Prototyping a hybrid quantum-classical classifier in PyTorch or JAX and comparing it with a classical baseline.
  • Running a QAOA MaxCut example on small instances and verifying the result by enumeration.
  • Preparing a validated circuit for a hardware provider plugin, with a note on what may differ on hardware.

Frequently asked questions

Is the PennyLane agent skill free to use?

The directory lists the skill under the MIT licence, but the SKILL.md file in the package says Apache-2.0. Check the licence file inside the downloaded folder before reusing it, and note that PennyLane itself is a separate installation.

What do I need to install before using the PennyLane skill?

You need Python 3.11 or newer and NumPy 2 or newer, plus the PennyLane version pinned in the install command. PyTorch or JAX is optional for machine learning examples, and hardware plugins need separate environments and provider credentials.

Where do I put the skill folder in Claude?

For personal use, unzip it into ~/.claude/skills/. For one project, put it in the .claude/skills/ folder inside that project. In the Claude apps you can upload the ZIP under Settings, then Capabilities, then Skills.

Can the PennyLane skill run on real quantum hardware?

It explains how to move validated circuits to hardware provider plugins, but running jobs on hardware needs provider credentials and network access. The skill notes that authenticated hardware jobs were not executed during its review, so check each hardware step yourself.

Should I use PennyLane or qiskit or cirq for my circuit?

Use PennyLane for variational algorithms, quantum machine learning and simulator validation. The skill says hardware-specific compilation or transpilation should use qiskit or cirq, and open-system dynamics should use qutip.

Does the skill prove my quantum model gives an advantage?

No. The skill warns that small local examples do not establish quantum advantage, molecular accuracy or hardware fidelity. For publication-level conclusions, you need independent checks beyond the skill.

New agent skills, repos and AI tools — every week

The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.

Our verdict

Use this skill if you are learning or prototyping variational quantum algorithms with PennyLane and want an agent that checks values, gradients and baselines as it works. Pick something else if you need hardware-specific compilation (use qiskit or cirq), open-system dynamics (use qutip), or claims of quantum advantage or chemical accuracy that must hold up to publication-level scrutiny.

Download the skill