Owen L

Results 338 comments of Owen L

Sure you could compute that as well. Just get the state and you can compute pretty much anything from it (of course none of this will be differentiable).

Well you have a density matrix (either naturally or just convert the pure state to one, there is also maybe a simpler formula for pure states like there is for...

Also for trace distance I thought you only needed the square root of a matrix?

You want to evaluate the trace of a matrix, just use tf.linalg.trace

Are you putting in a pure state? If so that's not a matrix and you need to convert it to a density matrix (of course the trace of a pure...

What's the shape of the tensor you are putting into the logm that's causing an error?

And you have 4 qubits I'm guessing?

This is a statevector. If you want to work with density matrices you will need to convert it.

dm = sv.conj().T @ sv (that's numpy Notation idk off the top of my head if it would work in TF but just do the equivalent operations)

1) you can use the simpler formula for statevector fidelity (and avoid unnecessary matrix computations) see: https://www.quantiki.org/wiki/fidelity 2) are you actually getting a complex value or is the dtype just...