Heavy ion physics with the CMS experiment at the large hadron collider