-
Notifications
You must be signed in to change notification settings - Fork 328
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
ISA circuit support for latest Runtime #786
Comments
Just noting this as it came up. Using tutorial 2 now with a runtime Sampler and QNNCircuit where it needs to be an ISA circuit. When you transpile that to pass it as an ISA circuit one needs to be explicit about input and weights as this logic https://github.com/qiskit-community/qiskit-machine-learning/blob/main/qiskit_machine_learning/neural_networks/sampler_qnn.py#L187-L192 will no longer see it as a QNNCircuit instance and default them appropriately. Also without clbits we should probably think about doing a measure_active() rather than a measure_all(). |
@woodsp-ibm, is the issue here just we need to updates our ML algs to use V2 primitives, being careful with passing inputs and weights? A fairly large overhaul but not much of a challenge, the new documentation makes it seem easy enough. |
@oscar-wallis No, supporting V2 primitives is a separate thing. For them, and for the current V1 primitives since March, IBM Runtime requires the circuit to be an ISA circuit as input to its primitives and no longer supports logical circuits - ie they must be already transpiled to the target device to be valid. The new V2 primitives need this as well so it needs to be done either way. Note the the V1 primitives in Runtime are already deprecated as of the 0.23 release mid April and they will be removed completely in the not too distant future. |
@woodsp-ibm yes sorry, with updating to V2 I meant also adding the transpiling to ISA circuits. So we need to go through to wherever an alg uses an estimator or sampler like QSVC and make sure we do the added steps of requiring a backend and then transpiling to that backend? Everything specified in the Primitives with transpiling documentation. |
Just to add, the deadline for this is August 15, 2024. See here. |
https://docs.quantum.ibm.com/announcements/product-updates/2024-02-14-qiskit-runtime-primitives-update
This affects the existing V1 primitves, as supported here, as well as the newly introduced V2 ones which are yet to be supported, see #742
In cases in maybe that the user can already pass a transpiled circuit, in some cases where its two circuits that joined, feature map and ansatz, care would be needed. Observables need to match the layout too. Anyway the situation needs investigation to determine how to proceed.
ML also makes use of Qiskit Algorithms for which there is an open issue too on the same subject qiskit-community/qiskit-algorithms#164 and though I have linked this for reference I think the dependence is more around optimizers and other logic that is independent of the primitives, except for use of the gradients which most likely needs further investigation around whether ISA circuits can be directly used with these, or do they need any alteration.
The text was updated successfully, but these errors were encountered: