spheres.stabilization.pytket.random_pytket_circuit¶
-
spheres.stabilization.pytket.
random_pytket_circuit
(n_qubits=1, depth=1)[source]¶ Generates a random circuit specification with a specified number of qubits and depth. Returns a dictionary containing a history of gates, divided into layers. We don’t return a circuit itself so we can continue to manipulate the circuit.
- Parameters
n_qubits (int) –
depth (int) –
- Returns
circ_info –
- “history”: a list of circuit layers, each of which contains
a list of dicts with keys “gate”: (‘H’, ‘S’, ‘T’, or ‘CX’) and “to”: list of qubits.
- ”gate_map”: a dictionary mapping gate strings to functions that take a circuit
and qubit indices and add the gate to the circuit
”n_qubits”
”depth”
- Return type
dict