-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
get num of qubits from api or use 36 and fix EM sampler #188
Conversation
qiskit_ionq/helpers.py
Outdated
).json()["qubits"] | ||
except Exception: # pylint: disable=broad-except | ||
if backend == "ionq_qpu.harmony": | ||
return 11 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why this? falling back to a hard-coded value when the API is down feels a little weird
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
because the user might not have an api_key set, and we require that to get characterization data (including the number of qubits)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah I meant more, the part where we code in the current system sizes, would worry it could quickly become stale, like the new method with warning and a fixed cap, thanks for changing!
qiskit_ionq/helpers.py
Outdated
elif backend == "ionq_qpu.forte-1": | ||
return 36 | ||
else: | ||
return 36 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would have a hard time understanding what this code was doing, since it falls back during an exception but doesn't' log it or what value it's deciding. Could you add logs here? (or alternatively, fall back to Infinity or something >> 36?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we can't do inifinity because the transpiler freezes (i guess it tries to create a graph of length #qubits lol
e322f54
to
20a72bb
Compare
Summary
temporary solution before migrating to backendv2
Details and comments
update
n_qubits
to36
.set EM from backend options