Can a parent have child custody if he or she has committed a crime?

Some states prohibit or limit parents’s custody if they have committed certain sex or violent crimes. For example, Arizona prohibits a parent from having custody or even unsupervised parental time if he or she is a convicted sex offender or a murderer of a former spouse unless the court makes written findings that the parent poses no significant risk to the child.