System

System(
    label=None,
    num_states=1,
    energies=None,
    decays=None,
    initial_state=None,
    fields=None,
)

An open quantum system: its states, decays and the fields coupling them.

The system can be an atom or any other few-level quantum system, such as a quantum dot or a colour centre.

Parameters

Name Type Description Default
label str | None string label describing the system. None
num_states int number of states. 1
energies list[float] | None absolute or relative energy levels of the states. None
decays list[dict] | None list of dicts representing decays. e.g. [ { “rate”: 1.0, “channels”: [[0,1]], “factors”: [1.0] } { “rate”: 2.0, “channels”: [[2,1], [3,1]], “factors”: [0.707, 0.707] } ] None
initial_state list[float] | None initial state, as a list or array None
fields list[dict] | None list of dicts representing the fields that couple the system’s states. None

Methods

Name Description
add_field Add a Field to the list given a dict representing the field.
build_fields Build the field list given a list of dicts representing fields.
build_initial_state Build the initial density matrix for the system.
build_operators Build the quantum operators representing the bare Hamiltonian,
get_detunings Returns a list of detunings, one for each field in fields.
get_fields_sum_coherence Returns the sum coherences of the system density matrix for each
set_H_Delta Set the detuning part of the interaction Hamiltonian, H_Delta,
set_H_Omega Set the Rabi frequency part of the interaction Hamiltonian.
to_json_str Return a JSON string representation of the System object.

add_field

System.add_field(field_dict)

Add a Field to the list given a dict representing the field.

build_fields

System.build_fields(field_dicts)

Build the field list given a list of dicts representing fields.

build_initial_state

System.build_initial_state(initial_state=None)

Build the initial density matrix for the system.

The default is for all of the population to be in |0><0|.

Parameters

Name Type Description Default
initial_state list[float] | None a list or array of populations, length num_states. If not given, all the population starts in level 0. None

Returns

Name Type Description
qu.Qobj The initial density matrix, diagonal with the given populations.
qu.Qobj It is also stored as self.initial_state and self.rho.

Raises

Name Type Description
ValueError If initial_state has the wrong length or its elements do not sum to 1.

Notes

  • The elements must sum to 1 (as this will be the trace of the density matrix).

build_operators

System.build_operators()

Build the quantum operators representing the bare Hamiltonian, collapse operators and interaction Hamiltonian.

get_detunings

System.get_detunings()

Returns a list of detunings, one for each field in fields.

get_fields_sum_coherence

System.get_fields_sum_coherence(states_t=None)

Returns the sum coherences of the system density matrix for each field, including the relative strength factors.

Parameters

Name Type Description Default
states_t np.ndarray | None (optional) a states_t object. If not provided, use self.states_t() None

Returns

Name Type Description
np.ndarray np.ndarray of shape (num_fields, t_steps+1)

set_H_Delta

System.set_H_Delta(detunings)

Set the detuning part of the interaction Hamiltonian, H_Delta, given a list of detunings.

Parameters

Name Type Description Default
detunings list[float] list of floats: detunings of each field in the list required

set_H_Omega

System.set_H_Omega(rabi_freqs, rabi_freq_t_funcs, rabi_freq_t_args)

Set the Rabi frequency part of the interaction Hamiltonian.

Updates each field’s Rabi frequency and time function, then rebuilds the Hamiltonian.

Parameters

Name Type Description Default
rabi_freqs list[float] Rabi frequency for each field. required
rabi_freq_t_funcs list Name of the time function for each field, as in clerq.t_funcs (e.g. "gaussian"). required
rabi_freq_t_args list[dict] Argument dict for each field’s time function. required

Returns

Name Type Description
list The list of Rabi frequency Hamiltonian terms, one for each field.

to_json_str

System.to_json_str()

Return a JSON string representation of the System object.

Returns

Name Type Description
str (string) JSON representation of the System object.