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

Remove deprecated use of cirq.google in install guide #4647

Merged
merged 2 commits into from
Nov 9, 2021

Conversation

amcnamara
Copy link
Contributor

Very minor fix. The install guide at https://quantumai.google/cirq/install has a validation step that references cirq.google which is a deprecated usage on new installs, example:

[amcnamara] > python -c 'import cirq; print(cirq.google.Foxtail)'
<string>:1: DeprecationWarning: cirq.google was used but is deprecated.
 it will be removed in cirq v0.14.
 Use cirq_google instead.

(0, 0)───(0, 1)───(0, 2)───(0, 3)───(0, 4)───(0, 5)───(0, 6)───(0, 7)───(0, 8)───(0, 9)───(0, 10)
│        │        │        │        │        │        │        │        │        │        │
│        │        │        │        │        │        │        │        │        │        │
(1, 0)───(1, 1)───(1, 2)───(1, 3)───(1, 4)───(1, 5)───(1, 6)───(1, 7)───(1, 8)───(1, 9)───(1, 10)
[amcnamara] > python -c 'import cirq_google; print(cirq_google.Foxtail)'
(0, 0)───(0, 1)───(0, 2)───(0, 3)───(0, 4)───(0, 5)───(0, 6)───(0, 7)───(0, 8)───(0, 9)───(0, 10)
│        │        │        │        │        │        │        │        │        │        │
│        │        │        │        │        │        │        │        │        │        │
(1, 0)───(1, 1)───(1, 2)───(1, 3)───(1, 4)───(1, 5)───(1, 6)───(1, 7)───(1, 8)───(1, 9)───(1, 10)

Very minor fix.  The install guide at https://quantumai.google/cirq/install has a validation step that references `cirq.google` which is a deprecated usage on new installs, example:

```
[amcnamara] > python -c 'import cirq; print(cirq.google.Foxtail)'
<string>:1: DeprecationWarning: cirq.google was used but is deprecated.
 it will be removed in cirq v0.14.
 Use cirq_google instead.

(0, 0)───(0, 1)───(0, 2)───(0, 3)───(0, 4)───(0, 5)───(0, 6)───(0, 7)───(0, 8)───(0, 9)───(0, 10)
│        │        │        │        │        │        │        │        │        │        │
│        │        │        │        │        │        │        │        │        │        │
(1, 0)───(1, 1)───(1, 2)───(1, 3)───(1, 4)───(1, 5)───(1, 6)───(1, 7)───(1, 8)───(1, 9)───(1, 10)
[amcnamara] > python -c 'import cirq_google; print(cirq_google.Foxtail)'
(0, 0)───(0, 1)───(0, 2)───(0, 3)───(0, 4)───(0, 5)───(0, 6)───(0, 7)───(0, 8)───(0, 9)───(0, 10)
│        │        │        │        │        │        │        │        │        │        │
│        │        │        │        │        │        │        │        │        │        │
(1, 0)───(1, 1)───(1, 2)───(1, 3)───(1, 4)───(1, 5)───(1, 6)───(1, 7)───(1, 8)───(1, 9)───(1, 10)
```
@amcnamara amcnamara requested review from cduck, vtomole and a team as code owners November 9, 2021 17:00
@amcnamara amcnamara requested a review from mpharrigan November 9, 2021 17:00
@google-cla google-cla bot added the cla: yes Makes googlebot stop complaining. label Nov 9, 2021
@CirqBot CirqBot added the Size: XS <10 lines changed label Nov 9, 2021
@amcnamara
Copy link
Contributor Author

amcnamara commented Nov 9, 2021

Looks like there are a few other references to cirq.google in the docs:

[amcnamara] > grep cirq\\.google -ir docs
docs/google/specification.md:This specification is defined in the Device proto within `cirq.google.api.v2`.
docs/google/specification.md:engine = cirq.google.Engine(project_id='your_project_id')
docs/google/specification.md:The `cirq.google.SerializableDevice` class allows someone to take this
docs/google/specification.md:The `cirq.google.SerializableDevice` combines a `DeviceSpecification` protocol
docs/google/specification.md:import cirq.google as cg
docs/google/specification.md:                   proto_version=cirq.google.ProtoVersion.V2)
docs/google/engine.md:the only supported client for this API, using the `cirq.google.Engine` class.
docs/google/engine.md:engine = cirq.google.Engine(.*)
docs/google/engine.md:import cirq.google as cg
docs/google/engine.md:Several public devices have been released and can be found in the `cirq.google`
docs/google/engine.md:into a `cirq.Device` by using `cirq.google.SerializableDevice.from_proto()` that will
docs/google/engine.md:engine = cirq.google.Engine(project_id='YOUR_PROJECT_ID')
docs/google/engine.md:                       gate_set=cirq.google.FSIM_GATESET,
docs/google/engine.md:engine = cirq.google.Engine(project_id='YOUR_PROJECT_ID')
docs/google/engine.md:To list the executions of your circuit, i.e. the jobs, you can use `cirq.google.Engine.list_jobs()`.
docs/google/engine.md:from cirq.google.engine.client.quantum import enums
docs/google/engine.md:engine = cirq.google.Engine(project_id='YOUR_PROJECT_ID')
docs/google/engine.md:To list the different instances of your circuits uploaded, i.e. the programs, you can use `cirq.google.Engine.list_programs()`.
docs/google/engine.md:With an existing `cirq.google.EngineProgram` object, you can list any jobs that were run using that program.
docs/google/engine.md:from cirq.google.engine.client.quantum import enums
docs/google/engine.md:engine = cirq.google.Engine(project_id='YOUR_PROJECT_ID')
docs/google/devices.md:cirq.Z(cirq.GridQubit(5, 5)).with_tags(cirq.google.PhysicalZTag())
docs/google/devices.md:be accessed using `cirq.google.SYC`.  This gate is equivalent to
docs/google/devices.md:This gate has a duration of 12ns and can be used in `cirq.google.SYC_GATESET`
docs/google/devices.md:or in the `cirq.google.FSIM_GATESET`.
docs/google/devices.md:`cirq.google.SQRT_ISWAP_GATESET` or in the `cirq.google.FSIM_GATESET`.
docs/google/devices.md:It can be accessing by using `cirq.google.Sycamore`. This device has two possible
docs/google/devices.md:used on `cirq.google.optimized_for_sycamore` with optimizer type `sqrt_iswap`
docs/google/devices.md:*  Sycamore gate. This gate, equivalent to FSimGate(π/2, π/6) can be used as `cirq.google.SYC`
docs/google/devices.md:by using `cirq.google.optimized_for_sycamore` with optimizer type `sycamore`
docs/google/devices.md:This grid can be accessed using `cirq.google.Sycamore23` and uses the same gate sets and
docs/google/devices.md:It can be accessing by using `cirq.google.Bristlecone`. Circuits can be compiled to it by using
docs/google/devices.md:`cirq.google.optimized_for_xmon` or by using `cirq.google.optimized_for_sycamore` with
docs/google/devices.md:It can be accessing by using `cirq.google.Foxtail`. Circuits can be compiled to it by using
docs/google/devices.md:`cirq.google.optimized_for_xmon` or by using `cirq.google.optimized_for_sycamore` with
docs/google/calibration.md:import cirq.google as cg
docs/install.md:    python -c 'import cirq; print(cirq.google.Foxtail)'
docs/install.md:    python -c 'import cirq; print(cirq.google.Foxtail)'
docs/install.md:    python -c "import cirq; print(cirq.google.Foxtail)"
docs/dev/notebooks.md:Unfortunately we have no easy way to test notebooks with external API dependencies, e.g. cirq.google's Engine API.
docs/dev/development.md:        print(cirq.google.Foxtail)
docs/dev/development.md:    python -c "import cirq; print(cirq.google.Foxtail)"

I'm happy to go through these individually and verify they all match up with the new module if that's useful, but it'll take a while.

@MichaelBroughton MichaelBroughton self-assigned this Nov 9, 2021
Copy link
Collaborator

@MichaelBroughton MichaelBroughton left a comment

Choose a reason for hiding this comment

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

LGTM.

but it'll take a while.

In that case I may do a follow up so we spend as few days as possible with broken docs.

@MichaelBroughton MichaelBroughton added the automerge Tells CirqBot to sync and merge this PR. (If it's running.) label Nov 9, 2021
@CirqBot CirqBot added the front_of_queue_automerge CirqBot uses this label to indicate (and remember) what's being merged next. label Nov 9, 2021
@CirqBot CirqBot merged commit 6fdad5f into quantumlib:master Nov 9, 2021
@CirqBot CirqBot removed automerge Tells CirqBot to sync and merge this PR. (If it's running.) front_of_queue_automerge CirqBot uses this label to indicate (and remember) what's being merged next. labels Nov 9, 2021
CirqBot pushed a commit that referenced this pull request Nov 9, 2021
Follow up from #4647 replacing the rest of the uses of `cirq.google` in the `docs`.
rht pushed a commit to rht/Cirq that referenced this pull request May 1, 2023
)

Very minor fix.  The install guide at https://quantumai.google/cirq/install has a validation step that references `cirq.google` which is a deprecated usage on new installs, example:

```
[amcnamara] > python -c 'import cirq; print(cirq.google.Foxtail)'
<string>:1: DeprecationWarning: cirq.google was used but is deprecated.
 it will be removed in cirq v0.14.
 Use cirq_google instead.

(0, 0)───(0, 1)───(0, 2)───(0, 3)───(0, 4)───(0, 5)───(0, 6)───(0, 7)───(0, 8)───(0, 9)───(0, 10)
│        │        │        │        │        │        │        │        │        │        │
│        │        │        │        │        │        │        │        │        │        │
(1, 0)───(1, 1)───(1, 2)───(1, 3)───(1, 4)───(1, 5)───(1, 6)───(1, 7)───(1, 8)───(1, 9)───(1, 10)
[amcnamara] > python -c 'import cirq_google; print(cirq_google.Foxtail)'
(0, 0)───(0, 1)───(0, 2)───(0, 3)───(0, 4)───(0, 5)───(0, 6)───(0, 7)───(0, 8)───(0, 9)───(0, 10)
│        │        │        │        │        │        │        │        │        │        │
│        │        │        │        │        │        │        │        │        │        │
(1, 0)───(1, 1)───(1, 2)───(1, 3)───(1, 4)───(1, 5)───(1, 6)───(1, 7)───(1, 8)───(1, 9)───(1, 10)
```
rht pushed a commit to rht/Cirq that referenced this pull request May 1, 2023
Follow up from quantumlib#4647 replacing the rest of the uses of `cirq.google` in the `docs`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes Makes googlebot stop complaining. Size: XS <10 lines changed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants