String representation of quantum loops