toqito.matrix_props.mutual_coherence ==================================== .. py:module:: toqito.matrix_props.mutual_coherence .. autoapi-nested-parse:: Computes the mutual coherence for a list of 1D numpy arrays. Module Contents --------------- .. py:function:: mutual_coherence(vectors) Calculate the mutual coherence of a collection of input vectors. The mutual coherence of a collection of input vectors is defined as the maximum absolute value of the inner product between any two distinct vectors, divided by the product of their normsĀ [@WikiMutualCoh]. It provides a measure of how similar the vectors are to each other. .. rubric:: Examples ```python exec="1" source="above" import numpy as np from toqito.matrix_props.mutual_coherence import mutual_coherence example_A = [np.array([1, 0]), np.array([0, 1])] print("Result for example_A = ",mutual_coherence(example_A)) # An example with a larger set of vectors example_B = [np.array([1, 0, 1]), np.array([0, 1, 1]), np.array([1, 1, 0])] print("Result for example_B = ",mutual_coherence(example_B)) ``` :raises ValueError: If arrays in list are not 1D. :raises TypeError: If input is not a list. :param vectors: A list of 1D numpy arrays. :returns: The mutual coherence of the collection of input vectors.