qbraid.interface

Module providing utilities for interfacing with supported quantum programs.

Functions

random_circuit(package[, num_qubits, depth])

Generate random circuit of arbitrary size and form.

random_unitary_matrix(dim)

Create a random (complex) unitary matrix of order dim

circuits_allclose(circuit0, circuit1[, ...])

Check if quantum program unitaries are equivalent.

assert_allclose_up_to_global_phase(a, b, ...)

Checks if two numpy arrays are equal up to a global phase, within a specified tolerance, i.e. if a ~= b * exp(i t) for some t.

Submodules

random

Module for generaing random quantum circuits and unitary matrices for testing.