As per California Government Code, section 12955, it's illegal to discriminate housing accommodation based on the source of income.
However, what about the occupation itself? For example, is it possible to have an apartment complex dedicated to those in the field of engineering? Or where all occupants are engaged in (unrelated) technical startups?