0
$\begingroup$

When I try to connect to ibm real quantum hardware locally,

from qiskit_ibm_runtime import QiskitRuntimeService
service = QiskitRuntimeService()

I got the following error, the reason may be that I have turned on the system proxy problem.

"HTTPSConnectionPool(host='auth.quantum-computing.ibm.com', port=443): Max retries exceeded with url: /api/version (Caused by SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:****)')))"

I want to know how to connect to ibm's real quantum hardware locally besides running the code in jupyter in ibm cloud under the premise of turning on the system proxy?

$\endgroup$
2
  • $\begingroup$ When you say, 'besides running the code in jupyter in IBM cloud" are you refering to the IBM Quantum Lab? Are you wanting to access the quantum devices without needing to login to IBM Quantum? Or are you wanting to avoid Jupyter notebooks entirely? $\endgroup$
    – PGibbon
    Mar 29, 2023 at 11:53
  • $\begingroup$ Sure! I am referring to the IBM Quantum Lab when I say “besides running the code in Jupyter in IBM cloud”. I have logged into IBM Quantum via “QiskitRuntimeService.save_account()” on my computer and now I want to run your qiskit-runtime job using quantum real hardware locally by using a backend. I don’t want to avoid using Jupyter Notebook completely because I’ve made some changes to some packages. So I want to use Jupyter on my computer to call real quantum hardware instead of running the program in Jupyter Notebook inside IBM Quantum Lab. Thank you for your prompt reply. $\endgroup$
    – Mistico013
    Mar 29, 2023 at 12:52

1 Answer 1

1
$\begingroup$

I think I understand what you are wanting to do and I hope this helps, but I'm not familiar with the particular code you have used above so perhaps I will miss the mark...

From my understanding it seems like you are looking for the code that is necessary to access IBM Quantum devices without logging into IBM Quantum itself.

I am not sure what you have already got downloaded, but I am assuming you have git, anaconda python (or some other source of Jupyter notebooks) and you have installed qiskit locally.

If this is the case you should be able to open a Jupyter notbook and run the following cells cells to activate IBMQ locally

Where the code states "YOUR NUMBER PASTED HERE" copy and past your API token from the dashboard of IBM Quantum.

Once you have run these cells, do not delete this file. As long as this has been run on your device you will have access.

Hope this helps!

$\endgroup$
1
  • $\begingroup$ Thank you for your answer! I have resolved the issue by restarting the environment. $\endgroup$
    – Mistico013
    Apr 16, 2023 at 7:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.