No, if “California” was trying, it simply would have done it.
Some California localities have done something like that, though (some of which have subsequently faced adverse rulings in court.)
SF has done it.