PPT criteria
Positive Partial Transpose (PPT)
Accessible in both numqi.entangle
(recommended) and numqi.entangle.ppt
numqi.entangle.get_ppt_boundary(dm, dim, dm_norm=None, within_dm=True)
get the PPT (positive partial transpose) boundary of a density matrix
Parameters:
Name | Type | Description | Default |
---|---|---|---|
dm
|
ndarray
|
density matrix (support batch) |
required |
dim
|
tuple[int]
|
tuple of integers, must be of length 2 |
required |
dm_norm
|
(float, NoneType)
|
norm of the density matrix. if None, then calculate it internally |
None
|
within_dm
|
bool
|
if |
True
|
Returns:
Name | Type | Description |
---|---|---|
beta_pt_l |
float
|
minimum value of beta |
beta_pt_u |
float
|
maximum value of beta |
numqi.entangle.is_ppt(rho, dim, eps=-1e-07)
Positive Partial Transpose (PPT)
wiki/Peres-Horodecki-criterion
Parameters:
Name | Type | Description | Default |
---|---|---|---|
rho
|
ndarray
|
density matrix |
required |
dim
|
tuple[int]
|
tuple of integers |
required |
eps
|
float
|
threshold for the eigenvalues, if min(eig(X))>=eps, then X is positive semi-definite |
-1e-07
|
Returns:
Name | Type | Description |
---|---|---|
tag |
bool
|
whether rho is PPT |
numqi.entangle.is_generalized_ppt(rho, dim, return_info=False)
Generalized Positive Partial Transpose (PPT)
The generalized partial transposition criterion for separability of multipartite quantum states doi-link
Parameters:
Name | Type | Description | Default |
---|---|---|---|
rho
|
ndarray
|
density matrix |
required |
dim
|
tuple[int]
|
tuple of integers |
required |
return_info
|
bool
|
whether to return the list of nuclear norms |
False
|
Returns:
Name | Type | Description |
---|---|---|
tag |
bool
|
whether rho is generalized PPT (superset of SEP) |
info |
list[float]
|
list of nuclear norms |
numqi.entangle.get_generalized_ppt_boundary(dm, dim, threshold=1e-10, xtol=1e-05)
get boundary according to Generalized Positive Partial Transpose (PPT) criterion
Parameters:
Name | Type | Description | Default |
---|---|---|---|
dm
|
ndarray
|
density matrix |
required |
dim
|
tuple[int]
|
tuple of integers |
required |
threshold
|
float
|
threshold for the nuclear norm |
1e-10
|
xtol
|
float
|
tolerance for the root finding |
1e-05
|
Returns:
Name | Type | Description |
---|---|---|
beta |
float
|
boundary in Gell-Mann space |
numqi.entangle.get_ppt_numerical_range(op_list, direction, dim, return_info=False, use_tqdm=True)
get the PPT (positive partial transpose) numerical range of a list of operators
TODO bug, this is cross-section, not numerical range
Parameters:
Name | Type | Description | Default |
---|---|---|---|
op_list
|
list
|
a list of operators, each operator is a 2d numpy array |
required |
direction
|
ndarrray
|
the boundary along the direction will be calculated, if 2d, then each row is a direction |
required |
dim
|
tuple[int]
|
the dimension of the density matrix, e.g. (2,2) for 2 qubits, must be of length 2 |
required |
return_info
|
bool
|
if |
False
|
use_tqdm
|
bool
|
if |
True
|
Returns:
Name | Type | Description |
---|---|---|
beta |
ndarray
|
the distance from the origin to the boundary along the direction.
If |
boundary |
ndarray
|
the boundary along the direction. only returned if |
normal_vector |
ndarray
|
the normal vector of the boundary. only returned if |
numqi.entangle.get_ppt_ree(rho, dimA, dimB, return_info=False, sqrt_order=3, pade_order=3, use_tqdm=True)
numqi.entangle.get_dm_cross_section_boundary(op0, op1, num_point=101, dim=None, tag_eig=False, tag_ppt=True, tag_gppt=False)
Get the boundary of the cross section spanned by two Hermitian operators.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
op0
|
ndarray
|
Hermitian operator, |
required |
op1
|
ndarray
|
Hermitian operator, |
required |
num_point
|
int
|
number of points to sample the boundary |
101
|
dim
|
None | tuple[int]
|
the dimension of bipartite system, Required if |
None
|
tag_eig
|
bool
|
whether to calculate the eigenvalues of the interpolated density matrix |
False
|
tag_ppt
|
bool
|
whether to calculate the PPT boundary |
True
|
tag_gppt
|
bool
|
whether to calculate the generalized PPT boundary |
False
|
Returns:
Name | Type | Description |
---|---|---|
ret |
dict
|
a dictionary containing the following keys:
theta_list (np.ndarray): the angles of the boundary points
beta_dm (np.ndarray): the boundary points of the cross section
theta_op (float): the angle of the plane spanned by |
numqi.entangle.plot_dm_cross_section(beta_dm, theta_op=None, label=None, dim=None, ax=None, tag_show_legend=True, **kwargs)
Plot the boundary of the cross section spanned by two Hermitian operators.
see numqi.entangle.get_dm_cross_section_boundary
Parameters:
Name | Type | Description | Default |
---|---|---|---|
beta_dm
|
ndarray
|
the boundary length of the density matrix in the cross section |
required |
theta_op
|
float | None
|
the angle of the plane spanned by |
None
|
label
|
tuple[str] | None
|
the label of the plane and the boundary |
None
|
dim
|
int | None
|
the dimension of the bipartite system, if provided, then the inscribed circle and the circumscribed circle will be plotted |
None
|
ax
|
None | AxesSubplot
|
the axes to plot, if |
None
|
tag_show_legend
|
bool
|
whether to show the legend |
True
|
kwargs
|
dict
|
additional boundary points to plot, the key will be used as label, value can be a 1d array or a dictionary of 1d arrays |
{}
|
Returns:
Name | Type | Description |
---|---|---|
fig |
Figure
|
the figure |
ax |
AxesSubplot
|
the axes |
numqi.entangle.cvx_matrix_xlogx
TODO
numqi.entangle.cvx_matrix_mlogx
TODO