1 of 8

Examples in qutip from the qt3qutipsandbox git repository

Max Parsons, rolling from 12/18/2022

(this presentation is publicly viewable, linked on github repo readme)

2 of 8

Example scripts to help you get started

2

Pattern of my qutip example models (e.g. two_level_closed.py):

<Model Name>Parameters class: This is just a set of attributes that describe all of the inputs to the model in the form of a python dataclass.

run_<model>: A method that takes as argument the

<Model Name>Parameters class and returns some modelling result. There can be multiple of these for one type of parameters class.

get_check_parameters(): A method that just returns an example

<Model Name>Parameters class with round numbers for checking the models.

check_<model>(): Produces some plots of the model, usually with some parameter varied as an example. These plots are what end up in this presentation.

QT3 Lab

3 of 8

Two-level atom / single qubit

3

QT3 Lab

4 of 8

Two-level unitary model

4

See two_level_closed.py in the repository.

class TwoLevelUnitaryMonochromePulseParameters

This is a parameter class for simulating a monochrome pulse on a two-level system.

Attributes:

f_rabi – Rabi frequency on resonance for the coupling field

f_splitting – Frequency corresponding to the two-level splitting energy

f_drive – Frequency of oscillation of the driving field

initial_state – Initial state coefficients, initial_state[0]|0> + initial_state[1]|1>

pulse_duration – Duration of the driving field pulse

dt – Timestep used to generate the t_list of the qutip.sesolve method

QT3 Lab

5 of 8

Qutip can be used to model coherent dynamics

5

Example for resonant drive, sweeping the pulse duration.

Generated using two_level_closed.py check_resonant_two_level_drive_population_dynamics()

Model Parameter

Value

f_rabi

1 MHz

f_splitting

1 GHz

f_drive

1 MHz

Initial_state

|0>

pulse_duration

Swept (x-axis)

dt

1 ns

<n>

 

time

QT3 Lab

6 of 8

Qutip can be used to simulate an experimental spectrum

6

Model Parameter

Value

f_rabi

Swept (across plots)

f_splitting

1 GHz

f_drive

Swept (x-axis)

Initial_state

|0>

pulse_duration

Swept (legends)

dt

1 ns

QT3 Lab

7 of 8

Model of Ramsey fringes (free evolution time scan)

7

Model Parameter

Value

f_rabi

30 MHz

f_splitting

1 GHz

f_drive

resonant

Initial_state

|0>

pulse_duration

pi/2 (ramsey sequence)

free evolution time

swept (x-axis)

dt

10 ns

 

 

free evolution time

<n>

 

1/(f_splitting)

QT3 Lab

8 of 8

Ramsey spectrum (qubit energy splitting scan)

8

Model Parameter

Value

f_rabi

30 MHz

f_splitting

swept (x-axis)

f_drive

resonant

Initial_state

|0>

pulse_duration

pi/2 (ramsey sequence)

free evolution time

swept (legend)

dt

10 ns, 10 ns, 3 ns (with splitting)

 

 

free evolution time

<n>

 

QT3 Lab