q-optimize / c3

Toolset for control, calibration and characterization of physical systems
https://c3-toolset.readthedocs.io/
Apache License 2.0
66 stars 36 forks source link

Problem in example code possibly due to newer version of tensorflow #247

Open qc-man opened 3 months ago

qc-man commented 3 months ago

Describe the bug

While running the example code as provided in the docs for two qubit chip with C3, an error message appears. Error message is: AttributeError: module 'tensorflow.python.framework.ops' has no attribute 'Tensor'

To Reproduce

Create a fresh env with pip install c3-toolset (which will be a standard step for anyone starting with the package. It also requires pip install tf-keras ). Then run the example code (link: https://c3-toolset.readthedocs.io/en/master/two_qubits.html), the code where we define the Quantities does not work and gives the attribute error as mentioned above.

Expected behavior

A clear and concise description of what you expect(ed) to happen.

Screenshots

image image these two screenshots are there just visually showing the issue that I have briefly described above

Environment (please complete the following information)

Additional context

A simple hack to get over this problem would have been to have an older version of TensorFlow installed but unfortunately, I am unable to install the older versions of TensorFlow.

On the other hand, the requirement for C3-toolset has TensorFlow version greater than 2.15.0 but greater than 2.15 versions do not seem to work.