Skip to content
This repository has been archived by the owner on Mar 23, 2021. It is now read-only.

[ENTRY] Quantum Optimal Subarchitecture Extraction (QOSE) #73

Open
therooler opened this issue Feb 26, 2021 · 2 comments
Open

[ENTRY] Quantum Optimal Subarchitecture Extraction (QOSE) #73

therooler opened this issue Feb 26, 2021 · 2 comments
Labels
submission This is an official entry for the QHack Open Hackathon

Comments

@therooler
Copy link

therooler commented Feb 26, 2021

Team Name:

Many body system

Project Description:

Training a quantum classifier on a classical data set is no easy feat, and one of the key issues for getting good performance is choosing a suitable ansatz that fits the problem of interest well. Due to the absence of practical guidelines for circuit design, we aim to leverage the full software stack available to the QML practitioner to find the optimal circuit architecture by a tree-based metaheuristic. Inspired by an analogous approach in classical machine learning [1], we propose Quantum Optimal Subarchitecture Extraction, or QOSE.

By combining the the scalability of AWS with the versatility and performance of Xanadu's PennyLane, we can reliably train hundreds of different circuit architectures in parallel. In QOSE, we iteratively add layers to a simple base circuit, increasing the expressiveness as the circuit deepens. This construction process can be described by a directed graph in the form of a tree, where nodes correspond to circuits of depth d. For each node in the tree, we briefly train the corresponding circuit on a subset of the actual data to get a glimpse of the expected performance.

To combat the exponential increase of the search space of possible circuit architectures, we use a tree-pruning algorithm that eliminates nodes based on each circuit's quality. This quality is determined by a metric that combines inference speed, accuracy and model size into a single scalar cost. Our code can be made embarrassingly parallel by evaluating the cost of each depth-d node concurrently, which in the end allowed us to train 30000 different variational circuits in under three hours.

A QOSE tree with thousands of circuits

[1] Adrian de Wynter, An Approximation Algorithm for Optimal Subarchitecture Extraction, 2020. eprint:arXiv:2010.08512.

Presentation:

This video summarizes the main idea behind QOSE and how it could benefit your research.

QOSE: Finding the optimal circuit architecture

For an in depth view into QOSE, check out this preliminary report:

QOSE: Quantum Optimal Subarchitecture Extraction

and the three notebooks that illustrate the power of QOSE:

For basic functionality of QOSE
QOSE: Finding the optimal circuit architecture

For exploring the effects of different embedding methods
QOSE: Different Embeddings

For a demonstration of parallelized execution
QOSE: MPI and SV1 parallelization on AWS

Source code:

The source code is available here:

https://github.com/kmz4/QHACK2021

With documentation available here:

https://kmz4.github.io/QHACK2021/

@therooler therooler added the submission This is an official entry for the QHack Open Hackathon label Feb 26, 2021
@co9olguy
Copy link
Member

Thanks for the submission! We hope you have enjoyed participating in QHack 😃

We will be assessing the entries and contacting the winners separately. Winners will be publicly announced sometime in the next month.

We will also be freezing the GitHub repo as we sort through the submitted projects, so you will not be able to update this submission.

@therooler
Copy link
Author

Sounds good. We had a lot of fun and learned a lot. Thanks for organizing this!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
submission This is an official entry for the QHack Open Hackathon
Projects
None yet
Development

No branches or pull requests

2 participants