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

Add Quantum Engine support for cirq.CZPowGate #6562

Merged
merged 21 commits into from
Apr 15, 2024

Conversation

eliottrosenberg
Copy link
Collaborator

No description provided.

Copy link

codecov bot commented Apr 13, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.79%. Comparing base (7b7c93d) to head (0d98aa8).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #6562   +/-   ##
=======================================
  Coverage   97.79%   97.79%           
=======================================
  Files        1124     1124           
  Lines       95489    95493    +4     
=======================================
+ Hits        93380    93384    +4     
  Misses       2109     2109           

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

Copy link
Collaborator

@senecameeks senecameeks left a comment

Choose a reason for hiding this comment

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

LGTM

@@ -644,6 +679,7 @@ def test_to_proto():
cirq.ops.FSimGate, tags_to_accept=[cirq_google.FSimViaModelTag()]
): base_duration
* 10,
cirq.GateFamily(cirq.CZPowGate): base_duration * 11,
Copy link
Collaborator

Choose a reason for hiding this comment

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

just to double check CZ will take 11ns, right?

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 was confused about this test until I stared at it for a while, so just pointing out a couple of things:

  • These gate durations are arbitrary; take a look at lines 118-151, and you'll see that they are just arbitrary durations, and then the test compares them to gate_durations = [(n, i * 1000) for i, n in enumerate(gate_names)] (line 83).
  • In this test (not in real life), cz is given a duration of 3 ns (line 127).

@eliottrosenberg eliottrosenberg merged commit 2eb6d63 into main Apr 15, 2024
34 checks passed
@eliottrosenberg eliottrosenberg deleted the u/eliottrosenbrg/cphase branch April 15, 2024 21:49
jselig-rigetti pushed a commit to jselig-rigetti/Cirq that referenced this pull request May 28, 2024
* Add Quantum Engine support for cirq.CZPowGate

* build protos

* update test

* update test

* add _CZ_POWER_GATE_FAMILY and keep _CZ_GATE_FAMILY

* small revert to original

* black

* update test

* update test

* update test

* add _CZ_POWER_TARGET_GATES

* update target gateset

* update test

* update gatesets

* update gatesets

* update gatesets

* update test

* update test

* update test

* POW instead of POWER

* POW instead of POWER
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.

4 participants