pygsti.processors.random_compilation

pygsti.processors.random_compilation#

Randomized circuit compilation via random compiling and central Pauli propagation.

Functions

gate_inverse(label)

Computes the inverse of a given gate label.

haar_random_u3(q[, rand_state])

Generates a Haar-random U3 gate.

haar_random_u3_layer(qubits[, rand_state])

Generates a layer of Haar-random U3 gates.

inverse_u3(args)

Computes the inverse parameters for a U3 gate given its parameters.

mod_2pi(theta)

Modifies an angle to be within the range of -π to π.

pad_layer(layer, qubits)

Pads a layer of gates with idle gates for any unused qubits.

pauli_randomize_circuit(circ[, rand_state, ...])

Performs random compilation on a given circuit by inserting Pauli gates between layers.

pauli_vector_to_u3_layer(p, qubits)

Converts a Pauli vector into a corresponding layer of U3 gates.

randomize_central_pauli(circ[, rand_state, ...])

Perform circuit randomization by propagating a central Pauli layer through the circuit.

u3_cx_cz_inv(circ)

Computes the inverse of a circuit composed of U3, CX and CZ gates.

update_u3_parameters(layer, p, q, qubit_map)

Updates the parameters of U3 gates in a given layer based on the provided Pauli random compiling vectors.

Classes

RandomCompilation([rc_strategy, return_bs, ...])

A class for performing randomized circuit compilation.