Is the following unitary transformation possible? If so, what will be the value of $U$?

$$U|i,j_1\rangle = 1/\sqrt{k}(|i,j_1\rangle+|i,j_2\rangle+|i,j_3\rangle...+|i,j_k\rangle)$$

Here, $i$ is a node in a graph and $j_1,j_2....j_k$ are the nodes to which node $i$ is attached. $k$ is the degree of node.

For example: Consider we have 8 nodes in the graph and Node 0($|000\rangle$) is attached to node 1($|001\rangle$) ,node 7($|111\rangle$) and node 5($|101\rangle$). So, what I want is a single $U$ operator which does this:

$$U|000,001\rangle=1/\sqrt{3}(|000,001\rangle+|000,111\rangle+|000,101\rangle)$$ $$U|000,111\rangle=1/\sqrt{3}(|000,001\rangle+|000,111\rangle+|000,101\rangle)$$ $$U|000,101\rangle=1/\sqrt{3}(|000,001\rangle+|000,111\rangle+|000,101\rangle)$$

  • $\begingroup$ Shouldn't it be $U|00\rangle = \dfrac{1}{\sqrt{2}} \bigg(|00\rangle + |01\rangle$ ? And if I am not mistaken, then for 3 qubit, it would be $U|000\rangle = \dfrac{1}{\sqrt{3}} \bigg( |000 \rangle + |001\rangle + |010\rangle \bigg)$? $\endgroup$
    – KAJ226
    Commented Nov 20, 2020 at 5:40
  • $\begingroup$ No. As I mentioned in question I want equal probability to all the links attached to the node. $\endgroup$ Commented Nov 20, 2020 at 5:44
  • $\begingroup$ Have you tried computing a small example of what you want by hand? Maybe a graph with $3$ or $4$ nodes? Write the transformation as some arbitrary matrix $A = \sum_{ij} a_{ij} |i \rangle \langle j |$ and solve for the $a_{ij}$ then check if the resulting matrix is unitary. $\endgroup$
    – Rammus
    Commented Nov 20, 2020 at 10:02

2 Answers 2


There is a question that has something in common with your question, see the answer by @DaftWullie.

Since all three input states after the operation, $U$, give the same result, then we can not decide which state is our input(it can not be recovered), this means that the operation is not reversible.

Maybe, after you appended some ancilla and enlarge the operation $U$ your requirement is possible.


To compute the values of $U$ matrix representation you should calculate its elements $<{i, j}|U|{i', j'}>$ for all values of $i, i', j, j'$. For instance:

$$ U_{i,j_1,i,j_1} = <{i, j_1}|U|{i, j_1}> = 1/\sqrt{k} $$ $$ U_{i,j_2,i,j_1} = <{i, j_2}|U|{i, j_1}> = 1/\sqrt{k} $$

and so on..

You should also define the state $U|i,j>$ for all $i$ and $j$ to completely determine the $U$ matrix. Otherwise, it will contain unknown elements.

However, your example shows that your transformation is not unitary:

If $U|x> = U |y>$ while $<x|y> = 0$, it implies that if $U$ is unitary, then $$ <x|U^\dagger U|y> = 0$$ which is contradiction since $U|x> = U |y>$.

Hence, your transformation is NOT unitary (which is obvious from the identical outputs which implies IR-REVERSIBILITY). You should include ENTANGLING operations with additional qubits to achieve a legal quantum gate.

  • 2
    $\begingroup$ Trace preservation is not enough, $U$ needs to take orthogonal states to orthogonal states, which it doesn't because it has repeated columns. $\endgroup$
    – chrysaor4
    Commented Nov 20, 2020 at 14:40
  • $\begingroup$ Yes I didn't see the examples ! Thank you $\endgroup$
    – Appo
    Commented Nov 20, 2020 at 18:36
  • $\begingroup$ But what do you mean by trace preservation? @chrysaor4 $\endgroup$
    – Appo
    Commented Nov 20, 2020 at 18:48
  • $\begingroup$ Please, can you tell me what do you mean by including entangling operations? $\endgroup$ Commented Nov 21, 2020 at 6:42
  • $\begingroup$ @AbdellahTounsi For pure states, $ \langle \psi | \psi \rangle = Tr(\langle \psi | \psi \rangle) = Tr(\rho) $, so preserving the trace is the same as preserving the norm. $\endgroup$
    – chrysaor4
    Commented Nov 21, 2020 at 11:10

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.