pygsti.algorithms.randomcircuit.random_alternating_clifford_circ#
- random_alternating_clifford_circ(pspec, depth, qubit_labels=None, two_q_gate_density=0.25, rand_state=None)#
Generates a random circuit with composite layers cponsisting of a layer of two-qubit gates followed by a layer of of single-qubit gates.
- Parameters:
pspec (QubitProcessorSpec) – The QubitProcessorSpec for the device that the circuit is being sampled for. The pspec is always handed to the sampler, as the first argument of the sampler function.
depth (int) – The number of composite layers in the final circuit.
qubit_labels (list, optional) – If not None, a list of the qubFalseits that the RB circuit is to be sampled for. This should be all or a subset of the qubits in the device specified by the QubitProcessorSpec pspec. If None, it is assumed that the RB circuit should be over all the qubits. Note that the ordering of this list is the order of the ``wires’’ in the returned circuit, but is otherwise irrelevant.
- samplerargslist, optional
A list of arguments that are handed to the sampler function, specified by sampler. The first argument handed to the sampler is pspec and samplerargs lists the remaining arguments handed to the sampler.
- Returns:
A random circuit with 2*depth layers
- Return type: