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 passingparamsto initialize the Hamiltonian, list of qudit numbers to include.params (
Optional[Dict[str,Any]]) – Hamiltonian parameters given by IBMQbackend.configuration().hamiltonian['vars'], optionally augmented with'crosstalk', which should be adictof form{(j, k): z}specifying the crosstalk factorz(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 inqudits.default_frame (
str) – Default global frame to use.set_global_frame(default_frame, keep_phase=True)is executed each timeadd_quditoradd_couplingis 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 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.
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.
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.
- 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.
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_levelsNumber of considered energy levels.
num_quditsNumber of qudits.