Comments (6)
Do we really need to add RUNTIME
to it? Or can we just do QISKIT_IBM_API_TOKEN
for all qiskit-ibm-nnn
repos, and maybe QISKIT_IBM_CLOUD_TOKEN
for cloud services?
from qiskit-ibm-runtime.
@jyu00 Yes, we can do that if we want to share env variables between packages.
from qiskit-ibm-runtime.
I've updated description as per the suggestion. Thanks @jyu00!
from qiskit-ibm-runtime.
We discussed this briefly in Slack before but I want to bring this up again in the right context. With the proposed approach the number of environment variables we need to support in our code scales with the number of supported test environments (currently: 2, planned: 4, future: ?). I am not sure if this is needed.
Alternative Proposal
To make sure we can handle additional test environments transparently, I propose to move to a single set of environment variables, i.e.
- not use
QISKIT_IBM_CLOUD_API_...
,QISKIT_IBM_CLOUD_STAGING_API_...
,QISKIT_IBM_API_...
,QISKIT_IBM_STAGING_API_...
- instead use
QISKIT_IBM_API_...
and set it to different values depending on the targeted environment
Example Usage
CI/CD
Local Development
VSCode also supports different run configurations and can be set up in a similar way.
from qiskit-ibm-runtime.
@daka1510 The environment variables are not just required for CI. There is another use case for internal users.
As an internal user who has access to both staging and production environments, I should be able to store my staging and production credentials as environment variables and then switch to using one vs the other using QISKIT_IBM_CLOUD_USE_STAGING_CREDENTIALS
for cloud and QISKIT_IBM_USE_STAGING_CREDENTIALS
for legacy. If we use the same env variables then I'd have to setup two different conda environments locally, one for staging and one for production, which is not the end of the world, but needs educating internal users. Also I don't know if everyone uses conda. Once we have the ability to save multiple credentials in qiskit-ibm.json (See #31), people can use that to store staging credentials as well. But again not sure if everyone would want to use this method to save the credentials vs just setting env variables.
Also I don't see us having more than these 4 envs in the near future.
@jyu00 Do you see anything for or for having a single set of env variables?
from qiskit-ibm-runtime.
As per discussions in Slack and during our daily, I plan to give it a try with a reduced set of environment variables:
# Legacy / Cloud
QISKIT_IBM_API_LOCATOR=<http://auth.quantum-computing.ibm.com/api> or <CRN>
QISKIT_IBM_API_TOKEN=<Legacy API Token> or <Cloud API Key>
QISKIT_IBM_DEVICE=...
# Legacy Only (differentiation between HGP and PRIVATE_HGP no longer needed)
QISKIT_IBM_HGP=...
from qiskit-ibm-runtime.
Related Issues (20)
- IBMNotAuthorizedError: '401 Client Error: Unauthorized for url: https://auth.quantum-computing.ibm.com/api/users/loginWithToken. Login with some authorized provider required., Error code: 3445.' HOT 1
- 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
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.