pygsti.algorithms.randomcircuit.sample_pauli_layer_as_compiled_circuit

pygsti.algorithms.randomcircuit.sample_pauli_layer_as_compiled_circuit#

sample_pauli_layer_as_compiled_circuit(pspec, absolute_compilation, qubit_labels=None, keepidle=False, rand_state=None)#

Samples a uniformly random n-qubit Pauli and converts it to the gate-set of pspec.

Parameters:
  • pspec (QubitProcessorSpec) – The QubitProcessorSpec for the device.

  • absolute_compilation (CompilationRules) – Rules for exactly (absolutely) compiling the “native” gates of pspec into clifford gates.

  • qubit_labels (list, optional) – If not None, a list of a subset of the qubits from pspec that the pauli circuit should act on.

  • keepidle (bool, optional) – Whether to always have the circuit at-least depth 1.

  • rand_state (RandomState, optional) – A np.random.RandomState object for seeding RNG

Returns:

A circuit corresponding to a uniformly random n-qubit Pauli, converted to the native gate-set of pspec.

Return type:

Circuit