It depends.
In California, parents have equal rights to custody. Courts (and mental health professionals) believe it is usually best for children to spend time with both parents to develop a relationship with each parent.
If the other parent does not want custody and agrees to it, the court can give you sole custody.