Capitalism and the Chinese state

Deng Xiaoping with US President Jimmy Carter.

How was capitalism restored in China?