DihedralUtils.random_gates

DihedralUtils.random_gates(num_qubits)[source]

Pick a random CNOT-dihedral element on num_qubits.

Parameters

num_qubits (int) – number of qubits of the CNOTDihedral object.

Returns

A CNOTDihedral object.

Return type

CNOTDihedral

Raises

ValueError – number of qubits bigger than 2 is not supported.