toqito.state_props.is_unextendible_product_basis¶
Check if a set of states form an unextendible product basis.
Module Contents¶
- toqito.state_props.is_unextendible_product_basis.is_unextendible_product_basis(vecs, dims)[source]¶
Check if a set of vectors form an unextendible product basis (UPB) [@Bennett_1999_UPB].
Consider a multipartite quantum system (mathcal{H} = bigotimes_{i=1}^{m} mathcal{H}_{i}) with (m) parties with respective dimensions (d_i, i = 1, 2, …, m). An (incomplete orthogonal) product basis (PB) is a set (S) of pure orthogonal product states spanning a proper subspace (mathcal{H}_S) of (mathcal{H}). An unextendible product basis (UPB) is a PB whose complementary subspace (mathcal{H}_S-mathcal{H}) contains no product state. This function is inspired from IsUPB in [@QETLAB_link].
Examples
See [tile()][toqito.states.tile.tile]. All the states together form a UPB:
`python exec="1" source="above" import numpy as np from toqito.states import tile from toqito.state_props import is_unextendible_product_basis upb_tiles = np.array([tile(i) for i in range(5)]) dims = np.array([3, 3]) print(is_unextendible_product_basis(upb_tiles, dims)) `However, the first 4 do not:
`python exec="1" source="above" import numpy as np from toqito.states import tile from toqito.state_props import is_unextendible_product_basis non_upb_tiles = np.array([tile(i) for i in range(4)]) dims = np.array([3, 3]) print(is_unextendible_product_basis(non_upb_tiles, dims)) `The orthogonal state is given by
]
- Raises:
ValueError – If product of dimensions does not match the size of a vector.
ValueError – If at least one vector is not a product state.
- Parameters:
vecs (list[numpy.ndarray]) – The list of states.
dims (list[int]) – The list of dimensions.
- Returns:
Returns a tuple. The first element is True if input is a UPB and False otherwise. The second element is a witness (a product state orthogonal to all the input vectors) if the input is a PB and None otherwise.
- Return type:
tuple[bool, numpy.ndarray | None]