weed is still illegal under federal law, so its a no-no if you're doing federal work. state-level is a different story.
in most cases no one cares if you did it last year, but you gotta be clean while on the gub'mnt / contractor payroll.
unofficially after the drug test i don't think anyone asks too many questions. just make sure you don't have to lie on the background check cuz I've seen people upgrade from a Secret to higher, and the higher clearance investigations went deeper and found stuff. RIP job in that case.
but seriously tho, knew a dude who did GIS work for the DIA and he was ripping a bong the second he got home. he eventually got really into the cult-y motivational speaker world, not sure where he is now, but was making fat stacks while blazing for a while