Your Toyota Corolla will end up being considered a Special Construction vehicle and will need to be inspected by a California State Smog Referee. While installing the new engine, you will need to install all the emission components for that engine as well.
The Referee will ensure that the job was done properly and that the new engine does not pollute. If all is well they will issue you a BAR label which will be placed somewhere on your vehicles chassis which will be an indication that the vehicle is California legal.
The only concern we have with this engine is that it may very well be a JDM engine. Per the Air Resources Board (ARB), JDM engines are not legal for Public Roadway Use. Please check with the State Smog Referee's office prior to beginning this project. You can contact the referee by calling (800)622-7733.