GSoC/GCI Archive
Google Summer of Code 2011


Web Page:

Mailing List:


SymPy is a Python library for symbolic mathematics. It aims to become a full-featured computer algebra system (CAS) while keeping the code as simple as possible in order to be comprehensible and easily extensible. SymPy is written entirely in Python and does not require any external libraries, which makes it available everywhere Python can be used.

It has a liberal BSD license allowing other open source projects and commercial companies to make use of SymPy in their own projects. SymPy has a vast array of potential applications, from theoretical physics (atomic physics, quantum field theory, general relativity, classical mechanics, quantum information...), applied math (solving algebraic and differential equations, ...), teaching (calculus, integrals, derivatives, limits, ...), web (it runs on the Google App Engine), and it can also be included as a library in any scientific code.

SymPy has a large, active development team that has increased non-stop since 2007 (ref: thanks to an extensible architecture that enables features to be added easily and in a modular way. It is built and tested regularly on all major platforms and all major architectures to ensure that it can reach the widest possible audience.

The official code samples for SymPy at available at  We have a detailed report of the project for this year at


  • Combinatorics package for Sympy Sympy currently does not have much of the functionality of combinatorics packages such as Combinatorica or Combinat of Maple. These packages have applications not just in engineering but also fundamental sciences. My project aims to implement the features of these packages.
  • Definite Integration using Meijer G-functions The aim of this project is to extend the definite integration capabilities of the symbolic computer algebra package SymPy to include a (eventually wide) range of special functions. The approach will be to use the very general familiy Meijer G functions. Most definite integrals of importance to mathematical physics can be deduced from general properties of the G functions.
  • Implementing F5 SymPy currently uses Gröbner bases for -- among other things -- computations in polynomial rings, computing minimal polynomials of algebraic numbers and solving systems of polynomial equations. I plan to implement the F5B flavor of the F5 algorithm in order to improve performance with such computations and allow for new applications, such as simplification of rational functions modulo prime ideals.
  • Porting to Python 3 Python 3 represents the future of the language. If SymPy is to be used as a library, it will have to be ported to Python 3. In order to accomplish this, a system for automatic testing will need to be established. A robust test system will ensure no regression happen and will ease the maintaining of a dual code-base. After the main porting is done, my goal is to attempt to support alternative Python compilers, to further ensure compatibility and reduce reliance on implementation details.
  • Position and Momentum Bases for Quantum Mechanics Currently in sympy, there is support for discrete Hilbert spaces, which are quite useful for spin calculations or symbolic quantum computing. However, there is only very preliminary support for continuous Hilbert spaces. The goal of this project would be to implement position/momentum representations for operators and eigenstates in various coordinate systems, including cartesian, cylindrical, and spherical, as well as implementing many "textbook" example QM systems.
  • PyDy Improve and integrate existing PyDy code, which relies on SymPy, with the main SymPy module. Will allow more people to use PyDy and fix the existing flaws in PyDy.
  • Symbolic Clebsch-Gordon coefficients/Wigner symbols and Implementing Addition of Spin Angular Momenta The current implementation of spin in Sympy covers single spin states and the operators that can act on them; however, there is no means of dealing with spin states in multiple particle systems, which requires Clebsch-Gordon/Wigner symbols. Sympy currently has functions capable of calculating Clebsch-Gordon coefficients numerically; this project will focus on implementing a symbolic means of manipulating these coefficients and expand the spin implementation to utilize these coefficients.
  • Symbolic Linear Algebra Computational Linear Algebra is numerically mastered by numpy/scipy. But there is no open source library which handles Linear Algebra for matrices with symbolic content. My project is to write sparse matrix algorithms for symbolic matrices. Matrices will majorly support exact ints, rational numbers, real numbers, polynomials, rational functions and finally algebraic expression as its elements.
  • SymPy Stats: Random Variables We encode the formalism behind Event Spaces, Probability Distributions, and Random Variables into SymPy, an open source Computer Algebra System in Python.