-
Notifications
You must be signed in to change notification settings - Fork 1k
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 QVM pages and mentions in other pages #5794
Conversation
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
Initially reviewed via external channels. |
@augustehirth, the failing notebook tests are due to reliance on unreleased features. Our options are either to (a) wait until 1.0 releases, then re-run the checks, or (b) follow the dev guidance for prerelease notebooks for now, then update after 1.0 comes out. Given how close 1.0 is, I'm in favor of (a). |
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.
Some minor nits. Most I marked as Optional. Preemptively approving, since I probably won't have time for a second pass.
Okay, there's a bit of a catch-22 here:
We can either (a) do a break-glass change of qsim to force Cirq 1.0 compatibility before the release, or (b) wait for the release and bump qsim then. Either way, this PR is blocked on the qsim update unless we do a break-glass submit of this PR. |
Discussed offline: holding this PR for post-1.0 release, where qsim can be updated to match. |
Enqueued behind quantumlib/qsim#555 (and quantumlib/qsim#557, to release the previous PR). |
Waiting on qsimcirq pypi update |
Automerge cancelled: A status check is failing. |
Automerge cancelled: A status check is failing. |
Automerge cancelled: A status check is failing. |
docs/simulate/qvm_builder_code.ipynb
Outdated
"outputs": [], | ||
"source": [ | ||
"# create your device ready circuit here!\n", | ||
"your_circuit_name = cirq.Circuit()" |
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.
You probably want to add a measurement here.
"\n", | ||
"reps = 3000\n", | ||
"start = time.time()\n", | ||
"results = sim_engine.get_sampler(processor_id).run(circuit, repetitions=reps)\n", |
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.
We either need to comment this out, add output for it, or add a measurement (ideally to a qubit both on weber and rainbow) in the circuit (see above).
"circuit = your_circuit_name # @param\n", | ||
"\n", | ||
"reps = 3000\n", | ||
"start = time.time()\n", | ||
"results = sim_engine.get_sampler(processor_id).run(circuit, repetitions=reps)\n", |
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.
This is causing a notebook test error - a circuit with no measurements can't be passed to Simulator.run
.
QVM builder code is template code that isn't supposed to be run for outputs by the pipeline. I've added it to the skip notebooks lists. @dstrain115 @95-martin-orion is this a satisfactory solution? |
That seems reasonable to me. |
Upon further reflection I've made both changes (added a measure and added to the skip files), so that the output isn't generated, and the user can run the page end to end without changes if they want. |
* Add QVM pages and mentions in other pages * Pre fix * Pre fix 2 * pre fix 3 * Pre fix 4 * Test fix and feedback * Pre fix 5 * Pre revert * Don't run qvm_builder_code * Don't run qvm_builder_code 2.0 * Make qvm_builder_code USER runnable
New pages and supporting changes documenting the use of a quantum virtual machine in cirq.
Six new pages:
Plus mentions in other related and top-level pages to mention the QVM and how you might use it.