Technically, yes it's illegal. Weed is still a schedule I drug and illegal at the federal level, as is it's cultivation.
The feds haven't bothered enforcing for the most part, but if the DEA felt like it, they could shut down every grow operation from Anchorage to Bangor.