Depends on whether the state in question conforms to the Opportunity Zone parts of the Internal Revenue Code. Most notably, California and New York do not. To a certain extent, Massachusetts also does not conform. Consult a qualified advisor in your state for more details on this.