Take 5 players from the que, average their MMR (so 1900+2300+2800+2100+2400 create an average of 2300 when divided by 5) and match them with another team made up of five other players whose average is around 2300. Their highest player could be close to 3k while the lowest is way under 2k.
Block mirrors if possible, force tanks on both sides if one side has a tank, force a healer if both teams have a healer. Force support if possible (but rule can be broken if que is extended, like mirror rule)
Those are the only rules I know that exist and are documented on HotS wiki through dev comments and patch notes.
Quick Match has at some point apparently also tried to match people playing a higher level hero against people on higher level heroes, or a low level hero with low level ones etc., but I don’t know if that rule exists with the current population.
QM also has MMR so it’s not a consequence-free mode like AI or ARAM, you will get worse games if you lose a lot.
Players should be matched with and against players of slightly lower skill when playing a Hero for the first time, and slightly higher skill when playing Heroes with which they have extensive experience. This results in a higher percentage of evenly-matched games, in which each team has a 45% - 55% probability of victory, and should encourage more players to try out a greater variety of Heroes in Quick Match games.
(I don’t know if this last rule exists anymore. It was first documented many, many years ago when this game had much more players in April 2016)
The matchmaking system will now account for each player’s Hero level in order to better define match quality and calculate win probabilities more accurately when attempting to create Quick Match games.