Import Error of FermiC, FermiA and jordan_wigner

Hi, I was trying to reproduce the code from the demo, “Fermionic operators[¶]”(Fermionic operators | PennyLane Demos), and some importing problems poped up.

# Here is the code
from pennylane import FermiC, FermiA
from pennylane import jordan_wigner

Belowing is the full error message (error messages for FermiC, FermiA and jordan_winger are the same):

ImportError                               Traceback (most recent call last)
Cell In[13], line 1
----> 1 from pennylane import jordan_wigner

ImportError: cannot import name 'jordan_wigner' from 'pennylane' (C:\Users\joyce\anaconda3\envs\penny\lib\site-packages\pennylane\

The versions of my packages:

Name: PennyLane
Version: 0.23.0
Summary: PennyLane is a Python quantum machine learning library by Xanadu Inc.
License: Apache License 2.0
Location: c:\users\joyce\anaconda3\envs\penny\lib\site-packages
Requires: appdirs, autograd, autoray, cachetools, networkx, numpy, pennylane-lightning, retworkx, scipy, semantic-version, toml
Required-by: PennyLane-Lightning

Platform info:           Windows-10-10.0.22631-SP0
Python version:          3.10.13
Numpy version:           1.26.3
Scipy version:           1.12.0
Installed devices:
- default.gaussian (PennyLane-0.23.0)
- default.mixed (PennyLane-0.23.0)
- default.qubit (PennyLane-0.23.0)
- default.qubit.autograd (PennyLane-0.23.0)
- default.qubit.jax (PennyLane-0.23.0)
- (PennyLane-0.23.0)
- default.qubit.torch (PennyLane-0.23.0)
- lightning.qubit (PennyLane-Lightning-0.23.0)

Any possible help are wellcoming, thanks a lot.

Hello @yht ! Welcome to the forum!

I see that you have quite an outdated version of PennyLane. :thinking:
I would suggest an update to the latest release.

I hope it helps! :slight_smile: