vqc

Train a variational quantum classifier on tabular data with parameter-shift gradients.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

Classifies tabular data by leveraging a Variational Quantum Classifier (VQC) trained with data re-uploading and the Parameter Shift Rule to produce interpretable class logits from a small quantum circuit.

Core Features & Use Cases

  • Data re-uploading encoding of 4 features on 4 qubits per layer to preserve input information across depth.
  • Trainable Ry rotations with a CNOT ladder enabling expressive quantum circuits for classification.
  • Exact gradient estimation via the Parameter Shift Rule, enabling gradient-based optimization with Adam.
  • Demonstrations on the Iris dataset (4 features, 3 classes) and multi-layer quantum-classical training workflows.

Quick Start

Run the included script to train the VQC on Iris data and report the final test accuracy.

Frequently Asked Questions about vqc

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

FAQPage Schema
How do I train a variational quantum classifier on the Iris dataset?

Data re-uploading encodes 4 features onto 4 qubits per layer, using trainable Ry rotations and a CNOT ladder to preserve input information and increase circuit depth for classification tasks.

How does the parameter shift rule work for quantum classification training?

The parameter shift rule provides exact gradient estimation for the quantum circuit, enabling gradient-based optimization with Adam to update trainable rotations during the classification training workflow.

Can I use this variational quantum classifier for tabular data beyond the Iris dataset?

This variational quantum classifier targets Iris-like datasets or small benchmarks with 4 features and 3 classes, supporting multi-layer architectures for demonstrations of training, evaluation, and circuit export.

What Python scientific stack do I need for quantum classification training?

Quantum classification training requires a Python scientific stack including Torch, NumPy, and scikit-learn for data handling and optimization, plus a quantum circuit backend to execute gates.

What are the limitations of using a 4-qubit variational quantum classifier for supervised classification?

A 4-qubit variational quantum classifier is limited to small benchmarks like the Iris dataset, as 4 qubits restrict scalability for large tabular datasets while focusing on circuit expressiveness and exact gradient estimation.