Skip to content
This repository has been archived by the owner on Dec 7, 2021. It is now read-only.

Expectation value w.r.t. qreg list #815

Closed
Zoufalc opened this issue Feb 7, 2020 · 3 comments
Closed

Expectation value w.r.t. qreg list #815

Zoufalc opened this issue Feb 7, 2020 · 3 comments
Assignees

Comments

@Zoufalc
Copy link
Contributor

Zoufalc commented Feb 7, 2020

What is the expected enhancement?

Allow expectation value evaluation circuit generation w.r.t. to a list of qregs instead of a single qreg only

In the WeightedPauliOperator line 643, 644 the following check is conducted
if not wave_function.has_register(qr):
raise AquaError("The provided QuantumRegister (qr) is not in the circuit.")
This prevents to construct the evaluation circuits w.r.t. a list of qregs/qubits. e.g. [q0[0], q0[2], q1[1]]. The rest of the function works with this kind of list though.

@dongreenberg
Copy link
Contributor

Hi Christa - #852 gets rid of using specific qregs for the expectation, and instead allows you to just append your expectation measurement to the circuit directly. Does this solve your issue?

@Zoufalc
Copy link
Contributor Author

Zoufalc commented Apr 28, 2020

Hey Donny,
If I can specify the qubits to append the expectation measurement to - which I assume - yes.

@woodsp-ibm
Copy link
Member

Christa, from discussion with Donny, and above comments, I understand with the new operator flow and the use now of the new expectation objects that your needs should be accommodated. As such I am closing this.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants