I live in california too. I have not done the swap, but I did a little research. To make it legal you need following things:
1) The engine should be from the same year or newer CALIFORNIAN car. You CANNOT put the engine from 2002 car into your 2003 car. Must be same year or newer.
2) It should be completely swapped with all the emissions stuff from the donor car
3) The swap should be approved by the refferree. Once the refferee approves it, he gives you the certificate.
If you want to know more, talk to the refferree and ask him what you need to do to make it approved.