qlasskit
qlasskit copied to clipboard
py2qasm cli tool
Create a cli tool in the qlasskit/tools package called py2qasm that receives a python script (file or stdin) in input and outputs qasm code. The python script should contain at least one qlassf function.
- If not specified by --input-file/-i, read from stdin (-).
- If not specified by --entrypoint/-e, func_name is the last qlassf defined.
- If not specified by --output/-o, output to stdout
- If not specified by --compiler/-c use internal compiler (or tweedledum)
- If not specified by --qasm-version/-q use v3 qasm version
py2qasm -i pyfile [-e func_name] [-c internal] -o qasm_file
Provide also:
-
-h\--helpfor usage -
-v\--versionfor qlasskit version
Requirements:
- Code should be placed on
qlasskit/tools - Use
argparsefor argument parsing - Use
qlasskit.tools.utilsfor getting qlassfs from file / string - A test case must be provided in
test_tools.py - Keep an eye on issue #28
Please read CONTRIBUTING.md before contributing.