PauliZ expectation value on Qiskit error


#1

versions:
image

i’m actually trying the example in the notebooks but it keeps saying that PauliZ is not defined as an expectation value
@josh


#2

Thanks for the bug report @kareem_essafty! I’ll look into this and see what I find.


#3

any updates or suggestions to help?


#4

Hi @kareem_essafty, do you get the same issue if you switch the PennyLane-Qiskit installation to the following github branch?

pip uninstall pennylane-qiskit
git clone https://github.com/josh146/pennylane-qiskit.git
cd pennylane-qiskit
git checkout fix_expectation_map
pip install -e .

Also, don’t forget to update your Qiskit installation:

pip install qiskit -U

#5

it’s working
thank you so much