Researchers from Origin Quantum Computing Technology and the Institute of Artificial Intelligence have created PyQLAS, a new quantum-classical hybrid library designed to solve complex linear systems. The library uniquely allows developers to control how computation is divided between quantum and classical resources, rather than imposing a fixed structure. PyQLAS operates consistently across simulators and real superconducting processors, offering a versatile tool for tackling large-scale engineering problems.
PyQLAS: Hybrid Quantum-Classical Linear System Solver
PyQLAS, a new Python library, allows for the solving of linear systems by deliberately apportioning computation between quantum processors and classical hardware. This design choice addresses a key limitation of current quantum algorithms, which, while theoretically efficient, require careful resource management to outperform classical methods on existing devices. The library’s architecture centres around a variational core nested within a variational solver, an outer residual iteration, and a Krylov-subspace projection; this three-layer structure enables flexible distribution of computational load.
The library’s design incorporates two independent levels of preconditioning, a dimension alignment process, and checkpointing capabilities, all designed to optimise performance and stability. A single solve, written to interface with PyQLAS, functions consistently across different computational environments, including exact state-vector simulators, local samplers and actual superconducting processors. This versatility streamlines development and testing, allowing researchers to move smoothly between simulation and hardware execution.
Meng-Han Dou of Origin Quantum Computing Technology (Hefei) Co., Ltd. and colleagues built the library to address the need for a productized approach to hybrid quantum-classical computation. Using this test system embedded within a classical Newton iteration, the library achieved convergence to the specified tolerance, reproducing the classical reference solution to within 2.3× 10^(-8) per unit in voltage magnitude.
Zhao-Yun Chen of the Institute of Artificial Intelligence notes that the library’s interface “reflects a deliberate division: the device runs a bounded variational subroutine, while the classical host owns the iteration and the resource budget.” The library is built on pyqpanda3 and exposes nine public entry points, including a stateful executor and a variational driver.
Variational Core Design for Fixed Circuit Width
PyQLAS employs a nested solver architecture, building three layers around a single variational core to manage computational load. This deliberate apportionment of tasks is an exposed design parameter available to developers, not a fixed assumption within the library. The library’s structure extends beyond the core solvers to include tools for preconditioning at two independent levels, dimension alignment, checkpointing and device-budget control.
A single computational solve, built to interface with a quantum system, functions identically whether run on an exact state-vector simulator, a local sampler, or a real superconducting processor. The library’s approach is not to introduce another variational algorithm, but to productize a division of labour between quantum hardware and classical computation.
The nested solver layers share the same variational core, meaning a user can progress from a single solve to residual correction and then to Krylov projection without altering the quantum subroutine’s circuit width. This allows the classical host to absorb the increasing computational demands as the problem scales. “Its contribution is not another variational algorithm but a productized division of labour between the quantum device and the classical host,” the authors state, highlighting the library’s focus on practical implementation and resource management.
Nested Solver Layers for Classical-Quantum Load Balancing
This design prioritises maintaining a fixed circuit width on the quantum side, shifting computational demands to the classical host as problem size increases, and enabling elastic rebalancing of the quantum and classical loads. The library achieves this through nested solver layers built around a single variational core, a structure that allows for flexible apportionment of tasks without requiring users to redefine their approach. Independent preconditioning occurs at two levels within PyQLAS, further refining the distribution of computational effort.
The outer preconditioner transforms the initial system, reducing its condition number and potentially increasing its dimension to meet solver requirements. This dual-level preconditioning, coupled with options for device and directory management, allows multiple solvers to share a single quantum device and budget, or to checkpoint progress for later resumption. The library’s architecture is designed to minimise the cognitive load on the user, presenting a small, manageable interface despite the complexity of the underlying operations.
IEEE 118-Bus Power Flow Validation & Accuracy
This level of precision, attained within a classical Newton-Raphson iteration, demonstrates the library’s ability to reproduce established results by using quantum computation. in voltage magnitude and 3.4× degrees in voltage angle. The library’s architecture allows for solutions to remain consistent regardless of the underlying hardware. This hardware independence is a key feature, enabling a smooth transition from testing and development to practical deployment.
The design prioritises a stable interface, shielding users from the complexities of hybrid quantum-classical implementation. The library is presented as a reusable engineering component, rather than simply a demonstration of a new algorithm.
Two-Level Preconditioning for Improved System Conditioning
PyQLAS employs two distinct levels of preconditioning to enhance the stability and efficiency of linear solves, addressing challenges related to problem scaling and convergence. The inner preconditioning layer is integral to the solver itself, selected during its construction with an integer parameter, and directly modifies the operator minimized by the variational core. This contrasts with the outer preconditioning function, a purely classical tool invoked before solver instantiation, which operates on the entire system supplied for solution and remains stateless.
The outer preconditioning process involves three sequential operations designed to improve the system’s conditioning without altering the solution. First, an incomplete LU factorisation is applied, reducing the condition number. This is followed by rescaling both sides of the equation by the median singular value of the factorised matrix, further refining the system.
Finally, the dimension is increased to the nearest power of two through padding with a decoupled identity block, ensuring compatibility and potentially improving solver performance. Systems already possessing a power-of-two dimension can bypass this final step, or undergo it solely for conditioning benefits. Testing revealed a strong correlation between preconditioning and successful solution attainment.
The library’s design acknowledges that simply replacing a problem with a reduced-order surrogate can alter the solution, necessitating a focus on maintaining problem fidelity alongside computational efficiency. This emphasis on repetition, scale, conditioning, and verifiability defines the requirements for a practical linear-solver library. PyQLAS directly addresses these needs through its carefully constructed preconditioning scheme and nested solver architecture.
QTask and QMachine: PyQLAS Interface Overview
The PyQLAS library distinguishes itself through its two-object interface, QTask and QMachine, which abstracts the underlying quantum backend, allowing a single computational solve to run without modification across different hardware platforms. QTask is an immutable description of the quantum workload, encapsulating circuits and their designated qubit allocation, while QMachine functions as the stateful executor responsible for running those tasks and tracking performance metrics. Beyond the core execution layer, PyQLAS offers two key control mechanisms: solver sharing and checkpointing.
A solver can be configured to use a shared QMachine, enabling multiple solvers to operate on the same device and within a unified resource budget. The library supports checkpointing by allowing solvers to save their state to a designated directory, facilitating the resumption of calculations from a specific point in time.
This feature is particularly valuable for long-running simulations or when dealing with limited quantum resources, as it mitigates the risk of losing progress due to hardware interruptions or budgetary constraints. The architecture, as described in the paper, moves work to the classical host to rebalance loads elastically for both the problem and the device. The library’s nested solver layers, VQSolver, IVQSolver and GVQSolver, build upon a central variational core, progressively adding classical outer loops to refine the solution.
VQSolver focuses on optimizing an ansatz, while IVQSolver incorporates an outer iteration on the residual, and GVQSolver projects the solution onto a subspace of fixed dimension. The framework’s design prioritises a deliberate division of labour, with the quantum device handling the bounded variational subroutine and the classical host managing the overall iteration and resource allocation. The library’s nine public entry points, including the Preconditioner function, further enhance its versatility and control over the linear system solving process.
Dimension Alignment & Backend Portability in PyQLAS
This versatility addresses a critical gap in existing quantum linear solvers, many of which are restricted to specific hardware or remain as limited prototypes. The library’s design prioritises portability, moving beyond algorithm-centric tools to deliver a stable component suitable for engineering workflows. Beyond the core execution layers, PyQLAS incorporates features designed to manage the practicalities of hybrid quantum-classical computation. Two independent levels of preconditioning are implemented alongside dimension alignment, a process of adjusting problem dimensions to a power of two.
This alignment is not merely an optimization. It is a key element in enabling efficient execution on quantum hardware, as the library’s variational solver uses a fixed subspace dimension of four, requiring only two qubits regardless of system size. The results demonstrate that the library can handle realistically sized and conditioned problems.
The library’s architecture is designed to absorb the growth of the problem on the classical host, while maintaining a fixed circuit width for the quantum subroutine. This deliberate apportionment of computational effort is a defining characteristic of PyQLAS, differentiating it from single-layer variational linear solvers and fault-tolerant tools with demanding resource requirements. The authors state, highlighting its intended role as a practical component in larger simulations. The combination of features, preconditioning, dimension alignment, checkpointing and backend portability, positions PyQLAS as a tool for bridging the gap between theoretical quantum algorithms and real-world engineering applications.
Resource Control & Device Budget Management
PyQLAS incorporates a two-tiered system for managing quantum resources, allowing a single quantum machine to be shared across multiple solvers and budgets. This contrasts with existing quantum computing platforms that primarily focus on circuit execution and job management, leaving the assembly of solvers and resource controls to the user. PyQLAS implements budget control mechanisms, including task-count limits and device-time limits, to ensure safe and unattended operation on real quantum devices.
A task-count limit prevents further submissions once a predefined limit is reached, while a device-time limit reports the total execution time after the fact, preserving the results even if the time limit is exceeded. Validation of the library demonstrated that the quantum resource consumption remains independent of the system’s order, with circuits using only two qubits regardless of whether the solved block is of order 181 or 256.
The entire solve, in one test case, consumed 2492 circuits, highlighting the efficiency of the approach. The library’s architecture also ensures that the Jacobian matrix, even when of order 181, never reaches the quantum device in any other form. The elapsed time of the GVQSolver calls, covering both machine time and library overhead, provides a comprehensive measure of the computational cost.
👉 More information
🗞 PyQLAS: A Quantum-Classical Hybrid Solver Library for Linear Systems
✍️ Meng-Han Dou, Teng-Yang Ma, Chuang-Chao Ye and Guo-Ping Guo (Origin Quantum Computing Technology (Hefei) Co., Ltd., Hefei, China); Zhao-Yun Chen (nstitute of Artificial Intelligence, Hefei Comprehensive National Science Center, Hefei, China)
🧠 ArXiv: https://arxiv.org/abs/2610.41317




See today’s quantum computing news on Quantum Zeitgeist for the latest breakthroughs in qubits, hardware, algorithms, and industry deals.
