From a6d6fb8666730672f5da550d9bbd7adbcf36c9d9 Mon Sep 17 00:00:00 2001 From: Edward Thomas Date: Tue, 28 Nov 2023 14:14:33 +0000 Subject: [PATCH 1/4] Fix display of LaTeX in outputs --- qutip/core/qobj.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qutip/core/qobj.py b/qutip/core/qobj.py index 2236a3276c..d42e08b9bc 100644 --- a/qutip/core/qobj.py +++ b/qutip/core/qobj.py @@ -603,10 +603,10 @@ def _repr_latex_(self): cols.append(None) cols += list(range(n_cols - half_length, n_cols)) # Make the data array. - data = r'\begin{equation*}\left(\begin{array}{*{11}c}' + data = r'$$\left(\begin{array}{cc}' data += r"\\".join(_latex_row(row, cols, self.data.to_array()) for row in rows) - data += r'\end{array}\right)\end{equation*}' + data += r'\end{array}\right)$$' return self._str_header() + data def __and__(self, other): From a4b945836a2c9f085f92f65f8344578a7baa4f10 Mon Sep 17 00:00:00 2001 From: Edward Thomas Date: Tue, 28 Nov 2023 14:19:24 +0000 Subject: [PATCH 2/4] Update changelog --- doc/changes/2172.bugfix | 1 + 1 file changed, 1 insertion(+) create mode 100644 doc/changes/2172.bugfix diff --git a/doc/changes/2172.bugfix b/doc/changes/2172.bugfix new file mode 100644 index 0000000000..05d74ec7cc --- /dev/null +++ b/doc/changes/2172.bugfix @@ -0,0 +1 @@ +Fix LaTeX display of Qobj state in Jupyter cell outputs \ No newline at end of file From 6e45a33d0ea81a142823c9acb7145474db6ca2da Mon Sep 17 00:00:00 2001 From: Edward Thomas Date: Tue, 28 Nov 2023 14:45:21 +0000 Subject: [PATCH 3/4] Rename change file with PR number --- doc/changes/2272.bugfix | 1 + 1 file changed, 1 insertion(+) create mode 100644 doc/changes/2272.bugfix diff --git a/doc/changes/2272.bugfix b/doc/changes/2272.bugfix new file mode 100644 index 0000000000..05d74ec7cc --- /dev/null +++ b/doc/changes/2272.bugfix @@ -0,0 +1 @@ +Fix LaTeX display of Qobj state in Jupyter cell outputs \ No newline at end of file From 3f0ad48e330583153d28e594224270cec6fd50e7 Mon Sep 17 00:00:00 2001 From: Edward Thomas Date: Tue, 28 Nov 2023 14:51:08 +0000 Subject: [PATCH 4/4] Remove old change file --- doc/changes/2172.bugfix | 1 - 1 file changed, 1 deletion(-) delete mode 100644 doc/changes/2172.bugfix diff --git a/doc/changes/2172.bugfix b/doc/changes/2172.bugfix deleted file mode 100644 index 05d74ec7cc..0000000000 --- a/doc/changes/2172.bugfix +++ /dev/null @@ -1 +0,0 @@ -Fix LaTeX display of Qobj state in Jupyter cell outputs \ No newline at end of file