Unless you are a physician and the other person is your patient, the answer is no.
In September 2015, California's legislature approved the state's first-ever "assisted-suicide" law.
This new law allows doctors to help terminally-ill patients end their lives without worrying about criminal penalties. It has received praise from people who advocate for the option of "death with dignity" for those who have only a short time left to live.
But it is important to note that this law applies only to doctors. Ordinary people who want to help their terminally-ill friends or relatives die a peaceful, painless death still have to worry about charges under Penal Code 401 PC, California's law against aiding a suicide.
If you help a sick friend purchase pills or a gun so that s/he can end his/her life, for example, you will be subject to felony penalties under that law.
And if you go a step further and actually kill a terminally-ill friend at their request, then you can be charged with California murder--even if the "victim" wanted your assistance in dying.