{"id":27868,"library":"ibm-quantum-schemas","title":"IBM Quantum Schemas","description":"Pydantic models for IBM Quantum service programs (estimator, sampler, executor, noise-learner). Current version: 0.7.20260419. Released weekly. Requires Python >=3.10.","status":"active","version":"0.7.20260419","language":"python","source_language":"en","source_url":"https://github.com/Qiskit/ibm-quantum-schemas","tags":["ibm","quantum","pydantic","models","schemas"],"install":[{"cmd":"pip install ibm-quantum-schemas","lang":"bash","label":"Standard install"}],"dependencies":[{"reason":"All models are Pydantic models","package":"pydantic","optional":false},{"reason":"Used for numerical types in some model fields","package":"numpy","optional":true}],"imports":[{"note":"No direct top-level import; must use program and version submodule","wrong":"from ibm_quantum_schemas import EstimatorResult","symbol":"EstimatorResult","correct":"from ibm_quantum_schemas.estimator.version_0_1 import EstimatorResult"},{"note":"","wrong":null,"symbol":"SamplerResult","correct":"from ibm_quantum_schemas.sampler.version_0_1 import SamplerResult"}],"quickstart":{"code":"from ibm_quantum_schemas.estimator.version_0_1 import EstimatorResult\n\nresult = EstimatorResult(\n    metadata=[{\"example\": \"data\"}],\n    values=[0.5],\n    precision=[0.01]\n)\nprint(result.model_dump())","lang":"python","description":"Create an EstimatorResult model instance and serialize it."},"warnings":[{"fix":"Update imports to include program and version submodule, e.g., `from ibm_quantum_schemas.estimator.version_0_1 import EstimatorResult`.","message":"In version 0.5.20260320, the public interface changed: all imports must now use the pattern `ibm_quantum_schemas.<program>.version_<x_y>.SomeModel`. Old direct imports from `ibm_quantum_schemas` will break.","severity":"breaking","affected_versions":"<0.5.20260320"},{"fix":"Use stable versions like `0.1` or `0.2` without `_dev` suffix.","message":"The `executor` model version `0.1_dev` removed in favor of `0.2`. The `noise-learner-v3` model versions `0.2_dev` also removed. Avoid using `_dev` versions.","severity":"deprecated","affected_versions":">=0.2.20260209"},{"fix":"Use `from ibm_quantum_schemas.noise_learner.version_0_1 import ...` instead of `noise_learner_v3`.","message":"Models for `noise-learner` changed from `noise-learner-v3` to `noise-learner` in version 0.6.20260414. Old import paths will break.","severity":"breaking","affected_versions":"<0.6.20260414"},{"fix":"Upgrade Python to 3.10 or later.","message":"The package requires Python >=3.10. Users on Python 3.9 or earlier will get import errors.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-09T00:00:00.000Z","next_check":"2026-08-07T00:00:00.000Z","problems":[{"fix":"Run `pip install ibm-quantum-schemas` in the active environment.","cause":"Package not installed or installed in wrong environment.","error":"ModuleNotFoundError: No module named 'ibm_quantum_schemas'"},{"fix":"Use correct import: `from ibm_quantum_schemas.estimator.version_0_1 import EstimatorResult`.","cause":"Using old direct import pattern that no longer exists.","error":"ImportError: cannot import name 'EstimatorResult' from 'ibm_quantum_schemas'"},{"fix":"Check the model schema for required fields. For example, EstimatorResult requires `metadata`, `values`, and `precision`.","cause":"Missing required fields when constructing a model.","error":"pydantic.ValidationError: ... field required"},{"fix":"Use a stable version like `version_0_1` or `version_0_2`.","cause":"Trying to access a version that doesn't exist (e.g., `version_0_1_dev`) after removal.","error":"AttributeError: module 'ibm_quantum_schemas' has no attribute 'executor'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}