4
$\begingroup$

The documentation for the new version Qiskit 0.20.0 states that:

  • UGate is "Implemented using two X90 pulses on IBM Quantum systems:

$U(θ,ϕ,λ)=RZ(ϕ−π/2)RX(π/2)RZ(π−θ)RX(π/2)RZ(λ−π/2)$"

  • U3Gate is "Implemented using two X90 pulses on IBM Quantum systems:

$U3(θ,ϕ,λ)=RZ(ϕ)RX(−π/2)RZ(θ)RX(π/2)RZ(λ)$"

It looks like only the latter matches the known rotation sequence for U3: $z$-rotation ($\lambda$), $y$-rotation ($\theta$), $z$-rotation ($\varphi$)

Although their presentation matrices completely coincide: $$ \mathrm{U3}= \mathrm{U}= \begin{pmatrix} \cos(\theta/2) & -\mathrm{e}^{i\lambda}\sin(\theta/2) \\ \mathrm{e}^{i\phi}\sin(\theta/2) & \mathrm{e}^{i(\phi+\lambda)}\cos(\theta/2) \end{pmatrix}. $$

Is this an inaccuracy in the documentation or am I missing something and these gates are actually different?

Just in case, the aforementioned difference stated in the documentation refers to the hardware (not software) implementation of these gates on IBM Q systems.

$\endgroup$
3
$\begingroup$

If you look at the source code then you will see that the UGate is defined as an alias for the U3Gate. As to why do they need this alias, I do not know for sure. But if I were to hazard a guess, then it would be because in most quantum computing literature, $U$ is used to refer to an arbitrary unitary gate/operator. Since in qiskit U3Gate is the most generic single qubit unitary gate, it makes sense to identify it with $U$ from quantum computing literature.

| improve this answer | |
$\endgroup$
  • 1
    $\begingroup$ That's quite right about implementation in source code of Qiskit: in qelib1.inc the u3 gate (like all the others, except the controlled ones) are defined through the U gate too. But this does not say anything about the hardware implementation: in IBM Q separate hardware implementations are used for u3, u2 and u1 gates (despite their definition through the generic U gate). $\endgroup$ – Psanfi Aug 20 at 15:26
  • $\begingroup$ @Psanfi I do not understand why you think U3 and U would be implemented separately. I would think one would be implemented in terms of the other at the hardware level, since they are essentially equivalent, granted I do not really know if they are implemented differently at the hardware level. The way I am reading it is that if they are equivalent then they will be implemented in the same way. $\endgroup$ – e-eight Aug 21 at 0:12
  • $\begingroup$ You said: "I do not understand why you think U3 and U would be implemented separately". I don't think so, I don't know too what the actual hardware implementation of the U gate is and would it be be implemented separately. The different hardware implementations of U and U3 gates are written in the documentation, I just want to figure out if this can be believed and if yes, what reason is? $\endgroup$ – Psanfi Aug 21 at 5:24
  • $\begingroup$ @Psanfi Could you point out where it is written that they are implemented differently? From your question, I only see that for both the implementation is by "using two X90 pulses on IBM Quantum systems". $\endgroup$ – e-eight Aug 21 at 6:16
  • $\begingroup$ Yes, but then there is a colon, below is a specific implementation for each gate (e.g. for the U gate a specific implementation: U(θ,ϕ,λ)=RZ(ϕ−π/2)RX(π/2)RZ(π−θ)RX(π/2)RZ(λ−π/2). In my question it was a direct quote from the documentation, enclosed in double quotes. $\endgroup$ – Psanfi Aug 21 at 6:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.