@@ -92,16 +92,12 @@ class SupportsDecompose(Protocol):
92
92
"""An object that can be decomposed into simpler operations.
93
93
94
94
All decomposition methods should ultimately terminate on basic 1-qubit and
95
- 2-qubit gates included by default in Cirq. Cirq does not make any guarantees
96
- about what the final gate set is. Currently, decompositions within Cirq
97
- happen to converge towards the X, Y, Z, CZ, PhasedX, specified-matrix gates,
98
- and others. This set will vary from release to release. Because of this
99
- variability, it is important for consumers of decomposition to look for
100
- generic properties of gates, such as "two qubit gate with a unitary matrix",
101
- instead of specific gate types such as CZ gates (though a consumer is
102
- of course free to handle CZ gates in a special way, and consumers can
103
- give an `intercepting_decomposer` to `cirq.decompose` that attempts to
104
- target a specific gate set).
95
+ 2-qubit gates included by default in Cirq. If a custom decomposition is not
96
+ specified, Cirq will decompose all operations to XPow/YPow/ZPow/CZPow/Measurement
97
+ + Global phase gateset. However, the default decomposition in Cirq should be a last resort
98
+ fallback and it is recommended for consumers of decomposition to either not depend
99
+ upon a specific target gateset, or give an `intercepting_decomposer` to `cirq.decompose`
100
+ that attempts to target a specific gate set.
105
101
106
102
For example, `cirq.TOFFOLI` has a `_decompose_` method that returns a pair
107
103
of Hadamard gates surrounding a `cirq.CCZ`. Although `cirq.CCZ` is not a
0 commit comments