Skip to content
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

VQR Documentation Update Request #667

Open
sabrinaherbst opened this issue Jun 26, 2023 · 1 comment
Open

VQR Documentation Update Request #667

sabrinaherbst opened this issue Jun 26, 2023 · 1 comment
Assignees
Labels
documentation 📖 type: enhancement ✨ Features or aspects to improve

Comments

@sabrinaherbst
Copy link

Hello,

While working with the VQR model, we discovered that the predicted values only fall within the range of [-1, 1]. Surprisingly, this information is only documented in the base class NeuralNetworkRegressor.
May I suggest an update to the documentation to ensure this detail is mentioned in the class documentation? It is possible that many developers and researchers might overlook this information, since most of them probably don't check out the base class documentation.

Thanks in advance!

@edoaltamura edoaltamura added type: enhancement ✨ Features or aspects to improve documentation 📖 labels Feb 16, 2024
@oscar-wallis
Copy link
Collaborator

Hi @sabrinaherbst,

I understand that this isn't directly documented in NeuralNetworkRegressor but that would actually be the wrong place to do it, as this is a more general thing. The output of any circuit using the Estimator primtive is the expectation value of a set of chosen Pauli operators [I, X, Y, Z]. As the eigenvalues of all the Pauli operators are 1 and +1, this forms the range in which any combination of them can reach. For example, if your observable was for a 4 qubit circuit:

observable = SparsePauliOp.from_list([("XZZX", 1)])

Or any other set of Paulis assuming that only 1 is taken per qubit, you will be bounded by [-1, 1]. Within the EstimatorQNN() documentation you can find the default observable is to take the Pauli Z on each qubit.

You could get an output outside of this range for example having multiple observables like:

observable1 = SparsePauliOp.from_list([("XXXX", 1), ("ZZZZ", 1)])

This would essentially add the expectation value of XXXX and ZZZZ which could be outside of [-1, 1] theoretically. Or you could just increase the multiplier, which is the number after the string:

observable = SparsePauliOp.from_list([("XZZX", 2)])

Anyways, we could still look into adding it explicitly in the documentation, I'll bring this up internally. I appreciate this was a year ago and I apologise that no-one managed to get back to you.

@oscar-wallis oscar-wallis self-assigned this May 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation 📖 type: enhancement ✨ Features or aspects to improve
Projects
None yet
Development

No branches or pull requests

3 participants