-
Notifications
You must be signed in to change notification settings - Fork 981
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
Google tutorial docs boilerplate #4260
Comments
I'm totally pro this change, it would cut a lot of the cirq.google notebooks. I think this would be an ideal starter project for someone. |
Can you please give an example of such boilerplate code, I want to pick up this issue, but I am new and not sure of what tutorial exactly is being talked about. |
def get_auth_device_sampler(project_id=None, processor_id=None):
# Body of the function
return device, sampler, line_length Are these the tasks I am supposed to perform?
Should the line-length be in the final return type, and are the rest of the steps correct? |
I am facing the following issues in executing these plans, I have made a PR of my current state, could someone please let me know if I am on the right track and how to resolve these two issue? Thanks.
Rest of the work on the PR seems to be complete to me. |
…ls (quantumlib#4286) Code from the tutorial notebooks has been abstracted out into a function in the `cirq_google` library. The function goes by the name `cirq_google.engine.engine_sampler.get_device_sampler()` All the notebooks are being refactored to use this abstraction. Closes quantumlib#4260.
There's quite a wall of boilerplate code to go along with the cirq.google tutorials to handle the various cases: [simulator, engine] x [colab, ipython, other] x [explicitly set, environment variable].
We should factor this out into a library function that you can call to do auth and get a device and sampler (and maybe an engine? we don't have a simulator analog of engine)
The text was updated successfully, but these errors were encountered: