-
Notifications
You must be signed in to change notification settings - Fork 54
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
Reuploading classifier expects states method from circuit result object #1286
Comments
@stavros11 besides this issue, could you please send to @sorewachigauyo our first notebook for quantum vqc regression, presented years ago to the TII team? Otherwise @MatteoRobbiati could you share the code used for the pdf fit? Thanks. |
Thanks for opening this @sorewachigauyo. If you consider a more hardware-friendly execution, e.g. shot-noise simulation or, indeed, execution on some quantum device, this strategy cannot be applied. In fact, what we can use to process information (at least without the gate set tomography) are only the frequencies we get after measurements. For this reason, in other works involving reuploading models (like the aforementioned regression), we defined a different optimization strategy, computing a Mean Squared Error loss function and using expectation values as predictors. An example of this approach can be found in a recent code we implemented to compute real time quantum error mitigation during a VQA. To give you a practical example: The expressibility of the model remains untouched, since you are only changing the way of processing the final information. In the end, I would say this error is well expected if the adopted strategy is the one implemented in the |
In case this is still helpful, I uploaded this notebook here: https://gist.github.com/stavros11/d737f45ef816911e1d40d0a0fd0fcce3 |
Thanks @stavros11 and @MatteoRobbiati !
The qubit state can be obtained as @mho291 are you planning to add such very simple procedures to test GST? If not, then @scarrazza we should plan to have more simple procedures in place for the 20q iqm chip? |
Describe the bug
The reuploading classifier example expects a
state()
method for the circuit result object on line 85 ofqclassifier.py
. This method exists for theQuantumState
object which is a result of the numpy backend, but the qibolab backend returns aMeasurementOutcomes
object which does not have said method.To Reproduce
On numpy
On qibolab
The text was updated successfully, but these errors were encountered: