qml.math.binary_is_independent¶
- binary_is_independent(vector, basis)[source]¶
Check whether a binary vector, i.e., a bitstring, is linearly independent (over \(\mathbb{Z}_2\)) of a basis of binary vectors, given as column vectors of a matrix.
- Parameters:
vector (np.ndarray) – Binary vector to check.
basis (np.ndarray) – Basis of binary vectors against which
vectoris checked. Ifvectorhas shape(r,),basisshould have shape(r, m)and rankmin(r, m). I.e., the columns ofbasisall need to be linearly independent.
- Returns:
Whether
vectoris linearly independent ofbasisover \(\mathbb{Z}_2\).- Return type:
bool
Warning
This function is currently not compatible with JAX.
code/api/pennylane.math.binary_is_independent
Download Python script
Download Notebook
View on GitHub