How to use qiskit gpu on window? - python

I want to calculate unitary of quantum circuit with GPU because my cpu is already too busy.
But it seems qiskit-aer-gpu supports only ubuntu. Is there any way to use it on window10?

The qiskit-aer-gpu package provided is only available on Linux running on a x86_64 platform. If you want to make it run on Windows, you'll have to build the Aer code to support GPU from source. You can refer here for instructions.
Another way might be to use Windows Subsystem for Linux (WSL) to install CUDA and use the already built qiskit-aer-gpu package. I've never tried it but it's worth a try. https://docs.nvidia.com/cuda/wsl-user-guide/index.html
Patrick

Related

Pick a specific CUDA version to use inside Singularity 3.6 container

I am working on a POC of running tensorflow container via Singularity 3.6. I have a requirement that the user may need to pick an older version of CUDA which are available in a customized location rather than the system installed one.
I read the 3.6 document for GPGPU support, the -nv flag does all magic automatically, I could not see any step where I can specific which CUDA to use. I have multiple CUDA versions on the system and they are summoned by module load command normally.
Any idea is welcomed.
Cheers

Does the Windows Subsystem for Linux (WSL) support cpufreq as used by Python psutil?

I am using the WSL (Ubuntu 18.04.2 LTS) for machine learning projects. So I installed autokeras 1.0 on Python 3.6 which is based on the new tensorflow 2.0. However, all autokeras examples break with the psutil error message "NotImplementedError: can't find current frequency file".
So far, I found out that psutil is looking for a file named cpuinfo_cur_freq
for each cpu e.g. in /sys/devices/system/cpu/cpu0/cpufreq/. However, in that path I only have the files cpuinfo_max_freq and scaling_max_freq. As far as I understand, the files pstool is looking for are managed by the Linux cpufreq kernel infrastructure, which obviously is not active on my system.
So I wonder if WSL supports the Linux cpufreq infrastructure at all. I could imagine this to be difficult as it would have to be coordinated with the cpu management on the Windows host system. But if WSL does support it, I would like to learn, what I need to do to get it running.
I am not sure, if this is the right place to ask, but the platforms provided by Microsoft for WSL (GitHub and UserVoice) did not seem appropriate to me.

how to cross compile python packages (e.g. Numpy) for ARM

I know this question have been posted before. But I couldn't find a complete answer on how to do it.
I would like to use python packages with C extensions such as Numpy and Twisted in an embedded system (platform architecture: ARM 32Bit and some Linux distribution).
Info: the tool chain is already configured.
Found this alternatives:
Using dockers
Using distutilscross (sounds the easiest, but couldn't find documentation)
https://pypi.python.org/pypi/distutilscross
Using VM
Thank you in advance
Crossenv
But I get the issues with multiarray among working with numpy all the time.
Numpy dependable cross compilations are failing with the issue. So I modified PATH to make them start building.
Built numpy also fires the issue when imported in target python.
For the second issue:
$ sudo apt install python-numpy
is meant to be the solution but since I am developing for an embedded system I cannot/have never tried to use it.
I get to a conclusion that I should cross compile it by myself but then a lot more dependency issues occurred. However, one can try it if the target is not a minimalist linux and apt is available.

Create "Windows installer" for Python lib

I have compiled a PyXMLSec lib successful on Ubuntu. I want to create a windows-installer for this lib (i.e PyXMLSec-win32-python27.exe). Can I create it from my Ubuntu or it must be from Win32? How can I create it? I prefer from Ubuntu because in Windows, I have some bugs.
Thanks.
You should build and test the installer on Windows. (If you don't test it on Windows, you don't know it works on Windows.)
The commonly used free installation software products used for making Windows installers typically include Wix and Inno Setup. For ease of use, I prefer Inno Setup; it has some free GUIs (linked to from the site itself) for creating the setup scripts used to build the installer, is pretty flexible without any custom work on your part, and easily extendable using it's built-in Object Pascal-based scripting language.
Wix, however, supports building MSI-based installers that use Windows Installer. MSI installs are often required by corporate network administrators because they allow pushing the installation out to computers in the network domain easily. It's harder to work with unless you're pretty familiar with it, so it may not be suitable for a one-off installer requirement like you seem to need.
I want to make an installation file for my python source code"
You have to use NSIS, InnoSetup, BitRock Installer, IzPack or equivalent to produce a platform installer. So you have to take the binary result produced on the first part and package it for os distribution. Almost all the installer systems are thinked for Windows systems. Cross platform : Zero Install, IzPack ... If you use IzPack you can have a cross platform installer paying the price of including a jvm.
And i Believe This >> HELP Can be Light of Your Way ;)
Have a look at the documentation for Build Distribution:
python setup.py bdist --format=msi

Can I install Python 2.7.1 64bit along side of an exsiting 32bit install on OS X?

Short Description
Is it possible to install Python 2.7.1 64/32bit from python.org on top of an existing install (from python.org) of Python 2.7.1 32bit?
Background
I installed the 32bit version for wxPython(2.8) support which until now has given me zero issues. There are a few modules that I am now having difficultly installing (psycopg2 and mysql-python). The warning messages in homebrew constantly warn me about not having a 64bit version of Python on the path. These warnings only add to my list of wanting to use a 64 bit version.
At the time I selected the 32bit install, the GUI for a particular project was the main focus. Now the GUI has been come very simple and the database back-end support (using Django) is much more important. This being said, using the development version of wxPython 2.9 (which supports OS X and 64bit 2.7) has become acceptable.
For the non-mac users, to help explain why I had to use the 32bit version please see this Brief guide to using virtualenv in a wxpython project
System Information
Development System
OS: Mac OS X Snow Leopard (10.6.7)
Python: 2.7.1 with virutalenv / virutalenv-wrapper
Project Dependencies:
Note that MySQL could be PostgresSQL's psycopg2 if I can get the postgresql to install with homebrew
Django==1.2.5
MySQL-python==1.2.3
PIL==1.1.7
PyVISA==1.3
pyserial==2.5
virtualenv==1.5.1
virtualenvwrapper==2.6.3
wsgiref==0.1.2
wxPython==2.8.11.0
wxPython-common==2.8.11.0
Deployment System
OS: Windows XP / Windows 7
Python: Hopefully none (goal to use py2exe, or similar tool)
Current Thoughts
I fear that my goal cannot be accomplished based on the file paths alone. In Windows 7 the identifier (x86) is placed in the path showing that it is a 32bit program, but on OS X the path would be the same for 32bit or 64/32bit installs (/Library/Frameworks/Python.framework/Versions/2.7/).
Any thoughts or comments would be helpful!
Update 5-18-2011: 8:40 AM
I have confirmed that using the pre-compiled (.dmg) framework builds, installing the a 64 bit version does blow away the 32 bit install. This did negatively effect my virtual environments in that all of the things I have installed in the environments was based on the 32 bit install nearly every module threw an error of some sort.
I still have not achieved installing 32 bit and 64 bit on the same machine, however looking into homebrew with greater detail does look this could be possible. The trick would be to define your own formulas for each of the python builds (from source) and rename the install directory to something like 'Python27_32' and 'Python27_64'. I'll keep exploring this front as I have time.
EDIT 7-12-2011: 10:51 AM CST
Has anyone out there been able control how homebrew compile options? Specifically how to select to use a 64bit compiler or a 32 bit compiler? I will create a new SO question if this doesn't bring anything up.
Check out http://www.macports.org/ Which provides ports of various flavors of linux/unix tools that don't appear in the default MacInstallation and duplicates those that it needs otherwise. It installs everthing in /opt/local instead of stepping on the installed base. With some manipulation of PATH and LD_LIBRARY_PATH this might give you the options you need.
I would use something like virtualenv. This way you can have as many different installs of python as you wish.
EDIT: To use different versions of python use:
virtualenv -p python2.6
Reference
Another possible solution that was provided in an answer to one of my questions aimed at using a virtual environment in the Windows world was using Buildout. This approach looks like it would allow me create an environment with the 32bit installed and another one with the 64bit.
I have not tested this out yet, but wanted to pass it along to anyone else attempting this feat.
Cheers!

Categories

Resources