Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions docs/guides/specify-observables-pauli.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -147,10 +147,13 @@
"We expand the observable $O$ as\n",
"\n",
"$$\n",
"O = \\sum_{P \\in \\{I, X, Y, Z\\}^{\\otimes n}} \\mathrm{Tr}(O P) P,\n",
"O =\n",
"\\frac{1}{2^n}\n",
"\\sum_{P \\in \\{I, X, Y, Z\\}^{\\otimes n}}\n",
"\\mathrm{Tr}(O P) P,\n",
"$$\n",
"\n",
"where the sum runs over all possible $n$-qubit Pauli terms and $\\mathrm{Tr}(\\cdot)$ is the trace of a matrix, which acts as inner product.\n",
"where the sum runs over all possible $n$-qubit Pauli terms and $\\mathrm{Tr}(\\cdot)$ is the trace of a matrix, which acts as an inner product. The factor $1/2^n$ accounts for the Hilbert--Schmidt normalization of $n$-qubit Pauli strings.\n",
"You can implement this decomposition from a matrix to Pauli terms using the `SparsePauliOp.from_operator` method, like so:"
]
},
Expand Down