![]() |
THIS FUNCTION IS DEPRECATED.
cirq_google.optimizers.gate_product_tabulation(
base_gate: np.ndarray,
max_infidelity: float,
*,
sample_scaling: int = 50,
allow_missed_points: bool = True,
random_state: cirq.RANDOM_STATE_OR_SEED_LIKE = None
) -> cirq_google.optimizers.GateTabulation
IT WILL BE REMOVED IN cirq v0.16
.
Use cirq.two_qubit_gate_product_tabulation instead.
Generate a GateTabulation for a base two qubit unitary.
Args:
base_gate: The base gate of the tabulation.
max_infidelity: Sets the desired density of tabulated product unitaries.
The typical nearest neighbor Euclidean spacing (of the KAK vectors)
will be on the order of \\(\sqrt{max\_infidelity}\\). Thus the number of
tabulated points will scale as \\(max\_infidelity^{-3/2}\\).
sample_scaling: Relative number of random gate products to use in the
tabulation. The total number of random local unitaries scales as
~ \\(max\_infidelity^{-3/2} * sample\_scaling\\). Must be positive.
random_state: Random state or random state seed.
allow_missed_points: If True, the tabulation is allowed to conclude
even if not all points in the Weyl chamber are expected to be
compilable using 2 or 3 base gates. Otherwise an error is raised
in this case.
Returns:
A GateTabulation object used to compile new two-qubit gates from
products of the base gate with 1-local unitaries.
Raises:
ValueError: If `allow_missed_points` is False and not all points
in the Weyl chamber were compilable using 2 or 3 base gates.