Skip to main content

No project description provided

Project description

HierarQcal

dalle image

**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

hierarqcal-0.2.3.tar.gz (17.7 kB view details)

Uploaded Source

Built Distribution

hierarqcal-0.2.3-py3-none-any.whl (19.4 kB view details)

Uploaded Python 3

File details

Details for the file hierarqcal-0.2.3.tar.gz.

File metadata

  • Download URL: hierarqcal-0.2.3.tar.gz
  • Upload date:
  • Size: 17.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.1

File hashes

Hashes for hierarqcal-0.2.3.tar.gz
Algorithm Hash digest
SHA256 24ce4bad4a2817a6c4c1ea250dc142bc84d114f2fb2cfc94f825f1f2bf6bb108
MD5 f703d128308126ac1fa21caa85366fa5
BLAKE2b-256 6f049946a46c9bb9d4b5afb237508b44dd53b36c38aa649d6567fc89893417f2

See more details on using hashes here.

File details

Details for the file hierarqcal-0.2.3-py3-none-any.whl.

File metadata

  • Download URL: hierarqcal-0.2.3-py3-none-any.whl
  • Upload date:
  • Size: 19.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.1

File hashes

Hashes for hierarqcal-0.2.3-py3-none-any.whl
Algorithm Hash digest
SHA256 1a9abe478958fa39e238f559b4ac44011ddd68f859909ecabd2b9cb3661b0a37
MD5 81c86cd9f6a9980f6a24d71418aa0919
BLAKE2b-256 25719754484549ef0a250aaf138b1146226a91203edd113fdff8ed41bcfcb827

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page