cirq.RandomGateChannel

class cirq.RandomGateChannel(*, sub_gate: cirq.Gate, probability: Union[float, sympy.core.basic.Basic])[source]

Applies a sub gate with some probability.

__init__(*, sub_gate: cirq.Gate, probability: Union[float, sympy.core.basic.Basic])[source]

Initialize self. See help(type(self)) for accurate signature.

Methods

controlled([num_controls, control_values, …])

Returns a controlled version of this gate. If no arguments are

num_qubits()

The number of qubits this gate acts on.

on(*qubits)

Returns an application of this gate to the given qubits.

validate_args(qubits)

Checks if this gate can be applied to the given qubits.

with_probability(probability)

wrap_in_linear_combination([coefficient])