Model
- class Model(name=None)
Represent a coupled spin system.
This class provides a high-level abstraction for simulating quantum systems consisting of multiple coupled spins. It supports adding spins, interactions, static and driving magnetic fields. The model allows calculation of energy levels and eigenstates. In addition, it provides methods for computing parameters required to define control pulses (e.g. splittings, Rabi-frequencies, …). It enables the simulation of the system’s time evolution under the influence of driving fields and additional noise. It is especially suitable for modeling systems like nitrogen-vacancy centers.
Initialize a model.
Hint
For example, to initialize a model for a nitrogen-vacancy center including the intrinsic nitrogen nuclear spin, one can use:
model = simphony.default_nv_model(nitrogen_isotope=14)
Methods
add_driving_field
(driving_field)Add driving field to the model.
add_interaction
(interaction)Add interaction to the model.
add_spin
(spin)Add spin to the model.
add_static_field
(static_field)Add static field to the model.
Calculate the operators of the driving fields.
Calculate the eigenenergies and eigenstates of the
static_hamiltonian
.Calculate the static Hamiltonian, the driving operators and the local quasistatic noise operators.
Calculate the operators associated with the local quasistatic noises.
Calculate the static part of the Hamiltonian of the model and store it in
static_hamiltonian
.driving_field
(name)Return the instance of the driving field specified by
name
.eigenenergy
(quantum_nums)Return the eigenenergy of the static Hamiltonian that associated with the eigenstate that has the largest overlap with the product basis state described by
quantum_nums
.eigenstate
(quantum_nums)Return the eigenstate of the static Hamiltonian that has the largest overlap with the product basis state described by
quantum_nums
.matrix_element
(driving_field_name, state1, ...)Return the matrix element of the time-independent operator associated with the driving field between two states.
plot_driving_fields
([name, function, start, end])Plot the pulses of the driving fields.
plot_levels
([height, width])Plot the energy levels of the model.
productstate
(quantum_nums)Return the product basis state of the model corresponding to given quantum numbers of the spins.
project_to_qubit_subspace
(unitary[, ...])Project unitary to qubit subspace.
rabi_cycle_amplitude
(driving_field_name, ...)Return the required amplitude of a driving field for a single Rabi cycle assuming resonant transition of the model under the influence of a constant-strength driving field.
rabi_cycle_amplitude_qubit
(...[, ...])Return the required amplitude of a driving field for a single Rabi cycle assuming resonant transition of the model under the influence of a constant-strength driving field.
rabi_cycle_time
(driving_field_name, ...)Return the period time of a Rabi cycle for a resonant transition of the model under the influence of a constant-strength driving field.
rabi_cycle_time_qubit
(driving_field_name, ...)Return the period time of a Rabi cycle for a resonant transition of the model under the influence of a constant-strength driving field.
Remove all added pulses from all driving fields and reset the virtual z-phases to zero.
rotating_frame_operator
(t[, only_diag, ...])Return the rotating frame operator:
simulate_time_evolution
([n_shots, start, ...])Simulate the time evolution of the model due to the driving fields under the effect of the noise.
spin
(name)Return the instance of the spin specified by
name
.splitting
(spin_name, quantum_nums, ...)Return the energy splitting between the two eigenstates of the model.
splitting_qubit
(spin_name[, rest_quantum_nums])Return the energy splitting between the two eigenstates of the model.
state
(quantum_nums[, basis, coeffs_basis])Return the state of the model corresponding to the given quantum numbers.
virtual_phases_operator
([only_diag, ...])Return the operator corresponding the virtual z-phases:
Attributes
Basis of the Hamiltonian.
Basis corresponding to the qubit subspace.
Total dimension of the spin model.
Names of the driving fields.
Driving fields attached to the model.
Driving operators.
Eigenbasis of the static Hamiltonian.
Initial state of the simulations.
Interactions attached to the model.
End time of the latest pulse among all driving fields.
Local quasistatic-noise operators.
Number of the spins.
Name of the model.
Pulses of all driving fields.
Rotating frame frequencies.
Names of the spins.
Spins attached to the model.
Static field attached to the model.
Time-independent part of the Hamiltonian.
Dimensions of the spins.
Virtual z-phases.