We merge topology optimization with artificial-intelligence-assisted algorithms and integrate machine-learning based analysis with photonic design and quantum optical measurements. By implementing deep-learning assisted topology optimization we advance metasurface design for energy applications. We also apply neural network-based technique for real-time quantum measurements.