-
Notifications
You must be signed in to change notification settings - Fork 181
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
[sc-63358] How to use Qiskit 1.0 with PennyLane #1104
base: master
Are you sure you want to change the base?
Conversation
👋 Hey, looks like you've updated some demos! 🐘 Don't forget to update the Please hide this comment once the field(s) are updated. Thanks! |
demonstrations/tutorial_how_to_use_qiskit1.0_with_pennylane.metadata.json
Outdated
Show resolved
Hide resolved
demonstrations/tutorial_how_to_use_qiskit1.0_with_pennylane.metadata.json
Outdated
Show resolved
Hide resolved
demonstrations/tutorial_how_to_use_qiskit1.0_with_pennylane.metadata.json
Outdated
Show resolved
Hide resolved
demonstrations/how_to_use_qiskit1.0_with_pennylane.metadata.json
Outdated
Show resolved
Hide resolved
demonstrations/how_to_use_qiskit1.0_with_pennylane.metadata.json
Outdated
Show resolved
Hide resolved
Thank you for opening this pull request. You can find the built site at this link. Deployment Info:
Note: It may take several minutes for updates to this pull request to be reflected on the deployed site. |
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 sharing, @isaacdevlugt !
# Let’s say you’ve created the following Qiskit code that prepares a modified GHZ state for an | ||
# arbitrary amount of qubits, measures several expectation values of ``SparsePauliOp`` operators. |
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'm wondering if the 3-step process here would be easier to visually scan through if you actuall make subsections for it?
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.
The problem with that is that there's no "X step process" in general for doing this. We could use the from_qiskit
and from_qiskit_op
functions in any order and still get the same outcome. I think the 2-point bulleted list above is probably fine?
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.
Fair.
Co-authored-by: Ivana Kurečić <[email protected]>
@@ -0,0 +1,430 @@ | |||
r"""How to use Qiskit 1.0 with PennyLane | |||
==================================== | |||
|
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'm unresolving this because it's a how-to instead of a demo. It should be quick to get to the 'meat' and set expectations. Are you sure there's no way you would want to cut it down a little bit?
Another question I have is about emoji in section titles. |
|
||
import pennylane as qml | ||
|
||
dev = qml.device("qiskit.basicsim", wires=2, shots=1024) |
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.
(not a blocking comment for this PR) Maybe a question to @austingmhuang - is wires
a required argument for the new devices? Like default.qubit
, it feels like we could make it optional, with the wires inferred at runtime.
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.
Wires
is a required argument but you could make it optional by inferring the # of wires either off the real hardware backend chosen or, for simulators, the circuit itself I imagine.
# This will install PennyLane, the plugin, and the latest Qiskit 1.0 version that the plugin supports. | ||
# If you use an environment that contains a pre-1.0 version of Qiskit, upgrading to Qiskit 1.0 could | ||
# cause issues. In that case, we recommend following `Qiskit's upgrade instructions <https://docs.quantum.ibm.com/start/install>`__. |
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.
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, thanks!
…b.com/PennyLaneAI/qml into tutorial-use-qiskit1.0-with-pennylane
Title: How to use Qiskit 1.0 with PL
Shortcut: https://app.shortcut.com/xanaduai/story/63358/how-to-how-to-use-qiskit-1-0-with-pennylane