It is legal to grow cannabis for medical purposes in California, and has been for a number of years. The products are sold in what are called medical cannabis dispensaries. In order to buy products, a California resident must obtain a prescription from a licensed medical doctor. The prescriptions are issued to treat the symptoms of specific ailments as determined by the state's board of medicine.
The products are regulated. A California resident must obtain a license to grow cannabis plants. Obviously that entails meeting certain requirements.
Beginning Jan 1 leisure use will be decriminalized. I prefer that word instead of legalized. Anyone who obtains cannabis products is still breaking federal statutes.
The production of cannabis products for leisure use is obviously in the process of being regulated.