# Finding a unitary transformation between two quantum states.

Tags:
1. Nov 4, 2015

### Qubix231

I have to find a unitary transformation that takes me from one quantum state to another (or if there is such a transformation), given the two quantum states in matrix form. The matrices are huge (smallest is 16x16) , so doing it on paper is not an option. Does anyone know how I can do this in Mathematica?

2. Nov 4, 2015

### JorisL

Do you need the explicit transformation? Otherwise you could prove it exists and use it as a general operator.

If you do need it, try to get it to work for smaller examples.

A last question have you googled? Because I suppose if it's got a built in solution you would find loads of info.
If not please do so, good lookup skills are one of the most important things you'll ever learn.

3. Nov 4, 2015

### Qubix231

I don't necessarily need to see the matrix form of the unitary, I just have to prove that it does exist, i.e. that my two states are unitarily equivalent. And yep, I did google.

4. Nov 4, 2015

### JorisL

What is your system?
Because in the cases I encountered you can use the strong mathematical formalism to show this.
It can be non-trivial but once you find the solution you often smack yourself in the head.

5. Nov 4, 2015

### Qubix231

3 to 6 qubits. (forgot to mention initially that the smallest is 8x8, not 16x16).

6. Nov 5, 2015

### JorisL

It has been a while since I've worked with this. Which is why I took so long to answer.
However you'll need to determine what the Hilbert space is.

That's where my ideas get shaky.
I will refrain from giving information that is likely to have grave errors in it. That way you don't have to unlearn faulty information.

I noticed a mentor to move this to the QM forum where you'll get quality answers.

7. Nov 5, 2015

### Qubix231

Thanks JorisL. So if it is of any help, the two matrices are here:

http://pastebin.com/s3B1T0HD

I want to see if there is a unitary (up to some approximation anyway) , that takes me from one matrix to the other. Anyone know how to do this in Mathematica? or Numpy Python ?

8. Nov 5, 2015

### Strilanc

If the states are pure, then an operation that transforms between them is just $M_{b \leftarrow a} = I + \left| b \right\rangle \left\langle a \right|$. To make it unitary just pick some arbitrary other basis vectors to complete the $a$ basis and $b$ basis and add a mapping between them in as well.

If the states are mixed, I guess you'd take the schmidt decomposition then map each schmidt basis vector in $a$ across the basis vectors in $b$ so the coefficients end up matching... but if $b$ is more pure than $a$ then there's likely an obstacle that prevents it from working.