A key test of their unity would be on Sunday, at a protest rally in Delhi to which AAP has invited all opposition parties
The riots began in the district of Muzaffarnagar, 130 km (81 miles) northeast of New Delhi, and spread to other areas in the country's most populous state months before the 2014 election won by Prime Minister Narendra Modi's Hindu nationalist party.
A court in Muzaffarnagar sentenced the men after they were found guilty of killing the two Hindus in the village of Kawal on Aug 27, 2013, prosecutor Rajeev Sharma told Reuters.
Reuters could not immediately contact the families of the convicted men.
Nearly all the victims of the riots were Muslims, including about 12,000 people who were made temporarily homeless due to the unrest that polarised western Uttar Pradesh on religious lines.