No module named 'pennylane.templates.utils'

Hello all! I have an issue with importing which tells me that: “No module named ‘pennylane.templates.utils’”. I am using google colab. Actually what I need is to import “from pennylane.templates.utils import check_wires, check_number_of_layers, check_shapes”. When I try to import I faced the problem of “No module named ‘pennylane.templates.utils’”. I will be very happy if you suggest how to import them:)
Thank you in advance

Hi @Aigerim! These functions were no longer being used by PennyLane templates, and were removed in version 0.20 last year.

If you need access to them, you can pip install an older version of PennyLane:

pip install pennylane==0.19

Alternatively, if you would like to use the latest PennyLane version, let me know what you were using them for, and I can suggest replacements :slight_smile:

Dear Josh! Thank you very much!

Hello Josh! Recently I asked you about pennylane version == 0.19 and I want to make some replacements in order to start using latest version. So I would like to know where I can start?

Thank you!

Hi @Aigerim, it’s great that you want to start using the latest version!

One next step would be to create a new virtual environment in your computer with the latest PennyLane version (0.32.1).

Then you can run your code and see where you start getting similar errors as the one you had before. You can then comment this line and keep running the rest of your code. This can be a way of identifying which features have been removed.

You can then go the PennyLane Release Notes and search for the removed features and the new alternative.

If you have trouble with this you can of course ask here and we’ll try to help you. :smiley: