2
$\begingroup$

Let's consider a set of $N = 2^n$ binary values $S_i \in \left\{-1, 1\right\}$ and define the diagonal matrix $W$ as a quantum unitary operator acting on a system of $n$ qubits: $$ W = \begin{pmatrix} S_1 & 0 & 0 & 0 & 0\\ 0 & S_2 & 0 & 0 & 0\\ 0 & 0 & \dots & 0 & 0\\ 0 & 0 & 0 & S_{N-1} & 0\\ 0 & 0 & 0 & 0 & S_N \end{pmatrix} $$ Is it possible to build a parameterized quantum circuit $U(\theta)$ to get all and only the unitary operators written as $W$ (with just $1$ or $-1$ on the main diagonal) varying the values of the $\theta$ parameters?

For example, if I consider the matrix: $$ W_1 = \begin{pmatrix} 1 & 0 & 0 & 0\\ 0 & 1 & 0 & 0\\ 0 & 0 & -1 & 0\\ 0 & 0 & 0 & 1\\ \end{pmatrix} $$ the equivalent circuit can be built using the following Qiskit code:

import numpy as np
from qiskit import QuantumCircuit, transpile

W1 = np.diag([1, 1, -1, 1])

qc = QuantumCircuit(2)
qc.unitary(W1, qubits=[0, 1])

transpile(qc, basis_gates=['u', 'cx']).draw('mpl')

enter image description here

However, if I consider another matrix as for instance $$ W_2 = \begin{pmatrix} 1 & 0 & 0 & 0\\ 0 & -1 & 0 & 0\\ 0 & 0 & -1 & 0\\ 0 & 0 & 0 & 1\\ \end{pmatrix} $$ the same piece of code gives me a different circuit:

enter image description here

How can I build an ansatz for all the quantum unitary operators written like $W$?

$\endgroup$
5
  • $\begingroup$ I don't think a parameterized ansatz will only produce such kind of diagonal unitary. You may find an ansatz that is able to give you all these diagonal unitary, but will not only get these stuff. $\endgroup$
    – Yunzhe
    Oct 23 at 5:37
  • $\begingroup$ @Dran Not even if, having fixed the ansatz, I put constraints on the values of the parameters? $\endgroup$ Oct 23 at 6:55
  • $\begingroup$ Then I don't see the point of making it into a parameterized ansatz with restricted input values. People parameterize the circuit mainly because they wanna optimize it for some loss function. Maybe you can elaborate more on the motivation of your question? $\endgroup$
    – Yunzhe
    Oct 23 at 7:06
  • $\begingroup$ That's exactly what I want to do as well. But I also want to do it constraining the values of the parameters so that the unitary operator corresponding to the quantum circuit looks like a matrix written as $W$ $\endgroup$ Oct 23 at 7:23
  • $\begingroup$ Can we assume any other constraints? For example, polynomially-many "-1"s $\endgroup$ Nov 5 at 12:10

0

Your Answer

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