qilimanjaro-tech / qiboconnection

Python library that allows you to execute quantum programs on Qilimanjaro's QPUs and simulators.
Apache License 2.0
20 stars 2 forks source link

Qiboconnection qicks you out quite fast #116

Open anapalu opened 1 year ago

anapalu commented 1 year ago

Feature details

It has happened to me often that, while my job is in the queue, 10 minutes can easily go by and thus I need to go back to the beginning of the notebook in order to run my access token again. This is not insurmountably terrible, but it is quite annoying.

code cell: results = connection.get_result(job_id=5704) output: `{ "title": "Unauthorized", "status": 401, "detail": "JWTExpired: Error verifying the authorisation access token. Expired at 1699523133, time: 1699524606(leeway: 60) 401 Client Error: for url: https://qilimanjaroqaas.ddns.net:8080/api/v1/jobs/5704" } {"title":"Unauthorized","status":401,"detail":"JWTExpired: Error verifying the authorisation access token. Expired at 1699523133, time: 1699524606(leeway: 60)"}

Your job with id 5704 is completed.`

Implementation

The easy solution for the user now is to put the code lines that connect them to the device (the ones that they run at the beginning of the notebook) inside a function with their credentials and run the function every time they get this message. I guess an implementation that essentially does the same thing behind the curtain would be enough.

How important would you say this feature is?

1: Not important. Would be nice to have.

Additional information

No response

AlbertMitjans commented 1 year ago

Hi @anapalu, thank you for posting this issue!

@JavierSab @ziiiki when an access token expires, what do you think of requesting a new one without showing any error message to the user?