It's fairly straightforward and explained in qa-config.php.
Basically you can set a different prefix for those database tables which are related to users and their profiles. So you can set up multiple Q2A sites which use the same prefix for user-related tables, and different prefixes for the other tables.
There's a also a setting for the cookie domain, so that people logging in to one subdomain will automatically be logged in to other subdomains.
If you use Facebook login, be sure to also set the higher level domain in your FB application settings, so the Facebook cookie is also shared.