Qadence 2 Platforms
Note
Qadence 2 Platforms is currently a work in progress and is under active development.
Please be aware that the software is in an early stage, and frequent updates, including breaking changes, are to be expected. This means that:
- Features and functionalities may change without prior notice.
- The codebase is still evolving, and parts of the software may not function as intended.
- Documentation and user guides may be incomplete or subject to significant changes.
Qadence 2 Platforms is a collection of functionalities that transforms Qadence IR into backend-specific data and constructors, to be executed by backend methods. It is not intended to be used directly by Qadence 2 users, but rather only those who need to implement new or extend existing backends, quantum instruction primitives, and compiler or backend directives, etc.
Installation
Note: it is advised to set up a python environment before installing the package.
To install the current version, there is currently one option:
Installation from Source
Clone this repository by typing on the terminal
Go to qadence2-platforms
folder and install it using hatch:
and run hatch
to create or reuse the project environment:
Description
Platforms
This package should not be used directly by the user. It is used to convert Qadence IR into backend-compatible data, and to execute it with extra options (provided by the compilation process, either on Qadence 2 expressions or Qadence 2 core).
Qadence Intermediate Representation (IR)
Qadence 2 expressions is being compiled into an IR comprised of both quantum and classical operations.
Platforms API
The backend
module exposes a single compile_to_backend
function which accepts a Model
and a string denoting the backend
.
Platforms Backend
Each submodule under backend
is expected (1) to translate the IR
data into backend-compatible data, (2) to provide instruction conversions from IR
to backend, (3) to handle the storage and embedding of parameters, and (4) to implement execution process for run
, sample
and expectation
.
Example
Check the Example tab for usage example of this package.
Contributing
Before making a contribution, please review our code of conduct.
- Submitting Issues: To submit bug reports or feature requests, please use our issue tracker.
- Developing in qadence 2 platforms: To learn more about how to develop within
qadence 2 platforms
, please refer to contributing guidelines.