DOI: 10.1145/3821430 ISSN: 2643-6809
TREV: Python Library for Efficient Implementations of Variational Quantum Algorithms for Optimization using Tensor Networks
Keun Jun Park, Dheeraj Peddireddy, Vaneet Aggarwal
Variational Quantum Algorithms (VQAs) are a central class of hybrid quantum–classical methods for optimization on noisy intermediate-scale quantum (NISQ) hardware. Their scalability is constrained by the cost of gradient evaluation via the parameter-shift rule, whose complexity grows with both the number of circuit parameters and Pauli terms in the Hamiltonian, quickly dominating runtime for deep circuits or large qubit counts. We present
TREV
(Tensor-Ring Evaluated Variational algorithms), a Python library that accelerates VQA simulation through
batched parameter evaluation
within
tensor-ring state representations
. By amortizing contraction and sampling costs across multiple parameter shifts, TREV exploits GPU-parallel tensor contractions to achieve substantial runtime reduction with tunable memory–throughput trade-offs. Implemented in PyTorch, the framework supports both deterministic contraction-based and stochastic sampling-based evaluations. Benchmarks on Max-Cut, Traveling Salesperson Problem (TSP), and molecular ground-state energy estimation (H
2
, H
4
, LiH, BeH
2
) show comparable accuracy and up to 97% runtime reduction over sequential evaluation, while outperforming PennyLane, TensorCircuit, and Qiskit in runtime scalability. The chemistry benchmarks further demonstrate that TREV handles arbitrary Pauli Hamiltonians beyond QUBO formulations, broadening its applicability to quantum chemistry.