Skip to content

Commit 9f96579

Browse files
authored
Add prime indices for inner in docs (#1124)
1 parent dcc8e09 commit 9f96579

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

docs/src/examples/MPSandMPO.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ A key example could be the Hamiltonian defining a quantum system.
162162
Given an MPO `W` and an MPS `psi`, you can compute ``\langle\psi|W|\psi\rangle``
163163
by using the function `inner` as follows:
164164
```julia
165-
ex_W = inner(psi,W,psi)
165+
ex_W = inner(psi',W,psi)
166166
```
167167
which will return a scalar that may be either real or complex, depending on the properties of
168168
`psi` and `W`.

src/mps/mpo.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -421,7 +421,7 @@ MPOs. In general it is more efficient and accurate than `inner(y, apply(A, x))`.
421421
This is helpful for computing the expectation value of an operator `A`, which would be:
422422
423423
```julia
424-
inner(x, A, x)
424+
inner(x', A, x)
425425
```
426426
427427
assuming `x` is normalized.
@@ -431,7 +431,7 @@ If you want to compute `⟨By|Ax⟩` you can use `inner(B::MPO, y::MPS, A::MPO,
431431
This is helpful for computing the variance of an operator `A`, which would be:
432432
433433
```julia
434-
inner(A, x, A, x) - inner(x, A, x) ^ 2
434+
inner(A, x, A, x) - inner(x', A, x) ^ 2
435435
```
436436
437437
assuming `x` is normalized.

0 commit comments

Comments
 (0)