Skip to content

Commit ac20afb

Browse files
authored
Use GoogleCZTargetGateset; add device gateset as additional gates in target gatesets (quantumlib#5765)
* GridDevice target gateset generation logic now matches all required gates for a particular gateset, rather than just the 2q gate. * In target gatesets that support additional_gates, it's set to all gates in a device's gateset other than required gates in the target gateset, so that device gates are not decomposed during circuit transformation. First commit is from quantumlib#5744 @tanujkhattar cc @dstrain115
1 parent 0c289d4 commit ac20afb

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

cirq/transformers/target_gatesets/cz_gateset.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ def __init__(
5656
allow_partial_czs: If set, all powers of the form `cirq.CZ**t`, and not just
5757
`cirq.CZ`, are part of this gateset.
5858
additional_gates: Sequence of additional gates / gate families which should also
59-
be "accepted" by this gateset. Defaults to `cirq.GlobalPhaseGate`.
59+
be "accepted" by this gateset. This is empty by default.
6060
"""
6161
super().__init__(
6262
ops.CZPowGate if allow_partial_czs else ops.CZ,

cirq/transformers/target_gatesets/sqrt_iswap_gateset.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ def __init__(
6262
use_sqrt_iswap_inv: If True, `cirq.SQRT_ISWAP_INV` is used as part of the gateset,
6363
instead of `cirq.SQRT_ISWAP`.
6464
additional_gates: Sequence of additional gates / gate families which should also
65-
be "accepted" by this gateset. Defaults to `cirq.GlobalPhaseGate`.
65+
be "accepted" by this gateset. This is empty by default.
6666
6767
Raises:
6868
ValueError: If `required_sqrt_iswap_count` is specified and is not 0, 1, 2, or 3.

0 commit comments

Comments
 (0)