Initial commit

First implementation of the qA() function.