System of linear constraints for constrained optimization.
There are more informative comments in the source code.
Copyright 2008-2012 Research Foundation State University of New York
This file is part of QUB Express.
QUB Express is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
Free Software Foundation, either version 3 of the License, or (at your
option) any later version.
QUB Express is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
Public License for more details.
You should have received a copy of the GNU General Public License,
named LICENSE.txt, in the QUB Express program directory. If not, see
<http://www.gnu.org/licenses/>.
|
AllConstraints(K0,
K1,
K2,
L,
V,
P,
constraints)
Returns combined AutoConstraints(...) and UserConstraints(...) |
source code
|
|
|
AutoConstraints(K0,
K1,
K2,
L,
V,
P)
Returns the constraints (Ain, Bin) [11] which fix unconnected k0
and unsensitive k1. |
source code
|
|
|
|
|
K012toK(K0,
K1,
K2)
Returns a flat array of the useful (non-diagonal) numbers in log(K0)
and K1; first all the K0s, then all the K1s, in canonical (K_index) order. |
source code
|
|
|
K01toK(K0,
K1)
Returns a flat array of the useful (non-diagonal) numbers in log(K0)
and K1; first all the K0s, then all the K1s, in canonical (K_index) order. |
source code
|
|
|
|
|
K_index(N)
Returns all pairs (a,b) such that (0 <= a,b < N) and (a != b);
in canonical order. |
source code
|
|
|
|
|
|
|
|
|
UserConstraints(K0,
K1,
K2,
L,
V,
P,
constraints)
Returns the constraints (Ain, Bin) [11] corresponding to the tuples
(name, states) in constraints where name is in ["FixRate",
"FixExp", "FixPress", "ScaleRate",
"ScaleExp", "ScalePress",
"BalanceLoop", "ImbalanceLoop"] and states is a
sequence of state indices. |
source code
|
|
|
adjusted_svd(A)
Returns U, W, V, Winv, Ainv, Nsv, such that A = U*W*V.T = Ainv.I, and
A has rank Nsv. |
source code
|
|
|
linear_constraints(Ain,
Bin,
K0)
Returns A, B, A.I, P0 [12]. |
source code
|
|
|
|
|
reduce_constraints(A,
B)
Returns constraint system (A, B) with linearly dependent rows
deleted. |
source code
|
|
|
start_at_ones(P0)
Returns As, Bs, As.I, S0 [32]. |
source code
|
|
|
ALLOW_THREADS = 1
|
|
BUFSIZE = 8192
|
|
CLIP = 0
|
|
ERR_CALL = 3
|
|
ERR_DEFAULT = 521
|
|
ERR_IGNORE = 0
|
|
ERR_LOG = 5
|
|
ERR_PRINT = 4
|
|
ERR_RAISE = 2
|
|
ERR_WARN = 1
|
|
FLOATING_POINT_SUPPORT = 1
|
|
FPE_DIVIDEBYZERO = 1
|
|
FPE_INVALID = 8
|
|
FPE_OVERFLOW = 2
|
|
FPE_UNDERFLOW = 4
|
|
False_ = False
|
|
Inf = inf
|
|
Infinity = inf
|
|
MAXDIMS = 32
|
|
MAY_SHARE_BOUNDS = 0
|
|
MAY_SHARE_EXACT = -1
|
|
NAN = nan
|
|
NINF = -inf
|
|
NZERO = -0.0
|
|
NaN = nan
|
|
PINF = inf
|
|
PZERO = 0.0
|
|
RAISE = 2
|
|
SHIFT_DIVIDEBYZERO = 0
|
|
SHIFT_INVALID = 9
|
|
SHIFT_OVERFLOW = 3
|
|
SHIFT_UNDERFLOW = 6
|
|
ScalarType = ( <type 'int'>, <type 'float'>, <type 'complex'>, ...
|
|
True_ = True
|
|
UFUNC_BUFSIZE_DEFAULT = 8192
|
|
UFUNC_PYVALS_NAME = ' UFUNC_PYVALS '
|
|
WRAP = 1
|
|
__package__ = ' qubx '
|
|
absolute = <ufunc 'absolute'>
|
|
add = <ufunc 'add'>
|
|
arccos = <ufunc 'arccos'>
|
|
arccosh = <ufunc 'arccosh'>
|
|
arcsin = <ufunc 'arcsin'>
|
|
arcsinh = <ufunc 'arcsinh'>
|
|
arctan = <ufunc 'arctan'>
|
|
arctan2 = <ufunc 'arctan2'>
|
|
arctanh = <ufunc 'arctanh'>
|
|
bitwise_and = <ufunc 'bitwise_and'>
|
|
bitwise_not = <ufunc 'invert'>
|
|
bitwise_or = <ufunc 'bitwise_or'>
|
|
bitwise_xor = <ufunc 'bitwise_xor'>
|
|
c_ = <numpy.lib.index_tricks.CClass object>
|
|
cast = {<type 'numpy.bool_'>: <function <lambda> at 0x7fd1396e...
|
|
cbrt = <ufunc 'cbrt'>
|
|
ceil = <ufunc 'ceil'>
|
|
conj = <ufunc 'conjugate'>
|
|
conjugate = <ufunc 'conjugate'>
|
|
copysign = <ufunc 'copysign'>
|
|
cos = <ufunc 'cos'>
|
|
cosh = <ufunc 'cosh'>
|
|
deg2rad = <ufunc 'deg2rad'>
|
|
degrees = <ufunc 'degrees'>
|
|
divide = <ufunc 'divide'>
|
|
e = 2.71828182846
|
|
equal = <ufunc 'equal'>
|
|
euler_gamma = 0.577215664902
|
|
exp = <ufunc 'exp'>
|
|
exp2 = <ufunc 'exp2'>
|
|
expm1 = <ufunc 'expm1'>
|
|
fabs = <ufunc 'fabs'>
|
|
floor = <ufunc 'floor'>
|
|
floor_divide = <ufunc 'floor_divide'>
|
|
fmax = <ufunc 'fmax'>
|
|
fmin = <ufunc 'fmin'>
|
|
fmod = <ufunc 'fmod'>
|
|
frexp = <ufunc 'frexp'>
|
|
greater = <ufunc 'greater'>
|
|
greater_equal = <ufunc 'greater_equal'>
|
|
hypot = <ufunc 'hypot'>
|
|
index_exp = <numpy.lib.index_tricks.IndexExpression object>
|
|
inf = inf
|
|
infty = inf
|
|
invert = <ufunc 'invert'>
|
|
isfinite = <ufunc 'isfinite'>
|
|
isinf = <ufunc 'isinf'>
|
|
isnan = <ufunc 'isnan'>
|
|
ldexp = <ufunc 'ldexp'>
|
|
left_shift = <ufunc 'left_shift'>
|
|
less = <ufunc 'less'>
|
|
less_equal = <ufunc 'less_equal'>
|
|
little_endian = True
|
|
log = <ufunc 'log'>
|
|
log10 = <ufunc 'log10'>
|
|
log1p = <ufunc 'log1p'>
|
|
log2 = <ufunc 'log2'>
|
|
logaddexp = <ufunc 'logaddexp'>
|
|
logaddexp2 = <ufunc 'logaddexp2'>
|
|
logical_and = <ufunc 'logical_and'>
|
|
logical_not = <ufunc 'logical_not'>
|
|
logical_or = <ufunc 'logical_or'>
|
|
logical_xor = <ufunc 'logical_xor'>
|
|
maximum = <ufunc 'maximum'>
|
|
mgrid = <numpy.lib.index_tricks.nd_grid object>
|
|
minimum = <ufunc 'minimum'>
|
|
mod = <ufunc 'remainder'>
|
|
modf = <ufunc 'modf'>
|
|
multiply = <ufunc 'multiply'>
|
|
nan = nan
|
|
nbytes = {<type 'numpy.bool_'>: 1, <type 'numpy.timedelta64'>:...
|
|
negative = <ufunc 'negative'>
|
|
newaxis = None
hash(x)
|
|
nextafter = <ufunc 'nextafter'>
|
|
not_equal = <ufunc 'not_equal'>
|
|
ogrid = <numpy.lib.index_tricks.nd_grid object>
|
|
pi = 3.14159265359
|
|
power = <ufunc 'power'>
|
|
r_ = <numpy.lib.index_tricks.RClass object>
|
|
rad2deg = <ufunc 'rad2deg'>
|
|
radians = <ufunc 'radians'>
|
|
reciprocal = <ufunc 'reciprocal'>
|
|
remainder = <ufunc 'remainder'>
|
|
right_shift = <ufunc 'right_shift'>
|
|
rint = <ufunc 'rint'>
|
|
s_ = <numpy.lib.index_tricks.IndexExpression object>
|
|
sctypeDict = { 0: <type 'numpy.bool_'>, 1: <type 'numpy.int8'>, ...
|
|
sctypeNA = { ' ? ' : ' Bool ' , ' B ' : ' UInt8 ' , ' Bool ' : <type 'numpy.bo...
|
|
sctypes = { ' complex ' : [ <type 'numpy.complex64'>, <type 'numpy....
|
|
sign = <ufunc 'sign'>
|
|
signbit = <ufunc 'signbit'>
|
|
sin = <ufunc 'sin'>
|
|
sinh = <ufunc 'sinh'>
|
|
spacing = <ufunc 'spacing'>
|
|
sqrt = <ufunc 'sqrt'>
|
|
square = <ufunc 'square'>
|
|
subtract = <ufunc 'subtract'>
|
|
tan = <ufunc 'tan'>
|
|
tanh = <ufunc 'tanh'>
|
|
true_divide = <ufunc 'true_divide'>
|
|
trunc = <ufunc 'trunc'>
|
|
typeDict = { 0: <type 'numpy.bool_'>, 1: <type 'numpy.int8'>, 2...
|
|
typeNA = { ' ? ' : ' Bool ' , ' B ' : ' UInt8 ' , ' Bool ' : <type 'numpy.bool...
|
|
typecodes = { ' All ' : ' ?bhilqpBHILQPefdgFDGSUVOMm ' , ' AllFloat ' : ...
|