No project description provided
Project description
HierarQcal
**HierarQcal** is an Open-Source Python Package for Building Custom Quantum Circuits for Machine Learning. The package simplifies the process of creating general quantum convolutional neural networks (QCNN) by enabling an hierarchical design process. With HierarQcal, automatic generation of QCNN circuits is made easy, and it facilitates QCNN search space design for neural architecture search (NAS). The package includes primitives such as Qconv, Qpool, Qdense, Qfree
that can be stacked together hierarchically to form complex QCNN circuit architectures.
A robot building itself with artifical intelligence, pencil drawing - generated with Dall E 2
Quick example
from hierarqcal import Qconv, Qpool, Qfree
qcnn = Qfree(8) + (Qconv(stride=1) + Qpool(filter="right")) * 3
$\text{QCNN:}$
### Reverse binary tree
from hierarqcal import Qconv, Qpool, Qfree
# motif: level 1
m1_1 = Qconv(stride=2)
m1_2 = Qpool(filter="left")
# motif: level 2
m2_1 = m1_1 + m1_2
# motif: level 3
m3_1 = Qfree(8) + m2_1 * 3
$m^3_1\rightarrow \text{QCNN}:$
# extending follows naturally, repeating the above circuit 5 times is just:
m3_1 * 5
Installation
HierarQcal
is hosted on pypi and can be installed via pip:
# Based on the quantum computing framework you use, choose one of:
pip install hierarqcal[cirq]
# or
pip install hierarqcal[qiskit]
# or
pip install hierarqcal[pennylane]
The package is quantum computing framework independent, there are helper functions for Cirq, Qiskit and Pennylane to represent the circuits in their respective frameworks. You can also use the the package independent of any framework, if you want to do this just run:
pip install hierarqcal
Tutorial and Documentation
There are quickstart tutorials for each major Quantum computing framework:
For more detailed usage see the documentation.
Contributing
We welcome contributions to the project. Please see the contribution guidelines and code of conduct for more information.
License
BSD 3-Clause "New" or "Revised" License, see LICENSE for more information.
Citation
@article{lourensArchitectureRepresentationsQuantum2022,
doi = {10.48550/ARXIV.2210.15073},
url = {https://arxiv.org/abs/2210.15073},
author = {Lourens, Matt and Sinayskiy, Ilya and Park, Daniel K. and Blank, Carsten and Petruccione, Francesco},
keywords = {Quantum Physics (quant-ph), Artificial Intelligence (cs.AI)},
title = {Architecture representations for quantum convolutional neural networks},
publisher = {arXiv},
journal = {arXiv:2210.15073[quant-ph]},
year = {2022},
copyright = {arXiv.org perpetual, non-exclusive license}
}
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for hierarqcal-0.3.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a39c9b28b2b77ea3860a347fd95f88036a6ab7991071810870cc1cffdadc0486 |
|
MD5 | 7f9009586cf87e865be4f424557965a2 |
|
BLAKE2b-256 | 07cba1ec00c86aedf2dd3e16859d1acc8b58e8c3b0c692d3b073318300893f61 |