In theory California could stop most gun violence by the following actions:
Step 1: Build a border wall with Mexico that is impermeable. Crew it with drones, sensors, and weaponry. This will stop the flow of munitions into California
Step 2: Build border fortifications with other states. Barbed wire, check points, drones, sensors, and weaponry. Get clearance from California Supreme Court to waive environmental concerns to allow this to happen. This will stop the flow of weapons from other states into California
Step 3: Enhance port security to such an extent that weapons cannot be smuggled in via ship
Step 4: Institute a gun buy back program. California citizens have 90 days to turn in their guns and will receive some sort of market value
Step 5: Ownership of any sort of firearm is a criminal offense. Creation of firearms is a criminal offense. Establish robust enforcement and offer rewards for information on potential offenders
Step 6: Conduct house to house searches of all homes within California for illegal weapons, using above robust enforcement arm
Do all of these things - and presuming none are declared unconstitutional - and the state could radically reduce gun violence.