First of all, your operator (let me call it $U$) is represented by a $2 \times 2$ matrix, so it simply acts as a rotation on a single qubit (no $CNOT$ or any other multiple-qubit gates are needed).
That said, $U = U(\theta)$, meaning that your operator is parameterized by an angle $\theta$ and, of course, the actual unitary matrix depends on the value assigned to $\theta$. Unfortunately, the latest Qiskit version (qiskit-terra==0.22.4
) does not yet support the transformation of the parameterized unitary operator $U(\theta)$ into the corresponding parameterized quantum circuit (and, by the way, neither the other way around: take a look here). So, as far as I know, there is no way to get directly the general decomposition of $U(\theta)$ using Qiskit.
However, a workaround to the problem could be to implement a Python function U(theta)
returning your operator as a numpy
array:
import numpy as np
def U(theta):
return np.array([[np.cosh(theta / 2) + 1j*np.sinh(theta / 2), 0],
[0, np.cosh(theta / 2) - 1j*np.sinh(theta / 2)]])
Then, you call this function (passing a specific value of theta
) and you create the corresponding quantum circuit by the QuantumCircuit.unitary
method as follows:
from qiskit import QuantumCircuit
qc = QuantumCircuit(1)
matrix = U(theta=<theta_value>)
qc.unitary(matrix, 0)