Hi, these are my solutions to the QHack 2022 quantum machine learning hackathon.
Everything is coded in Xanadu's PennyLane quantum programming package.
The original repo with all the hackathon details can be found at /XanaduAI/QHack2022.
Site: QHack.ai
Date: February 2022
Here is a screenshot of my completed hackathon scoreboard entry.
I ranked 47th in terms of cumulative completion time for the problem sets.
I couldn't figure out games_500_switches
using just a single shot, and so didn't get those points.
Instead, my circuit has to be repeated until the ancilla qubit measures as a 1
, which has a 50% chance of occurring.
And here is my certificate for completing all but one of the problem sets.
The Coding_Challenges
folder contains all the problem statements and solutions.
There is a requirements.txt
to install the necessary python packages.
Each problem set is in its own sub-folder with the name <topic>_<score>_template
.
In each problem set, there is a .pdf
problem statement and a .py
solution.
There are also given test input .in
and answers .ans
with can be invoked in terminal via
>> python <problem name>_template.py < 1.in
- Pennylane Language
pennylane101_100_OrderMatters
- Quantum Gatespennylane101_200_KnowYourDevices
- Pure & Mixed State Simulator/Devicepennylane101_300_superdense_coding
- Superdense Codingpennylane101_400_FiniteDifferenceGradient
- Pennylane's Finite Difference Gradientpennylane101_500_BitflipErrorCode
- Repetition Code
- Quantum Algorithms
algorithms_100_DeutschJozsa
- Deutsch-Jozsa Algorithmalgorithms_200_AdaptingTopology
- Hardware Topology/Connectivityalgorithms_300_AdderQFT
- Draper QFT Adderalgorithms_400_QuantumCounting
- Grover's Algorithmalgorithms_500_DeutschJozsaStrikesAgain
- Advanced Deutsch-Jozsa Algorithm
- Games
games_100_TardigradeMasquerade
- Entanglement Entropygames_200_CHSH
- CHSH Gamegames_300_Elitzur_Vaidman
- Elitzur-Vaidman Bomb Testergames_400_FindTheCar
- Monty Hall Problemgames_500_switches
- 3 Switches Problem
- Quantum Chemistry
qchem_100_IsParticlePreserving
- Particle Preservingqchem_200_OptimizingMeasurements
- Combining Circuit Measurementsqchem_300_Universality_Givens
- Givens Rotation (for 1/2 excitations)qchem_400_TripleGivens
- Givens Rotation (for 3 excitations)qchem_500_MindTheGap
- Hydrogen's 1st Excited State
- Quantum Machine Learning
qml_100_GeneratingFourierState
- Quantum Fourier Transformqml_200_WhoLikesTheBeatles
- Quantum State Overlapqml_300_IsingOnTheCake
- Variational Quantum Classifierqml_400_BuildingQRAM
- Quantum RAMqml_500_UDMIS
- Unit Disk Maximum Independent Set