represent(expr, basis = ...) gives the matrix (or wavefunction) of a
quantum expression in a basis, as SymPy's
sympy.physics.quantum.represent. The basis is an operator, a state or a
class name such as "JzOp"; without one the default basis of the object
is used. rep_innerproduct() and rep_expectation() build the position
representation of states and operators, get_basis() finds the basis
state, enumerate_states() lists states with consecutive labels and
integrate_result() integrates over the unities inserted by
represent().
Usage
represent(expr, ...)
rep_innerproduct(expr, ...)
rep_expectation(expr, ...)
integrate_result(orig_expr, result, ...)
get_basis(expr, basis = NULL, replace_none = TRUE, ...)
enumerate_states(...)Examples
represent(IdentityOperator(2))
#> Matrix(2, 2)
#> [1, 0]
#> [0, 1]