aqc

Explains and demonstrates UnitaryLab's adiabatic quantum linear-system solver with statevector simulation.

18|3|Updated Aug 14, 2026
One-click install
npx skills add https://github.com/unitarylab/quantum-practices --skill aqc-unitarylab
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: aqc
Source: https://github.com/unitarylab/quantum-practices/tree/main/algorithms/linear-systems/aqc
Command: npx skills add https://github.com/unitarylab/quantum-practices --skill aqc-unitarylab

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve? It helps you understand, run, debug, and reimplement the UnitaryLab Adiabatic Quantum Computing (AQC) solver for small quantum linear-system problems, including Householder state preparation, SVD block encoding, adiabatic schedules, and post-selection. ## Core Features & Use Cases - Guided execution: Run the packaged AQCAlgorithm with deterministic inputs, automatic step selection, and structured return fields like residual norm and post-selection amplitude. - Debugging support: Diagnose condition-number, normalization, post-selection, direction-error, and scale-conversion issues using documented checkpoints. - Reimplementation guidance: Follow a theory-to-code mapping and a minimal manual implementation built on unitarylab.Circuit and unitarylab.Register. - Use Case: Ask how the AQC solver prepares |b> with a Householder transform and post-selects the five-ancilla register, then run the n=2 example and inspect the residual and fidelity. ## Quick Start Ask the assistant to run the UnitaryLab AQC solver with n=2 and automatic step selection, then explain the residual and post-selection results.

Frequently Asked Questions about aqc

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

FAQPage Schema
How do I run the UnitaryLab AQC linear-system solver?

Import AQCAlgorithm from unitarylab_algorithms and call run with parameters like n=2, T=0 for automatic step selection, p=1.4, and a backend such as torch. The result dictionary includes the quantum solution, classical solution, residual norm, and post-selection amplitude.

What is the AQC algorithm for solving linear systems?

AQC solves Ax=b by preparing |b> with a Householder transform, block-encoding a normalized matrix A via SVD, and evolving under a discretized adiabatic schedule. Post-selecting the ancilla register yields a state proportional to the solution direction, which is then rescaled classically.

What problem sizes can the AQC solver handle?

The solver targets 1 to 6 system qubits, meaning dense matrices up to dimension 64. It is an educational statevector solver, not a scalable fault-tolerant QLSP, so practical examples should start with n=1 or n=2.

Why does AQC post-selection give a near-zero amplitude?

A near-zero post-selection amplitude usually means the adiabatic step count T is too small for the problem's condition number. Increase T or reduce n; with T=0 the source automatically selects ceil(10*kappa) rounded up to an even number.

Why is the AQC residual large even when the direction error is small?

A good direction with a large residual indicates a scaling problem rather than an evolution failure. Check the normalization factors a_scale and b_scale and the internal least-squares scale factor used to reconstruct the original-system solution.