The Byzantine army is now equipped at the cutting edge of modern technology. The lieutenant generals communicate with the commander general and with each other through pairwise authenticated classical and quantum channels.
To order an attack on the enemy that the army surrounds or to initiate a retreat, the commander general sends a single-bit order m to each lieutenant.
Traitors could be present who will try to confuse the faithful parties. In this seminal article by Lamport, Shostak and Marshal, it was proved that no classical solution with fewer than 3m + 1 generals can cope with m traitors.
A quantum solution to this problem was proposed, based on qutrits
A derived solution using five qubits is described by Adan Cabello in this article and was experimentally demonstrated using four-photon entanglement
The first notebook in this repository presents a protocol using this latter solution. The traitor detection is achieved by a turn-based game between the lieutenants.
The first notebook includes also a solution using 5 qubits for the case of the four generals, largely inspired by the Cabello protocol for three generals.
A detailed description of the agreement process can be found in the second notebook.
A hardware demo for this solution is presented in the third notebook.
These solutions are presented in the last notebook. However, the noisy system solution for four generals is not possible at this time, because of the depth of the circuit. WIP: code in this second notebook not yet including use of hypergeometric distributions or distances for demasking traitors.