Experimental quantum pattern recognition in IBMQ and diamond NVs