MyQLM comes with bindings towards various python based frameworks:
Language | to QLM | From QLM |
---|---|---|
Qiskit | Yes | Yes |
openqasm | Yes | No |
pyquil | Yes | Yes |
projectq | Yes | No |
cirq | Yes | Yes |
This document presents some examples and explanations, for further information about usage, refer to the linked tutorials.
This is the structure of the library.
├── cirq
│ ├── algorithms.py
│ ├── converters.py
│ └── providers.py
│
├── openqasm
│ ├── oqasm_routine.py
│ ├── qasm_lexer.py
│ └── qasm_parser.py
├── projectq
│ ├── algorithms.py
│ ├── converters.py
│ └── providers.py
├── pyquil
│ ├── algorithms.py
│ ├── converters.py
│ └── providers.py
└── qiskit
├── algorithms.py
├── converters.py
└── providers.py
Besides openqasm which is different because it is just a compiler, the different libraries offer circuit conversions (converters.py
), qpu and other wrappers for seamless integration (providers.py
) and some ready to use algorithms mostly for testing purposes, generally taken from the corresponding library of each language (algorithms.py
).
Currently only pyquil and qiskit have providers, because they're the only ones who offer the possibility for implementing them.
Also only pyquil has algorithms, since qiskit's have been removed and the others do not have such easily plugable examples.
To make using these libraries even easier, we're using the same conventions for names as well :
To import any conversion function it's easy: In any conversion, two frameworks are involved, the QLM and another one, we'll call it framework of interest
from qat.interop.<'framework of interest'>.converters import to_<'framework to which to convert'>_circ
# e.g.
from qat.interop.qiskit.converters import to_qlm_circ
from qat.interop.cirq.converters import to_cirq_circ
The names of the frameworks are :