I am using the code below, utilizing QETLAB's RandomStateVector(4) and IsPPT, to generate a random state and to judge whether the state is entangled or separable:

clear all; clc;
for i = 1:30000
    psi = RandomStateVector(4);
    rho = psi*psi';
    if IsPPT(rho)

But why does the program nearly never get inside the if block? I didn't see one single yes output. But the program works well, and if I use RandomDensityMatrix(4) instead, it's easy to see the output yes.

So, does it mean that for pure two qubits state, nearly all state are entangled?


Yes. Intuitively, the set of pure product states has lower dimension than the set of all pure states. Therefore, almost all pure two-qubit states are entangled.

Let $\mathcal{F}$ denote the set of all pure states of two qubits and $\mathcal{S}$ denote the set of all pure product states of two qubits. Note that $\mathcal{S}$ can be thought of as the Cartesian product of two Bloch spheres. Therefore, $\mathcal{S}$ is a four-dimensional real manifold. On the other hand, one needs six real numbers to describe an element of $\mathcal{F}$. Thus, $\mathcal{S}$ is a low dimensional submanifold of $\mathcal{F}$.

Consequently, a pure two-qubit state selected uniformly$^1$ at random is entangled almost surely, i.e. with probability one. Finally, two qubit state is entangled if and only if its partial transpose is not positive. Therefore, the partial transpose of a pure two-qubit state selected uniformly at random fails to be positive with probability one.

$^1$ The same applies to every probability measure which is absolutely continuous with respect to the uniform probability measure.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.