2.1.9. filter_functions.util
This module provides various helper functions.
2.1.9.1. Functions
abs2()Absolute value squared
get_indices_from_identifiers()The indices of a subset of identifiers within a list of identifiers.
tensor()Fast, flexible tensor product of an arbitrary number of inputs using
einsum()tensor_insert()For an array that is known to be a tensor product, insert arrays at a given position in the product chain
tensor_merge()For two arrays that are tensor products of known dimensions, merge them at arbitary positions in the product chain
tensor_transpose()For a tensor product, transpose the order of the constituents in the product chain
mdot()Multiple matrix product
adot()Accumulated matrix product
remove_float_errors()Set entries whose absolute value is below a certain threshold to zero
oper_equiv()Determine if two vectors or operators are equal up to a global phase
dot_HS()Hilbert-Schmidt inner product
get_sample_frequencies()Get frequencies with typical infrared and ultraviolet cutoffs for a
PulseSequenceprogressbar()A progress bar for loops. Uses tqdm if available and a simple custom one if not.
hash_array_along_axis()Return a list of hashes along a given axis
all_array_equal()Check if all arrays in an iterable are equal
2.1.9.2. Exceptions
CalculationErrorException raised if trying to fetch the pulse correlation function when it was not computed during concatenation
Functions
|
Fast function to calculate the absolute value squared, |
|
Accumulate matrix products along axis. |
|
Return |
|
Fast complex exponential. |
|
Fast complex exponential minus one. |
|
Return the Hilbert-Schmidt inner product of U and V, |
|
Get the indices of operators for given identifiers. |
|
Get n_samples sample frequencies spaced 'linear' or 'log'. |
|
Return the hashes of arr along the first axis |
|
Fast trapezoidal integration with small memory footprint. |
|
Test if obj is a sequence-like type. |
|
Multiple matrix products along axis. |
|
Checks whether psi and phi are equal up to a global phase, i.e. |
|
Parse a sequence of operators and convert to ndarray. |
|
Decorator factory to parse optional parameter with certain legal values. |
|
|
|
Progress bar for loops. |
|
Wrapper for range() that shows a progressbar dependent on a kwarg. |
|
Clean up arr by removing floating point numbers smaller than the dtype's precision multiplied by eps_scale. |
|
Fast, flexible tensor product using einsum. |
|
For a tensor product arr, insert args into the product chain at pos. |
|
For two tensor products arr and ins, merge ins into the product chain at indices pos. |
|
Transpose the order of a tensor product chain. |
Exceptions
|
Indicates a quantity could not be computed. |