pennylane
Skill by K-Dense-AI
Builds and differentiates PennyLane quantum circuits, hybrid PyTorch or JAX models, and molecular VQE and QAOA workflows. It is for researchers working on variational quantum algorithms and quantum machine learning.
Install pennylane
Built from the published package, never by AI.
git clone --depth 1 https://github.com/K-Dense-AI/scientific-agent-skills /tmp/scientific-agent-skills && mkdir -p ~/.claude/skills && cp -r /tmp/scientific-agent-skills/skills/pennylane ~/.claude/skills/pennylaneRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
git clone --depth 1 https://github.com/K-Dense-AI/scientific-agent-skills /tmp/scientific-agent-skills && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/scientific-agent-skills/skills/pennylane ~/.gemini/antigravity-cli/skills/pennylaneAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Skills can run scripts on your machine. Some need an API key: check the README.
About
This skill guides an AI assistant through building parameterized PennyLane quantum circuits and checking them before use. It targets stable PennyLane 0.45.1 and covers QNodes, gradients, optimization, and hybrid models with PyTorch or JAX. It also covers molecular VQE and QAOA workflows, with steps for validating results against classical references.
The skill is written for researchers and developers doing variational quantum algorithms, quantum machine learning, or simulator validation. It recommends checking known values and gradients first, recording seeds and package versions, and reporting uncertainty. For hardware-specific compilation it points to qiskit or cirq, and for open-system dynamics it points to qutip.
Written from the project's SKILL.md and checked against it.
What it can do
- Circuit buildingBuilds small analytic default.qubit circuits and separates the quantum function from the QNode.
- Gradient checksChecks values and gradients against analytic or finite-difference results before training.
- Quantum MLRuns hybrid classifier training with PyTorch TorchLayer or JAX, with feature scaling and evaluation.
- Molecular VQESets up chemistry workflows such as H2 UCCSD, with unit, particle sector and active space checks.
- QAOA and MaxCutCovers QAOA workflows, MaxCut sign handling and exact QUBO-to-Ising conversion.
- Noise and shotsIntroduces finite shots and noise, and reports uncertainty and decomposed resources.
- Device selectionDescribes simulators and provider plugin contracts, and how to choose an accessible backend.
What you need
- Python 3.11 or newer
- PennyLane 0.45.1 with NumPy 2 or newer
- Optional PyTorch, JAX or provider plugins in compatible environments
- Provider credentials and network access for hardware runs
Try asking
- Build a one-qubit PennyLane circuit and check its gradient against the analytic result
- Set up an H2 UCCSD VQE workflow with explicit units and particle sector checks
- Train a hybrid PyTorch quantum classifier and report held-out accuracy and a classical baseline
Good to know
- Local examples use small synthetic systems.
- Successful optimization does not establish quantum advantage, molecular accuracy or hardware fidelity.
- Plugin portability does not guarantee identical gates, measurements or gradients.
- Provider hardware, GPU, Catalyst and external chemistry backends were not run with authenticated jobs.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: skills/pennylane/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work
Inside the skill
Allowed tools: Read Bash Python
-
SKILL.md7 KB -
references/advanced_features.md8 KB -
references/devices_backends.md9 KB -
references/getting_started.md4 KB -
references/optimization.md7 KB
Show all 8 files
-
references/quantum_chemistry.md7 KB -
references/quantum_circuits.md5 KB -
references/quantum_ml.md6 KB
Alternatives to pennylane
All alternatives →Searches arXiv for scientific papers and preprints, extracts their metadata and abstracts, and downloads PDF or HTML full text. Suited to users who need research papers, literature or specific arXiv IDs.
Downloads AlphaFold predicted structures and PAE matrices for a UniProt ID, then reports pLDDT confidence, domain boundaries and disorder. Built for users who already have a UniProt accession.
Queries the QuickGO and Evidence & Conclusion Ontology REST API to map genes to Gene Ontology terms. Built for researchers doing functional annotation and GO hierarchy exploration.
Connects an AI assistant to Peloton to browse fitness classes, check live and archived schedules, and manage workouts. Built for Peloton users who want to plan rides from their assistant.
Queries NCBI Gene through the E-utilities and Datasets API. It helps researchers search genes by symbol or ID, retrieve gene details, and run batch lookups for annotation and functional analysis.
Prepares and launches nf-core/pacsomatic runs for matched tumor-normal PacBio HiFi data starting from unaligned BAM files. It generates samplesheets and pinned launch artifacts, then runs locally or submits to a scheduler.
Compare with literature-search-arxiv, alphafold-database-fetch-and-analyze or quickgo-database
pennylane: common questions
Does PennyLane need credentials to run?
Local simulation needs no credentials. Hardware runs require provider credentials and network access.
Which PennyLane version does this skill target?
The skill targets stable PennyLane 0.45.1 and states that the latest JAX may not be supported by this release.
When should I use a different skill instead?
For hardware-specific compilation the source points to qiskit or cirq, and for open-system dynamics it points to qutip.
How do I install pennylane?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is pennylane free?
The code is published under the MIT licence. The service it connects to may have its own pricing.
Is pennylane safe to use?
It scores 94 of 100. Grades: maintenance A, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to pennylane?
Similar skills: literature-search-arxiv, alphafold-database-fetch-and-analyze, quickgo-database, peloton.
