pygsti.tools.frobeniusnorm

pygsti.tools.frobeniusnorm(ar)

Compute the frobenius norm of an array (or matrix),

sqrt( sum( each_element_of_a^2 ) )
Parameters:ar (numpy array) – What to compute the frobenius norm of. Note that ar can be any shape or number of dimenions.
Returns:depending on the element type of ar.
Return type:float or complex