A framework for algorithm deployment on cloud-based quantum computers

Sukin Sim, Yudong Cao, Jonathan Romero, Peter D. Johnson, Alán Aspuru‐GuzikarXiv 2018 · DOI

Abstract

In recent years, the field of quantum computing has significantly developed in both the improvement of hardware as well as the assembly of various software tools and platforms, including cloud access to quantum devices. Unfortunately, many of these resources are rapidly changing and thus lack accessibility and stability for robust algorithm prototyping and deployment. Effectively leveraging the array of hardware and software resources at a higher level, that can adapt to the rapid development of software and hardware, will allow for further advancement and democratization of quantum technologies to achieve useful computational tasks. As a way to approach this challenge, we present a flexible, high-level framework called algo2qpu that is well-suited for designing and testing instances of algorithms for near-term quantum computers on the cloud. Algorithms that employ adaptive protocols for optimizations of algorithm parameters can be grouped under the umbrella of "adaptive hybrid quantum-classical" (AHQC) algorithms. We demonstrate the utility of algo2qpu for near-term algorithm development by applying the framework to implement proof-of-principle instances of two AHQC algorithms that have applications in quantum chemistry and/or quantum machine learning, namely the quantum autoencoder and the variational quantum classifier, using Rigetti Computing's Forest platform.

Introduction

The current Noisy Intermediate-Scale Quantum (NISQ) era offers cloud-based access to quantum processors (QPUs), yet these devices remain constrained by noise and limited qubit connectivity. Moreover, the software ecosystem is fragmented, creating a "deployment gap" between abstract algorithm design and hardware execution. Heuristic algorithms, which require iterative tuning through a tight feedback loop between classical optimizers and quantum hardware, are particularly challenging to deploy. To address this, we introduce algo2qpu, a modular framework designed to bridge this gap by providing a stable, hardware-agnostic workflow for "adaptive hybrid quantum-classical" (AHQC) algorithms.

The algo2qpu Framework

The algo2qpu framework follows a systematic six-step workflow to transition from an algorithmic concept to a physical result:

  1. Selection of Algorithm: Defining high-level objectives, such as energy minimization or fidelity maximization.
  2. Definition of Instance: Selecting specific parameters and abstract circuit structures.
  3. Compilation: Mapping abstract qubits to physical ones and decomposing gates into the QPU's native instruction set.
  4. Execution: Running compiled circuits on either a Quantum Virtual Machine (QVM) or a physical QPU.
  5. Postprocessing: Gathering measurement outcomes and calculating the objective function.
  6. Classical Feedback: Updating parameters via a classical optimizer and looping back to refine the instance or compilation.
The six-step workflow of the algo2qpu framework for deploying quantum algorithms.

Implemented using Rigetti Computing’s Forest platform, the framework leverages pyQuil for circuit generation and grove for algorithmic building blocks, ensuring a streamlined deployment process.

Experimental Results and Discussion

The utility of algo2qpu was demonstrated through the deployment of two AHQC algorithms on Rigetti’s 8-qubit "Agave" processor.

Quantum Autoencoder (QAE)

The QAE aims to compress quantum information from multiple qubits into a smaller set. We compared two training modes: "full-training" (using the entire encoder-decoder circuit) and "halfway-training" (measuring only the "trash" qubits after encoding).

Implementation and results of the Quantum Autoencoder using algo2qpu, comparing full and halfway training modes.

Results indicated that "halfway-training" was more effective on physical hardware. Despite the theoretical advantages of the full circuit, the reduced depth of the halfway-training circuit accumulated significantly less noise, leading to better convergence and results closer to noiseless simulations.

Variational Quantum Classifier (VQC)

The VQC was tested on a synthetic "XOR" dataset—a classic non-linearly separable benchmark. The framework successfully enabled the VQC to learn the XOR boundary. Contour plots from both the QVM and the physical QPU showed that the trained classifier's decision boundaries closely matched the expected XOR pattern, whereas untrained versions failed to categorize the data correctly.

Conclusion and Future Outlook

While algo2qpu successfully demonstrates proof-of-principle deployments, several areas for improvement remain. Current qubit mapping is performed manually based on gate fidelities; future versions will integrate hardware-aware compilers for dynamic optimization. Additionally, reducing communication latency between classical optimizers and remote QPUs is critical for scaling. As hardware matures, the modular nature of algo2qpu will support increasingly complex experiments, furthering the democratization of quantum computing resources.

Summary updated

BibTeX
@misc{sim2018framework,
  author = {Sukin Sim and Yudong Cao and Jonathan Romero and Peter D. Johnson and Alán Aspuru‐Guzik},
  title = {{A framework for algorithm deployment on cloud-based quantum computers}},
  year = {2018},
  eprint = {1810.10576},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1810.10576},
}
Figure