Calculation of elastic constants in defected and amorphous silicon by quantum simulations