Random states¶
Random states on \(\mathbb{C}^m \otimes \mathbb{C}^n\), sorted by their partial transpose.
Random density matrices for use as comparison points next to the bound
entangled states, drawn by rejection sampling from
random_density_matrix
(the Hilbert–Schmidt measure):
random_NPTreturns a random NPT state — entangled, and distillable, so not bound entangled;random_PPTreturns a random PPT state. It is not "random bound entangled": a PPT draw may well be separable, and in \(2 \otimes 2\) and \(2 \otimes 3\) every PPT state is;random_PPT_close_to_the_PPT_edgereturns a PPT state near the PPT/NPT boundary, found by bisecting between a PPT and an NPT draw.
random_NPT ¶
A uniformly random density matrix with a non-positive partial transpose (rejection sampling).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
m_n
|
tuple[int, int]
|
dimensions (m, n) of the C^m (x) C^n bipartite system. |
required |
Returns:
| Type | Description |
|---|---|
ndarray
|
a random NPT (hence necessarily entangled) density matrix. |
Examples:
The rejection sampling makes both properties true of every draw, so no seed is needed. Being NPT, the state is distillable — it is not bound entangled.
>>> from toqito.matrix_props import is_density
>>> from toqito.state_props import is_ppt
>>> state = random_NPT((2, 2))
>>> is_density(state)
True
>>> is_ppt(state, dim=[2, 2])
False
Source code in src/bound_entangled/cm_otimes_cn/random_not_bound_entangled.py
random_PPT ¶
A uniformly random density matrix with a positive partial transpose (rejection sampling).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
m_n
|
tuple[int, int]
|
dimensions (m, n) of the C^m (x) C^n bipartite system. |
required |
Returns:
| Type | Description |
|---|---|
ndarray
|
a random PPT density matrix. |
Examples:
In 2 (x) 2 the total dimension is 4, so PPT implies separable (Horodecki 1996) — the draw is not bound entangled either.
>>> from toqito.matrix_props import is_density
>>> from toqito.state_props import is_ppt, is_separable
>>> state = random_PPT((2, 2))
>>> is_density(state)
True
>>> is_ppt(state, dim=[2, 2])
True
>>> sep, _ = is_separable(state, dim=[2, 2])
>>> sep
True
Source code in src/bound_entangled/cm_otimes_cn/random_not_bound_entangled.py
random_PPT_close_to_the_PPT_edge ¶
A random PPT state close to the boundary of the PPT set.
Obtained by bisecting the segment between a random PPT and a random NPT state: at each step the midpoint replaces whichever endpoint is on its own side, halving the distance to the PPT/NPT boundary.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
m_n
|
tuple[int, int]
|
dimensions (m, n) of the C^m (x) C^n bipartite system. |
required |
precision
|
int
|
number of bisection steps. |
required |
Returns:
| Type | Description |
|---|---|
ndarray
|
a PPT density matrix close to the PPT boundary. |
Examples:
Bisection only ever keeps the PPT endpoint, so the result is PPT for every draw and every precision.
>>> from toqito.matrix_props import is_density
>>> from toqito.state_props import is_ppt
>>> state = random_PPT_close_to_the_PPT_edge((2, 3), 20)
>>> is_density(state)
True
>>> is_ppt(state, dim=[2, 3])
True