A small CLI app to distribute the roles for secret santa with true - quantum - randomness. Based on the IBM-Qiskit Framwork and use the noise of their quantum system to obtain random numbers.
- This is not an example for efficent use of ressources - in fact it is the complet opposite of it.
- In the current state the distributer - lets call them elfs - can see all the roles.
./main.py [options]
- Edit the list in the script
- Add the provider
- Execute the script.
- The script reads the
config.json
file, if the file is not present it should get the data from the CLI arguments. - It calculates the curcit size based on the - very basic - formula:
math.ceil(math.log2(num_participants**2))
. - It builds the quantum cuicuit, each q-bit is modified by a Hardamad gate, and then measured on a individual bit. The Hardamard Gate sets the possiblity for the events 0/1 to 1/sqrt(2).
- It sends the requests to the quantum provider, base case is the ibm-quiskit system. (Test case is the ibm-simulator)
- After recieving the response the strings of numbers got convertet from base-2 to base 10 mod
num_participants
. - The participants are given an index to rearange the order.
- For each participant a recipiant is drawn.
When
participant_i
gotparticipant_j
assingedj
is removed from the string of numbers. - Step 7 is repeated until every participant as someone to send a gift to or there are no numbers left.
- A few basic checks are performed to evaluate the output.
- The output is printed in the console.
- ~~Add Explanation to README~~~
- improve explanation with images
- Save Output in file!
- Save output in an encrypted file
Add CLI commandsRemove hard coded list- Let the elfs participate:
- Host a microserver and obtain links
- Send mails automaticly /SMS accordingly