qudit_sim.HamiltonianBuilder.change_frame
- HamiltonianBuilder.change_frame(tlist, obj, from_frame, to_frame=None, objtype='evolution', t0=None)
Apply the change-of-frame unitaries to states, unitaries, hamiltonians, and observables.
- Parameters
tlist (
numpy.ndarray) – 1D array of shape(T,)representing the time points.obj (
Union[numpy.ndarray,Qobj]) – Qobj or an array of shape either(D)(state),(T, D)(state evolution),(T, D, D)(evolution operator, time-dependent Hamiltonian, or an observable),(D, D)(evolution operator for a single time point, Hamiltonian, or an observable),(N, D, D)(multiple observables), or(N, T, D, D)(multiple time-dependent observables), whereDis the dimension of the quantum system (num_levels ** num_qudits) andNis the number of observables.from_frame (
Union[str,Dict[Hashable,Frame],Sequence[Frame]]) – Specification of original frame.to_frame (
Union[str,Dict[Hashable,Frame],Sequence[Frame],None]) – Specification of new frame. If None, the current frame is used.objtype (
str) –'state','evolution','hamiltonian', or'observable'. Ignored when the type can be unambiguously inferred from the shape ofobj.t0 (
Optional[float]) – Initial time for the frame change of the evolution operator. If None,tlist[0]is used.
- Return type
numpy.ndarray- Returns
An array representing the frame-changed object.