ob_atom
- class maxwellbloch.ob_atom.OBAtom(label: str | None = None, num_states: int = 1, energies: list[float] | None = None, decays: list[dict] | None = None, initial_state: list[float] | None = None, fields: list[dict] | None = None)[source]
Bases:
OBBase- add_field(field_dict: dict) None[source]
Add a Field to the list given a dict representing the field.
- build_fields(field_dicts: list[dict]) list[Field][source]
Build the field list given a list of dicts representing fields.
- build_initial_state(initial_state: list[float] | None = None) Qobj[source]
Build the initial density matrix for the atom.
The default is for all of the population to be in
|0><0|.- Parameters:
rho0 – a list or array of populations, length num_states.
- Returns:
A density matrix representing the initial
- Return type:
Qu.Qobj
Notes
- The elements must sum to 1 (as this will be the trace of the
density matrix).
- build_operators() None[source]
Build the quantum operators representing the bare Hamiltonian, collapse operators and interaction Hamiltonian.
- get_fields_sum_coherence(states_t: ndarray | None = None) ndarray[source]
- Returns the sum coherences of the atom density matrix for each
field, including the relative strength factors.
- Parameters:
states_t – (optional) a states_t object. If not provided, use self.states_t()
- Returns:
np.ndarray of shape (num_fields, t_steps+1)
- mesolve(tlist: ndarray, e_ops: list | None = None, options: dict | None = None, recalc: bool = True, savefile: str | None = None, show_pbar: bool = False) Any[source]
- set_H_Delta(detunings: list[float]) Qobj[source]
- Set the detuning part of the interaction Hamiltonian, H_Delta,
given a list of detunings.
- Parameters:
detunings – list of floats: detunings of each field in the list