Recently many states have legalized cannabis. While alcohol intoxication is easy to measure, intoxication by cannabis is not. Cannabis can stay in the blood for several months, whereas the underlying individual is most likely no longer intoxicated after several hours (see https://americanaddictioncenters.org/marijuana-rehab/how-long-system-body for information as to how long cannabis can be detected in the bloodstream).
In Thinking Fast and Slow Daniel Kahneman describes how one can measure cognitive load while doing arithmetic problems via pupil dilation. I am a mathematician by training and not a neuroscientist. However, I would like to conjecture that if one could measure pupil dilation effectively enough then the rate at which one's pupils would dilate while doing an such arithmetic tasks might differ sufficiently during cannabis intoxication that one could effectively measure whether a driver was intoxicated by a "roadside arithmetic test" in which one would wear a special pair of glasses and perform such arithmetic tasks. There would be potential obstacles depending on the numeracy of various people, however if it would work such a test would be far fairer to drivers than conventional methods. Has an effort been put into creating such a test? Would such effort be worthwhile and if so, would anyone on this forum know someone who would be interested in approaching this problem?