rigetti / forest-benchmarking

A library for quantum characterization, verification, validation (QCVV), and benchmarking using pyQuil.
Apache License 2.0
52 stars 23 forks source link

Importing pyquil.gate_matrices raises a warning #213

Closed appleby closed 2 years ago

appleby commented 4 years ago

Tell us the versions of your environment (ensure you are running the latest):

Describe the bug

In pyquil 2.16, the pyquil.gate_matrices modules was moved into pyquil.simulation.matrices. Attempting to import from the old location now raises a FutureWarning.

This is only a warning and not urgent, but should be fixed at some point.

Steps to reproduce the behavior

In [2]: import forest.benchmarking.utils
/anaconda3/envs/pyquil-2.18-test/lib/python3.6/site-packages/pyquil/gate_matrices.py:24:
FutureWarning: The code in pyquil.gate_matrices has been moved to 
pyquil.simulation.matrices, please update your import statements.
  FutureWarning,
In [3]: forest.benchmarking.__version__
Out[3]: '0.7.1'

Possible solutions

Replace all pyquil.gate_matrices imports with corresponding import of pyquil.simulation.matrices.

Note that doing this will require bumping the pyquil dependency to >= 2.16