Skip to content

Add Quantum Engine support for cirq.CZPowGate#6562

Merged
eliottrosenberg merged 21 commits intomainfrom
u/eliottrosenbrg/cphase
Apr 15, 2024
Merged

Add Quantum Engine support for cirq.CZPowGate#6562
eliottrosenberg merged 21 commits intomainfrom
u/eliottrosenbrg/cphase

Conversation

@eliottrosenberg
Copy link
Copy Markdown
Collaborator

No description provided.

@codecov
Copy link
Copy Markdown

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.

Comment thread cirq-google/cirq_google/devices/grid_device.py
Comment thread cirq-google/cirq_google/devices/grid_device.py Outdated
Copy link
Copy Markdown
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

cirq.ops.FSimGate, tags_to_accept=[cirq_google.FSimViaModelTag()]
): base_duration
* 10,
cirq.GateFamily(cirq.CZPowGate): base_duration * 11,
Copy link
Copy Markdown
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
Copy Markdown
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
@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
BichengYing pushed a commit to BichengYing/Cirq that referenced this pull request Jun 20, 2025
* 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