Skip to main content
Help improve PyPI by participating in a 5-minute user interface survey!

Monte Carlo simulation of Generalized Canonical Ensemble for Ising Model

Project Description

Gceising is a Monte Carlo simulation toolkit of the Generalized Canonical Ensemble of 2D Ising Model.

The programming of this project involves tasks in three aspects: Time consuming jobs, Numerical calculation and Data virtualization. To improve the performance of time consuming job, we code it in C++ and then bind it via swig as a python module, which can be used by other modules. Python has many advanced data structures, from which it is so free to do scientific jobs such as numerical calculation. Though Matplotlib python package, we also can easily deal with data virtualization. If we use pyQT, UI design is amazing.

Gceisng bases on C++, Swig, Numpy, Matplotlib and PyQt4.


This package depends on Numpy, Matplotlib, and PyQt4 (swig are optional if you need modify the *.i files). Once you have fulfilled these dependencies you can install the package with the usual command:

$ python install

if you INSTALL ON WINDOWS, you can use mingw32 or MS VC++ as C++ compiler. For installation of PyQt4 on Windows, PyQt4 binary package (build-in with qt and sip) is strongly recommended instead of source packages. PyQt4 download link


There are various ways to use gceising. The simplest is add inline code as argument to the Python interpreter:

$ python -c "from gceising import qIsing;qIsing.main()"

This will create a GUI window which you can operate. Or execute python after or _Ising.pyd is built.

It is also possible to manually call inside Python code:

>>> from gceising import qIsing
>>> qIsing.main()
Note: in gceising package can be freely extended as need like

You can also find a video demo of gceising on youtube.


The source code has been successfully tested on Linux and Windows with Python 2.5 and Python 2.6 respectively. Bugs on Mac OS are unknown.


Author: Alwin Tsui <> ;

Theoretical Physics advisor: Xin Zhou <> at Asia Pacific Center for Theoretical Physics (APCTP).


Comments, suggestions and patches are welcome and appreciated. They can be sent to


GPLv3+ License, (C) 2011 Alwin Tsui.

Release history Release notifications

This version
History Node


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
gceising-1.0.tar.gz (80.1 kB) Copy SHA256 hash SHA256 Source None Mar 4, 2011

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page