Code stays running after job is done in IBMQ

Hello. I’m having a problem where I am sending a QNode to the IBM device as a job, then I see that the job is finished in IBM’s dashboard, but the code does not stop running. I don’t know what’s happening. How can I get my job data back from IBM’s device? Below is my code where I define the device and the circuit then run by quantum node.

qiskit.IBMQ.load_account()
ibm_dev = qml.device('qiskit.ibmq', wires=3, shots=nshots)
n=2
theta = np.pi/4
time = 1
A_vedral = np.array([[10, 0, 0],
                     [0, 10, 0],
                     [0, 0, 5]])
@qml.qnode(ibm_dev)
def circ0(params, wires):
  theta, A, time, n = params
  qml.PauliX(wires=wires[0])
  qml.PauliX(wires=wires[1])
  qml.Hadamard(wires=wires[1])
  qml.CNOT(wires=[wires[1],wires[0]])
  # ApproxTimeEvolution(penny_Hamiltonian(theta, A), time, n)
  qml.CNOT(wires=[wires[1],wires[0]])
  qml.Hadamard(wires=wires[1])
  return qml.counts()

@qml.qnode(ibm_dev)
def circ1(params, wires):
  theta, A, time, n = params
  qml.PauliX(wires=wires[0])
  qml.PauliX(wires=wires[1])
  qml.PauliX(wires=wires[2])
  qml.Hadamard(wires=wires[1])
  qml.CNOT(wires=[wires[1],wires[0]])
  # ApproxTimeEvolution(penny_Hamiltonian(theta, A), time, n)
  qml.CNOT(wires=[wires[1],wires[0]])
  qml.Hadamard(wires=wires[1])
  return qml.counts()

params = [theta, A_vedral, time, n]
result1 = circ0(params, range(3))

It keeps loading like this in Google Colab.

image

Hey @Pedro_Alvarez! Just checking with a few people internally as to what might be going on here. Will get back to you ASAP!

Hey @isaacdevlugt , the problem kinda fixed itself, now it’s working properly.

1 Like

Awesome! We were a little confused here as well. What ended up being the solution?

I just reset Colab’s environment, I don’t really know what was causing the problem.

1 Like

Okay! Well, sometimes turning off and on again is the solution :sweat_smile: