Aligning reference frames with quantum states