-
Notifications
You must be signed in to change notification settings - Fork 2
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
Q-ctrt expectation values are returned as 1D array unlike runtime which is 0D #25
Comments
Hi @nonhermitian, our Qiskit Function Estimator output is based on the StatevectorEstimator, as we were advised previously. If this is an issue for our Estimator, should the output for StatevectorEstimator be updated as well? |
So I think the source of ground truth in this case should be what the runtime returns. That is to say that given the same input pubs, the output should match the runtime. Executing the examples in the readme of the runtime repo (ignoring the fact that some are not updated properly, Qiskit/qiskit-ibm-runtime#2013) then I see that a 0D array seems to be the correct output. It is also the output of the IBM circuit functions, and others. I also agree that the |
For the record, I have run the statevector estimator, and it also returns 0D data, est = StatevectorEstimator()
est.run(pubs=pubs).result()[0].data.evs gives |
Gotcha, thanks for the clarification. We're fixing this issue to return the correct shape here. |
Latest behaviour is that q-ctrl expectation values are returned as floats. @chongyouquan is currently checking to update this to 0D array |
Steps to reproduce the problem
Consider the circuit operator pair:
The Qiskit runtime, IBM circuit function, and TEM function all return the expectation values as 0D arrays, e.g.
array(0.39490533)
. In contrast the Q-ctrl result is a 1D array,array([0.4495])
.What is the current behavior?
see above
What is the expected behavior?
The return objects should have unified shapes.
The text was updated successfully, but these errors were encountered: