# How to measure a general two-qubits gate? Does it help to Bob and Alice?

Excuse me if this question is absurd. I discovered logic gates a few weeks ago.

two-qubis Logic gates are represented by 4x4 matrices. Can they mimic a general density matrix of pairs of spin 1/2 particles? The problem that I have in mind is the reconstruction (tomography) of the global density matrix from the local measurement by Alice and Bob once they can compare their results. I suppose that we can measure the 16 elements of the logic gate matrix. Does it help to find a similar procedure for Bob and Alice?

• Quantum states are represented by positive semidefinite matrices with trace 1. Gates are represented by unitary matrices. So unless your gate is also a quantum state then I don't know if there is a meaningful way in which you can 'measure' it. Nov 14 '20 at 17:44

Long story short: if you want to characterize a circuit or operation, you have to perform Quantum process tomography (QPT), which is a generalization of quantum state tomography, which is used to characterize states. QPT is not very easy unfortunately, there is a little math involved. Please see this answer to a previous question for a general overview.

## A note on the relation of states/density matrices and unitaries

First a note on the correspondence between two-qubit states and two-qubit operations. You are right in saying that both are represented by $$4\times 4$$ matrices, but, as Rammus points out, the sets of valid density matrices and valid operations are not the same.

• A density matrix must have unit trace and only positive eigenvalues; the only way for a density matrix to have an eigenvalue of $$1$$ is when all others are zero, which means that the matrix is rank $$1$$ (this is a pure state).

• A unitary matrix has only unit eigenvalues (up to a phase) and is necessarily full rank.

We can conclude that no density matrix can be a unitary matrix and vice versa.

## Back to the question at hand

If Alice and Bob share a (possibly entangled) pair of spin-$$\frac{1}{2}$$ particles (we generally refer to the particles as qubits), they can reconstruct the state of the particle if they have multiple copies of the state. To do this, they both make repeated coordinated measurements in the $$X, Y$$ and $$Z$$ basis, so that they obtain $$3^2 = 9$$ different measurement statistics. They can reconstruct the density matrix from all of the (combined) measurement outcomes, and the important thing to notice is that all measurements are local measurements; they only have to coordinate and communicate classically. This procedure is known as quantum state tomography (QST), please check this answer for further details.

If they know that their particles always go through some $$2$$-qubit unitary, they can try to reconstruct this unitary by having different 'input states' on which the unitary acts, and subsequently perform QST to reconstruct these 'output states'. If the output state of enough input states is known (you need $$\geq 4^{2} = 16$$ different input states) the entire unitary is encoded into the relation between the pairs of input and output states. Reconstructive methods allow to estimate the unitary operation.

Please do not be disheartened if you are not able to fully grasp what I have said here. QPT is not easy, and contains some slightly more advanced topics in quantum information science.

The main take away is that, yes, it is possible to reconstruct a unitary matrix from measurement results, coordination and some smart thinking alone.

Can they mimic a general density matrix of pairs of spin 1/2 particles?

As pointed out, no, because the sets of density matrices and unitary operations is strictly disjoint.

The problem that I have in mind is the reconstruction (tomography) of the global density matrix from the local measurement by Alice and Bob once they can compare their results. I suppose that we can measure the 16 elements of the logic gate matrix.

As hinted at above, the direct elements from a unitary can not be measured, but we can reconstruct the elements through smart measurements on the output states of the unitary.

Does it help to find a similar procedure for Bob and Alice?

All the operations that Alice and Bob need to perform need to be coordinated between each other, and all operations are symmetrical; therefore it does not matter who is who.

Excuse me if this question is absurd.

Absolutely not!