Photonic Techniques for Quantum Dynamics: Open Systems and Light-Matter Interaction