jcmgray / quimb

A python library for quantum information and many-body calculations including tensor networks.
http://quimb.readthedocs.io
Other
488 stars 108 forks source link

Attribute Error with Circuit Class when Using Quimb on Google Colab #79

Closed JustinS6626 closed 3 years ago

JustinS6626 commented 3 years ago

First off, thank you very much again for all of your help. At the current stage of my experiment, I am trying to run my model on Google Colab, which requires that quimb be reinstalled with each new session. When I run the experiment, I get the following error:

AttributeError: 'Circuit' object has no attribute 'su4'

Based on this, I think there may be an error in the installation scripts for quimb, and I am wondering what can be done to resolve this.

jcmgray commented 3 years ago

I think you likely just need to install from the github develop branch.

JustinS6626 commented 3 years ago

Thank you very much for getting back to me. I am trying to run

!pip install https://github.com/jcmgray/quimb

on my colab notebook, but I am getting the error

ERROR: Cannot unpack file /tmp/pip-unpack-leogwvsb/quimb (downloaded from /tmp/pip-req-build-4zb25gdz, content-type: text/html; charset=utf-8); cannot detect archive format ERROR: Cannot determine archive format of /tmp/pip-req-build-4zb25gdz

Is this because I did not get the URL for the repository exactly right?

emprice commented 3 years ago

Did you try the following?

!pip install git+https://github.com/jcmgray/quimb

I don't have Colab, so I can't check, but I think you normally need the "git+" for pip.

JustinS6626 commented 3 years ago

Problem solved! Thanks again for your help!