Access policies using FunctionAccessResult and access manager (#2041)
adding FunctionAccessClient and constants
refactor tests
rename action to permission
feat: add accessible_functions + permission to with_permission and get_function_by_permission
fix: code quality issues in functions model manager
fix: add AbstractUser type annotation to get_function_by_permission user param
feat: add accessible_functions + permission to ProviderAccessPolicy.can_access
fix: move imports to top of test_providers.py
feat: add accessible_functions to JobAccessPolicies.can_access and can_read_provider_logs
fix: move FunctionAccessEntry and FunctionAccessResult to core/domain/authorization to satisfy import contracts
linter
refactor: ProviderAccessPolicy con métodos nombrados por operación
linter
refine provider access checks to function level when client responds
update phase 2 plan with function-level access design decision
remove planning doc from git tracking
reorder ProviderAccessPolicy params: provider, function_title, accessible_functions
update can_read_provider_logs docstring to match can_access style
rename PLATFORM_PERMISSION_VIEW to PLATFORM_PERMISSION_READ
improve PLATFORM_PERMISSION_* comments
per-function access in provider job list; add is_provider_admin fallback
Apply suggestions from code review
Co-authored-by: Alberto Vilches 194074+avilches@users.noreply.github.com
refactor provider job list use case; remove duplicate api/domain/authorization
fix trailing whitespace
clarify ProviderAccessPolicy docstrings: both auth paths
better comments
refactor methods
rename field
integration tests
reorganize test_functions into classes
silence pylint unused-argument on base client stub
integration tests
integration tests
normalize business_model to uppercase; fix pylint warnings in conftest
added logs
Added feature flag
Added feature flag k8s
use env var override in FunctionAccessClient to bypass stale DB config
Fix feature flag in tests
Enable flag in tests only
Enable flag in tests only k8s
comment
added url to k8s
rename permission_name to legacy_permission_name in FunctionsQuerySet
rename platform permission constants to function-namespaced values
Apply suggestion from @avilches
Apply suggestion from @avilches
rename PLATFORM_PERMISSION_JOB_RETRIEVE to PLATFORM_PERMISSION_JOB_READ
refactor
rollback integration tests
remove endpoint wiring from PR2, keep as infra-only
decouple FunctionsQuerySet from authorization layer
restore api/domain/authorization as tracked files
move filter_function_names logic to PR3 branch
refactor tests
refactor tests
refactor access policy tests with parametrize
版权所有:中国计算机学会技术支持:开源发展技术委员会
京ICP备13000930号-9
京公网安备 11010802032778号
Qiskit Serverless
Qiskit Serverless is a user-friendly tool that enables you to easily run complex quantum computing tasks. With this software, you can execute Qiskit Functions as long running jobs and distribute them across multiple CPUs, GPUs, and QPUs. This means you can take on more complex quantum-classical programs and run them with ease. You don’t have to worry about configuration or scaling up computational resources, as Qiskit Serverless takes care of everything for you.
Table of Contents
Quickstart
This Quickstart section guides users to easily deploy Qiskit Serverless infrastructure and run a simple example.
Docker
For user convenience, this section assumes that users will deploy the infrastructure in a local environment using Docker following the next steps.
Prepare local Qiskit Serverless infrastructure
Install Docker You can use any runtime that you prefer to run Docker on your machine: Docker Desktop, podman… If you are using a MacOS with ARM processors we highly recommend to use Colima as your container runtime to avoid problems with that architecture.
This is a project that takes advantage of distributed computing, so it places a high demand on resources. We recommend increasing the assigned resources to these runtimes. In case of Colima for example we typically use:
Install qiskit-serverless on your local system (we recommend using a virtual environment).
Clone the Qiskit Serverless repository
Run Qiskit Serverless infrastructure Execute Docker Compose using the following commands.
The output should resemble the following.
Write your first Qiskit Function following our hello-world example in the tutorial section.
That’s all!
Kubernetes
For user convenience, this section assumes that users will deploy the infrastructure in a local environment using Kind following the next steps.
Prepare local Qiskit Serverless infrastructure
Install Docker You can use any runtime that you prefer to run Docker on your machine: Docker Desktop, podman… If you are using a MacOS with ARM processors we highly recommend to use Colima as your container runtime to avoid problems with that architecture.
This is a project that takes advantage of distributed computing, so it places a high demand on resources. We recommend increasing the assigned resources to these runtimes. In case of Colima for example we typically use:
Install Kind To simplify the process to deploy a k8s cluster locally we use Kind as the main tool to create a cluster.
Install qiskit-serverless on your local system (we recommend using a virtual environment).
Clone the Qiskit Serverless repository
Run Qiskit Serverless infrastructure Execute the script to setup the cluster
The creation process can take some minutes.
Write your first Qiskit Function following our hello-world example in the tutorial section.
That’s all!
For more detailed examples and explanations refer to the Guide:
How to Give Feedback
We encourage your feedback! You can share your thoughts with us by:
Contribution Guidelines
For information on how to contribute to this project, please take a look at our contribution guidelines.
Deprecation Policy
This project is meant to evolve rapidly and, as such, do not follow Qiskit’s deprecation policy. We may occasionally make breaking changes in order to improve the user experience. When possible, we will keep old interfaces and mark them as deprecated, as long as they can co-exist with the new ones. Each substantial improvement, breaking change, or deprecation will be documented in release notes.
References and Acknowledgements
[1] Qiskit
https://github.com/Qiskit/qiskit
[2] Client for IBM Qiskit Runtime
https://github.com/Qiskit/qiskit-ibm-runtime
License
Apache License 2.0