qnn

Build and train a Quantum Neural Network for supervised classification with angle-encoded PQCs.

30|2|Updated Apr 16, 2026
One-click install
npx skills add https://github.com/unitarylab/quantum-skills --skill qnn
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: qnn
Source: https://github.com/unitarylab/quantum-skills/tree/main/algorithms/quantum-machine-learning/qnn
Command: npx skills add https://github.com/unitarylab/quantum-skills --skill qnn

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires numpy, unitarylab, and includes scripts (resource) components.

What problem does it solve?

Enables building and training a Quantum Neural Network (QNN) for supervised classification tasks using parameterized quantum circuits.

Core Features & Use Cases

  • Feature-encoded PQCs: map classical features to quantum states via angle encoding.
  • Variational layers: per-qubit Rx/Ry/Rz rotations with entangling CNOTs to learn complex decision boundaries.
  • Training scaffold: provides a simplified loop to demonstrate learning and evaluation on labeled data (synthetic or real datasets).

Quick Start

Run the provided script to train the QNN on a synthetic binary classification dataset.

Frequently Asked Questions about qnn

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I train a quantum neural network for supervised classification?

To train a quantum neural network for supervised classification, use this Skill to build a parameterized quantum circuit with angle-encoded features and per-qubit rotations, then run the provided NumPy-based training loop on labeled data.

What is angle encoding in parameterized quantum circuits?

Angle encoding in parameterized quantum circuits is the process of mapping classical features to quantum states via rotations, which this Skill uses alongside variational layers with CNOT entanglement to learn complex decision boundaries.

Can I use this quantum neural network Skill on large datasets?

This quantum neural network Skill is applicable to small-to-moderate datasets, as it uses a lightweight training scaffold designed to explore angle-encoded PQCs and variational layers rather than scaling to massive data.

How do variational layers with CNOT entanglement work in a QNN?

Variational layers in a QNN apply per-qubit Rx, Ry, and Rz rotations combined with CNOT entanglement to learn complex decision boundaries, allowing the parameterized circuit to adapt during the supervised training process.

Do I need NumPy to run the quantum neural network training scaffold?

Yes, you need NumPy to run the quantum neural network training scaffold, because the workflow relies on a NumPy-based implementation compatible with UnitaryLab's QNNAlgorithm to execute the variational circuits.