PauliZ expectation value on Qiskit error

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

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

1 Like

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 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
1 Like

it’s working
thank you so much

1 Like