Skip to content

Commit f246c2b

Browse files
authored
Add Quantum Engine Support for InternalGate (#6613)
* add internal gate to device proto * build protos * tests pass * add docstring * build protos * build protos
1 parent 3b975b0 commit f246c2b

File tree

5 files changed

+79
-45
lines changed

5 files changed

+79
-45
lines changed

cirq-google/cirq_google/api/v2/device.proto

+4
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ message GateSpecification {
5858
Wait wait = 11;
5959
FSimViaModel fsim_via_model = 12;
6060
CZPowGate cz_pow_gate = 13;
61+
InternalGate internal_gate = 14;
6162
}
6263

6364
// Gate types available to Google devices.
@@ -76,6 +77,9 @@ message GateSpecification {
7677
message Wait {}
7778
message FSimViaModel {}
7879
message CZPowGate {}
80+
// This gate gets mapped to the internal representation corresponding
81+
// to <gate_module.gate_name>.
82+
message InternalGate {}
7983
}
8084

8185
message GateSet {

cirq-google/cirq_google/api/v2/device_pb2.py

+44-42
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cirq-google/cirq_google/api/v2/device_pb2.pyi

+19-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cirq-google/cirq_google/devices/grid_device.py

+3
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,9 @@ class _GateRepresentations:
164164
gate_spec_name='fsim_via_model',
165165
supported_gates=[cirq.GateFamily(cirq.FSimGate, tags_to_accept=[ops.FSimViaModelTag()])],
166166
),
167+
_GateRepresentations(
168+
gate_spec_name='internal_gate', supported_gates=[cirq.GateFamily(ops.InternalGate)]
169+
),
167170
]
168171

169172

0 commit comments

Comments
 (0)