matrix space
numerical range
numqi.matrix_space.get_matrix_numerical_range(matA, num_point=100)
get the numerical range of a square matrix A, A could be complex
see arxiv-link appendix A
Parameters:
Name | Type | Description | Default |
---|---|---|---|
matA
|
ndarray
|
a square matrix, could be complex |
required |
num_point
|
int
|
number of points to sample the numerical range |
100
|
Returns:
Name | Type | Description |
---|---|---|
ret |
ndarray
|
a 1d array of length num_point, dtype is complex, the numerical range of matA |
numqi.matrix_space.get_matrix_numerical_range_along_direction(matA, alpha, kind='max')
get the numerical range of a square matrix A along a direction alpha
This function might give wrong results especially when the numerical range is not smooth, In that case, a warning will be printed.
see arxiv-link appendix A
Parameters:
Name | Type | Description | Default |
---|---|---|---|
matA
|
ndarray
|
a square matrix, could be complex |
required |
alpha
|
float
|
the direction to sample the numerical range, in radian |
required |
kind
|
str
|
'max' or 'min', the maximum or minimum value along the direction |
'max'
|
Returns:
Name | Type | Description |
---|---|---|
maximum |
float
|
the maximum value along the direction \(e^{i\alpha}\) |
EVC |
ndarray
|
the eigenvector corresponding to the maximum value |
numqi.matrix_space.get_real_bipartite_numerical_range(mat, kind='min', method='eigen')
get the real bipartite numerical range of a square matrix A
where \(W^{\arctan y/x}(A)\) is the numerical range of \(A\) along the direction \(e^{i\arctan y/x}\), see
numqi.matrix_space.get_matrix_numerical_range_along_direction()
see arxiv-link
Parameters:
Name | Type | Description | Default |
---|---|---|---|
mat
|
ndarray
|
4-dimensional numpy array of shape |
required |
kind
|
str
|
'min' or 'max', the boundary of numerical range to compute |
'min'
|
method
|
str
|
'rotation' or 'eigen'.
If 'rotation': use If 'eigen': (see theorem 2 in arxiv-link) use the eigenvalue decomposition to compute the numerical range.
the matrix Two methods usually give the same output and one might be faster (TODO benchmark) |
'eigen'
|
Returns:
Name | Type | Description |
---|---|---|
ret |
float
|
the boundary of the real bipartite numerical range |
numqi.matrix_space.get_joint_algebraic_numerical_range(op_list, direction, return_info=False, use_tqdm=True)
get the joint algebraic numerical range (JANR) of a list of operators along a direction
Parameters:
Name | Type | Description | Default |
---|---|---|---|
op_list
|
list
|
a list of operators, each operator is a 2d numpy array |
required |
direction
|
ndarrray
|
the boundary along the direction will be calculated, if 2d, then each row is a direction |
required |
return_info
|
bool
|
if |
False
|
use_tqdm
|
bool
|
if |
True
|
Returns:
Name | Type | Description |
---|---|---|
beta |
ndarray
|
the distance from the origin to the boundary along the direction.
If |
boundary |
ndarray
|
the boundary along the direction. only returned if |
normal_vector |
ndarray
|
the normal vector of the boundary. only returned if |