Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
qc-man opened this issue Jun 6, 2024 · 0 comments
Open

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

qc-man opened this issue Jun 6, 2024 · 0 comments

Comments

@qc-man
Copy link

qc-man commented Jun 6, 2024

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)

  • OS: Windows
  • Python Version: Python 3.12.3
  • c3-toolset Version 1.4
  • Other 'might be important' packages version details:
  • tensorboard 2.16.2
    -tensorboard-data-server 0.7.2
    -tensorflow 2.16.1
    -tensorflow-estimator 2.15.0
    -tensorflow-intel 2.16.1
    -tensorflow-probability 0.24.0
    -termcolor 2.4.0
    -terminado 0.18.1
    -tf_keras 2.16.0

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant