Variational Quantum Linear Solver
Overview
Variational Quantum Linear Solver
This PennyLane demo implements the Variational Quantum Linear Solver (VQLS), a near-term algorithm for solving systems of linear equations of the form Ax = b on a quantum computer without the deep circuits that the textbook HHL algorithm requires. Solving linear systems is ubiquitous across science and engineering, and VQLS recasts it as a variational optimization: a parameterized circuit prepares a candidate solution state, and a cost function measures how far applying the matrix A to that state is from the (normalized) target vector b, so minimizing the cost drives the circuit toward the solution. The tutorial expresses the matrix A as a linear combination of unitaries and the vector b as a state-preparation circuit, builds the cost function from Hadamard-test-style overlap measurements in PennyLane, and optimizes the parameterized solution circuit with gradient-based optimization. It walks through constructing the problem, evaluating the variational cost, and verifying the recovered solution against the classical answer. By trading deep coherent circuits for a shallow variational loop, VQLS shows a practical, near-term route to quantum linear algebra, presented hands-on in PennyLane.
Run it
pip install -r requirements.txt
python demo.py
Source and license
Imported from demonstrations_v2/tutorial_vqls/demo.py in PennyLaneAI/demos at c52c0abeb5122218aa96b38eea848864cce7323f, under the Apache License 2.0. Original authors: Xanadu and the PennyLane community. The upstream LICENSE is included alongside this example.
This entry was created automatically from publicly available records. QCR links to public sources and only stores repository content where the license permits redistribution.
Publication
doi:10.48550/arxiv.1909.05820Carlos Bravo-Prieto, Ryan LaRose, M. Cerezo, Yigit Subasi, Lukasz Cincio, Patrick J. Coles
Versions
Cite all versions? Use the base QCR ID to always reference the latest version of this entry.
Join the Discussion
Comments (0)
No comments yet. Be the first to share your thoughts!