If you get caught with just a little bit it's like a getting a speeding ticket. But if you have more than a week to stay in California, you could go to the DMV the first day you're there and get an identfication card (all you need is a valid government-issued ID such as a passport or an out of state driver's license, plus your friend's cali address that you can call your own to get your ID delivered to you). Once you get your ID card shipped to you a week later (mine took 5 days last time), you can go to a pot doctor and get a recommendation for 50 bucks. Then you'll be completely legal and can go into dispensaries and shit. Peace