-
Notifications
You must be signed in to change notification settings - Fork 66
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
Fix QASM examples #1993
base: main
Are you sure you want to change the base?
Fix QASM examples #1993
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hi,
as some libs are not useful for the example, I would replace
from qiskit import transpile, assemble, qasm3
from qiskit.converters import circuit_to_dag, dag_to_circuit
from qiskit.quantum_info import Statevector
by only
from qiskit import transpile
I would also add the backend stuff before the parameter definition
backend = service.backend("your selected backend")
from qiskit.transpiler.preset_passmanagers import generate_preset_pass_manager
pm = generate_preset_pass_manager(backend=backend, optimization_level=1)
Thanks
…d-fix-qasm-examples
One or more of the following people are relevant to this code: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for these improvements
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, Thanks
Co-authored-by: Eric Arellano <[email protected]>
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be worth having Abby C copy edit
docs/guides/primitives-rest-api.mdx
Outdated
headers = { | ||
'Content-Type': 'application/json', | ||
'"Authorization": f"Bearer xxxxxxx", | ||
'x-qx-client-application': 'qiskit-version-2/0.39.2/'+'your_application' # specifying the application you might be running from. For an actual Integration project, this option is invaluable to know where jobs are coming from. At this time the "qiskit-version-2/0.39.2/" string is a necessary prefix. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please double check with the SMEs qiskit-version-2/0.39.2
is still accurate - I'm surprised it's set to 0.39.2?
'x-qx-client-application': 'qiskit-version-2/0.39.2/'+'your_application' # specifying the application you might be running from. For an actual Integration project, this option is invaluable to know where jobs are coming from. At this time the "qiskit-version-2/0.39.2/" string is a necessary prefix. | |
# You should replace <your_application> with the name of your app. This is useful to know | |
# where jobs are coming from. Note that the prefix "qiskit-version-2/0.39.2/" is necessary. | |
'x-qx-client-application': f'qiskit-version-2/0.39.2/<your_application>', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I still suggest my change to use an f string and put the comment above the line, split over two lines
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep - I wasn't ignoring that comment; I was just leaving it open because I'm still looking for a good answer from an SME.
Co-authored-by: Eric Arellano <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Co-authored-by: abbycross <[email protected]>
Fixes #1984