Anders Sandberg and Nick Bostrom, of Oxford's Future of Humanity Institute, have published an in-depth roadmap for "whole brain emulation" - in other words, the replication of a fully functional human brain inside a computer. "The basic idea" for whole brain emulation (WBE), they write, "is to take a particular brain, scan its structure in detail, and construct a software model of it that is so faithful to the original that, when run on appropriate hardware, it will behave in essentially the same way as the original brain." It's virtualization, applied to our noggins.
They deal with the problem of free will, or, as they term it, the possibility of a random or "physically indeterministic element" in the working of the human brain, by declaring it a non-problem. They suggest that it can be dealt with rather easily by "including sufficient noise in the simulation ... Randomness is therefore highly unlikely to pose a major obstacle to WBE." And anyway: "Hidden variables or indeterministic free will appear to have the same status as quantum consciousness: while not in any obvious way directly ruled out by current observations, there is no evidence that they occur or are necessary to explain observed phenomena."
The only way you can emulate a person with a computer is by first defining the person to be a machine. The Future of Humanity Institute would seem to be misnamed.