qiskit-community / qiskit-quantinuum-provider Goto Github PK
View Code? Open in Web Editor NEWQiskit provider for Quantinuum backends.
License: Apache License 2.0
Qiskit provider for Quantinuum backends.
License: Apache License 2.0
The Qiskit's PyPI account is enabling 2FA on Oct 19. As a consequence, deploying this repo won longer be able to use password authentication for publishing this package to PyPI after this date. The best mechanism PyPI offers for publishing now is trusted publishers:
https://docs.pypi.org/trusted-publishers/using-a-publisher/
which authorizes a GitHub Action workflow to push to PyPI and bypasses the need for any user credentials.
So, this repo needs such a workflow. Take a look to other project as examples:
.github/workflows/wheels.yml
in https://github.com/Qiskit/qiskit/pull/10999/files.github/workflows/deploy-code.yml
in https://github.com/qiskit-community/qiskit-machine-learning/pull/698/filesOnce done, a manual linking process needs to be done in the web UI by @mtreinish .
I was wondering what the status of this package is? Is it meant to be currently operational?
Are there plans to have it in pypi?
Currently installing qiskit-quantinuum-provider
via source (as shown in #27 ) seems to not work for me.
It seems that the package tries to establish/verify credentials on import. For example running from qiskit_quantinuum import Quantinuum
from a command-line interpreter just gets stuck.
Running that from within a jupyter notebook brings out my browser's keyring dialog, which I can't seem to get through.
Assuming this package is actually meant to be operational(?), it could make sense to separate importing from any sort of account management. Since I can't import the package, I can't delete/load/save any account info.
run from qiskit_quantinuum import Quantinuum
from a command-line interpreter.
import succeeds and one can run commands to manage account (i.e. login, delete, save)
would be good to have it clearly stated if this package is actually meant to be used.
Thanks!
Executing
from qiskit.providers.honeywell import Honeywell
gives ImportError: cannot import name 'validate_qobj_against_schema' from 'qiskit.qobj'
Do the import mentioned above with Qiskit Terra version 0.19.1.
Should import correctly
In this upgrade log, https://github.com/Qiskit/qiskit-terra/blob/d5094eeca27f2c0f3c13f23f1e812cd41b6108f2/releasenotes/notes/0.19/remove-schemas-ca9f3f2e0f08bca8.yaml , it suggests to manually building jsonschema
validation function. From a new user's perspective, it is not clear what to do exactly.
I'm a Cyber Security researcher developing PackjGuard [1]. Our tool has detected a deleted dependency vulnerability in this repository.
The package qiskit-quantinuum-provider
mentioned in file README
at line 14 does not exist on the public Pypi registry. A bad actor can hijack this package to propagate malicious code.
Not only your apps/service is vulnerable to this attack, but users of your open-source Github repo are also vulnerable to this attack.
Please highlight this in file README and register a placeholder package for qiskit-quantinuum-provider
on public Pypi soon to remediate.
Thanks!
PackjGuard is a Github app that monitors repos for malicious/vulnerable dependencies and mitigates attacks by creating pull requests for automatic remediation https://github.com/marketplace/packjguard
I'm reopening #26 as I still believe this to not be completely resolved.
Regarding being able to use the package, I have a question about usage. I see that the .save_account
method naturally points to the Honeywell page for user login. Naturally, I'd rather use the qapi.quantinuum.com/
URL instead. I see that one can configure this (in principle) in the proxies
variable
import os
from qiskit.providers.honeywell import Honeywell
USERNAME = os.environ.get("QUANTINUUM_USERNAME")
PASSWORD = os.environ.get("QUANTINUUM_PASSWORD")
Honeywell.save_account(USERNAME,
proxies = { 'urls': {'http':
f'http://{USERNAME}:{PASSWORD}@qapi.quantinuum.com/',
'https':
f'http://{USERNAME}:{PASSWORD}@qapi.quantinuum.com/'
} })
backends = Honeywell.backends()
backend = Honeywell.get_backend(machine)
However, this seems to fail is appears to be pointing to the Honeywell login link despite the fact that (I thought) I was configuring it to login to a different URL. I'm most likely doing something wrong, but is it obvious what that might be? Thank you again for your help!
Here is the error output upon trying to call the associated save_account
method:
/Users/vincent.russo/Library/Caches/pypoetry/virtualenvs/benchmark-Is--SOOG-py3.11/lib/python3.11/site-packages/qiskit/providers/honeywell/__init__.py:38: FutureWarning: This is the final release of qiskit-honeywell-provider. It will be replaced by the qiskit-quantinuum-provider package in the future.
warnings.warn("This is the final release of qiskit-honeywell-provider. "
Enter your password:
Traceback (most recent call last):
File "/Users/vincent.russo/Projects/resarch/unitary_fund/metriq-api/benchmark/benchmark/QC-App-Oriented-Benchmarks/quantum-fourier-transform/qiskit/qft_benchmark.py", line 427, in <module>
backends = Honeywell.backends()
^^^^^^^^^^^^^^^^^^^^
File "/Users/vincent.russo/Library/Caches/pypoetry/virtualenvs/benchmark-Is--SOOG-py3.11/lib/python3.11/site-packages/qiskit/providers/honeywell/honeywellprovider.py", line 92, in backends
if not self._api.has_token():
^^^^^^^^^^^^^^^^^^^^^
File "/Users/vincent.russo/Library/Caches/pypoetry/virtualenvs/benchmark-Is--SOOG-py3.11/lib/python3.11/site-packages/qiskit/providers/honeywell/api/honeywellclient.py", line 76, in has_token
return bool(self.client_api.session.credentials.access_token)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/vincent.russo/Library/Caches/pypoetry/virtualenvs/benchmark-Is--SOOG-py3.11/lib/python3.11/site-packages/qiskit/providers/honeywell/api/session.py", line 96, in credentials
self.update_auth()
File "/Users/vincent.russo/Library/Caches/pypoetry/virtualenvs/benchmark-Is--SOOG-py3.11/lib/python3.11/site-packages/qiskit/providers/honeywell/api/session.py", line 89, in update_auth
self.headers.update({'Authorization': self._credentials.access_token})
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/vincent.russo/Library/Caches/pypoetry/virtualenvs/benchmark-Is--SOOG-py3.11/lib/python3.11/site-packages/qiskit/providers/honeywell/credentials/credentials.py", line 146, in access_token
return self._login()
^^^^^^^^^^^^^
File "/Users/vincent.russo/Library/Caches/pypoetry/virtualenvs/benchmark-Is--SOOG-py3.11/lib/python3.11/site-packages/qiskit/providers/honeywell/credentials/credentials.py", line 274, in _login
self._authenticate()
File "/Users/vincent.russo/Library/Caches/pypoetry/virtualenvs/benchmark-Is--SOOG-py3.11/lib/python3.11/site-packages/qiskit/providers/honeywell/credentials/credentials.py", line 205, in _authenticate
status_code, message = self._request_tokens(body)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/vincent.russo/Library/Caches/pypoetry/virtualenvs/benchmark-Is--SOOG-py3.11/lib/python3.11/site-packages/qiskit/providers/honeywell/credentials/credentials.py", line 155, in _request_tokens
response = sess.post(
^^^^^^^^^^
File "/Users/vincent.russo/Library/Caches/pypoetry/virtualenvs/benchmark-Is--SOOG-py3.11/lib/python3.11/site-packages/requests/sessions.py", line 635, in post
return self.request("POST", url, data=data, json=json, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/vincent.russo/Library/Caches/pypoetry/virtualenvs/benchmark-Is--SOOG-py3.11/lib/python3.11/site-packages/qiskit/providers/honeywell/api/session.py", line 170, in request
raise RequestsApiError(ex, message) from None
qiskit.providers.honeywell.api.exceptions.RequestsApiError: HTTPSConnectionPool(host='qapi.honeywell.com', port=443): Max retries exceeded with url: /v1/login (Caused by ProxyError('Cannot connect to prox
I'm a Cyber Security researcher developing PackjGuard [1]. Our tool has detected a deleted dependency vulnerability in this repository.
The package qiskit-quantinuum-provider
mentioned in file README
at line 14 does not exist on the public Pypi registry. A bad actor can hijack this package to propagate malicious code.
Not only your apps/service is vulnerable to this attack, but users of your open-source Github repo are also vulnerable to this attack.
Please highlight this in file README and register a placeholder package for qiskit-quantinuum-provider
on public Pypi soon to remediate.
Thanks!
When importing honeywell-provider with code
from qiskit.providers.honeywell import Honeywell
prompted with ModuleNotFound Error, "Marshmallow" not found
"pip install qiskit-honeywell-provider"
"from qiskit.providers.honeywell import Honeywell"
Provider should be imported without error
I manually install marshmallow using pip then everything works. Perhaps we should add it to the dependency file?
It appears as though one is unable to install the qiskit-quantinuum-provider
package either via the PyPi server (as it is not present) or via Git. IOW, doing:
pip3 install qiskit-quantinuum-provider
is broken as the PyPi link is broken. Alternatively, attempting to install the package via Git, that is:
python -m pip install 'qiskit-quantinuum-provider @ git+ https://github.com/qiskit-community/qiskit-quantinuum-provider'
also fails. It seems as if the last commit to this project was at the end of March of 2023. Are there any plans to continue development on this project or has it been deprioritized? If the latter, are there any specific adaptations one would have to do in order to make use of this provider pattern within Qiskit?
qiskit-honeywell-provider
depends on qiskit-terra (>=0.16.0)
https://www.wheelodex.org/projects/qiskit-honeywell-provider/ which is reaching EoL:
Important
The package qiskit-terra
is not going to be updated after August 15th, 2024. Since Qiskit 0.44 (released on July 27th, 2023), the qiskit
meta-package only contains qiskit-terra
. In Qiskit 1.0 and beyond, the meta-package architecture is removed.
If you are installing or depending on qiskit-terra
, consider changing that to qiskit
: Either qiskit>=0.x,<1
(if you did not transition to Qiskit 1.0 yet) or qiskit>=0.x,<2
(to also include Qiskit 1.*).
Read more.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.