The error Circuit runtime is greater than the device repetition rate [8020]
is associate with the fact that your circuit is too deep. The device can't handle that many quantum operations.
The depth of 6 might not seems a lot but it can when pretty large when you map it to the real hardware device. This is because not all the qubits are connected in a quantum processor. Hence a lot of overhead swapping needs to be done.
For example: Consider this depth 6 random circuit.
You can create this random circuit with some fixed depth through Qiskit as follows:
from qiskit.circuit.random import random_circuit
num_qubits = 11
circuit_depth = 5
max_operands = 3 #between 0 and 3
measurement_all_qubit = True
qc_random = random_circuit(num_qubits, circuit_depth, max_operands=max_operands, measure=measurement_all_qubit)
print( 'original ircuit depth', qc_random.depth() )
qc_random.draw( 'mpl',style={'name': 'bw'}, scale = 1, filename = 'random depth 6', plot_barriers= False, initial_state = True)
The above doesn't take into account the hardware connectivity issues. But if we are going to map this onto real hardware, like the ibmq_16_melbourne
then it would get larger. In fact, it would translate to a circuit of depth of 108. Below is the transpiled circuit being mapped to ibmq_16_melbourne
.
Here is the code for that transpilation process if you are interested:
provider = IBMQ.load_account()
from qiskit.compiler import transpile
Circuit_Transpile = transpile(qc_random, provider.get_backend('ibmq_16_melbourne') , optimization_level=3)
print('Transpiled circuit depth', Circuit_Transpile.depth() )
Circuit_Transpile.draw( 'mpl',style={'name': 'bw'}, filename = 'random transpiled', plot_barriers= False, initial_state = True, scale = 1)