qbraid.interface.random.random_circuit
- random_circuit(package, num_qubits=None, depth=None, **kwargs)[source]
Generate random circuit of arbitrary size and form.
- Parameters:
package (
str
) – qBraid supported software packagenum_qubits (
Optional
[int
]) – Number of quantum wires. If not provided, set randomly in range [2,4].depth (
Optional
[int
]) – Layers of operations (i.e. critical path length) If not provided, set randomly in range [2,4].
- Raises:
PackageValueError – if
package
is not supportedQbraidError – when invalid random circuit options given
- Returns:
randomly generated quantum circuit/program
- Return type:
QPROGRAM