qudit_sim.HamiltonianBuilder

class qudit_sim.HamiltonianBuilder(num_levels=2, qudits=None, params=None, default_frame='dressed')

Hamiltonian with static transverse couplings and external drive terms.

Parameters
  • num_levels (int) – Number of energy levels to consider.

  • qudits (Union[int, Sequence[int], None]) – If passing params to initialize the Hamiltonian, list of qudit numbers to include.

  • params (Optional[Dict[str, Any]]) – Hamiltonian parameters given by IBMQ backend.configuration().hamiltonian['vars'], optionally augmented with 'crosstalk', which should be a dict of form {(j, k): z} specifying the crosstalk factor z (complex corresponding to \(\alpha_{jk} e^{i\rho_{jk}}\)) of drive on qudit \(j\) seen by qudit \(k\). \(j\) and \(k\) are qudit ids given in qudits.

  • default_frame (str) – Default global frame to use. set_global_frame(default_frame, keep_phase=True) is executed each time add_qudit or add_coupling is called.

Methods

add_coupling(q1, q2, value)

Add a coupling term between two qudits.

add_crosstalk(source, target, factor)

Add a crosstalk term from the source channel to the target qudit.

add_drive(qudit_id[, frequency, amplitude, ...])

Add a drive term.

add_qudit(qubit_frequency, anharmonicity, ...)

Add a qudit to the system.

build([rwa, compile_hint, tlist, args])

Return the list of Hamiltonian terms passable to qutip.sesolve.

build_hdiag()

Build the diagonal term of the Hamiltonian.

build_hdrive([rwa, tlist, args])

Build the drive Hamiltonian.

build_hint([compile_hint, tlist])

Build the interaction Hamiltonian.

change_frame(tlist, obj, from_frame[, ...])

Apply the change-of-frame unitaries to states, unitaries, hamiltonians, and observables.

clear_drive()

Remove all drives.

copy([clear_drive])

coupling(q1, q2)

Coupling constant between the two qudits.

crosstalk(source, target)

Crosstalk factor from source to target.

dressed_frequencies([qudit_id])

Return the dressed-qudit frequencies.

drive([qudit_id])

Drive terms for the qudit.

eigenvalues()

Compute the energy eigenvalues of the static Hamiltonian (free and coupling).

frame([qudit_id])

Frame of the qudit.

frame_change_operator(from_frame[, to_frame])

Compute the change-of-frame operator.

free_frequencies([qudit_id])

Return the free-qudit frequencies.

identity_op()

rtype

Qobj

make_scan(scan_type, values, **kwargs)

Build a list of copies of self varied over a single attribute.

make_tlist(points_per_cycle[, num_cycles, ...])

Build a list of time points using the maximum frequency in the Hamiltonian.

noiz_frequencies([qudit_id, comp_dim])

Return the no-IZ frequencies.

qudit_id(idx)

Qudit ID for the given index.

qudit_ids()

List of qudit IDs.

qudit_index(qudit_id)

Qudit index.

qudit_params(qudit_id)

Qudit parameters.

set_frame(qudit_id[, frequency, phase])

Set the frame for the qudit.

set_global_frame(frame_spec[, keep_phase])

Set frames for all qudits globally.

Attributes

num_levels

Number of considered energy levels.

num_qudits

Number of qudits.