The QHack Coding Challenge is a set of 25 quantum coding challenges. Challenge Repository link
pip install -r requirements.txt
Run the #.py
by supplying one of the #.in
files for that problem to the solution script via stdin
.
For example, to run the file my_solution.py
and for the first set of inputs, do the following:
- Open a terminal console (
CMD
,Terminal
, etc.) and navigate to the folder containing the solution - Run the file and pass in the inputs:
python ./my_solution.py < 1.in
- Output to the console should match answer in
1.ans
file (within some tolerance specified in theproblem.pdf
file)
To run on Windows Powershell: Get-Content 1.in | python .code.py