Many quantum algorithms rely on initializing qubits in a specific state. The promised speedup of the algorithm depends on the ability to prepare the quantum state efficiently. The challenge of preparing a quantum state is an example of a broader use case of compiling isometrics into specific quantum circuit and it is known that, in general, an exponential number of gates, O(2n), are needed.
One of the popular distributions is the log-normal distribution, used in many places such as in the Black-Scholes model option pricing formula. The log-normal distribution is given by:
$f(x) = \frac{1}{x\sigma\sqrt{2\pi}}exp^{-\frac{(\ln(x)-\mu)^2}{2\sigma^2}}$
In this assignment, you are tasked with preparing a log-normal distribution with μ = 0 and σ = 0.1.
Where pi is the probability of the ’i’ state (i.e p3 corresponds to |11⟩ ) and n is the number of state qubits.
For example: Suppose you have two qubits prepared with the state $\frac{1}{3}$ |00$\rangle$ +$\frac{2}{3}$ |01$\rangle$+ $\frac{2}{3}$ |10$\rangle$ + 0|11$\rangle$ and choose the discretized domain as (0.1, 1, 1.5,2 ,3), then the error will be:
The first four terms calculate the error over the three discretized domain (0.1 to 1, 1 to 1.5, 1.5 to 2, and 2 to 3) and the last two terms calculate the error over the range from 0 to 0.1 and then from 3 to infinity, where there is no estimation.
For example Python code that calculates L2 distance, see our Competition support site
The winning submission will be the solution that meets the above conditions and has the shortest circuit depth.
When submitting, please make sure you note:
We look forward to reviewing your solution. Here are some things to know: