1
$\begingroup$

I've seen a similar question asked (How do I compute the square root of the $Y$ gate?) but I'm trying to understand how I can use the gates $Y^{\frac{1}{2}}$ or $Y^{\frac{1}{4}}$ in Qiskit in terms of other building blocks, if it is possible.

Is there a way to use the gate $Y^{\frac{1}{2}} = \begin{bmatrix} \frac{1}{2} + \frac{1}{2}i & -\frac{1}{2} - \frac{1}{2}i\\ \frac{1}{2} + \frac{1}{2}i & \frac{1}{2} + \frac{1}{2}i \end{bmatrix}$ in Qiskit? I can say that $Y = iRY(\pi)$ and compute the square root manually, but how can I describe such an operation, if possible, in Qiskit?

$\endgroup$
0
$\begingroup$

For some reason this took a while to find, but has a simple solution:

circ.append(YGate().power(1/2), [qbit])

Where circ is the QuantumCircuit object and qbit is the register to apply the gate on.

| improve this answer | |
$\endgroup$

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.