1
$\begingroup$

I am trying to implement the gate

$(X \otimes X)^\alpha$

where $X$ is the standard Pauli-X gate, $\otimes$ is the tensor product and $\alpha$ is a real number. Is there a way to implement this in a qiskit circuit?

$\endgroup$

1 Answer 1

0
$\begingroup$

Qiskit's Gate.power() method accepts float exponent. So, you can implement it as follows:

from qiskit.circuit.library import PauliGate

alpha = 2.73
xxp_gate = PauliGate('XX').power(alpha)
circ.append(xxp_gate, [0, 1])

The result:

enter image description here

Internally, power() method diagonalizes the unitary, raises the diagonal entries to the specified power, then constructs the resulting gate.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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