TransWikia.com

Principal square root of Pauli Y gate in Qiskit?

Quantum Computing Asked by m1cky22 on August 1, 2021

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?

One Answer

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.

Correct answer by m1cky22 on August 1, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP