generate_abstract_qv_circuit

forest.benchmarking.quantum_volume.generate_abstract_qv_circuit(depth: int) → Tuple[List[numpy.ndarray], numpy.ndarray]

Produces an abstract description of the square model circuit of given depth=width used in a quantum volume measurement.

The description remains abstract as it does not directly reference qubits in a circuit; rather, the circuit is specified as a list of depth many permutations and depth many layers of two qubit gates specified as a depth by depth//2 numpy array whose entries are each a haar random four by four matrix (a single 2 qubit gate). Each permutation is simply a list of the numbers 0 through depth-1, where the number x at index i indicates the qubit in position i should be moved to position x. The 4 by 4 matrix at gates[i, j] is the gate acting on the qubits at positions 2j, 2j+1 after the i^th permutation has occurred.

Parameters:depth – the depth, and also width, of the model circuit
Returns:the random depth-many permutations and depth by depth//2 many 2q-gates which comprise the model quantum circuit of [QVol] for a given depth.