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 Cirq to 0.11 and Fixes #182

Merged
merged 7 commits into from
Jul 29, 2021
Merged

Conversation

mpharrigan
Copy link
Collaborator

@mpharrigan mpharrigan commented Jul 13, 2021

  • PyTKet checks for gate equality instead of doing isinstance() checks, so Cirq's change to having a real Rx class breaks compilation.
  • PyTKet got rid of Device
  • get engine calibration moved
  • some (but not all) cirq.google -> cirq_google migration

@google-cla google-cla bot added the cla: yes label Jul 13, 2021
@mpharrigan mpharrigan mentioned this pull request Jul 13, 2021
9 tasks
@mpharrigan mpharrigan requested a review from balopat July 13, 2021 23:11
@dstrain115
Copy link
Collaborator

We should change the PR name and description to match the fact that multiple changes (wrap_function, nbfmt, etc) are involved in this PR. Otherwise, it looks good so far.

@mpharrigan
Copy link
Collaborator Author

I was using this PR as a little testbed. I hope to merge those other changes independently and then rebase this one so it's only the Rx change

PyTKet checks for gate equality instead of doing
isinstance() checks, so Cirq's change to having
a real Rx class breaks compilation.

Change-Id: I36c04119ff01c28f44ff4a9296e8d6ae6dcb4de4
│ │ │ │ │ │
│ │ │ │ │ │
│ │ │ │ │ │
X X X X X X
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

annoyingly, this test behavior will now change depending on cirq version that you're using recirq with, although the circuits have the same effect.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Optional: Is there a better way to test it besides testing the diagram output? If not, oh well I guess?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I'll investigate. I think we have some tests for unitary equivalence, which is the important thing. This may have been an additional test to be sure (or to check for keeping the circuit structured how we expected)

Change-Id: I222bcab3840d96153e673adea4f7301dc98fe0b2
Change-Id: I27d2203521a7a9858db82d107433d21e47224f61
Change-Id: Id6b3def2817c4b2365cb7ad66aa7d43ce011b8f2
Change-Id: I819b8e69f4822939e38996ec477eb6b9bb543982
@mpharrigan mpharrigan changed the title Switch to using XPowGate instead of Rx Update Cirq to 0.11 and Fixes Jul 26, 2021
@mpharrigan
Copy link
Collaborator Author

We don't have an automated test for the notebooks, but the fermi hubbard example is currently broken by the loss of cirq.TrialResult backwards compatibility quantumlib/Cirq#4318

Change-Id: Ie1332eb59f388e64b4a8d9fc10301fdf4e5c6ae4
│ │ │ │ │ │
│ │ │ │ │ │
│ │ │ │ │ │
X X X X X X
Copy link
Collaborator

Choose a reason for hiding this comment

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

Optional: Is there a better way to test it besides testing the diagram output? If not, oh well I guess?

requirements.txt Outdated Show resolved Hide resolved
Change-Id: I4f81f623f26b7aa4e5943566986248a4a0dd8d3b
@mpharrigan mpharrigan merged commit 423b950 into quantumlib:master Jul 29, 2021
@mpharrigan mpharrigan deleted the 2021-07-rx branch July 29, 2021 19:03
madcpf pushed a commit to madcpf/ReCirq that referenced this pull request Sep 5, 2021
* Switch to using XPowGate instead of Rx

PyTKet checks for gate equality instead of doing
isinstance() checks, so Cirq's change to having
a real Rx class breaks compilation.

Change-Id: I36c04119ff01c28f44ff4a9296e8d6ae6dcb4de4

* requirements

Change-Id: I222bcab3840d96153e673adea4f7301dc98fe0b2

* Pytket changes

Change-Id: I27d2203521a7a9858db82d107433d21e47224f61

* Fix some deprecations

Change-Id: Id6b3def2817c4b2365cb7ad66aa7d43ce011b8f2

* Fix some cirq.google deprecations

Change-Id: I819b8e69f4822939e38996ec477eb6b9bb543982

* Split cirq into cirq-core and cirq-google

Change-Id: Ie1332eb59f388e64b4a8d9fc10301fdf4e5c6ae4

* Bump version

Change-Id: I4f81f623f26b7aa4e5943566986248a4a0dd8d3b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants