PauliZ expectation value on Qiskit error



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


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


any updates or suggestions to help?


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
cd pennylane-qiskit
git checkout fix_expectation_map
pip install -e .

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

pip install qiskit -U


it’s working
thank you so much