Under your set of facts, if the only issue is ants (and not continued presence of rats, mice, and/or cockroaches), then the tenant is responsible, not the landlord.
Pest control is considered a luxury, not a necessity. The only instance where the landlord would be responsible is if there was continued presence of rats, mice and/or cockroaches which might render the premises uninhabitable. The California Supreme Court articulated the the landlord's duties in a 1974 case called Green v. Superior Court, (1974) 10 Cal.3d 616 which held that all residential leases and rental agreements contain an implied warranty of habitability.
Unless the lease agreement contractually obligates the landlord to do so, there is nothing under California law that imposes an obligation on the landord to do preventative pest control.Ask a similar question
Check your rental agreement. If pest control is called for in it, the agreement will govern. If the agreement is silent on the issue, unless the home is uninhabitable due to infestation of vermin (I do not think your ant problem as you've described would qualify, annoying as it may very well be) it will likely fall to the tenant to be responsible for pest control.Ask a similar question