Dissipative quantum state engineering for quantum computation and quantum metrology