Yes, you need to file with California. For California to know about the loss, so you can carry the loss forward, you need to file a return with them
The general rule is that is if you do not file then you loose the loss and cannot take a deduction for it when you have income.
@andrew-uthoff