Enhancing distributed functional monitoring with quantum protocols