Skip to content

HTML progress bar is broken in Jupyter notebooks #2475

@pmenczel

Description

@pmenczel

Bug Description

Qutip's HTMLProgressBar seems not to function any more in jupyter notebooks. Perhaps since "jupyterlab" was introduced.

Code to Reproduce the Bug

import qutip as qt
import numpy as np
qt.mcsolve(qt.sigmax(), state=qt.basis(2, 0), tlist=np.linspace(0, 5, 100), c_ops=[qt.sigmam()], ntraj=100, options={'progress_bar': 'html'})

Code Output

[[ empty progress bar ]]
Javascript Error: $ is not defined
Javascript Error: $ is not defined
Javascript Error: $ is not defined
Javascript Error: $ is not defined
...

Expected Behaviour

There should be no error and the progress bar should display the progress.

Your Environment

"About Jupyter Notebook" shows version 7.2.1.

QuTiP Version:      5.1.0.dev0+487e4ec
Numpy Version:      2.0.0
Scipy Version:      1.13.1
Cython Version:     3.0.10
Matplotlib Version: 3.8.4
Python Version:     3.12.4
Number of CPUs:     20
BLAS Info:          Generic
INTEL MKL Ext:      False
Platform Info:      Linux (x86_64)

Additional Context

The weird thing is that $() actually is available, as one can see in the developer console.

Relevant stackoverflow discussions:

Thanks to Hussein Shiri for pointing this bug out on the mailing list.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions