An Enhanced Photonic Quantum Finite Automaton