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
will be published soon! For the time being you can install it as follows:
Clone the project and run the following commands (on the develop
branch):
cd path/to/project/
pip install -r requirements_core.txt
# Based on the quantum computing framework you use, choose one of:
pip install .[cirq]
# or
pip install .[qiskit]
# or
pip install .[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, to do this install it with:
pip install .
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
File details
Details for the file hierarqcal-0.2.2.tar.gz
.
File metadata
- Download URL: hierarqcal-0.2.2.tar.gz
- Upload date:
- Size: 13.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.8.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c7603ddd76c08f36a7c54ce74aa41387cac551d5b087a57143527258ba623b0d |
|
MD5 | d034ca0ab602f9ce125208f146898caa |
|
BLAKE2b-256 | 26775da225127d2a8517199c59d8170dc8478d58dc1fb1fe5bc084aee83d8451 |
File details
Details for the file hierarqcal-0.2.2-py3-none-any.whl
.
File metadata
- Download URL: hierarqcal-0.2.2-py3-none-any.whl
- Upload date:
- Size: 12.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.8.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 119950739b67632889a5882705bcffaf0c1823d87e6efd55e8d08551f01da9e9 |
|
MD5 | 6aca6bb74a0bd9a37211911fa0a4e7f3 |
|
BLAKE2b-256 | dd4fe90206fb71310ddaa316efe4e12d02329112edff22d6e00fb895223efe6d |