Base Fields

HilbertBaseField defines how the mathematics of HilbertArray works. Normally you don’t need to worry about this because usually the default implementation is appropriate. It is not recommened to call the constructor directly. Instead, use the interface provided by qitensor.factory.base_field_lookup(), or just use the dtype parameter of the factory functions in qitensor.factory. A subclass, SageHilbertBaseField, provides the ability to create arrays over Sage types (e.g. SR). This, too, is accessed through base_field_lookup or by passing the dtype parameter.

class qitensor.basefield.HilbertBaseField

Bases: object

HilbertBaseField(dtype, unique_id)

assert_same(self, HilbertBaseField other)

Asserts that this object is the same as other.

complex_unit(self)
dtype

dtype: object

eye(self, long size) → ndarray
frac(self, p, q)
fractional_phase(self, int a, int b)
infty(self)
input_cast_function(self)
latex_formatter(self, data, dollar_if_tex)
log2(self, x)
mat_adjoint(self, ndarray mat) → ndarray
mat_conj(self, ndarray mat) → ndarray
mat_det(self, ndarray mat)
mat_eig(self, ndarray mat, bool hermit)
mat_eigvals(self, ndarray mat, bool hermit)
mat_expm(self, ndarray mat) → ndarray
mat_inverse(self, ndarray mat) → ndarray
mat_logm(self, ndarray mat) → ndarray
mat_n(self, ndarray mat, prec=None, digits=None) → ndarray
mat_norm(self, ndarray arr, p)
mat_pinv(self, ndarray mat, rcond) → ndarray
mat_pow(self, ndarray mat, n) → ndarray
mat_qr(self, ndarray mat)
mat_simplify(self, ndarray mat, full=False) → ndarray
mat_svd(self, ndarray mat, full_matrices)
mat_svd_vals(self, ndarray mat)
matrix_np_to_sage(self, ndarray np_mat, R=None)
matrix_sage_to_np(self, sage_mat) → ndarray
random_array(self, shape) → ndarray

Returns random array with standard normal distribution

sage_ring

sage_ring: object

sqrt(self, x)
unique_id

unique_id: str

xlog2x(self, x)

Previous topic

Reference (internals)

Next topic

Hilbert Space Atoms

This Page