Simulation of quantum computation

Issue #51 on hold
Pierre Denis repo owner created an issue

Quantum computation has recently been on the spot with Google’s claim on quantum supremacy. An important part of the argument relates to the simulation of random quantum circuits (RQC) on classical computers. Those simulations are used to make comparisons with the actual RQC results, as well as to assess the relative merits of quantum computation vs classical computation on specific problems.

It is proposed that Lea provides a set of dedicated primitives to support such simulation of quantum computation. These primitives may include: qubit, quantum register, quantum gates and (random) quantum circuit.

Actually, Lea v3.2 has already several features that are prerequisites for such development. In particular, quantum entanglement is enabled by the concept of referential consistency, which is enforced by Lea’s inference algorithm (the “Statues” algorithm). Also, the cross-entropy measure, used to compare the fitness of two probability distributions, is provided off-the-shelf.

What is missing however is the following:

  • The ability to deal with probability amplitudes, i.e. to define pseudo-probability distributions having complex numbers for probability (aka wave functions, psy) – To get the true probability distribution, we need then to apply the Born rule, that is squaring the modulus of this probability amplitude: |psy|^2. Such operation shall never be called automatically; it shall be provided to the user, who can then make the call at the very time the quantum computation result needs to be interpreted as a true probability distribution. BTW, probability amplitudes requires to review Lea’s normalization function since the sum of probability amplitudes could be different from 1.
  • Easy-to use primitives – If support of probability amplitudes are added, Lea provides all primitives required to simulate quantum computations. However, the creation of objects simulating qubits, quantum registries and quantum circuits would require a thorough understanding of the current Lea primitives. For instance, it’s not obvious that quantum gate matrices (X, Y, Z, H, SWAP, etc.) having n entries can be translated into conditional probability tables (CPT), associating each input 2^n bitstrings to a given pmf giving the probability amplitude of each 2^n output bitstrings. It’s not obvious neither that such CPT's are passed to switch method for wiring the gate between qubits. There is then a need of higher-level abstractions for defining easily the aforementioned quantum devices and operating on them.

Once these developments are done, one should be able to build up simulated quantum circuits of any size and depth. The measured state of a quantum bit can be calculated as a normal Alea instance, giving probabilities of 0 and 1, by using the usual Statues algorithm (i.e. the calc method) followed by the Born rule, for converting probability amplitudes to true probabilities. Then, random samples made on this Alea instance represent measurements. The same apply for bitstrings measured from entangled quantum bits.

Comments (16)

  1. Log in to comment