SkillAgentSearch skills...

QBNN

Quantum Binary Neural Networks

Install / Use

/learn @phylyd/QBNN
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

Quantum Binary Neural Network

This repo is supplementary to our paper: https://arxiv.org/abs/1810.12948, presenting the code implementations of QBNN examples.

The implementations are done on Huawei's Quantum Computing Platform "HiQ" : http://hiq.huaweicloud.com/en/index.html

The hierachy of the code can be illustrated as follow:

.. image:: Code_hierachy.png

All the implementation examples execute the following generic scheme of training :

.. image:: circuits/generic_circuit.png

The Examples are:

Single neuron with 3 weights and 3 inputs (QBN 3-1):

.. image:: circuits/Example_2_QBN_Circuit2.png

3-layer Neural Network with 6 weights, 2 inputs and 1 ouput (QBNN 2-2-1):

.. image:: circuits/Example_3_QBNN_Circuit.png

3-layer Neural Network with 8 weights, 2 inputs and 1 ouput(QBNN 3-2-1):

.. image:: circuits/Example_4_QBNN_Circuit.png

For the QBN 3-1 and QBNN 3-2-1, we consider the following two tasks:

.. image:: results/tasks.png

When we apply task 1 to QBN 3-1, we see the weight state evolution over iterations:

.. image:: results/weight_state_evolution_Example_2_Task_1.png

When we apply task 2 to QBN 3-1, we see the weight state evolution over iterations:

.. image:: results/weight_state_evolution_Example_2_Task_2.png

For the QBNN 2-2-1 with the task given in the paper, the weight state evolution during the training iterations is:

.. image:: results/weight_state_evolution_Example_3.jpg

Similarly, we trained the QBNN 3-2-1 with the two tasks. For instance,the weight state evolution of the training with task 2:

.. image:: results/weight_state_evolution_Example_4_Task_2.jpg

**The state evolutions generated by the QBNN training cycles match the amplitude amplification of standard Grover's algorithm. This does not only imply the marking of the optimal weights is precise, but also indicates that the decoupling of the weights by the uncomputations succeed.

The probability of success (The probability of obtaining an optimal weights) over iterations for the two tasks respectively:

.. image:: results/Probability_of_Success_Example_4.png

View on GitHub
GitHub Stars16
CategoryDevelopment
Updated25d ago
Forks5

Languages

Python

Security Score

90/100

Audited on Mar 12, 2026

No findings