Skip to content
Trevor Grant edited this page Aug 16, 2024 · 2 revisions

QuMat Documentation

Welcome to the QuMat library documentation. This library provides a unified interface to work with multiple quantum computing backends (Amazon Braket, Cirq, Qiskit). Here, you will find detailed instructions and explanations for the usage of each component of the QuMat library. Below is the structure:

Introduction

QuMat is an abstraction layer that makes it easier to create and execute quantum circuits across different quantum backends. This allows developers to write their code once and be able to run it on different quantum computing platforms without making significant changes.

Installation

pip install -U poetry
poetry install
pip install git+https://github.com/apache/mahout.git@main

Getting Started

Here is a simple example to get you started with QuMat:

from qumat.qumat import QuMat  
  
backend_config = {  
    'backend_name': 'qiskit',  # Choose between 'amazon_braket', 'cirq', 'qiskit'  
    'backend_options': {  
        'simulator_type': 'qasm_simulator',  
        'shots': 1024  
    }  
}  
  
qumat_instance = QuMat(backend_config)  
qumat_instance.create_empty_circuit(2)  
qumat_instance.apply_hadamard_gate(0)  
qumat_instance.apply_cnot_gate(0, 1)  
result = qumat_instance.execute_circuit()  
print(result)