If used legally, operating while under the influence of marijuana is:

Even if marijuana is legal for medicinal or recreational use in the state in which you are riding, operating a motor vehicle while under the influence of marijuana is unsafe. Doing so is risky because the substance can distort your perception of space, time, and speed.
DMV Writen Test