The Machinery · Topic 33 of 41 · The Workbench: the two programs

Set up your bench: install, first run, and where to look

What do QuTiP and scqubits each do, how do you get both running, and where do you click when you do not know what to do next?

  1. 01
  2. 02
  3. 03
  4. 04
  5. 05
  6. 06
  7. 07
  8. 08
  9. 09
  10. 10
  11. 11
  12. 12
  13. 13
  14. 14
  15. 15
  16. 16
  17. 17
  18. 18
  19. 19
  20. 20
  21. 21
  22. 22
  23. 23
  24. 24
  25. 25
  26. 26
  27. 27
  28. 28
  29. 29
  30. 30
  31. 31
  32. 32
  33. 33
  34. 34
  35. 35
  36. 36
  37. 37
  38. 38
  39. 39
  40. 40
  41. 41
About this section: The Workbench: the two programs

Installation first, with the exact error messages you are likely to meet, and a map of where each program’s own documentation lives. Then QuTiP in two topics (objects, then solvers) and scqubits in two (a qubit, then coupled systems and sweeps). The last of them joins the two programs, which is how they are used together. The code is meant to be copied and changed.

See it

scqubits circuit → levels EJ, EC, EL → spectrum H QuTiP H + losses → time sesolve, mesolve … a notebook Jupyter, VS Code or Colab: run it, plot it, change it QuTiP: guide + tutorials qutip.readthedocs.io qutip.org/qutip-tutorials scqubits: docs + examples scqubits.readthedocs.io github.com/scqubits/scqubits-examples the two papers QuTiP 5: Phys. Rep. 1153 (2026) scqubits: Quantum 5, 583 (2021)
Two tools and one place to run them. scqubits answers “what are the energy levels of this circuit”; QuTiP answers “what does this system do over time, with losses”. Between them they are the numerical half of most superconducting-qubit papers.

Try it: a checklist you can tick, and a map of the documentation

Work through the setup below one step at a time (each command has a copy button and what it should print). Ticks are saved in this browser only. Underneath is a map of where to look: type what you want to do, and it lists the place in each tool’s documentation, using the page and notebook names that exist today.

The intuition

Everything in the last nine topics is something you can now do by hand or in the explorers. The two tools of this part do it for real circuits at real sizes, and they are the ones people actually use. QuTiP, the Quantum Toolbox in Python, was built to write the equations of open quantum systems in a few lines (its copyright notice starts in 2011). It holds quantum states and operators as objects (the Qobj), joins them with tensor, and solves how they change in time, with or without losses. The paper describing version 5 is in Physics Reports 1153 (2026), and its abstract says the package has been used for about thirteen years in research, teaching and industry. scqubits is narrower: it knows the Hamiltonians of the common superconducting circuits (the transmon and fluxonium of topics 29 and 30, the flux, cos(2φ) and 0–π qubits) and returns their spectra, matrix elements, wavefunctions and coherence estimates. Groszkowski and Koch describe it in Quantum 5, 583 (2021). Its Hamiltonians can be handed to QuTiP, which is the join between the two.

Where you will get stuck. Almost never on the physics. The usual stoppers are: a Python version one of the tools does not support, a script written for QuTiP 4 that no longer runs, a gate you expected to be in the library that is not, and a result that is wrong because a unit or a cutoff was wrong, with no error message. This topic lists the first three with the exact messages they produce, and the habits that catch the last.

Where to click. The QuTiP documentation’s left-hand sidebar has Installation, then the Users Guide (the chapters that matter for this part are “Basic Operations on Quantum Objects”, “Using Tensor Products and Partial Traces”, “Time Evolution and Quantum System Dynamics” and “Environments of Open Quantum Systems”), then API documentation. Worked notebooks are in a separate site, qutip-tutorials. scqubits’ documentation page gives you three doors: Install, Jupyter Examples and a YouTube channel of tutorials. The example notebooks live in a GitHub repository and open in Binder, so you can run them without installing anything.

Read the version first. A number from a different version of either tool is a different number until you have shown otherwise. Every example on this page prints its versions, and the code in this part says which versions it was run on and when. If your result differs from the printed one, compare versions before anything else.

The steps, in full

  1. Check Python. QuTiP’s package metadata requires Python 3.11 or later; scqubits’ README lists Python 3.10 to 3.12 (its metadata says 3.9 or later). Python 3.11 or 3.12 satisfies both; this part’s examples were run on Python 3.13.7, which both packages installed on.
    python --version
  2. Make a private environment so the two packages and their dependencies stay out of your system Python. On Windows (PowerShell):
    python -m venv bench
    bench\Scripts\Activate.ps1
    On macOS or Linux:
    python3 -m venv bench
    source bench/bin/activate
    The prompt now starts with (bench). QuTiP’s own instructions describe the conda route instead (conda create -n qutip-env python, then conda install qutip after adding the conda-forge channel with the lowest priority); scqubits’ page advises against mixing pip into a conda environment.
  3. Install. QuTiP and scqubits are on PyPI. Pin the versions below. With the newest QuTiP (5.3.1 when this was written) scqubits 4.3.1 can diagonalise a single qubit but fails as soon as you combine two systems in a HilbertSpace (see the table below), so this part runs on QuTiP 5.2.0 with SciPy 1.14.1. Add qutip-qip for named gates.
    pip install "qutip==5.2.0" "scqubits==4.3.1" "scipy==1.14.1" qutip-qip
    pip install "scqubits[gui]" jupyterlab
    The first line is the environment every example in this part was run in. The second adds optional packages (the gui extra of scqubits brings ipywidgets, ipyvuetify and h5py for its notebook widgets, and JupyterLab runs notebooks); we did not use them here.
  4. Check both. Each package has an about() that prints its version and the versions of what it was built on.
    python -c "import qutip; qutip.about()"
    python -c "import scqubits; scqubits.about()"
    QuTiP Version:      5.2.0
    Numpy Version:      2.2.6
    Scipy Version:      1.14.1
    Matplotlib Version: 3.11.2
    Python Version:     3.13.7
    ...
    scqubits version: 4.3.1
    numpy version:    2.2.6
    scipy version:    1.14.1
    QuTiP version:    5.2.0
  5. Open a notebook. A notebook runs code in cells and shows plots under them. With the environment active, jupyter lab opens one in your browser; VS Code and Google Colab also run notebooks (in Colab, put !pip install qutip scqubits in the first cell). Run a cell with Shift and Enter. Type a function name followed by a question mark, for example qt.mesolve?, to read its documentation without leaving the notebook.
  6. Run the first line of real physics.
    import qutip as qt
    print(qt.sigmaz())
    Quantum object: dims=[[2], [2]], shape=(2, 2), type='oper', dtype=CSR, isherm=True
    Qobj data =
    [[ 1.  0.]
     [ 0. -1.]]
    If that prints, the next topic starts from here.

When it goes wrong. The messages below are the ones we met while writing this part, copied from real runs.

You seeWhat it meansFix
TypeError: ('Unsupported operator type: ', <class 'scipy.sparse._csc.csc_array'>), raised inside HilbertSpace (for example at generate_lookup())scqubits 4.3.1 does not accept the sparse-array type that QuTiP 5.3.1 hands it. We reproduced it with QuTiP 5.3.1 on Python 3.13 and 3.14; scqubits 4.3.1 with QuTiP 5.0.4, 5.1.1 and 5.2.0 builds the same Hilbert space and prints the numbers in this part.Use the pinned install above (qutip==5.2.0), and check the scqubits release notes for a fix before moving to a newer QuTiP.
AttributeError: module 'qutip' has no attribute 'Options'The script was written for QuTiP 4. Version 5 removed the Options object.Pass a dictionary: options={"atol": 1e-9} to sesolve or mesolve.
AttributeError: module 'qutip' has no attribute 'hadamard_transform'Named gates are not in the core package.pip install qutip-qip, then from qutip_qip.operations import snot, cnot, or write the matrix yourself as in topic 24.
FutureWarning: The signature f(t, args) is deprecated and will be removed in QuTiP 5.5A time-dependent term uses the old function signature. It still runs on 5.3.1.Write the function as f(t) (or f(t, **kwargs) if it needs arguments).
A progress bar for every step from scqubits, flooding the outputIt is on by default.scq.settings.PROGRESSBAR_DISABLED = True
A plausible curve that is wrong, with no messageA unit (GHz where rad per ns was wanted) or a cutoff too small.See topic 25 and topic 26: write every conversion out, and run at two cutoffs.

Where each tool’s own pages are. QuTiP’s installation page, checked on 25 October 2026, lists Python 3.11 or later, NumPy 1.23.2 or later and SciPy 1.13 or later, and optional Matplotlib for plots and Cython for compiling time-dependent terms. The qutip-tutorials site lists these sections: Python Introduction, Visualization, Quantum information processing, Time evolution, Optimal control, Tomography, Permutational invariant Lindblad dynamics, Hierarchical Equations of Motion, Miscellaneous tutorials and a lecture series on quantum mechanics with QuTiP. The scqubits-examples repository’s examples folder holds, among others, demo_transmon.ipynb, demo_fluxonium.ipynb, demo_hilbertspace.ipynb, demo_parametersweep.ipynb, demo_explorer.ipynb, demo_noise.ipynb, demo_gui.ipynb, demo_customcircuit.ipynb, demo_jaynes-cummings.ipynb and demo_qutip_fluxoniumcz.ipynb. Documentation sites move; if a link here has gone, search the tool’s name with the topic.

Where it actually matters

Reproducibility, and the cost of the first hour A simulation is only as useful as it is repeatable by someone else. The habit that makes it so is cheap: record the versions with about() at the top of a notebook, fix the cutoffs and units in named variables, and write the Hamiltonian where it can be read. Most of the failures in the table above cost an hour when met for the first time, which is the reason this topic lists them. Both packages are open source and credit their authors by asking to be cited: qutip.cite() prints the reference for QuTiP, and the scqubits documentation asks for its two papers (Groszkowski and Koch 2021, and Chitta et al., New J. Phys. (2022), DOI 10.1088/1367-2630/ac94f2).