Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

py2qasm cli tool #26

Closed
dakk opened this issue Mar 23, 2024 · 9 comments
Closed

py2qasm cli tool #26

dakk opened this issue Mar 23, 2024 · 9 comments
Assignees
Labels
feature New feature unitaryhack Issue for unitaryhack

Comments

@dakk
Copy link
Owner

dakk commented Mar 23, 2024

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\--help for usage
  • -v\--version for qlasskit version

Requirements:

Please read CONTRIBUTING.md before contributing.

@dakk dakk added the feature New feature label Mar 23, 2024
@dakk dakk added the unitaryhack Issue for unitaryhack label May 28, 2024
@CRTejaswi
Copy link

Hi, @dakk !
I'd like to work on this issue as a part of unitaryhack.

@dakk
Copy link
Owner Author

dakk commented May 30, 2024

Hi, wonderful, please go on and let me know if you need anything.

@CRTejaswi
Copy link

Hi, @dakk! Can you please share a couple of sample python files to be transpiled?

@dakk
Copy link
Owner Author

dakk commented May 30, 2024

There is one in the test_tools file linked above. If you need more you can find some example code in test cases and in the docs; let me know if you need something different

@tomv42
Copy link
Contributor

tomv42 commented Jun 12, 2024

I'll start working on this issue

@dakk
Copy link
Owner Author

dakk commented Jun 12, 2024

Thank you for the contributions @tomv42 ; I hope you enjoyed working on the qlasskit library: if so, please "star" the project, and tell your quantum friends about qlasskit :)

@dakk dakk closed this as completed Jun 12, 2024
@tomv42
Copy link
Contributor

tomv42 commented Jun 12, 2024

This was my first experience in open source and I really enjoyed working on qlasskit. I learned a lot. Also, I've already starred the project :)

@dakk
Copy link
Owner Author

dakk commented Jun 12, 2024

This was my first experience in open source and I really enjoyed working on qlasskit. I learned a lot. Also, I've already starred the project :)

Great!

@tomv42 Also, if you have an idea about a quantum algorithm to be implemented in qlasskit, you can propose it on this issue #32 still open for unitary hack.

@KallieFerguson
Copy link

@tomv42 it doesn't look like you registered for unitaryhack, send me an email at kallie@unitary.fund if you want the bounty.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature unitaryhack Issue for unitaryhack
Projects
None yet
Development

No branches or pull requests

4 participants