Open DevelopDaily opened 3 years ago
QX gives me
[p = +0.4999980] (+0.6532819,-0.2705933) |00> +
[p = +0.5000020] (+0.6532845,-0.2705944) |10> +
when applying the sequence of gates produced by decomposition on 29fc44d (which is surely equivalent to the current develop branch in terms of unitary decomposition) to |00>
. I'm not really a quantum guy, but to me that looks like it differs only in global phase to what you got, which cannot be observed by measurement or manipulated by gates (and depends on how you define the rz/ry gates). So this doesn't look like a bug to me.
Your statement is partially correct. In a lot of applications, the global phase can be indeed ignored for the reason as you stated.
But, for one of the most important quantum algorithms - Quantum Phase Estimation, the whole thing is about the phase. The current implementation of the unitary decomposition in the OpenQL
is unable to support any quantum phase estimation applications.
Here is a simple unitary matrix:
Apply the matrix to
|0>
, and you will get(0.707107, 0, 0.707107, 0)^T
.Apply the gates generated by the unitary class to the same state
|0>
, you will not get the same result.