toqito.state_props.abs_ppt_constraints

Compute the constraints on a spectrum for it to be absolutely PPT.

Module Contents

toqito.state_props.abs_ppt_constraints.abs_ppt_constraints(eigs, p, max_constraints=33592, use_check=False)[source]

Return the constraint matrices for the spectrum to be absolutely PPT [@Hildebrand_2007_AbsPPT].

The returned matrices are constructed from the provided eigenvalues eigs, and they must all be positive semidefinite for the spectrum to be absolutely PPT.

!!! Note

The function does not always return the optimal number of constraint matrices. There are some redundant constraint matrices [@Johnston_2014_Orderings].

  • With use_checks=False, the number of matrices returned starting from (p=1) is ([0, 1, 2, 12, 286, 33592, 23178480, ldots]).

  • With use_checks=True, the number of matrices returned starting from (p=1) is ([0, 1, 2, 10, 114, 2612, 108664, ldots]).

However, the optimal number of matrices starting from (p=1) is given by ([0, 1, 2, 10, 114, 2608, 107498]).

!!! Note

This function accepts a cvxpy Variable as input for eigs. The function will return the assembled constraint matrices as a list of cvxpy Expressions. These can be used with cvxpy to optimize over the space of absolutely PPT matrices.

The user must impose the condition eigs[0] ≥ eigs[1] ≥ … ≥ eigs[-1] ≥ 0 and the positive semidefinite constraint on each returned matrix separately.

It is recommended to set use_check=True for this use case to minimize the number of constraint equations in the problem.

This function is adapted from QETLAB [@QETLAB_link].

Examples

We can compute the constraint matrices for a random density matrix:

```python exec=”1” source=”above” import numpy as np from toqito.rand import random_density_matrix from toqito.state_props import abs_ppt_constraints

rho = random_density_matrix(9) # assumed to act on a 3 x 3 bipartite system eigs = np.linalg.eigvalsh(rho) constraints = abs_ppt_constraints(eigs, 3) for i, cons in enumerate(constraints, 1):

print(f”Constraint {i}:”) print(cons)

```

Raises:

TypeError – If eigs is not a numpy ndarray or a cvxpy Variable.

Parameters:
  • eigs (numpy.ndarray | cvxpy.Variable) – A list of eigenvalues.

  • p (int) – The dimension of the smaller subsystem in the bipartite system.

  • max_constraints (int) – The maximum number of constraint matrices to compute. (default: 33,592)

  • use_check (bool) – Use the “criss-cross” ordering check described in [@Johnston_2014_Orderings] to reduce the number of

  • (default (constraint matrices.) – False)

Returns:

A list of max_constraints constraint matrices which must be positive semidefinite for an absolutely PPT spectrum.

Return type:

list[numpy.ndarray | cvxpy.Expression]