-
Notifications
You must be signed in to change notification settings - Fork 162
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
Login using IBM Cloud API key #29
Comments
Took a look at the implementation details and see the risk to bloat or overload some of the function signatures if we stick with the plan to use the same class ( ContextTo my understanding there are different terms that end users are familiar with, i.e.
Challenge / RiskTo map the above terms to the proposed common interface, additional overloaded terms like locator have to be introduced. This might come with an additional learning curve and/or confuse users. cloud_service = IBMRuntimeService(auth="cloud", token=cloud_api_key, locator="crn:v1:bluemix:public:quantum-computing:us-east:...")
legacy_service = IBMRuntimeService(auth="legacy", token=legacy_api_token, locator="https://auth.quantum-computing.ibm.com") The same challenge will also become relevant when the # how to extend this
IBMRuntimeService.save_account(
token: str, url: str,
# how to design the interface to not mix and match parameters that are only relevant for legacy/cloud
hub: Optional[str] = None,
group: Optional[str] = None,
project: Optional[str] = None,
) Proposalfrom abc import ABC
class IBMRuntimeService(ABC, RuntimeService):
# implements common functionality across cloud / legacy but is not directly instantiated
class IBMCloudRuntimeService(IBMRuntimeService):
# cloud users explicitly need to instantiate this class
def __init__(self, api_key, crn):
class IBMLegacyRuntimeService(IBMRuntimeService):
# legacy users explicitly need to instantiate this class
def __init__(self, token, url): |
@rathishcholarajan, @jyu00 - added a few thoughts in my previous commment. Let me know what you think (or discuss on Monday). As always: I may be totally wrong with these concerns. If so, I'm happy to learn why. |
Discussed in during our daily sync meeting and agreed to move forward as initially planned for now (i.e. use a single |
* added new feature map class * fixed bug in kernel matrix * updated test file with new kernel * changed shots in qka runtime outer * added shots in circuit runner * updated feature map name in json * updated demo notebook * averaging kernel parameters over last 10 percent * renamed initial lambdas to initial kernel parameters * renamed spsa steps to maxiters * removed old feature maps * update callback details * updated nb and test files
What is the expected feature or enhancement?
A user should be able to login using their IBM Cloud API Key.
When the user does
no API calls would be made but the passed in values should be stored in the RuntimeClient.
And then for subsequent calls made to the API like
service.programs()
orservice.pprint_programs()
theService-CRN: <paste-CRN-here>
andAuthorization: apikey <paste-apikey-here>
headers should be sent with every request.The URL for production vs staging should be automatically determined based on the cname in the CRN.
staging
for staging vsbluemix
for prod.Example curl to get programs:
The text was updated successfully, but these errors were encountered: