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

Add example notebook for braket setup and simple circuit #61

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from

Conversation

dbcq
Copy link

@dbcq dbcq commented Feb 15, 2023

Amazon braket documentation is sometimes not very clear, and pytket-braket doesn't have as much documentation as some other pytket extensions. This notebook is based on a Confluence page I wrote for our team and on a notebook by Callum. I have used the notebook template and generation from pytket-quantinuum.

@dbcq dbcq requested a review from cqc-alec as a code owner February 15, 2023 17:45
Copy link
Collaborator

@cqc-alec cqc-alec left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, this is a good idea!

There is a minor formatting issue that should be solved by running the black formatter on the new python file.

Apart from that, I think the instructions should be modified so that the user doesn't create their own plaintext credentials file -- see comment. With the AWS method one doesn't have to explicitly pass in this file. Unless there are some use cases where that doesn't work?

examples/python/braket.py Outdated Show resolved Hide resolved
examples/python/braket.py Outdated Show resolved Hide resolved
@dbcq
Copy link
Author

dbcq commented Feb 17, 2023

Could you advise what to do about the failed linting? I assume it comes from the long 'comments' which are turned into markdown cells by p2j. pytket-quantinuum seems to have the same formatting but appears to lint fine, but I couldn't see any particular options which were being used there

@cqc-alec
Copy link
Collaborator

Could you advise what to do about the failed linting? I assume it comes from the long 'comments' which are turned into markdown cells by p2j. pytket-quantinuum seems to have the same formatting but appears to lint fine, but I couldn't see any particular options which were being used there

Yes it seems to be coming from the long lines. Can you wrap the lines at 80 characters. or does that break the p2j conversion? If necessary we can exclude the folder from the link check.

@dbcq
Copy link
Author

dbcq commented Feb 17, 2023

Yes, p2j treats each line break as a new markdown cell so it doesn't look the best. I assume in pytket-quantinuum they're simply excluded from the linting check

@cqc-alec
Copy link
Collaborator

Yes, p2j treats each line break as a new markdown cell so it doesn't look the best. I assume in pytket-quantinuum they're simply excluded from the linting check

Actually they are not excluded there, and the python files do contain long lines (e.g. https://github.com/CQCL/pytket-quantinuum/blob/develop/examples/python/Quantinuum_circuit_submissions.py ), so I am not sure what's different here...

@CalMacCQ
Copy link
Contributor

I think it'd be nice to have an example as some of the syntax for pytket-braket can be confusing. Should we finish this off?

@cqc-alec
Copy link
Collaborator

I think it'd be nice to have an example as some of the syntax for pytket-braket can be confusing. Should we finish this off?

Sure, I think it's just some linting issues to fix?

@cqc-alec
Copy link
Collaborator

cqc-alec commented Jun 7, 2024

Please rebase and retarget to main which is now the default branch.

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

Successfully merging this pull request may close these issues.

3 participants