On a public works project, if you are in direct contract with the public owner, you do not have to provide a Preliminary Notice. If you are a subcontractor who is in direct contract with the General Contractor who has a contract with the public owner, you do not have to provide a Preliminary Notice.
In general, there are no mechanics liens on public property in California. There are rare instances, such as airport leases at airports, and such, where a private real estate interest are created, so a mechanic's lien might be appropriate. The Mechanics Lien Law is generally covered in California Civil Code 8000 and the the Public Payment Remedies in Civil Code 9000. There are strict deadlines and requirements for filing those documents and bringing a timely lawsuit.