-
Notifications
You must be signed in to change notification settings - Fork 26
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
PrimitivesV2 schemas #14
Conversation
schemas/estimator_v2_schema.json
Outdated
} | ||
} | ||
}, | ||
"resilience_level": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
resilience_level
is not inside options
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
Co-authored-by: Jessie Yu <[email protected]>
Co-authored-by: Jessie Yu <[email protected]>
Co-authored-by: Jessie Yu <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you also add support_qiskit
? Just so we don't have to make that update later.
Note that we should make the schema as descriptive as possible, since we got a lot of questions on using the REST API.
schemas/estimator_v2_schema.json
Outdated
"minItems": 2, | ||
"prefixItems": [ | ||
{"description": "The quantum circuit in base64-encoded QPY format. See https://docs.quantum.ibm.com/api/qiskit/qpy for more details on QPY.", "type": "object"}, | ||
{"description": "One or more observables.", "type": "array"}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It'd be helpful to point out the array elements need to be strings and/or show an example in the description.
@gadial Can you also add some tests? |
Co-authored-by: Jessie Yu <[email protected]>
Co-authored-by: Jessie Yu <[email protected]>
Co-authored-by: Jessie Yu <[email protected]>
Co-authored-by: Jessie Yu <[email protected]>
Co-authored-by: Jessie Yu <[email protected]>
Co-authored-by: Jessie Yu <[email protected]>
Co-authored-by: Jessie Yu <[email protected]>
Co-authored-by: Jessie Yu <[email protected]>
Co-authored-by: Jessie Yu <[email protected]>
Co-authored-by: Jessie Yu <[email protected]>
Co-authored-by: Jessie Yu <[email protected]>
Co-authored-by: Jessie Yu <[email protected]>
Co-authored-by: Jessie Yu <[email protected]>
Co-authored-by: Jessie Yu <[email protected]>
Co-authored-by: Jessie Yu <[email protected]>
Co-authored-by: Jessie Yu <[email protected]>
… of noise factors (currently disagrees with `EstimatorOptions` on behaviour in case of empty noise factor list)
…sure_noise_mitigation implies measure_noise_mitigation=True
…tion=True` if `pec` options are used
schemas/sampler_v2_schema.json
Outdated
"type": "array", | ||
"minItems": 1, | ||
"prefixItems": [ | ||
{"description": "The quantum circuit in QASM string or base64-encoded QPY format. See https://docs.quantum.ibm.com/api/qiskit/qpy for more details on QPY.", "type": "object"}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this type should be an object
or a string
(for the qasm string case)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done in b9f86871958419765806ec4e41c2810d75351fc5
@@ -2,3 +2,4 @@ fastjsonschema | |||
jsonschema | |||
jsonschema-rs | |||
ddt | |||
qiskit-ibm-runtime@git+https://[email protected]/Qiskit/qiskit-ibm-runtime.git |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any reason we want to install from main branch and not just the latest release?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Originally it was qiskit-ibm-runtime>=0.22
but I changed it because we had test failures due to obsolete code. I tried switching to 0.23 and had a similar problem now. That's because of small errors in qiskit-ibm-runtime
which I already fixed (e.g. it considered value of 0
for a pec-option as boolean False
and so did not check whether the enable-pec
option is True
. Really minor stuff.
Summary
This PR adds schemas for input for V2 primitives (EstimatorV2/SamplerV2) which rely on
qiskit.primitives.containers
for data passing.Addresses #121