import ket2dm into metrics.py