Pyqonvert User Documentation

The qonvert package is part of the HQS Quantum Libraries, which contain the modules alqorithms, qonvert, noise-mapper and the bath-mapper, as shown in Figure 1. Pyqonvert is the Python interface for the core qonvert package, which is written in Rust. quantumlibraries Figure 1: HQS Quantum Libraries

Pyqonvert is the HQS compiler package, which offers comprehensive functionality for quantum circuit and quantum program optimization. It decomposes circuits into a given set of gates, optimizes them for efficiency, and introduces noise to emulate the behavior of physical quantum computers. Additionally, pyqonvert provides routing capabilities to further enhance circuit performance.

Functionality

HQS's pyqonvert offers a range of classes designed to "convert" quantum circuits and quantum programs, each serving as a Converter with specific functionalities:

  • Gate Decomposition - enables the decomposition of single- and two-qubit gates into native gates supported by the quantum computing hardware.
  • Noise Insertion - facilitates the insertion of decoherence noise through qoqo's Pragma operations and introduces over-rotation noise via rotation gates. Note: qoqo is the open-source toolkit to represent quantum circuits by HQS Quantum Simulations.
  • Optimization - optimizes quantum circuits and quantum programs to enhance efficiency and performance.
  • Routing - provides routing capabilities to address the challenge of limited qubit connectivity in quantum computing hardware.

Using the library

Every Converter implements the convert method, offering a unified interface that takes as input

  • circuits or quantum programs
  • a qoqo.devices device
  • optionally, a noise model.

Output: The method ensures consistency and ease of use by returning the same type that was input—if a circuit is provided, a circuit is returned; if a quantum program is input, a quantum program is returned.

This straightforward design is powerful, enabling users to apply various conversions across circuits or programs with minimal code. For instance, the converters can be gathered in a list and called from within a for loop:

converters = [ ... optimizer, routers, decomposers, noise adders ... ]

for converter in converters:
    circuit = converter.convert(circuit, device, noise_models)

To see pyqonvert in action, refer to the examples.

API Documentation

HQS provides a comprehensive API documentation for all the functions availble in pyqonvert.