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

Update start.ipynb #6342

Merged
merged 18 commits into from
Nov 15, 2023
Merged

Update start.ipynb #6342

merged 18 commits into from
Nov 15, 2023

Conversation

senecameeks
Copy link
Collaborator

Update the start tutorial with a new notebook that details how to run circuits using our hardware. Note, only some people will have access to use our physical devices.

Update the start notebook with the new start notebook that details how to run against our hardware. Notably, only people with access can run circuits against our hardware.
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

Copy link

codecov bot commented Nov 9, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (0e288a7) 97.84% compared to head (823eeee) 97.84%.
Report is 2 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #6342      +/-   ##
==========================================
- Coverage   97.84%   97.84%   -0.01%     
==========================================
  Files        1110     1110              
  Lines       96597    96656      +59     
==========================================
+ Hits        94516    94572      +56     
- Misses       2081     2084       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

docs/tutorials/google/start.ipynb Show resolved Hide resolved
docs/tutorials/google/start.ipynb Show resolved Hide resolved
docs/tutorials/google/start.ipynb Show resolved Hide resolved
@wcourtney
Copy link
Collaborator

Added a few quick-to-resolve typo and link fixes. Otherwise LGTM to publish before resolving other issues in go/quacstart-feedback so that we have something posted.

attach --pre flag to cirq install for stable version
Copy link
Collaborator

@wcourtney wcourtney left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

Put in default value for processor_id
add Black as default. This _shouldn't_ run against actual hardware since a valid project_id is never specified. A valid `processor_id` however is needed to pass the CI.
populate default project_id
make default processor_id an empty string now that `virtual=True` is set
add back processor_id so it matches current merged version
rm `cirq --pre` install
delete overriding instance of `engine`
Add back original fix to known issue nteract/papermill#519
resolve nit
@@ -1,478 +1,532 @@
{
Copy link
Contributor

@aasfaw aasfaw Nov 15, 2023

Choose a reason for hiding this comment

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

Add another text block followed by code.

Text: "Among these best practices, we will highlight two important ones.

First, if your circuit uses more than one qubit, you can map the circuit onto the grid of the quantum processor in a way that accounts for its topology. You can do this as follows:

Code:

device_graph = device.metadata.nx_graph
router = cirq.RouteCQC(device_graph)
hw_circuit = router(circuit)
print(hw_circuit)

Second, if your quantum processor is calibrated to do a specific set of gates, you will need to transform your circuit into that gateset. For example, for a CZ gateset, you can do the following."

Code:

gateset = cirq.CZTargetGateset(allow_partial_czs=True)
hw_circuit = cirq.optimize_for_target_gateset(hw_circuit, gateset=gateset)
print(hw_circuit)


Reply via ReviewNB

Copy link
Contributor

Choose a reason for hiding this comment

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

Add to that text above: Other gatesets and considerations are included in the best practices guide

with same hyperlink as Will Courtney's above.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Will follow up with another PR to add this improvement. Up to this point I've been editing the codelab's raw json file directly (this was easiest for the initial quick changes), but adding another text/code block this way will likely cause errors.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The followup PR is #6346

@senecameeks senecameeks enabled auto-merge (squash) November 15, 2023 20:03
@senecameeks senecameeks merged commit 9a8298d into master Nov 15, 2023
38 checks passed
senecameeks added a commit to senecameeks/Cirq that referenced this pull request Nov 15, 2023
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