# Device Repetition Rate on Melbourne

I've been receiving "Circuit runtime is greater than the device repetition rate " errors when running a relatively simple circuit on ibmq_16_Melbourne, but have had no issues whatsoever when running the same on the Aer backend simulator. The circuit size is 11 and depth is 6. Would anyone have any idea why this might be happening? Thank you!

Clarification: I am attempting to implement Shor's algorithm using the circuit image below. I have heard mentioned that the three large controlled multiplication gates are not necessary, but I am admittedly not clear on this as my results are much different without them. Any advice is greatly appreciated. • @Jonathcraft Edited for clarification. Dec 3, 2020 at 21:56
• @LordofLannister What make you think that circuit has depth 6? Those purple blocks represent certain operator... it is not just a basic quantum gate. Dec 4, 2020 at 5:42
• That was the output from Qiskit's depth() function, however the transpiled circuit does of course have a larger depth. Dec 4, 2020 at 16:03

The error Circuit runtime is greater than the device repetition rate  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)