quantum_lib

wield.control.SFLU.test.quantum_lib

Functions

LO_field2(angle)

LO_field4(angle)

LO_field6(angle)

Minv(M)

Mrotation2(theta[, theta2])

Mrotation2MMqp(L[, phi, inv])

Mrotation4(theta[, theta2])

Mrotation4MMqp(L[, phi, inv])

Mrotation6(theta[, theta2])

Mrotation6MMqp(L[, phi, inv])

RPNK2(K)

RPNK4(K)

RPNK6(K)

SQZ2(sqzV, asqzV)

SQZ4(sqzV, asqzV)

SQZ6(sqzV, asqzV)

Vnorm_sq(M)

adjoint(M)

matrix_stack(arr[, dtype])

This routing allows one to construct 2D matrices out of heterogeneously shaped inputs.

matrix_stack_id2(value, **kwargs)

matrix_stack_id4(value, **kwargs)

matrix_stack_id6(value, **kwargs)

promote2(d, mat)

promote4(d, mat)

promote6(d, mat)

transpose(M)

Details

LO_field2(angle)[source][github]
LO_field4(angle)[source][github]
LO_field6(angle)[source][github]
Minv(M)[source][github]
Mrotation2(theta, theta2=0)[source][github]
Mrotation2MMqp(L, phi=0, inv=False)[source][github]
Mrotation4(theta, theta2=0)[source][github]
Mrotation4MMqp(L, phi=0, inv=False)[source][github]
Mrotation6(theta, theta2=0)[source][github]
Mrotation6MMqp(L, phi=0, inv=False)[source][github]
RPNK2(K)[source][github]
RPNK4(K)[source][github]
RPNK6(K)[source][github]
SQZ2(sqzV, asqzV)[source][github]
SQZ4(sqzV, asqzV)[source][github]
SQZ6(sqzV, asqzV)[source][github]
Vnorm_sq(M)[source][github]
adjoint(M)[source][github]
matrix_stack(arr, dtype=None, **kwargs)[source][github]

This routing allows one to construct 2D matrices out of heterogeneously shaped inputs. it should be called with a list, of list of np.array objects The outer two lists will form the 2D matrix in the last two axis, and the internal arrays will be broadcasted to allow the array construction to succeed

example

matrix_stack([

[np.linspace(1, 10, 10), 0], [2, np.linspace(1, 10, 10)]

])

will create an array with shape (10, 2, 2), even though the 0, and 2 elements usually must be the same shape as the inputs to an array.

This allows using the matrix-multiply “@” operator for many more constructions, as it multiplies only in the last-two-axis. Similarly, np.linalg.inv() also inverts only in the last two axis.

matrix_stack_id2(value, **kwargs)[source][github]
matrix_stack_id4(value, **kwargs)[source][github]
matrix_stack_id6(value, **kwargs)[source][github]
promote2(d, mat)[source][github]
promote4(d, mat)[source][github]
promote6(d, mat)[source][github]
transpose(M)[source][github]