cirq.ThreeQubitDiagonalGate

class cirq.ThreeQubitDiagonalGate(diag_angles_radians: List[Union[float, sympy.core.basic.Basic]])[source]

A gate given by a diagonal 8x8 matrix.

__init__(diag_angles_radians: List[Union[float, sympy.core.basic.Basic]]) → None[source]

A three qubit gate with only diagonal elements.

This gate’s off-diagonal elements are zero and it’s on diagonal
elements are all phases.
Parameters

diag_angles_radians – The list of angles on the diagonal in radians. If these values are $(x_0, x_1, ldots , x_7)$ then the unitary has diagonal values $(e^{i x_0}, e^{i x_1}, ldots, e^{i x_7})$.

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.

wrap_in_linear_combination([coefficient])