0
$\begingroup$

Is there a gate that can perform the matrix exponential operation

$$e^{iA}|\Psi\rangle$$

in IBM quantum experience API?

enter image description here

What is the name and symbol for this type of gate (or some other gates that can perform operations like the matrix exponential)?


I need a 2nd opinion that can confirm whether or not

$$ e^{i\begin{bmatrix} 8 & 6+i \\ 6-i & -1\end{bmatrix}} = \begin{bmatrix} -0.06558 -0.63357i & 0.38542 -0.66763i \\ 0.14805 -0.75654i & -0.46568 + 0.43456i \end{bmatrix}$$

is correct?

$\endgroup$
6
  • 1
    $\begingroup$ $A$ is a Hamiltonian - an arbitrary Hermitian matrix that is probably local (or at least sparse). $A$ is a black-box that can be used to represent or encode many varied problems. To understand "this type of gate" I recommend you study Hamiltonian simulation. The W'dia article is not bad - but there they call your matrix $A$ the Hamiltonian matrix $H$. There are also some decent lectures about Hamiltonian simulation on YouTube; this forum certainly has a number of other pointers, too. $\endgroup$ Jun 20, 2023 at 22:11
  • 1
    $\begingroup$ This may or may not be a helpful observation but RX, RY, RZ, RZZ, RXX are all exponentials of Pauli matrices (or their tensor products) with some phase angle $\theta$. The RZZ gate is equal to $e^{-i\frac{\theta}{2}Z \otimes Z}$ for instance. I don't know if more general $e^{iA}$ gates are available in IBM quantum experience. $\endgroup$
    – Callum
    Jun 20, 2023 at 22:37
  • $\begingroup$ @MarkSpinelli thank you. Presently what I need is a second opinion/calculation to check my implementation of $ e^{i\begin{bmatrix} 8 & 6+i \\ 6-i & -1\end{bmatrix}} = \begin{bmatrix} -0.06558 -0.63357i & 0.38542 -0.66763i \\ 0.14805 -0.75654i & -0.46568 + 0.43456i \end{bmatrix}$ if anyone has other software that can compute the complex matrix exponential, please? $\endgroup$
    – James
    Jun 20, 2023 at 23:21
  • $\begingroup$ Actually I found a site that can do the calculation emathhelp.net/en/calculators/linear-algebra/… . The answer seems correct. $\endgroup$
    – James
    Jun 20, 2023 at 23:31
  • 1
    $\begingroup$ Sure, your matrix is hermitian, and you probably correctly calculated it’s corresponding unitary (the matrix exponential). What you’d like to do now, is rewrite that matrix exponential in terms of other, well-used quantum gates such as $X,Y,Z$, CNOT, etc. For that, you’ll have to study Hamiltonian simulation. Or, you could ask a direct question like “How can I simulate the following $2\times 2$ Hamiltonian?” $\endgroup$ Jun 21, 2023 at 0:36

2 Answers 2

2
$\begingroup$

You may refer to various Qiskit sources to simulate the Hamiltonian using code. However, assuming that you are more interested in calculating the matrix exponential, links 1 and 2 can help.

$\endgroup$
0
$\begingroup$

As per the 2nd opinion, I've tried on my MathCAD the following expressions

Matrix Exponentation using MathCAD

There is a little rounding difference. I did 100 iterations, but the result already emerges at 50.

Matrix Exponentation using MathCAD

$\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.