qutip/qutip-notebooks

Can't run Quantum Gates examples

1eustace opened this issue · 14 comments

Thanks for a great toolbox! I've installed Qutip, can run the demos() OK, but unable to replicate this notebook: http://nbviewer.jupyter.org/github/qutip/qutip-notebooks/blob/master/examples/example-quantum-gates.ipynb. For example, the initial imports are successful but trying to run the command in the first cell, i.e. cphase(pi/2) I get the following error:

NameError Traceback (most recent call last)
in ()
----> 1 cphase(pi/2)

NameError: name 'cphase' is not defined

Am I missing something? I installed qutip via continuum anaconda which is using python 3.5.

Thanks

Hi,
Can I ask which version of QuTiP you are using?
I have just tested using the GitHub version. The notebook suggests that it
should work using the last released version 3.1.0.

You could try making a specific import of
from qutip.qip.gates import cphase

see what error you get.

On 29 February 2016 at 09:38, 1eustace notifications@github.com wrote:

Thanks for a great toolbox! I've installed Qutip, can run the demos() OK,
but unable to replicate this notebook:
http://nbviewer.jupyter.org/github/qutip/qutip-notebooks/blob/master/examples/example-quantum-gates.ipynb.
For example, the initial imports are successful but trying to run the
command in the first cell, i.e. cphase(pi/2) I get the following error:

NameError Traceback (most recent call last)
in ()
----> 1 cphase(pi/2)

NameError: name 'cphase' is not defined

Am I missing something? I installed qutip via continuum anaconda which is
using python 3.5.

Thanks


Reply to this email directly or view it on GitHub
#32.

Hi Alex,
Thank you for your fast response. Something weird may be going on with my system.

Running about() in Jupyter indicates I’m running QuTiP Version 2.2.0 (probably the problem)

Full info:
NumPy Version: 1.10.1
SciPy Version: 0.16.0
Matplotlib Version: 1.5.0

PySide Version: None
PyQt4 Version: 4.11.4
PyObjc Installed: No

However, when I try to update/install qutip using condo, it tells me quite 3.1.0 np19_0 jrjohansson is already installed.

Confuses me but probably points to the source of the problem. I’m using a Mid 2010 Mac PRO running OS X El Capitan Version 10.11.2. I should debug some more.

BTW, trying
from qutip.qip.gates import chase
Yielded


ImportError Traceback (most recent call last)
in ()
----> 1 from qutip.qip.gates import cphase

ImportError: No module named 'qutip.qip'

Thanks again. Will let you know.

On Feb 29, 2016, at 8:10 PM, Alexander Pitchford notifications@github.com wrote:

Hi,
Can I ask which version of QuTiP you are using?
I have just tested using the GitHub version. The notebook suggests that it
should work using the last released version 3.1.0.

You could try making a specific import of
from qutip.qip.gates import cphase

see what error you get.

On 29 February 2016 at 09:38, 1eustace notifications@github.com wrote:

Thanks for a great toolbox! I've installed Qutip, can run the demos() OK,
but unable to replicate this notebook:
http://nbviewer.jupyter.org/github/qutip/qutip-notebooks/blob/master/examples/example-quantum-gates.ipynb.
For example, the initial imports are successful but trying to run the
command in the first cell, i.e. cphase(pi/2) I get the following error:

NameError Traceback (most recent call last)
in ()
----> 1 cphase(pi/2)

NameError: name 'cphase' is not defined

Am I missing something? I installed qutip via continuum anaconda which is
using python 3.5.

Thanks


Reply to this email directly or view it on GitHub
#32.


Reply to this email directly or view it on GitHub #32 (comment).

Yes, this will indeed be your problem. The QIP module was new in V3.

It is always possible that you have multiple versions of qutip installed.
Sometimes it can be tricky to find which version is installed where.

You mention something about condo. Do you mean conda? As in have you
installed Anaconda Python. If not I would recommend it. It is in my view
the best way to manage your Python packages. If not using Anaconda and
don't want to, then try the following

You can find out which python you are running using:
$ which python

If that is somewhere in /usr/bin then its likely that your qutip is
installed in.
/usr/lib or /usr/local/lib
like /usr/local/lib/python2.7/site-packages

You could search for all folders called qutip under there. Delete them then
reinstall qutip.

Best of luck

Alex

On 1 March 2016 at 17:24, 1eustace notifications@github.com wrote:

Hi Alex,
Thank you for your fast response. Something weird may be going on with my
system.

Running about() in Jupyter indicates I’m running QuTiP Version 2.2.0
(probably the problem)

Full info:
NumPy Version: 1.10.1
SciPy Version: 0.16.0
Matplotlib Version: 1.5.0

PySide Version: None
PyQt4 Version: 4.11.4
PyObjc Installed: No

However, when I try to update/install qutip using condo, it tells me quite
3.1.0 np19_0 jrjohansson is already installed.

Confuses me but probably points to the source of the problem. I’m using a
Mid 2010 Mac PRO running OS X El Capitan Version 10.11.2. I should debug
some more.

BTW, trying
from qutip.qip.gates import chase

Yielded

ImportError Traceback (most recent call last)
in ()
----> 1 from qutip.qip.gates import cphase

ImportError: No module named 'qutip.qip'

Thanks again. Will let you know.

On Feb 29, 2016, at 8:10 PM, Alexander Pitchford <
notifications@github.com> wrote:

Hi,
Can I ask which version of QuTiP you are using?
I have just tested using the GitHub version. The notebook suggests that
it
should work using the last released version 3.1.0.

You could try making a specific import of
from qutip.qip.gates import cphase

see what error you get.

On 29 February 2016 at 09:38, 1eustace notifications@github.com wrote:

Thanks for a great toolbox! I've installed Qutip, can run the demos()
OK,
but unable to replicate this notebook:

http://nbviewer.jupyter.org/github/qutip/qutip-notebooks/blob/master/examples/example-quantum-gates.ipynb
.
For example, the initial imports are successful but trying to run the
command in the first cell, i.e. cphase(pi/2) I get the following error:

NameError Traceback (most recent call last)
in ()
----> 1 cphase(pi/2)

NameError: name 'cphase' is not defined

Am I missing something? I installed qutip via continuum anaconda which
is
using python 3.5.

Thanks


Reply to this email directly or view it on GitHub
#32.


Reply to this email directly or view it on GitHub <
#32 (comment)
.


Reply to this email directly or view it on GitHub
#32 (comment)
.

Hello Alex,
Yes, it was a typo on my part. I’m using conda (now just realized it was autocorrect’s fault) the environment manager in Anaconda. With regards to which python, I’m using …/anaconda/bin/python running python version “Python 3.5.1 :: Anaconda 2.4.1 (x86_64)”. Still, I shall delete all currently installed qutip, reinstall and see where it gets me.
Thanks for the insights.
eustace

On Mar 1, 2016, at 3:47 AM, Alexander Pitchford notifications@github.com wrote:

Yes, this will indeed be your problem. The QIP module was new in V3.

It is always possible that you have multiple versions of qutip installed.
Sometimes it can be tricky to find which version is installed where.

You mention something about condo. Do you mean conda? As in have you
installed Anaconda Python. If not I would recommend it. It is in my view
the best way to manage your Python packages. If not using Anaconda and
don't want to, then try the following

You can find out which python you are running using:
$ which python

If that is somewhere in /usr/bin then its likely that your qutip is
installed in.
/usr/lib or /usr/local/lib
like /usr/local/lib/python2.7/site-packages

You could search for all folders called qutip under there. Delete them then
reinstall qutip.

Best of luck

Alex

On 1 March 2016 at 17:24, 1eustace notifications@github.com wrote:

Hi Alex,
Thank you for your fast response. Something weird may be going on with my
system.

Running about() in Jupyter indicates I’m running QuTiP Version 2.2.0
(probably the problem)

Full info:
NumPy Version: 1.10.1
SciPy Version: 0.16.0
Matplotlib Version: 1.5.0

PySide Version: None
PyQt4 Version: 4.11.4
PyObjc Installed: No

However, when I try to update/install qutip using condo, it tells me quite
3.1.0 np19_0 jrjohansson is already installed.

Confuses me but probably points to the source of the problem. I’m using a
Mid 2010 Mac PRO running OS X El Capitan Version 10.11.2. I should debug
some more.

BTW, trying
from qutip.qip.gates import chase

Yielded

ImportError Traceback (most recent call last)
in ()
----> 1 from qutip.qip.gates import cphase

ImportError: No module named 'qutip.qip'

Thanks again. Will let you know.

On Feb 29, 2016, at 8:10 PM, Alexander Pitchford <
notifications@github.com> wrote:

Hi,
Can I ask which version of QuTiP you are using?
I have just tested using the GitHub version. The notebook suggests that
it
should work using the last released version 3.1.0.

You could try making a specific import of
from qutip.qip.gates import cphase

see what error you get.

On 29 February 2016 at 09:38, 1eustace notifications@github.com wrote:

Thanks for a great toolbox! I've installed Qutip, can run the demos()
OK,
but unable to replicate this notebook:

http://nbviewer.jupyter.org/github/qutip/qutip-notebooks/blob/master/examples/example-quantum-gates.ipynb
.
For example, the initial imports are successful but trying to run the
command in the first cell, i.e. cphase(pi/2) I get the following error:

NameError Traceback (most recent call last)
in ()
----> 1 cphase(pi/2)

NameError: name 'cphase' is not defined

Am I missing something? I installed qutip via continuum anaconda which
is
using python 3.5.

Thanks


Reply to this email directly or view it on GitHub
#32.


Reply to this email directly or view it on GitHub <
#32 (comment)
.


Reply to this email directly or view it on GitHub
#32 (comment)
.


Reply to this email directly or view it on GitHub #32 (comment).

Yes, probably you will have one called
…/anaconda/lib/python/site-packages/qutip
and another
…/anaconda/lib/python/site-packages/qutip-egg-blah*
Then it is difficult to say which gets used first

On 1 March 2016 at 19:59, 1eustace notifications@github.com wrote:

Hello Alex,
Yes, it was a typo on my part. I’m using conda (now just realized it was
autocorrect’s fault) the environment manager in Anaconda. With regards to
which python, I’m using …/anaconda/bin/python running python version
“Python 3.5.1 :: Anaconda 2.4.1 (x86_64)”. Still, I shall delete all
currently installed qutip, reinstall and see where it gets me.
Thanks for the insights.
eustace

On Mar 1, 2016, at 3:47 AM, Alexander Pitchford <
notifications@github.com> wrote:

Yes, this will indeed be your problem. The QIP module was new in V3.

It is always possible that you have multiple versions of qutip installed.
Sometimes it can be tricky to find which version is installed where.

You mention something about condo. Do you mean conda? As in have you
installed Anaconda Python. If not I would recommend it. It is in my view
the best way to manage your Python packages. If not using Anaconda and
don't want to, then try the following

You can find out which python you are running using:
$ which python

If that is somewhere in /usr/bin then its likely that your qutip is
installed in.
/usr/lib or /usr/local/lib
like /usr/local/lib/python2.7/site-packages

You could search for all folders called qutip under there. Delete them
then
reinstall qutip.

Best of luck

Alex

On 1 March 2016 at 17:24, 1eustace notifications@github.com wrote:

Hi Alex,
Thank you for your fast response. Something weird may be going on with
my
system.

Running about() in Jupyter indicates I’m running QuTiP Version 2.2.0
(probably the problem)

Full info:
NumPy Version: 1.10.1
SciPy Version: 0.16.0
Matplotlib Version: 1.5.0

PySide Version: None
PyQt4 Version: 4.11.4
PyObjc Installed: No

However, when I try to update/install qutip using condo, it tells me
quite
3.1.0 np19_0 jrjohansson is already installed.

Confuses me but probably points to the source of the problem. I’m
using a
Mid 2010 Mac PRO running OS X El Capitan Version 10.11.2. I should
debug
some more.

BTW, trying
from qutip.qip.gates import chase
Yielded


ImportError Traceback (most recent call last)
in ()
----> 1 from qutip.qip.gates import cphase

ImportError: No module named 'qutip.qip'

Thanks again. Will let you know.

On Feb 29, 2016, at 8:10 PM, Alexander Pitchford <
notifications@github.com> wrote:

Hi,
Can I ask which version of QuTiP you are using?
I have just tested using the GitHub version. The notebook suggests
that
it
should work using the last released version 3.1.0.

You could try making a specific import of
from qutip.qip.gates import cphase

see what error you get.

On 29 February 2016 at 09:38, 1eustace notifications@github.com
wrote:

Thanks for a great toolbox! I've installed Qutip, can run the
demos()
OK,
but unable to replicate this notebook:

http://nbviewer.jupyter.org/github/qutip/qutip-notebooks/blob/master/examples/example-quantum-gates.ipynb
.

For example, the initial imports are successful but trying to run
the
command in the first cell, i.e. cphase(pi/2) I get the following
error:

NameError Traceback (most recent call last)
in ()
----> 1 cphase(pi/2)

NameError: name 'cphase' is not defined

Am I missing something? I installed qutip via continuum anaconda
which
is
using python 3.5.

Thanks


Reply to this email directly or view it on GitHub
#32.


Reply to this email directly or view it on GitHub <

#32 (comment)

.


Reply to this email directly or view it on GitHub
<
https://github.com/qutip/qutip-notebooks/issues/32#issuecomment-190609716>
.


Reply to this email directly or view it on GitHub <
#32 (comment)
.


Reply to this email directly or view it on GitHub
#32 (comment)
.

Hello Alex,

After extensive debugging I think I have findings that might be of interest.

First, I confirmed there were several instances of site-packages/qutip. I used shell commands to find and delete them all but this did not help. Instead, I ran into an unexpected compatibility issue between anaconda and python3.5, so I removed all of anaconda include entries in .bash_profile, and also deleting anaconda’s backup of .bash_profile*. Did a fresh install which allowed coexistence of anaconda and python 3.5.

After these, and using conda, I’m finding that qutip always installs under python2.7/site-packages/ folder regardless of whether I’m installing it under conda root, conda python2.7 environment or conda python3.5 environment.

qutip/ qutip-3.1.0-py2.7.egg-info

I cannot import qutip when ran in python 3.5 conda env

I can import qutip when ran in python 2.7 conda env, but cannot run commands as basic as about().

running from conda root imports qutip and executes about() but does not see other packages.

I hope these findings make some sense to you so you can help me.

NB: I tried both jrjohansson/qutip and boson/qutip distributions from anaconda.org (only ones available for MAC)

Thanks,

eustace

On Mar 1, 2016, at 4:46 AM, Alexander Pitchford notifications@github.com wrote:

Yes, probably you will have one called
…/anaconda/lib/python/site-packages/qutip
and another
…/anaconda/lib/python/site-packages/qutip-egg-blah*
Then it is difficult to say which gets used first

On 1 March 2016 at 19:59, 1eustace notifications@github.com wrote:

Hello Alex,
Yes, it was a typo on my part. I’m using conda (now just realized it was
autocorrect’s fault) the environment manager in Anaconda. With regards to
which python, I’m using …/anaconda/bin/python running python version
“Python 3.5.1 :: Anaconda 2.4.1 (x86_64)”. Still, I shall delete all
currently installed qutip, reinstall and see where it gets me.
Thanks for the insights.
eustace

On Mar 1, 2016, at 3:47 AM, Alexander Pitchford <
notifications@github.com> wrote:

Yes, this will indeed be your problem. The QIP module was new in V3.

It is always possible that you have multiple versions of qutip installed.
Sometimes it can be tricky to find which version is installed where.

You mention something about condo. Do you mean conda? As in have you
installed Anaconda Python. If not I would recommend it. It is in my view
the best way to manage your Python packages. If not using Anaconda and
don't want to, then try the following

You can find out which python you are running using:
$ which python

If that is somewhere in /usr/bin then its likely that your qutip is
installed in.
/usr/lib or /usr/local/lib
like /usr/local/lib/python2.7/site-packages

You could search for all folders called qutip under there. Delete them
then
reinstall qutip.

Best of luck

Alex

On 1 March 2016 at 17:24, 1eustace notifications@github.com wrote:

Hi Alex,
Thank you for your fast response. Something weird may be going on with
my
system.

Running about() in Jupyter indicates I’m running QuTiP Version 2.2.0
(probably the problem)

Full info:
NumPy Version: 1.10.1
SciPy Version: 0.16.0
Matplotlib Version: 1.5.0

PySide Version: None
PyQt4 Version: 4.11.4
PyObjc Installed: No

However, when I try to update/install qutip using condo, it tells me
quite
3.1.0 np19_0 jrjohansson is already installed.

Confuses me but probably points to the source of the problem. I’m
using a
Mid 2010 Mac PRO running OS X El Capitan Version 10.11.2. I should
debug
some more.

BTW, trying
from qutip.qip.gates import chase
Yielded


ImportError Traceback (most recent call last)
in ()
----> 1 from qutip.qip.gates import cphase

ImportError: No module named 'qutip.qip'

Thanks again. Will let you know.

On Feb 29, 2016, at 8:10 PM, Alexander Pitchford <
notifications@github.com> wrote:

Hi,
Can I ask which version of QuTiP you are using?
I have just tested using the GitHub version. The notebook suggests
that
it
should work using the last released version 3.1.0.

You could try making a specific import of
from qutip.qip.gates import cphase

see what error you get.

On 29 February 2016 at 09:38, 1eustace notifications@github.com
wrote:

Thanks for a great toolbox! I've installed Qutip, can run the
demos()
OK,
but unable to replicate this notebook:

http://nbviewer.jupyter.org/github/qutip/qutip-notebooks/blob/master/examples/example-quantum-gates.ipynb
.

For example, the initial imports are successful but trying to run
the
command in the first cell, i.e. cphase(pi/2) I get the following
error:

NameError Traceback (most recent call last)
in ()
----> 1 cphase(pi/2)

NameError: name 'cphase' is not defined

Am I missing something? I installed qutip via continuum anaconda
which
is
using python 3.5.

Thanks


Reply to this email directly or view it on GitHub
#32.


Reply to this email directly or view it on GitHub <

#32 (comment)

.


Reply to this email directly or view it on GitHub
<
https://github.com/qutip/qutip-notebooks/issues/32#issuecomment-190609716>
.


Reply to this email directly or view it on GitHub <
#32 (comment)
.


Reply to this email directly or view it on GitHub
#32 (comment)
.


Reply to this email directly or view it on GitHub #32 (comment).

Hi Eustace,

Sorry you are having some much trouble with this. Is your root anaconda
py27 then (Python 2.7)? I should focus on this if it is. Again I would
delete all folders ~/anaconda_/lib/python_/site_packages/qutip then
install again. The 3.1 package from the website should be good. If that
does not work, then delete folders again and trying downloading the source
from the Github and installing from that (I would probably do this first
actually).

There should be a new conda package for Mac any moment now; literally I am
waiting for conda-forge to build it. So you could wait 24 hours and test
that out for me if you like?

Alex

On 3 March 2016 at 15:27, 1eustace notifications@github.com wrote:

Hello Alex,

After extensive debugging I think I have findings that might be of
interest.

First, I confirmed there were several instances of site-packages/qutip. I
used shell commands to find and delete them all but this did not help.
Instead, I ran into an unexpected compatibility issue between anaconda and
python3.5, so I removed all of anaconda include entries in .bash_profile,
and also deleting anaconda’s backup of .bash_profile*. Did a fresh install
which allowed coexistence of anaconda and python 3.5.

After these, and using conda, I’m finding that qutip always installs under
python2.7/site-packages/ folder regardless of whether I’m installing it
under conda root, conda python2.7 environment or conda python3.5
environment.

qutip/ qutip-3.1.0-py2.7.egg-info

I cannot import qutip when ran in python 3.5 conda env

I can import qutip when ran in python 2.7 conda env, but cannot run
commands as basic as about().

running from conda root imports qutip and executes about() but does not
see other packages.

I hope these findings make some sense to you so you can help me.

NB: I tried both jrjohansson/qutip and boson/qutip distributions from
anaconda.org (only ones available for MAC)

Thanks,

eustace

On Mar 1, 2016, at 4:46 AM, Alexander Pitchford <
notifications@github.com> wrote:

Yes, probably you will have one called
…/anaconda/lib/python/site-packages/qutip
and another
…/anaconda/lib/python/site-packages/qutip-egg-blah*
Then it is difficult to say which gets used first

On 1 March 2016 at 19:59, 1eustace notifications@github.com wrote:

Hello Alex,
Yes, it was a typo on my part. I’m using conda (now just realized it
was
autocorrect’s fault) the environment manager in Anaconda. With regards
to
which python, I’m using …/anaconda/bin/python running python version
“Python 3.5.1 :: Anaconda 2.4.1 (x86_64)”. Still, I shall delete all
currently installed qutip, reinstall and see where it gets me.
Thanks for the insights.
eustace

On Mar 1, 2016, at 3:47 AM, Alexander Pitchford <
notifications@github.com> wrote:

Yes, this will indeed be your problem. The QIP module was new in V3.

It is always possible that you have multiple versions of qutip
installed.
Sometimes it can be tricky to find which version is installed where.

You mention something about condo. Do you mean conda? As in have you
installed Anaconda Python. If not I would recommend it. It is in my
view
the best way to manage your Python packages. If not using Anaconda
and
don't want to, then try the following

You can find out which python you are running using:
$ which python

If that is somewhere in /usr/bin then its likely that your qutip is
installed in.
/usr/lib or /usr/local/lib
like /usr/local/lib/python2.7/site-packages

You could search for all folders called qutip under there. Delete
them
then
reinstall qutip.

Best of luck

Alex

On 1 March 2016 at 17:24, 1eustace notifications@github.com wrote:

Hi Alex,
Thank you for your fast response. Something weird may be going on
with
my
system.

Running about() in Jupyter indicates I’m running QuTiP Version
2.2.0
(probably the problem)

Full info:
NumPy Version: 1.10.1
SciPy Version: 0.16.0
Matplotlib Version: 1.5.0

PySide Version: None
PyQt4 Version: 4.11.4
PyObjc Installed: No

However, when I try to update/install qutip using condo, it tells
me
quite
3.1.0 np19_0 jrjohansson is already installed.

Confuses me but probably points to the source of the problem. I’m
using a
Mid 2010 Mac PRO running OS X El Capitan Version 10.11.2. I should
debug
some more.

BTW, trying
from qutip.qip.gates import chase
Yielded


ImportError Traceback (most recent call last)
in ()
----> 1 from qutip.qip.gates import cphase

ImportError: No module named 'qutip.qip'

Thanks again. Will let you know.

On Feb 29, 2016, at 8:10 PM, Alexander Pitchford <
notifications@github.com> wrote:

Hi,
Can I ask which version of QuTiP you are using?
I have just tested using the GitHub version. The notebook
suggests
that
it
should work using the last released version 3.1.0.

You could try making a specific import of
from qutip.qip.gates import cphase

see what error you get.

On 29 February 2016 at 09:38, 1eustace <notifications@github.com

wrote:

Thanks for a great toolbox! I've installed Qutip, can run the
demos()
OK,
but unable to replicate this notebook:

http://nbviewer.jupyter.org/github/qutip/qutip-notebooks/blob/master/examples/example-quantum-gates.ipynb

.

For example, the initial imports are successful but trying to
run
the
command in the first cell, i.e. cphase(pi/2) I get the
following
error:

NameError Traceback (most recent call last)
in ()
----> 1 cphase(pi/2)

NameError: name 'cphase' is not defined

Am I missing something? I installed qutip via continuum
anaconda
which
is
using python 3.5.

Thanks


Reply to this email directly or view it on GitHub
#32.


Reply to this email directly or view it on GitHub <

#32 (comment)

.


Reply to this email directly or view it on GitHub
<

https://github.com/qutip/qutip-notebooks/issues/32#issuecomment-190609716>

.


Reply to this email directly or view it on GitHub <

#32 (comment)

.


Reply to this email directly or view it on GitHub
<
https://github.com/qutip/qutip-notebooks/issues/32#issuecomment-190665462>
.


Reply to this email directly or view it on GitHub <
#32 (comment)
.


Reply to this email directly or view it on GitHub
#32 (comment)
.

Hi Alex,
Thanks of your kind attention. My root anaconda is py3.5 installed under ~/anaconda3/. I shall gladly wait and test the new build.
Thanks again,
Eustace

On Mar 3, 2016, at 12:19 AM, Alexander Pitchford notifications@github.com wrote:

Hi Eustace,

Sorry you are having some much trouble with this. Is your root anaconda
py27 then (Python 2.7)? I should focus on this if it is. Again I would
delete all folders ~/anaconda_/lib/python_/site_packages/qutip then
install again. The 3.1 package from the website should be good. If that
does not work, then delete folders again and trying downloading the source
from the Github and installing from that (I would probably do this first
actually).

There should be a new conda package for Mac any moment now; literally I am
waiting for conda-forge to build it. So you could wait 24 hours and test
that out for me if you like?

Alex

On 3 March 2016 at 15:27, 1eustace notifications@github.com wrote:

Hello Alex,

After extensive debugging I think I have findings that might be of
interest.

First, I confirmed there were several instances of site-packages/qutip. I
used shell commands to find and delete them all but this did not help.
Instead, I ran into an unexpected compatibility issue between anaconda and
python3.5, so I removed all of anaconda include entries in .bash_profile,
and also deleting anaconda’s backup of .bash_profile*. Did a fresh install
which allowed coexistence of anaconda and python 3.5.

After these, and using conda, I’m finding that qutip always installs under
python2.7/site-packages/ folder regardless of whether I’m installing it
under conda root, conda python2.7 environment or conda python3.5
environment.

qutip/ qutip-3.1.0-py2.7.egg-info

I cannot import qutip when ran in python 3.5 conda env

I can import qutip when ran in python 2.7 conda env, but cannot run
commands as basic as about().

running from conda root imports qutip and executes about() but does not
see other packages.

I hope these findings make some sense to you so you can help me.

NB: I tried both jrjohansson/qutip and boson/qutip distributions from
anaconda.org (only ones available for MAC)

Thanks,

eustace

On Mar 1, 2016, at 4:46 AM, Alexander Pitchford <
notifications@github.com> wrote:

Yes, probably you will have one called
…/anaconda/lib/python/site-packages/qutip
and another
…/anaconda/lib/python/site-packages/qutip-egg-blah*
Then it is difficult to say which gets used first

On 1 March 2016 at 19:59, 1eustace notifications@github.com wrote:

Hello Alex,
Yes, it was a typo on my part. I’m using conda (now just realized it
was
autocorrect’s fault) the environment manager in Anaconda. With regards
to
which python, I’m using …/anaconda/bin/python running python version
“Python 3.5.1 :: Anaconda 2.4.1 (x86_64)”. Still, I shall delete all
currently installed qutip, reinstall and see where it gets me.
Thanks for the insights.
eustace

On Mar 1, 2016, at 3:47 AM, Alexander Pitchford <
notifications@github.com> wrote:

Yes, this will indeed be your problem. The QIP module was new in V3.

It is always possible that you have multiple versions of qutip
installed.
Sometimes it can be tricky to find which version is installed where.

You mention something about condo. Do you mean conda? As in have you
installed Anaconda Python. If not I would recommend it. It is in my
view
the best way to manage your Python packages. If not using Anaconda
and
don't want to, then try the following

You can find out which python you are running using:
$ which python

If that is somewhere in /usr/bin then its likely that your qutip is
installed in.
/usr/lib or /usr/local/lib
like /usr/local/lib/python2.7/site-packages

You could search for all folders called qutip under there. Delete
them
then
reinstall qutip.

Best of luck

Alex

On 1 March 2016 at 17:24, 1eustace notifications@github.com wrote:

Hi Alex,
Thank you for your fast response. Something weird may be going on
with
my
system.

Running about() in Jupyter indicates I’m running QuTiP Version
2.2.0
(probably the problem)

Full info:
NumPy Version: 1.10.1
SciPy Version: 0.16.0
Matplotlib Version: 1.5.0

PySide Version: None
PyQt4 Version: 4.11.4
PyObjc Installed: No

However, when I try to update/install qutip using condo, it tells
me
quite
3.1.0 np19_0 jrjohansson is already installed.

Confuses me but probably points to the source of the problem. I’m
using a
Mid 2010 Mac PRO running OS X El Capitan Version 10.11.2. I should
debug
some more.

BTW, trying
from qutip.qip.gates import chase
Yielded


ImportError Traceback (most recent call last)
in ()
----> 1 from qutip.qip.gates import cphase

ImportError: No module named 'qutip.qip'

Thanks again. Will let you know.

On Feb 29, 2016, at 8:10 PM, Alexander Pitchford <
notifications@github.com> wrote:

Hi,
Can I ask which version of QuTiP you are using?
I have just tested using the GitHub version. The notebook
suggests
that
it
should work using the last released version 3.1.0.

You could try making a specific import of
from qutip.qip.gates import cphase

see what error you get.

On 29 February 2016 at 09:38, 1eustace <notifications@github.com

wrote:

Thanks for a great toolbox! I've installed Qutip, can run the
demos()
OK,
but unable to replicate this notebook:

http://nbviewer.jupyter.org/github/qutip/qutip-notebooks/blob/master/examples/example-quantum-gates.ipynb

.

For example, the initial imports are successful but trying to
run
the
command in the first cell, i.e. cphase(pi/2) I get the
following
error:

NameError Traceback (most recent call last)
in ()
----> 1 cphase(pi/2)

NameError: name 'cphase' is not defined

Am I missing something? I installed qutip via continuum
anaconda
which
is
using python 3.5.

Thanks


Reply to this email directly or view it on GitHub
#32.


Reply to this email directly or view it on GitHub <

#32 (comment)

.


Reply to this email directly or view it on GitHub
<

https://github.com/qutip/qutip-notebooks/issues/32#issuecomment-190609716>

.


Reply to this email directly or view it on GitHub <

#32 (comment)

.


Reply to this email directly or view it on GitHub
<
https://github.com/qutip/qutip-notebooks/issues/32#issuecomment-190665462>
.


Reply to this email directly or view it on GitHub <
#32 (comment)
.


Reply to this email directly or view it on GitHub
#32 (comment)
.


Reply to this email directly or view it on GitHub #32 (comment).

I am sorry, I am still waiting for the conda-forge people to make the
package. I will let you know as soon as it is ready. I was really hoping
they would have done it by now.

On 4 March 2016 at 00:08, 1eustace notifications@github.com wrote:

Hi Alex,
Thanks of your kind attention. My root anaconda is py3.5 installed under
~/anaconda3/. I shall gladly wait and test the new build.
Thanks again,
Eustace

On Mar 3, 2016, at 12:19 AM, Alexander Pitchford <
notifications@github.com> wrote:

Hi Eustace,

Sorry you are having some much trouble with this. Is your root anaconda
py27 then (Python 2.7)? I should focus on this if it is. Again I would
delete all folders ~/anaconda_/lib/python_/site_packages/qutip then
install again. The 3.1 package from the website should be good. If that
does not work, then delete folders again and trying downloading the
source
from the Github and installing from that (I would probably do this first
actually).

There should be a new conda package for Mac any moment now; literally I
am
waiting for conda-forge to build it. So you could wait 24 hours and test
that out for me if you like?

Alex

On 3 March 2016 at 15:27, 1eustace notifications@github.com wrote:

Hello Alex,

After extensive debugging I think I have findings that might be of
interest.

First, I confirmed there were several instances of
site-packages/qutip. I
used shell commands to find and delete them all but this did not help.
Instead, I ran into an unexpected compatibility issue between anaconda
and
python3.5, so I removed all of anaconda include entries in
.bash_profile,
and also deleting anaconda’s backup of .bash_profile*. Did a fresh
install
which allowed coexistence of anaconda and python 3.5.

After these, and using conda, I’m finding that qutip always installs
under
python2.7/site-packages/ folder regardless of whether I’m installing it
under conda root, conda python2.7 environment or conda python3.5
environment.

qutip/ qutip-3.1.0-py2.7.egg-info

I cannot import qutip when ran in python 3.5 conda env

I can import qutip when ran in python 2.7 conda env, but cannot run
commands as basic as about().

running from conda root imports qutip and executes about() but does not
see other packages.

I hope these findings make some sense to you so you can help me.

NB: I tried both jrjohansson/qutip and boson/qutip distributions from
anaconda.org (only ones available for MAC)

Thanks,

eustace

On Mar 1, 2016, at 4:46 AM, Alexander Pitchford <
notifications@github.com> wrote:

Yes, probably you will have one called
…/anaconda/lib/python/site-packages/qutip
and another
…/anaconda/lib/python/site-packages/qutip-egg-blah*
Then it is difficult to say which gets used first

On 1 March 2016 at 19:59, 1eustace notifications@github.com wrote:

Hello Alex,
Yes, it was a typo on my part. I’m using conda (now just realized
it
was
autocorrect’s fault) the environment manager in Anaconda. With
regards
to
which python, I’m using …/anaconda/bin/python running python
version
“Python 3.5.1 :: Anaconda 2.4.1 (x86_64)”. Still, I shall delete
all
currently installed qutip, reinstall and see where it gets me.
Thanks for the insights.
eustace

On Mar 1, 2016, at 3:47 AM, Alexander Pitchford <
notifications@github.com> wrote:

Yes, this will indeed be your problem. The QIP module was new in
V3.

It is always possible that you have multiple versions of qutip
installed.
Sometimes it can be tricky to find which version is installed
where.

You mention something about condo. Do you mean conda? As in have
you
installed Anaconda Python. If not I would recommend it. It is in
my
view
the best way to manage your Python packages. If not using
Anaconda
and
don't want to, then try the following

You can find out which python you are running using:
$ which python

If that is somewhere in /usr/bin then its likely that your qutip
is
installed in.
/usr/lib or /usr/local/lib
like /usr/local/lib/python2.7/site-packages

You could search for all folders called qutip under there. Delete
them
then
reinstall qutip.

Best of luck

Alex

On 1 March 2016 at 17:24, 1eustace notifications@github.com
wrote:

Hi Alex,
Thank you for your fast response. Something weird may be going
on
with
my
system.

Running about() in Jupyter indicates I’m running QuTiP Version
2.2.0
(probably the problem)

Full info:
NumPy Version: 1.10.1
SciPy Version: 0.16.0
Matplotlib Version: 1.5.0

PySide Version: None
PyQt4 Version: 4.11.4
PyObjc Installed: No

However, when I try to update/install qutip using condo, it
tells
me
quite
3.1.0 np19_0 jrjohansson is already installed.

Confuses me but probably points to the source of the problem.
I’m
using a
Mid 2010 Mac PRO running OS X El Capitan Version 10.11.2. I
should
debug
some more.

BTW, trying
from qutip.qip.gates import chase
Yielded


ImportError Traceback (most recent call last)
in ()
----> 1 from qutip.qip.gates import cphase

ImportError: No module named 'qutip.qip'

Thanks again. Will let you know.

On Feb 29, 2016, at 8:10 PM, Alexander Pitchford <
notifications@github.com> wrote:

Hi,
Can I ask which version of QuTiP you are using?
I have just tested using the GitHub version. The notebook
suggests
that
it
should work using the last released version 3.1.0.

You could try making a specific import of
from qutip.qip.gates import cphase

see what error you get.

On 29 February 2016 at 09:38, 1eustace <
notifications@github.com

wrote:

Thanks for a great toolbox! I've installed Qutip, can run
the
demos()
OK,
but unable to replicate this notebook:

http://nbviewer.jupyter.org/github/qutip/qutip-notebooks/blob/master/examples/example-quantum-gates.ipynb

.

For example, the initial imports are successful but trying
to
run
the
command in the first cell, i.e. cphase(pi/2) I get the
following
error:

NameError Traceback (most recent call last)
in ()
----> 1 cphase(pi/2)

NameError: name 'cphase' is not defined

Am I missing something? I installed qutip via continuum
anaconda
which
is
using python 3.5.

Thanks


Reply to this email directly or view it on GitHub
#32.


Reply to this email directly or view it on GitHub <

#32 (comment)

.


Reply to this email directly or view it on GitHub
<

https://github.com/qutip/qutip-notebooks/issues/32#issuecomment-190609716>

.


Reply to this email directly or view it on GitHub <

#32 (comment)

.


Reply to this email directly or view it on GitHub
<

https://github.com/qutip/qutip-notebooks/issues/32#issuecomment-190665462>

.


Reply to this email directly or view it on GitHub <

#32 (comment)

.


Reply to this email directly or view it on GitHub
<
https://github.com/qutip/qutip-notebooks/issues/32#issuecomment-191601208>
.


Reply to this email directly or view it on GitHub <
#32 (comment)
.


Reply to this email directly or view it on GitHub
#32 (comment)
.

No problem at all…

On Mar 3, 2016, at 9:04 PM, Alexander Pitchford notifications@github.com wrote:

I am sorry, I am still waiting for the conda-forge people to make the
package. I will let you know as soon as it is ready. I was really hoping
they would have done it by now.

On 4 March 2016 at 00:08, 1eustace notifications@github.com wrote:

Hi Alex,
Thanks of your kind attention. My root anaconda is py3.5 installed under
~/anaconda3/. I shall gladly wait and test the new build.
Thanks again,
Eustace

On Mar 3, 2016, at 12:19 AM, Alexander Pitchford <
notifications@github.com> wrote:

Hi Eustace,

Sorry you are having some much trouble with this. Is your root anaconda
py27 then (Python 2.7)? I should focus on this if it is. Again I would
delete all folders ~/anaconda_/lib/python_/site_packages/qutip then
install again. The 3.1 package from the website should be good. If that
does not work, then delete folders again and trying downloading the
source
from the Github and installing from that (I would probably do this first
actually).

There should be a new conda package for Mac any moment now; literally I
am
waiting for conda-forge to build it. So you could wait 24 hours and test
that out for me if you like?

Alex

On 3 March 2016 at 15:27, 1eustace notifications@github.com wrote:

Hello Alex,

After extensive debugging I think I have findings that might be of
interest.

First, I confirmed there were several instances of
site-packages/qutip. I
used shell commands to find and delete them all but this did not help.
Instead, I ran into an unexpected compatibility issue between anaconda
and
python3.5, so I removed all of anaconda include entries in
.bash_profile,
and also deleting anaconda’s backup of .bash_profile*. Did a fresh
install
which allowed coexistence of anaconda and python 3.5.

After these, and using conda, I’m finding that qutip always installs
under
python2.7/site-packages/ folder regardless of whether I’m installing it
under conda root, conda python2.7 environment or conda python3.5
environment.

qutip/ qutip-3.1.0-py2.7.egg-info

I cannot import qutip when ran in python 3.5 conda env

I can import qutip when ran in python 2.7 conda env, but cannot run
commands as basic as about().

running from conda root imports qutip and executes about() but does not
see other packages.

I hope these findings make some sense to you so you can help me.

NB: I tried both jrjohansson/qutip and boson/qutip distributions from
anaconda.org (only ones available for MAC)

Thanks,

eustace

On Mar 1, 2016, at 4:46 AM, Alexander Pitchford <
notifications@github.com> wrote:

Yes, probably you will have one called
…/anaconda/lib/python/site-packages/qutip
and another
…/anaconda/lib/python/site-packages/qutip-egg-blah*
Then it is difficult to say which gets used first

On 1 March 2016 at 19:59, 1eustace notifications@github.com wrote:

Hello Alex,
Yes, it was a typo on my part. I’m using conda (now just realized
it
was
autocorrect’s fault) the environment manager in Anaconda. With
regards
to
which python, I’m using …/anaconda/bin/python running python
version
“Python 3.5.1 :: Anaconda 2.4.1 (x86_64)”. Still, I shall delete
all
currently installed qutip, reinstall and see where it gets me.
Thanks for the insights.
eustace

On Mar 1, 2016, at 3:47 AM, Alexander Pitchford <
notifications@github.com> wrote:

Yes, this will indeed be your problem. The QIP module was new in
V3.

It is always possible that you have multiple versions of qutip
installed.
Sometimes it can be tricky to find which version is installed
where.

You mention something about condo. Do you mean conda? As in have
you
installed Anaconda Python. If not I would recommend it. It is in
my
view
the best way to manage your Python packages. If not using
Anaconda
and
don't want to, then try the following

You can find out which python you are running using:
$ which python

If that is somewhere in /usr/bin then its likely that your qutip
is
installed in.
/usr/lib or /usr/local/lib
like /usr/local/lib/python2.7/site-packages

You could search for all folders called qutip under there. Delete
them
then
reinstall qutip.

Best of luck

Alex

On 1 March 2016 at 17:24, 1eustace notifications@github.com
wrote:

Hi Alex,
Thank you for your fast response. Something weird may be going
on
with
my
system.

Running about() in Jupyter indicates I’m running QuTiP Version
2.2.0
(probably the problem)

Full info:
NumPy Version: 1.10.1
SciPy Version: 0.16.0
Matplotlib Version: 1.5.0

PySide Version: None
PyQt4 Version: 4.11.4
PyObjc Installed: No

However, when I try to update/install qutip using condo, it
tells
me
quite
3.1.0 np19_0 jrjohansson is already installed.

Confuses me but probably points to the source of the problem.
I’m
using a
Mid 2010 Mac PRO running OS X El Capitan Version 10.11.2. I
should
debug
some more.

BTW, trying
from qutip.qip.gates import chase
Yielded


ImportError Traceback (most recent call last)
in ()
----> 1 from qutip.qip.gates import cphase

ImportError: No module named 'qutip.qip'

Thanks again. Will let you know.

On Feb 29, 2016, at 8:10 PM, Alexander Pitchford <
notifications@github.com> wrote:

Hi,
Can I ask which version of QuTiP you are using?
I have just tested using the GitHub version. The notebook
suggests
that
it
should work using the last released version 3.1.0.

You could try making a specific import of
from qutip.qip.gates import cphase

see what error you get.

On 29 February 2016 at 09:38, 1eustace <
notifications@github.com

wrote:

Thanks for a great toolbox! I've installed Qutip, can run
the
demos()
OK,
but unable to replicate this notebook:

http://nbviewer.jupyter.org/github/qutip/qutip-notebooks/blob/master/examples/example-quantum-gates.ipynb

.

For example, the initial imports are successful but trying
to
run
the
command in the first cell, i.e. cphase(pi/2) I get the
following
error:

NameError Traceback (most recent call last)
in ()
----> 1 cphase(pi/2)

NameError: name 'cphase' is not defined

Am I missing something? I installed qutip via continuum
anaconda
which
is
using python 3.5.

Thanks


Reply to this email directly or view it on GitHub
#32.


Reply to this email directly or view it on GitHub <

#32 (comment)

.


Reply to this email directly or view it on GitHub
<

https://github.com/qutip/qutip-notebooks/issues/32#issuecomment-190609716>

.


Reply to this email directly or view it on GitHub <

#32 (comment)

.


Reply to this email directly or view it on GitHub
<

https://github.com/qutip/qutip-notebooks/issues/32#issuecomment-190665462>

.


Reply to this email directly or view it on GitHub <

#32 (comment)

.


Reply to this email directly or view it on GitHub
<
https://github.com/qutip/qutip-notebooks/issues/32#issuecomment-191601208>
.


Reply to this email directly or view it on GitHub <
#32 (comment)
.


Reply to this email directly or view it on GitHub
#32 (comment)
.


Reply to this email directly or view it on GitHub #32 (comment).

Ok, so we now have our conda package builder up and running. Still some
issues, like no windows packages yet, but should be good for OSX. See
instructions for adding a channel and installing the package here:

https://github.com/conda-forge/qutip-feedstock

On 4 March 2016 at 13:12, 1eustace notifications@github.com wrote:

No problem at all…

On Mar 3, 2016, at 9:04 PM, Alexander Pitchford <
notifications@github.com> wrote:

I am sorry, I am still waiting for the conda-forge people to make the
package. I will let you know as soon as it is ready. I was really hoping
they would have done it by now.

On 4 March 2016 at 00:08, 1eustace notifications@github.com wrote:

Hi Alex,
Thanks of your kind attention. My root anaconda is py3.5 installed
under
~/anaconda3/. I shall gladly wait and test the new build.
Thanks again,
Eustace

On Mar 3, 2016, at 12:19 AM, Alexander Pitchford <
notifications@github.com> wrote:

Hi Eustace,

Sorry you are having some much trouble with this. Is your root
anaconda
py27 then (Python 2.7)? I should focus on this if it is. Again I
would
delete all folders ~/anaconda_/lib/python_/site_packages/qutip then
install again. The 3.1 package from the website should be good. If
that
does not work, then delete folders again and trying downloading the
source
from the Github and installing from that (I would probably do this
first
actually).

There should be a new conda package for Mac any moment now;
literally I
am
waiting for conda-forge to build it. So you could wait 24 hours and
test
that out for me if you like?

Alex

On 3 March 2016 at 15:27, 1eustace notifications@github.com wrote:

Hello Alex,

After extensive debugging I think I have findings that might be of
interest.

First, I confirmed there were several instances of
site-packages/qutip. I
used shell commands to find and delete them all but this did not
help.
Instead, I ran into an unexpected compatibility issue between
anaconda
and
python3.5, so I removed all of anaconda include entries in
.bash_profile,
and also deleting anaconda’s backup of .bash_profile*. Did a fresh
install
which allowed coexistence of anaconda and python 3.5.

After these, and using conda, I’m finding that qutip always
installs
under
python2.7/site-packages/ folder regardless of whether I’m
installing it
under conda root, conda python2.7 environment or conda python3.5
environment.

qutip/ qutip-3.1.0-py2.7.egg-info

I cannot import qutip when ran in python 3.5 conda env

I can import qutip when ran in python 2.7 conda env, but cannot run
commands as basic as about().

running from conda root imports qutip and executes about() but
does not
see other packages.

I hope these findings make some sense to you so you can help me.

NB: I tried both jrjohansson/qutip and boson/qutip distributions
from
anaconda.org (only ones available for MAC)

Thanks,

eustace

On Mar 1, 2016, at 4:46 AM, Alexander Pitchford <
notifications@github.com> wrote:

Yes, probably you will have one called
…/anaconda/lib/python/site-packages/qutip
and another
…/anaconda/lib/python/site-packages/qutip-egg-blah*
Then it is difficult to say which gets used first

On 1 March 2016 at 19:59, 1eustace notifications@github.com
wrote:

Hello Alex,
Yes, it was a typo on my part. I’m using conda (now just
realized
it
was
autocorrect’s fault) the environment manager in Anaconda. With
regards
to
which python, I’m using …/anaconda/bin/python running python
version
“Python 3.5.1 :: Anaconda 2.4.1 (x86_64)”. Still, I shall
delete
all
currently installed qutip, reinstall and see where it gets me.
Thanks for the insights.
eustace

On Mar 1, 2016, at 3:47 AM, Alexander Pitchford <
notifications@github.com> wrote:

Yes, this will indeed be your problem. The QIP module was
new in
V3.

It is always possible that you have multiple versions of
qutip
installed.
Sometimes it can be tricky to find which version is installed
where.

You mention something about condo. Do you mean conda? As in
have
you
installed Anaconda Python. If not I would recommend it. It
is in
my
view
the best way to manage your Python packages. If not using
Anaconda
and
don't want to, then try the following

You can find out which python you are running using:
$ which python

If that is somewhere in /usr/bin then its likely that your
qutip
is
installed in.
/usr/lib or /usr/local/lib
like /usr/local/lib/python2.7/site-packages

You could search for all folders called qutip under there.
Delete
them
then
reinstall qutip.

Best of luck

Alex

On 1 March 2016 at 17:24, 1eustace <notifications@github.com

wrote:

Hi Alex,
Thank you for your fast response. Something weird may be
going
on
with
my
system.

Running about() in Jupyter indicates I’m running QuTiP
Version
2.2.0
(probably the problem)

Full info:
NumPy Version: 1.10.1
SciPy Version: 0.16.0
Matplotlib Version: 1.5.0

PySide Version: None
PyQt4 Version: 4.11.4
PyObjc Installed: No

However, when I try to update/install qutip using condo, it
tells
me
quite
3.1.0 np19_0 jrjohansson is already installed.

Confuses me but probably points to the source of the
problem.
I’m
using a
Mid 2010 Mac PRO running OS X El Capitan Version 10.11.2. I
should
debug
some more.

BTW, trying
from qutip.qip.gates import chase
Yielded


ImportError Traceback (most recent call last)
in ()
----> 1 from qutip.qip.gates import cphase

ImportError: No module named 'qutip.qip'

Thanks again. Will let you know.

On Feb 29, 2016, at 8:10 PM, Alexander Pitchford <
notifications@github.com> wrote:

Hi,
Can I ask which version of QuTiP you are using?
I have just tested using the GitHub version. The notebook
suggests
that
it
should work using the last released version 3.1.0.

You could try making a specific import of
from qutip.qip.gates import cphase

see what error you get.

On 29 February 2016 at 09:38, 1eustace <
notifications@github.com

wrote:

Thanks for a great toolbox! I've installed Qutip, can
run
the
demos()
OK,
but unable to replicate this notebook:

http://nbviewer.jupyter.org/github/qutip/qutip-notebooks/blob/master/examples/example-quantum-gates.ipynb

.

For example, the initial imports are successful but
trying
to
run
the
command in the first cell, i.e. cphase(pi/2) I get the
following
error:

NameError Traceback (most recent call last)
in ()
----> 1 cphase(pi/2)

NameError: name 'cphase' is not defined

Am I missing something? I installed qutip via continuum
anaconda
which
is
using python 3.5.

Thanks


Reply to this email directly or view it on GitHub
#32.


Reply to this email directly or view it on GitHub <

#32 (comment)

.


Reply to this email directly or view it on GitHub
<

https://github.com/qutip/qutip-notebooks/issues/32#issuecomment-190609716>

.


Reply to this email directly or view it on GitHub <

#32 (comment)

.


Reply to this email directly or view it on GitHub
<

https://github.com/qutip/qutip-notebooks/issues/32#issuecomment-190665462>

.


Reply to this email directly or view it on GitHub <

#32 (comment)

.


Reply to this email directly or view it on GitHub
<

https://github.com/qutip/qutip-notebooks/issues/32#issuecomment-191601208>

.


Reply to this email directly or view it on GitHub <

#32 (comment)

.


Reply to this email directly or view it on GitHub
<
https://github.com/qutip/qutip-notebooks/issues/32#issuecomment-191805237>
.


Reply to this email directly or view it on GitHub <
#32 (comment)
.


Reply to this email directly or view it on GitHub
#32 (comment)
.

Hello Alex,

There is improvement. I can now import qutip OK (Thanks!!!) but ran into
another snag.

I'm currently at a remote location without access to the MAC system I first
encounter the issue on but have reproduced the same problem on an Ubuntu
Linux Distro (14.04LTS 64-bit) running in a VM, so it serves as an
equitable test platform. Using the conda-forge install I'm now able to
import qutip OK, can access gate objects from the qip library. The problem
I now have has to do with rendering gate images. Some searching around
suggested I need to install ImageMagick and LiveTex2009+, both of which
I've installed via conda but still no luck. I'm using Jupyter but CL
output below captures the issue more compactly. Any ideas?

eustace@ubuntu:~$ python
Python 3.5.1 |Anaconda 2.5.0 (64-bit)| (default, Dec 7 2015, 11:16:01)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-1)] on linux
Type "help", "copyright", "credits" or "license" for more information.

from IPython.display import Image
from qutip import *
cnot()
Quantum object: dims = [[2, 2], [2, 2]], shape = [4, 4], type = oper,
isherm = True
Qobj data =
[[ 1. 0. 0. 0.]
[ 0. 1. 0. 0.]
[ 0. 0. 0. 1.]
[ 0. 0. 1. 0.]]
Image(filename='images/cnot.png')
Traceback (most recent call last):
File "", line 1, in
File
"/home/eustace/anaconda3/lib/python3.5/site-packages/IPython/core/display.py",
line 751, in init
super(Image, self).init(data=data, url=url, filename=filename)
File
"/home/eustace/anaconda3/lib/python3.5/site-packages/IPython/core/display.py",
line 388, in init
self.reload()
File
"/home/eustace/anaconda3/lib/python3.5/site-packages/IPython/core/display.py",
line 773, in reload
super(Image,self).reload()
File
"/home/eustace/anaconda3/lib/python3.5/site-packages/IPython/core/display.py",
line 406, in reload
with open(self.filename, self._read_flags) as f:
FileNotFoundError: [Errno 2] No such file or directory: 'images/cnot.png'

Thx, --eustace

On Sun, Mar 6, 2016 at 8:01 PM, Alexander Pitchford <
notifications@github.com> wrote:

Ok, so we now have our conda package builder up and running. Still some
issues, like no windows packages yet, but should be good for OSX. See
instructions for adding a channel and installing the package here:

https://github.com/conda-forge/qutip-feedstock

On 4 March 2016 at 13:12, 1eustace notifications@github.com wrote:

No problem at all…

On Mar 3, 2016, at 9:04 PM, Alexander Pitchford <
notifications@github.com> wrote:

I am sorry, I am still waiting for the conda-forge people to make the
package. I will let you know as soon as it is ready. I was really
hoping
they would have done it by now.

On 4 March 2016 at 00:08, 1eustace notifications@github.com wrote:

Hi Alex,
Thanks of your kind attention. My root anaconda is py3.5 installed
under
~/anaconda3/. I shall gladly wait and test the new build.
Thanks again,
Eustace

On Mar 3, 2016, at 12:19 AM, Alexander Pitchford <
notifications@github.com> wrote:

Hi Eustace,

Sorry you are having some much trouble with this. Is your root
anaconda
py27 then (Python 2.7)? I should focus on this if it is. Again I
would
delete all folders ~/anaconda_/lib/python_/site_packages/qutip
then
install again. The 3.1 package from the website should be good. If
that
does not work, then delete folders again and trying downloading the
source
from the Github and installing from that (I would probably do this
first
actually).

There should be a new conda package for Mac any moment now;
literally I
am
waiting for conda-forge to build it. So you could wait 24 hours and
test
that out for me if you like?

Alex

On 3 March 2016 at 15:27, 1eustace notifications@github.com
wrote:

Hello Alex,

After extensive debugging I think I have findings that might be
of
interest.

First, I confirmed there were several instances of
site-packages/qutip. I
used shell commands to find and delete them all but this did not
help.
Instead, I ran into an unexpected compatibility issue between
anaconda
and
python3.5, so I removed all of anaconda include entries in
.bash_profile,
and also deleting anaconda’s backup of .bash_profile*. Did a
fresh
install
which allowed coexistence of anaconda and python 3.5.

After these, and using conda, I’m finding that qutip always
installs
under
python2.7/site-packages/ folder regardless of whether I’m
installing it
under conda root, conda python2.7 environment or conda python3.5
environment.

qutip/ qutip-3.1.0-py2.7.egg-info

I cannot import qutip when ran in python 3.5 conda env

I can import qutip when ran in python 2.7 conda env, but cannot
run
commands as basic as about().

running from conda root imports qutip and executes about() but
does not
see other packages.

I hope these findings make some sense to you so you can help me.

NB: I tried both jrjohansson/qutip and boson/qutip distributions
from
anaconda.org (only ones available for MAC)

Thanks,

eustace

On Mar 1, 2016, at 4:46 AM, Alexander Pitchford <
notifications@github.com> wrote:

Yes, probably you will have one called
…/anaconda/lib/python/site-packages/qutip
and another
…/anaconda/lib/python/site-packages/qutip-egg-blah*
Then it is difficult to say which gets used first

On 1 March 2016 at 19:59, 1eustace notifications@github.com
wrote:

Hello Alex,
Yes, it was a typo on my part. I’m using conda (now just
realized
it
was
autocorrect’s fault) the environment manager in Anaconda.
With
regards
to
which python, I’m using …/anaconda/bin/python running python
version
“Python 3.5.1 :: Anaconda 2.4.1 (x86_64)”. Still, I shall
delete
all
currently installed qutip, reinstall and see where it gets
me.
Thanks for the insights.
eustace

On Mar 1, 2016, at 3:47 AM, Alexander Pitchford <
notifications@github.com> wrote:

Yes, this will indeed be your problem. The QIP module was
new in
V3.

It is always possible that you have multiple versions of
qutip
installed.
Sometimes it can be tricky to find which version is
installed
where.

You mention something about condo. Do you mean conda? As in
have
you
installed Anaconda Python. If not I would recommend it. It
is in
my
view
the best way to manage your Python packages. If not using
Anaconda
and
don't want to, then try the following

You can find out which python you are running using:
$ which python

If that is somewhere in /usr/bin then its likely that your
qutip
is
installed in.
/usr/lib or /usr/local/lib
like /usr/local/lib/python2.7/site-packages

You could search for all folders called qutip under there.
Delete
them
then
reinstall qutip.

Best of luck

Alex

On 1 March 2016 at 17:24, 1eustace <
notifications@github.com

wrote:

Hi Alex,
Thank you for your fast response. Something weird may be
going
on
with
my
system.

Running about() in Jupyter indicates I’m running QuTiP
Version
2.2.0
(probably the problem)

Full info:
NumPy Version: 1.10.1
SciPy Version: 0.16.0
Matplotlib Version: 1.5.0

PySide Version: None
PyQt4 Version: 4.11.4
PyObjc Installed: No

However, when I try to update/install qutip using condo,
it
tells
me
quite
3.1.0 np19_0 jrjohansson is already installed.

Confuses me but probably points to the source of the
problem.
I’m
using a
Mid 2010 Mac PRO running OS X El Capitan Version
10.11.2. I
should
debug
some more.

BTW, trying
from qutip.qip.gates import chase
Yielded


ImportError Traceback (most recent call last)
in ()
----> 1 from qutip.qip.gates import cphase

ImportError: No module named 'qutip.qip'

Thanks again. Will let you know.

On Feb 29, 2016, at 8:10 PM, Alexander Pitchford <
notifications@github.com> wrote:

Hi,
Can I ask which version of QuTiP you are using?
I have just tested using the GitHub version. The
notebook
suggests
that
it
should work using the last released version 3.1.0.

You could try making a specific import of
from qutip.qip.gates import cphase

see what error you get.

On 29 February 2016 at 09:38, 1eustace <
notifications@github.com

wrote:

Thanks for a great toolbox! I've installed Qutip, can
run
the
demos()
OK,
but unable to replicate this notebook:

http://nbviewer.jupyter.org/github/qutip/qutip-notebooks/blob/master/examples/example-quantum-gates.ipynb

.

For example, the initial imports are successful but
trying
to
run
the
command in the first cell, i.e. cphase(pi/2) I get
the
following
error:

NameError Traceback (most recent call last)
in ()
----> 1 cphase(pi/2)

NameError: name 'cphase' is not defined

Am I missing something? I installed qutip via
continuum
anaconda
which
is
using python 3.5.

Thanks


Reply to this email directly or view it on GitHub
<#32
.


Reply to this email directly or view it on GitHub <

#32 (comment)

.


Reply to this email directly or view it on GitHub
<

https://github.com/qutip/qutip-notebooks/issues/32#issuecomment-190609716>

.


Reply to this email directly or view it on GitHub <

#32 (comment)

.


Reply to this email directly or view it on GitHub
<

https://github.com/qutip/qutip-notebooks/issues/32#issuecomment-190665462>

.


Reply to this email directly or view it on GitHub <

#32 (comment)

.


Reply to this email directly or view it on GitHub
<

https://github.com/qutip/qutip-notebooks/issues/32#issuecomment-191601208>

.


Reply to this email directly or view it on GitHub <

#32 (comment)

.


Reply to this email directly or view it on GitHub
<

https://github.com/qutip/qutip-notebooks/issues/32#issuecomment-191805237>

.


Reply to this email directly or view it on GitHub <

#32 (comment)

.


Reply to this email directly or view it on GitHub
<
https://github.com/qutip/qutip-notebooks/issues/32#issuecomment-192090959>

.


Reply to this email directly or view it on GitHub
#32 (comment)
.

Hi,
Thanks for the feedback on the package.
You be better off posting this as a new topic on the help group:
https://groups.google.com/forum/#!forum/qutip
There might be someone who knows how to solve this problem on there.
Alex

On 9 March 2016 at 18:10, 1eustace notifications@github.com wrote:

Hello Alex,

There is improvement. I can now import qutip OK (Thanks!!!) but ran into
another snag.

I'm currently at a remote location without access to the MAC system I first
encounter the issue on but have reproduced the same problem on an Ubuntu
Linux Distro (14.04LTS 64-bit) running in a VM, so it serves as an
equitable test platform. Using the conda-forge install I'm now able to
import qutip OK, can access gate objects from the qip library. The problem
I now have has to do with rendering gate images. Some searching around
suggested I need to install ImageMagick and LiveTex2009+, both of which
I've installed via conda but still no luck. I'm using Jupyter but CL
output below captures the issue more compactly. Any ideas?

eustace@ubuntu:~$ python
Python 3.5.1 |Anaconda 2.5.0 (64-bit)| (default, Dec 7 2015, 11:16:01)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-1)] on linux
Type "help", "copyright", "credits" or "license" for more information.

from IPython.display import Image
from qutip import *
cnot()
Quantum object: dims = [[2, 2], [2, 2]], shape = [4, 4], type = oper,
isherm = True
Qobj data =
[[ 1. 0. 0. 0.]
[ 0. 1. 0. 0.]
[ 0. 0. 0. 1.]
[ 0. 0. 1. 0.]]
Image(filename='images/cnot.png')
Traceback (most recent call last):
File "", line 1, in
File

"/home/eustace/anaconda3/lib/python3.5/site-packages/IPython/core/display.py",
line 751, in init
super(Image, self).init(data=data, url=url, filename=filename)
File

"/home/eustace/anaconda3/lib/python3.5/site-packages/IPython/core/display.py",
line 388, in init
self.reload()
File

"/home/eustace/anaconda3/lib/python3.5/site-packages/IPython/core/display.py",
line 773, in reload
super(Image,self).reload()
File

"/home/eustace/anaconda3/lib/python3.5/site-packages/IPython/core/display.py",
line 406, in reload
with open(self.filename, self._read_flags) as f:
FileNotFoundError: [Errno 2] No such file or directory: 'images/cnot.png'

Thx, --eustace

On Sun, Mar 6, 2016 at 8:01 PM, Alexander Pitchford <

notifications@github.com> wrote:

Ok, so we now have our conda package builder up and running. Still some
issues, like no windows packages yet, but should be good for OSX. See
instructions for adding a channel and installing the package here:

https://github.com/conda-forge/qutip-feedstock

On 4 March 2016 at 13:12, 1eustace notifications@github.com wrote:

No problem at all…

On Mar 3, 2016, at 9:04 PM, Alexander Pitchford <
notifications@github.com> wrote:

I am sorry, I am still waiting for the conda-forge people to make the
package. I will let you know as soon as it is ready. I was really
hoping
they would have done it by now.

On 4 March 2016 at 00:08, 1eustace notifications@github.com wrote:

Hi Alex,
Thanks of your kind attention. My root anaconda is py3.5 installed
under
~/anaconda3/. I shall gladly wait and test the new build.
Thanks again,
Eustace

On Mar 3, 2016, at 12:19 AM, Alexander Pitchford <
notifications@github.com> wrote:

Hi Eustace,

Sorry you are having some much trouble with this. Is your root
anaconda
py27 then (Python 2.7)? I should focus on this if it is. Again I
would
delete all folders ~/anaconda_/lib/python_/site_packages/qutip
then
install again. The 3.1 package from the website should be good.
If
that
does not work, then delete folders again and trying downloading
the
source
from the Github and installing from that (I would probably do
this
first
actually).

There should be a new conda package for Mac any moment now;
literally I
am
waiting for conda-forge to build it. So you could wait 24 hours
and
test
that out for me if you like?

Alex

On 3 March 2016 at 15:27, 1eustace notifications@github.com
wrote:

Hello Alex,

After extensive debugging I think I have findings that might be
of
interest.

First, I confirmed there were several instances of
site-packages/qutip. I
used shell commands to find and delete them all but this did
not
help.
Instead, I ran into an unexpected compatibility issue between
anaconda
and
python3.5, so I removed all of anaconda include entries in
.bash_profile,
and also deleting anaconda’s backup of .bash_profile*. Did a
fresh
install
which allowed coexistence of anaconda and python 3.5.

After these, and using conda, I’m finding that qutip always
installs
under
python2.7/site-packages/ folder regardless of whether I’m
installing it
under conda root, conda python2.7 environment or conda
python3.5
environment.

qutip/ qutip-3.1.0-py2.7.egg-info

I cannot import qutip when ran in python 3.5 conda env

I can import qutip when ran in python 2.7 conda env, but cannot
run
commands as basic as about().

running from conda root imports qutip and executes about() but
does not
see other packages.

I hope these findings make some sense to you so you can help
me.

NB: I tried both jrjohansson/qutip and boson/qutip
distributions
from
anaconda.org (only ones available for MAC)

Thanks,

eustace

On Mar 1, 2016, at 4:46 AM, Alexander Pitchford <
notifications@github.com> wrote:

Yes, probably you will have one called
…/anaconda/lib/python/site-packages/qutip
and another
…/anaconda/lib/python/site-packages/qutip-egg-blah*
Then it is difficult to say which gets used first

On 1 March 2016 at 19:59, 1eustace <notifications@github.com

wrote:

Hello Alex,
Yes, it was a typo on my part. I’m using conda (now just
realized
it
was
autocorrect’s fault) the environment manager in Anaconda.
With
regards
to
which python, I’m using …/anaconda/bin/python running
python
version
“Python 3.5.1 :: Anaconda 2.4.1 (x86_64)”. Still, I shall
delete
all
currently installed qutip, reinstall and see where it gets
me.
Thanks for the insights.
eustace

On Mar 1, 2016, at 3:47 AM, Alexander Pitchford <
notifications@github.com> wrote:

Yes, this will indeed be your problem. The QIP module was
new in
V3.

It is always possible that you have multiple versions of
qutip
installed.
Sometimes it can be tricky to find which version is
installed
where.

You mention something about condo. Do you mean conda? As
in
have
you
installed Anaconda Python. If not I would recommend it.
It
is in
my
view
the best way to manage your Python packages. If not using
Anaconda
and
don't want to, then try the following

You can find out which python you are running using:
$ which python

If that is somewhere in /usr/bin then its likely that
your
qutip
is
installed in.
/usr/lib or /usr/local/lib
like /usr/local/lib/python2.7/site-packages

You could search for all folders called qutip under
there.
Delete
them
then
reinstall qutip.

Best of luck

Alex

On 1 March 2016 at 17:24, 1eustace <
notifications@github.com

wrote:

Hi Alex,
Thank you for your fast response. Something weird may
be
going
on
with
my
system.

Running about() in Jupyter indicates I’m running QuTiP
Version
2.2.0
(probably the problem)

Full info:
NumPy Version: 1.10.1
SciPy Version: 0.16.0
Matplotlib Version: 1.5.0

PySide Version: None
PyQt4 Version: 4.11.4
PyObjc Installed: No

However, when I try to update/install qutip using
condo,
it
tells
me
quite
3.1.0 np19_0 jrjohansson is already installed.

Confuses me but probably points to the source of the
problem.
I’m
using a
Mid 2010 Mac PRO running OS X El Capitan Version
10.11.2. I
should
debug
some more.

BTW, trying
from qutip.qip.gates import chase
Yielded


ImportError Traceback (most recent call last)
in ()
----> 1 from qutip.qip.gates import cphase

ImportError: No module named 'qutip.qip'

Thanks again. Will let you know.

On Feb 29, 2016, at 8:10 PM, Alexander Pitchford <
notifications@github.com> wrote:

Hi,
Can I ask which version of QuTiP you are using?
I have just tested using the GitHub version. The
notebook
suggests
that
it
should work using the last released version 3.1.0.

You could try making a specific import of
from qutip.qip.gates import cphase

see what error you get.

On 29 February 2016 at 09:38, 1eustace <
notifications@github.com

wrote:

Thanks for a great toolbox! I've installed Qutip,
can
run
the
demos()
OK,
but unable to replicate this notebook:

http://nbviewer.jupyter.org/github/qutip/qutip-notebooks/blob/master/examples/example-quantum-gates.ipynb

.

For example, the initial imports are successful but
trying
to
run
the
command in the first cell, i.e. cphase(pi/2) I get
the
following
error:

NameError Traceback (most recent call last)
in ()
----> 1 cphase(pi/2)

NameError: name 'cphase' is not defined

Am I missing something? I installed qutip via
continuum
anaconda
which
is
using python 3.5.

Thanks


Reply to this email directly or view it on GitHub
<
#32
.


Reply to this email directly or view it on GitHub <

#32 (comment)

.


Reply to this email directly or view it on GitHub
<

https://github.com/qutip/qutip-notebooks/issues/32#issuecomment-190609716>

.


Reply to this email directly or view it on GitHub <

#32 (comment)

.


Reply to this email directly or view it on GitHub
<

https://github.com/qutip/qutip-notebooks/issues/32#issuecomment-190665462>

.


Reply to this email directly or view it on GitHub <

#32 (comment)

.


Reply to this email directly or view it on GitHub
<

https://github.com/qutip/qutip-notebooks/issues/32#issuecomment-191601208>

.


Reply to this email directly or view it on GitHub <

#32 (comment)

.


Reply to this email directly or view it on GitHub
<

https://github.com/qutip/qutip-notebooks/issues/32#issuecomment-191805237>

.


Reply to this email directly or view it on GitHub <

#32 (comment)

.


Reply to this email directly or view it on GitHub
<

https://github.com/qutip/qutip-notebooks/issues/32#issuecomment-192090959>

.


Reply to this email directly or view it on GitHub
<
https://github.com/qutip/qutip-notebooks/issues/32#issuecomment-193069949>
.


Reply to this email directly or view it on GitHub
#32 (comment)
.

Hello Alex,
Thank you. I've confirmed on a Mac system as well that I can now load qutip and access the gates object. I shall open a new topic as advised.
Thanks again,
eustace