Nope, because of laws written by energy company lobbyists for the "safety" of consumers, so if you're mixing grid and solar on the same site (even if completely isolated circuits) you have to get all kinds of certifications and permits for inverters and breakers installed by certified technicians that make it cost prohibitive.
Also, many HOAs and local governments place ridiculous restrictions of their own right
I posted more on the other branch of this thread. But cost prohibitive is about all I can find about this and not illegal. Which for some people might be the same result of course.
As I understand it. They banned solar inverters as well as severely tariffing the panels. In some places it's also illegal not to get your electricity from the grid.