Molecular Optimization For Classical And Quantum Condensed Phase Systems