Comments (3)
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 (IBMRuntimeService
) to handle both cases in a fully transparent way.
Context
To my understanding there are different terms that end users are familiar with, i.e.
- familiar to users of http://cloud.ibm.com/ ("cloud")
API key
CRN
- familar to users of https://quantum-computing.ibm.com/ ("legacy")
API token
Authentication URL
Hub
,Group
,Project
Challenge / Risk
To 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 save_account
function is updated to serve both worlds.
# 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,
)
Proposal
from 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):
from qiskit-ibm-runtime.
@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.
from qiskit-ibm-runtime.
Discussed in during our daily sync meeting and agreed to move forward as initially planned for now (i.e. use a single IBMRuntimeService
). This decision is heavily based on the assumption that the runtime APIs will be the same across Cloud/Legacy and not require users to supply different parameters (cc: @renier).
from qiskit-ibm-runtime.
Related Issues (20)
- Precision and shots are not consistent for EstimatorV2 HOT 1
- Variances for non-commuting observables are wrong
- Use attribute docstrings for options
- Move backend related modules from Qiskit HOT 1
- There are no e2e tests
- Unit tests failing against main branch of Qiskit
- Deprecate interim result streaming
- Remove the use of websocket for job status
- A faulty qubit in FakeHanoi
- Deprecate passing a string for backend
- JSON Error when retrieving job results HOT 1
- Allow retrieving all backend data HOT 1
- Add private job attribute
- An user should have an easy way to verify a circuit is compatible with a target backend HOT 1
- race condition in list pending jobs integration test
- Validate precision values in `estimator.run()`
- Provide a usage function on RuntimeJob so metrics don't have to be parsed HOT 1
- Add `EstimatorPubResult` with plotting methods
- Consider deprecating skip_transpilation and changing its default value HOT 1
- Batch.status says "pending" even if all jobs have been processed HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from qiskit-ibm-runtime.