Introduction

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.

HQS Quantum Libraries - Qonvert

Figure 1: HQS Quantum Libraries - Qonvert

qonvert 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, qonvert provides routing capabilities to further enhance circuit performance.

Applications

qonvert can be used to compile a Circuit or QuantumProgram to make it compatible with a chosen device whether it is for simulation purposes or to run on real quantum computing hardware. The compilation routine provides a range of functionality, such as gate decomposition, circuit optimization, noise insertion and routing. This last compilation step is necessary to account for limited connectivity, to increase performance and to properly represent characteristics of the quantum computing hardware.

Getting started

The package can be installed with the following command:

hqstage install pyqonvert

Linux and MacOS only

Please note that the HQS Quantum Libraries are currently only supported on Linux and MacOS.

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 qonvert in action, refer to the examples.

Features

HQS's qonvert 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.

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