I am trying to implement Quantum Teleportation Algorithm on an actual device, I am using IBM-Q Jupyter notebook for the same purpose.
The code is as follows:
import qiskit as qk
from qiskit import ClassicalRegister, QuantumRegister, QuantumCircuit
from qiskit import execute, Aer
from qiskit import IBMQ
from qiskit.visualization import plot_histogram
%config InlineBackend.figure_format = 'svg'
def apply_secret_unitary(secret_unitary, qubit, quantum_circuit, dagger):
functionmap = {
'x': quantum_circuit.x,
'y': quantum_circuit.y,
'z': quantum_circuit.z,
'h': quantum_circuit.h,
't': quantum_circuit.t
}
if dagger == 1:
functionmap['t'] = quantum_circuit.tdg
if dagger:
[functionmap[unitary](qubit) for unitary in secret_unitary]
else:
[functionmap[unitary](qubit) for unitary in secret_unitary[::-1]]
secret_unitary = 'hzxhzhx'
qc = QuantumCircuit(3, 1)
'''
qc[0] -> The qubit to be teleported
qc[1] -> entangled state, possessed by alice
qc[2] -> entangled state, possessed by bob
'''
apply_secret_unitary(secret_unitary, qc.qubits[0], qc, dagger = 0)
qc.barrier()
qc.h(1)
qc.cx(1, 2)
qc.barrier()
qc.cx(0, 1)
qc.h(0)
qc.cx(1, 2)
qc.cz(0, 2)
apply_secret_unitary(secret_unitary, qc.qubits[0], qc, dagger = 1)
qc.barrier()
qc.measure(2, 0);
qc.draw(output= 'mpl')
IBMQ.load_account()
provider = IBMQ.get_provider(hub='ibm-q')
provider.backends()
from qiskit.providers.ibmq import least_busy
backend = least_busy(provider.backends(filters = lambda b: b.configuration().n_qubits >= 3 and
not b.configuration().simulator and
b.status().operational == True))
job_exp = execute(qc, backend = backend, shots = 8192)
exp_result = job_exp.result()
exp_measurement_result = exp_result.get_counts()
print(exp_measurement_result)
plot_histogram(exp_measurement_result)
The error which the following code gives is:
IBMQJobApiError: "'400 Client Error: Bad Request for url: https://api.quantum-computing.ibm.com/api/Network/ibm-q/Groups/open/Projects/main/Jobs/5e73033786653e0018a2364e/resultDownloadUrl. Cannot get presigned download url., Error code: 3202.'"
I've tried deleting my account and load a new account using a newly generated token but that doesn't seem to work either.
Clicking the link in the error gives the following error:
OPERATION_NOT_AVAILABLE
404 Shared class "Hub" has no method handling GET /ibm-q/Groups/open/Projects/main/Jobs/5e72ff01121d5e0018bfe775/resultDownloadUrl.
code: 2411
perhaps, I am using a method which is now deprecated. How can I tackle this situation?