A limit on the amount of absolute error introduced by the decomposition.
tabulation
If set, a tabulation for the Sycamore gate is used for decomposing Matrix
gates. If unset, an analytic calculation is used for Matrix gates. In both cases,
known decompositions for gates take priority over analytical / tabulation methods.
To get cirq.TwoQubitGateTabulation, call cirq.two_qubit_gate_product_tabulation
with a base gate (in this case, cirq_google.SYC) and a maximum infidelity.
Attributes
gates
name
num_qubits
Maximum number of qubits on which a gate from this gateset can act upon.
postprocess_transformers
List of transformers which should be run after decomposing individual operations.
preprocess_transformers
List of transformers which should be run before decomposing individual operations.
self if all new values are None or identical to the values of current Gateset.
else a new Gateset with identical gates and new values for named arguments.
Check for containment of a given Gate/Operation in this Gateset.
Containment checks are handled as follows:
a) For Gates or Operations that have an underlying gate (i.e. op.gate is not None):
- Forwards the containment check to the underlying <a href="https://quantumai.google/reference/python/cirq/GateFamily"><code>cirq.GateFamily</code></a> objects.
- Examples of such operations include `cirq.GateOperations` and their controlled
and tagged variants (i.e. instances of <a href="https://quantumai.google/reference/python/cirq/TaggedOperation"><code>cirq.TaggedOperation</code></a>,
<a href="https://quantumai.google/reference/python/cirq/ControlledOperation"><code>cirq.ControlledOperation</code></a> where `op.gate` is not None) etc.
b) For Operations that do not have an underlying gate:
- Forwards the containment check to `self._validate_operation(item)`.
- Examples of such operations include `cirq.CircuitOperations` and their controlled
and tagged variants (i.e. instances of <a href="https://quantumai.google/reference/python/cirq/TaggedOperation"><code>cirq.TaggedOperation</code></a>,
<a href="https://quantumai.google/reference/python/cirq/ControlledOperation"><code>cirq.ControlledOperation</code></a> where `op.gate` is None) etc.
The complexity of the method in terms of the number of gates, n, is
a) O(1) when any default cirq.GateFamily instance accepts the given item, except
for an Instance GateFamily trying to match an item with a different global phase.
b) O(n) for all other cases: matching against custom gate families, matching across
global phase for the default Instance GateFamily, no match against any underlying
gate family.