def dot(*values: ArrayLike) -> np.ndarray:
    """Computes the dot/matrix product of a sequence of values.

    Performs the computation in serial order without regard to the matrix
    sizes.  If you are using this for matrices of large and differing sizes,
    consider using np.lingalg.multi_dot for better performance.

    Args:
        *values: The values to combine with the dot/matrix product.

    Returns:
        The resulting value or matrix.

    Raises:
        ValueError: If the method is called without any arguments.
    """
    if len(values) == 0:
        raise ValueError("cirq.dot must be called with arguments")

    if len(values) == 1:
        # note: it's important that we copy input arrays.
        return np.array(values[0])

    result = np.asarray(values[0])
    for value in values[1:]:
        result = np.dot(result, value)
    return result
Computes the dot/matrix product of a sequence of values.

    Performs the computation in serial order without regard to the matrix
    sizes.  If you are using this for matrices of large and differing sizes,
    consider using np.lingalg.multi_dot for better performance.

    Args:
        *values: The values to combine with the dot/matrix product.

    Returns:
        The resulting value or matrix.

    Raises:
        ValueError: If the method is called without any arguments.
    
cirq-core/cirq/linalg/combinators.py