sympy/sympy — pull request #1233 by flacjacket (2012-04-14 04:52:07+00:00)
Title: Quantum printing improvements

* The biggest change is a change to the quantum printing structure.

```
The new printing system is as follows:

- The base QExpr printing methods call _print_contents. The _print_contents methods is where classes define a unique list of arguments to print as the contents. Note, this should not include outer parentheses or brackets.

- By default, _print_contents returns _print_label.

- _print_label should not be modified in the base classes, it is reserved for printing the label of the class, which in almost all cases is the args list.

- Adding other things to the printing of the object, such as an operator name to operators or brackets to states, the class should override the _print/_pretty/_latex functions directly and make calls to _print_contents. This allows things like InnerProduct to easily control its printing.
```

* Another key change in this pull is allowing states to pretty print tall brackets. This is also used by inner products in pretty printing states. This can be seen in the tests file.

* Fixes the handling of unicode in rendering expressions. All expressions can now be pretty printed without unicode.

* Other than this, there are some minor fixes and improvements to small parts of the rendering of various things.

Closes Issue 2510
http://code.google.com/p/sympy/issues/detail?id=2510