OriginQ Cloud

VQNet SKILL Library

Make Your AI a Quantum Machine Learning Expert, generating trainable code with one sentence

The skill library has been fully open-sourced. Click to go: GithubGithub

SKILL Overview

VQNet Quantum Machine Learning Skill Library

Quantum Machine LearningDifferentiable Quantum LayerModel Training & TuningQuantum-Classical HybridDistributed Training

It is a skill package that "injects a quantum machine learning engine" into the AI assistant. Once loaded, your AI assistant learns quantum machine learning and produces trainable code with no extra configuration: just describe your task in natural language, and it can handle quantum tensor computing, build quantum circuits and classical neural networks, and write variational quantum classifiers, while also wrapping quantum circuits into differentiable quantum layers, covering the full workflow of code generation and methodology guidance from building and training quantum-classical hybrid models all the way to real-device deployment.

Capability Scope

Through loading the VQNet Quantum Machine Learning SKILL Library, AI can help you complete the following tasks:

Capability DomainSpecific Content
Quantum Tensor ComputingQTensor autodiff tensors, dtype system, GPU acceleration, CPU/GPU device management
Classical Neural NetworksLinear, Conv2D, BatchNorm, LSTM layers; loss functions & optimizers; consistent with mainstream ML frameworks
Quantum Circuit ConstructionQMachine quantum VM, Hadamard, RX, RY, RZ, CNOT gates, complex circuit composition & measurement
Quantum Layer EncapsulationQuantumLayer, QuantumBatchAsyncQcloudLayer, NoiseQuantumLayer, QuantumLayerAdjoint
Variational Quantum CircuitsBuilt-in autodiff simulation, parameterized circuits, hardware-efficient ansatz, amplitude/angle embedding, QNG & QNSPSA optimizers
Quantum Information AnalysisProbability measurement, expectation values, quantum entropy, mutual information
QML Algorithm ApplicationsQuantum classifiers, QVC, QDRL, Quanvolution, quantum-classical hybrids (CNN + QNN)
Distributed TrainingMPI multi-process CPU training, NCCL GPU communication, multi-node, pipeline/tensor parallel, ZeRO optimizer
PyTorch BackendSeamless torch backend switch; state-vector circuits (sv.torch) & tensor-network circuits (tn.torch)
LLM Operators & Fine-TuningScaled softmax family, top-k/top-p/min-p sampling, fused_moe MoE operator, trl fine-tuning losses
Quantum LLMquantum-llm with Llama Factory for VQC-based LLM fine-tuning
Real-Device SupportWorks with quantum programming MCP for device status query, task preparation & submission

Usage Method

This SKILL supports the following installation methods:

Import Folder / Compressed Package

Directly import the SKILL folder or .zip package in the client to complete SKILL installation.

Manually Place to Specified Path

Copy the SKILL folder to the corresponding skills directory of the tool to complete SKILL installation.

One - click Configuration Script

Execute the one - click configuration script to quickly complete MCP service configuration and SKILL synchronization installation in the tool.

Note: If you find the above installation methods difficult, you can also send the SKILL folder to AI and tell AI: Help me install this SKILL

Specific Installation Steps:

Method 1Directly Import Folder / Compressed Package
Most AI Coding tools support direct import of SKILL folders or .zip packages:
Click to download .zip package(We periodically update. If issues occur, redownload the latest version or visit Github to check.)

Open the tool's settings page, find the relevant entry for SKILL settings (names vary by tool, such as “Skills”, “Manage SKILL”, etc.), import the SKILL folder and save to enable.

Taking CodeBuddy as an example:

1

Open the CodeBuddy settings page

2

Select "User SKILL" or "Project SKILL" as needed

3

Choose the pyvqnet-skills folder and confirm

4

Click "Skills"

5

Click "Import SKILL"

Method 2Manually Place to Specified Path

Copy the pyvqnet-skills folder to the corresponding tool's skills directory, restart or refresh the tool to take effect.

When installing SKILL in local AI Coding tools, it is usually divided into global skills and project skills. The common tool installation paths are as follows:

ToolUser/Global Skills DirectoryProject Skills Directory
OpenCode~/.config/opencode/skills/<project>/.opencode/skills/
Claude Code~/.claude/skills/<project>/.claude/skills/
Gemini CLI~/.gemini/skills/<project>/.gemini/skills/
CodeBuddy~/.codebuddy/skills/<project>/.codebuddy/skills/
Cline~/.cline/skills/Global Only
Note: Web - based AI tools usually do not involve local directories. You can import folders or .zip packages in the platform's Skills management interface.
Method 3One - click Configuration Script
If you are familiar with script execution and find manual MCP configuration and SKILL installation troublesome, we provide a one - click configuration script:
Click to download prepare_qpanda3_ai_kits.py(We periodically update. If issues occur, redownload the latest version.)

It can help you automatically complete MCP configuration and SKILL installation.

1
Prerequisites
What you needVersion requirementsDescription
Python≥3.11Python needs to be installed on the computer
UV—A Python package management tool, the script uses it to automatically handle dependencies
2
Supported tools

Currently, a variety of AI coding tools are supported: OpenCode, Claude Code, Codex, Gemini CLI, CodeBuddy, Cline, and others; you may also run the script below to check the supported list in real time, which we update periodically.

uv run prepare_qpanda3_ai_kits.py list
3
How to Use
1
Basic Usage: One - click Configuration

Open the terminal, cd to the directory where the script is located, and run the following command to complete:

uv run prepare_qpanda3_ai_kits.py prepare <Tool Name> -k <Your API_Key>

For example, if you are using CodeBuddy, after running the following command, the script will automatically help you write the MCP server connection information into CodeBuddy's configuration file, and then install the VQNet quantum machine learning skill package to CodeBuddy's skill directory:

uv run prepare_qpanda3_ai_kits.py prepare codebuddy -k <Your API_Key>

The corresponding to the 6 AI coding tools in the command line is as follows:

Tool NameCommand Line Parameter Name
OpenCodeopencode
Claude Codeclaude
Codex (OpenAI)codex
Gemini CLIgemini
CodeBuddycodebuddy
Clinecline
2
Advanced Usage: Project - level vs Global - level

Script supports two installation levels:

LevelSpecific Content
Global (Default)uv run prepare_qpanda3_ai_kits.py prepare <Tool Name> -k <Your API_Key>
Project - leveluv run prepare_qpanda3_ai_kits.py prepare <Tool Name> -k <Your API_Key> -p
3
Lazy Usage: Automatic Detection

If you are unsure of which tools are installed, or wish to configure all installed tools in one go, execute the command below without specifying a tool name. The script will automatically scan your system, identify installed supported AI tools, and configure them individually:

uv run prepare_qpanda3_ai_kits.py prepare -k <Your API_Key>
4
Uninstall

If you no longer need it in the future and want to clean it up, it's very simple:

To uninstall the configuration of a specific tool:

uv run prepare_qpanda3_ai_kits.py uninstall <Tool Name>

To uninstall the configuration of all tools:

uv run prepare_qpanda3_ai_kits.py uninstall
5
View Help

If you forget how to use the command at any time, run the following command to view all commands and parameter descriptions:

uv run prepare_qpanda3_ai_kits.py help

Verification method

Under most circumstances, the SKILL does not require manual invocation after installation. When you raise similar questions in AI conversations, the AI will automatically activate this SKILL:

AI Trigger Example

Automatically identify and activate SKILL

In the conversation, type the following questions, and the AI will automatically call this SKILL:

"Build a quantum neural network (QNN) model with VQNet"
"Write a variational quantum circuit (VQC) using VQNet"
"Build a quantum fully-connected layer with VQNet"
"How do I implement parameter gradient computation for a quantum layer in VQNet?"
"How do I build a quantum convolution layer (QConv) with VQNet?"
If the AI can output complete and standard pyvqnet code, it means the SKILL has taken effect.

Typical Code Example

AI - generated pyvqnet code example

The following is a standard pyvqnet code example generated with AI assistance:

from pyvqnet.qnn.pq3.quantumlayer import QuantumLayer
from pyvqnet.qnn.pq3.measure import ProbsMeasure
from pyvqnet.tensor import QTensor
import pyqpanda3.core as pq

def circuit(input, param):
cir = pq.QCircuit()
cir << pq.H(0) << pq.CNOT(0, 1)
cir << pq.RY(0, input[0])
cir << pq.RZ(1, param[0])

No Install, Try Now

Origin Brain comes with the full VQNet SKILL Library built in — no installation needed, just one prompt to get started.

Experience the Complete Skill Library Without Installation

Experience complete VQNet quantum machine learning programming without installation — an on-desktop workflow designed for developers, researchers, and professional users.

  • Open Origin Brain, chat directly
  • Built-in complete VQNet quantum machine learning skill library, no configuration needed
  • Generate quantum machine learning code with a single sentence