You can only have one PIC at a time. One person logs the time, the other is a passenger.
What sharing does allow you to do is go further for the same cost to yourself, by splitting the cost of a longer flight. But you can only log the time you were actually PIC.