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

Remove SDK references in Instruction.to_ir() #59

Merged
merged 1 commit into from
Mar 25, 2020
Merged

Remove SDK references in Instruction.to_ir() #59

merged 1 commit into from
Mar 25, 2020

Conversation

speller26
Copy link
Member

@speller26 speller26 commented Mar 25, 2020

So users working with IR don't see SDK classes like Qubit:

Before:

>>> bell.to_ir()
Program(instructions=[H(target=Qubit(0), type=<Type.h: 'h'>), CNot(control=Qubit(0), target=Qubit(1), type=<Type.cnot: 'cnot'>)])

After:

>>> bell.to_ir()
Program(instructions=[H(target=0, type=<Type.h: 'h'>), CNot(control=0, target=1, type=<Type.cnot: 'cnot'>)])

Also imported __future__.annotations so type hints for a class within the same class don't need to be quoted.

build_files.tar.gz

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

So users working with IR don't see SDK classes like `Qubit`.
@speller26 speller26 requested a review from kshitijc March 25, 2020 04:39
@speller26 speller26 merged commit 3cbe444 into master Mar 25, 2020
@speller26 speller26 deleted the caw branch March 25, 2020 17:56
kshitijc pushed a commit that referenced this pull request May 3, 2020
So users working with IR don't see SDK classes like `Qubit`.
kshitijc pushed a commit that referenced this pull request May 5, 2020
So users working with IR don't see SDK classes like `Qubit`.
shiyunon pushed a commit to shiyunon/amazon-braket-sdk-python that referenced this pull request Mar 9, 2021
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.

2 participants