matrix_props.mutual_coherence ============================= .. py:module:: matrix_props.mutual_coherence .. autoapi-nested-parse:: Computes the mutual coherence for a list of 1D numpy arrays. Functions --------- .. autoapisummary:: matrix_props.mutual_coherence.mutual_coherence 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Ā :footcite:`WikiMutualCoh`. It provides a measure of how similar the vectors are to each other. .. rubric:: Examples .. jupyter-execute:: 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)) .. rubric:: References .. footbibliography:: :param vectors: A list of 1D numpy arrays. :raises ValueError: If arrays in list are not 1D. :raises TypeError: If input is not a list. :return: The mutual coherence of the collection of input vectors.