tensorflow / quantum

Hybrid Quantum-Classical Machine Learning in TensorFlow
https://www.tensorflow.org/quantum
Apache License 2.0
1.77k stars 558 forks source link

tensorflow quantum can not be imported ?? #787

Open Rayhan740 opened 1 year ago

Rayhan740 commented 1 year ago

I am using google colab and where I am using python 3.8. So, where tensorflow quantum is installed but when I try to import tensorflow quantum then it doesn't work!!! how can I fix ...... and google tensorflow quantum and version compatibility is really a pain!!!!

lockwo commented 1 year ago

I honestly stopped using Colab with TFQ, so many issues with compatibility. But if you must, this worked for me: https://github.com/tensorflow/quantum/issues/782#issuecomment-1594142647

Rayhan740 commented 1 year ago

tried but didn't worked!! 😑

lockwo commented 1 year ago

Dang, unlucky. Colab is a real mess now.

rryoung98 commented 1 year ago

Hello, I understand that this is an alternative solution, but on qBraid TFQ and Tensorflow + Cirq are properly versioned and installable.

One thing to double check after activating the environment is to make sure your kernel is Python [ Tensorflow ] @Rayhan740 See video below:

https://www.youtube.com/watch?v=iqYmB7H2R2E

I've been there myself with all the compatibility issues, not to mention I couldn't find the TFQ distribution for python 3.8 on my Mac M1. 🥲

Rayhan740 commented 12 months ago

yes I am using qbraid as an alternative to colab.

knaughttyanyon commented 9 months ago

Duplicate of #798