In connection to  question, I am wondering how to calculate value $\langle \psi|\phi \rangle$ for arbitrary quantum states $|\psi\rangle$ and $|\phi\rangle$. A swap test is able to return only $|\langle \psi|\phi \rangle|^2$ which means that sign of the product is forgotten in case the inner product is real. Moreover, information about real and imaginary parts is lost in case of complex result. Do you know about any more general method how to calculate the inner product than swap test?
122916
I've been searching for a quantum algorithm to compute the the inner product between two $n$-qubit quantum states, namely $\langle\phi|\psi\rangle$, which is in general a complex number. One can get $|\langle\phi|\psi\rangle|^2$ through thte SWAP test for multiple qubits, but this is not really the inner product as the information of the real and imaginary parts are lost. I came across this , which claims that the task can be done by simply using CZ gates. I'm not sure if I am mistaken, but it seems to me that such a circuit works for computational basis states, but not for general quantum states. Could somebody help me confirm if this is actually the case? If the above algorithm doesn't work for general quantum states, what algorithm would you suggest?
46537
I'm trying to derive $\left\langle \frac{1}{r} \right\rangle = \frac{1}{n^2 a_0}$ (where $a_0$ is the Bohr radius) for the $| nlm\rangle$ state of hydrogen.  I've separated the radial and angular parts of the hydrogen wavefunction and split up the integration to yield  \begin{align}\left\langle \frac{1}{r} \right\rangle &amp;= \int R^*_{nl}(r) {Y^{m}_{l}}^*(\theta, \phi) \frac{1}{r} R_{nl}(r) Y_{l}^{m}(\theta, \phi) r^2 \sin \theta ~\mathrm dr ~\mathrm d\theta~\mathrm d\phi\\ &amp;= \int {Y^{m}_{l}}^*(\theta, \phi) Y_{l}^{m}(\theta, \phi) \sin \theta ~\mathrm d\theta ~\mathrm d\phi \int \limits_{0}^{\infty} r R^*_{nl}(r) R_{nl}(r) ~\mathrm dr\\ &amp;= \int \limits_{0}^{\infty} r R^*_{nl}(r) R_{nl}(r) ~\mathrm dr\end{align}  But from here, I'm not sure how to continue. Since $R_{nl}(r)$ is defined as $$R_{nl}(r) = \left( \frac{2 Z}{n a_0} r \right)^l \sum \limits_{k = 0}^{n - l - 1} a_k \left( \frac{2 Z}{n a_0} r \right)^k e^{-Zr/n a_0}$$ where $$a_{k + 1} = \frac{k + l + 1 - n}{(k + 1)(k + 2l + 2)}a_k$$  How do I deal with the sum inside the integral (especially a sum that requires recursion to compute coefficients)?  Have looked this  so far.
66530
Let $\langle\Omega|$ be the ground state of an interacting theory, just as Peskin &amp; Schroeder(PS) describes on page 82 and page 213. On page 213 PS do the following   $$\tag{1}\langle\Omega|\phi(x)|\lambda_{\vec{p}}\rangle = \langle\Omega|\exp(+\mathrm{i}Px)\phi(0)\exp(-\mathrm{i}Px)|\lambda_{\vec{p}}\rangle \\ =\langle\Omega|\phi(0)|\lambda_{0}\rangle\exp(-\mathrm{i}px)\bigg|_{p^0=E_{\vec{p}}} $$  In the above $|\lambda_0\rangle$ is an eigenstate of the full interacting hamiltonian $H$. The ket $|\lambda_{\vec{p}}\rangle$ is the boost of $|\lambda_0\rangle$ with momentum $\vec{p}.$ Furthermore $E_{\vec{p}} = \sqrt{p^2+m_\lambda^2}$ and $\vec{P}|\lambda_0\rangle = 0.$  I assume PS used $$\tag{2}\langle\Omega|\mathrm{e}^{\mathrm{i}Px}=\langle\Omega|\mathrm{e}^{\mathrm{i}0x}$$ in $(1)$.   Is $(2)$ true?   I thought $\langle0|\mathrm{e}^{\mathrm{i}Px}=\langle0|\mathrm{e}^{\mathrm{i}0x}$ where $\langle0|$ is the ground state of the free theory.   I hope I have provided enough info for the question to make sense.
86806
I have the following problem that I was unable to solve for class, but I had a couple first steps that I started with that I am unable to finish.  I know I can't get this since it's already been turned in, but I would like to see if this was even a viable option for doing this proof in the first place.  ``Given an orthogonal set of states, $\{\phi_{n}\}$, and a Hamiltonian, $\hat{H}$, show that the partition function, $Q_{\beta}$, satisfies the following $$ Q_\beta \geq \sum_{n}\exp\{-\beta \langle \phi_n|\hat{H}|\phi_n\rangle \}$$ with equality holding when the $\phi_n$ states are eigenstates of the Hamiltonian.''  I started by dropping in the identity in the exponential (as eigenstates of the Hamiltonian) $$ \sum_n \exp\{ -\beta\sum_k \langle \phi_n|\psi_k\rangle\langle \psi_k |\hat{H}|\phi_n\rangle\}=\sum_n \exp\{ -\beta \sum_k E_k |c_{nk}|^2\}$$  Then I am left with showing that $$\sum_n \exp\{ -\beta \sum_k E_k |c_{nk}|^2\} \leq \sum_k \exp\{ -\beta E_k\}$$ with equality showing up again the same way, with a Kronecker delta $\delta_{nk}$ collapsing the sum in the exponential.  I realize I didn't make it very far, so this might not be the best way to show this, but it seems manifestly true just by looking at it, but I can't actually show it.  Does anyone have any hints about how to continue with this?
97004
I come from a CS background  I was reading Neven and Farhi's paper ("Classification with Quantum Neural Networks on near Term Processors"), and I am trying to implement the subset parity problem using Qiskit, and solve it using a quantum Neural Network.  There is one thing that doesn't make sense to me though. In the paper, they measure "the Pauli Y gate on the readout qubit" (perhaps this phrasing is wrong, as I have to admit that whenever one does not measure in the computational basis, the whole thing doesn't make sense to me anymore). In one of the questions I already asked on this site, I was told that measuring in a basis other than the computational basis is simply the same as applying a matrix to the qubit and then measuring it in a computational basis.  Through various research, I was able to determine that, for this problem "to measure the Pauli Y gate the readout qubit", I had to apply $HS^{\dagger}$ and then measure in the computational basis in order to obtain the same result. It works, but I don't understand why it has to be this matrix in particular (is there any mathematical proof that shows that this is indeed this matrix ?)
61678
Here are my thoughts so far:    $C_p = \langle x \mid x^p =e\rangle$ $C_q = \langle y \mid y^q =e\rangle$ $C_p \times C_q$ has elements of the form $(x^a,y^b)$ There are $p$ possible values for $x^a$ and $q$ possible values for $y^b$. So there are $pq$ possible elements in $C_p \times C_q$. $C_{pq} = \langle z\mid z^{pq} = e\rangle$ and there are $pq$ elements in this group. For an isomorphism from $C_p \times C_q$ to $C_{pq}$ we send $(e,e)$ to $e$ to ensure that the identities are mapped to each other. However, I'm not sure how to define an isomorphism for the other elements.
88132
When using the definition and properties of the inner product, we get the parallelogram law: $$\:\,\|x+y\|^2 =\: \langle x+y, x+y\rangle= \langle x, x\rangle + \langle x, y\rangle +\langle y, x\rangle +\langle y, y\rangle\,,\\ \|x-y\|^2 =\:\langle x-y, x-y\rangle= \langle x, x\rangle - \langle x, y\rangle -\langle y, x\rangle +\langle y, y\rangle $$ Adding these two expressions: $$\|x+y\|^2+\|x-y\|^2 \:=\: 2\langle x, x\rangle + 2\langle y, y\rangle \:=\: 2\|x\|^2+2\|y\|^2$$ as required. But the above does not simplify to Pythagoras' theorem $\|x+y\|^2=\|x\|^2+\|y\|^2$ if $x$ and $y$ are orthogonal. How can we get Pythagoras from the parallelogram law?
1291
Let $\phi$ be a scalar field and then I see the following expression (1) for the square of the normal ordered version of $\phi^2(x)$.   \begin{align} T(:\phi^2(x)::\phi^2(0):) &amp;= 2 \langle 0|T(\phi(x)\phi(0))|0 \rangle^2 \\ &amp;+ 4\langle 0|T(\phi(x)\phi(0))|0 \rangle:\phi(x)\phi(0): \\ &amp;+ :\phi^2(x)\phi^2(0): \tag{1} \end{align}  It would be great if someone can help derive the above expression - may be from scratch - and without outsourcing to Wick's theorem - and may be help connect as to why the above is related (equal?) to the Wick's theorem?    Isn't the above also known as OPE (Operator Product Expansion)? If yes, then is there at all any difference between OPE and Wick's theorem? Is there a systematic way to derive such OPEs?  Can one help extend this to Fermions?
117672
There seems to be something very strange about the relationship between quantum field theory and quantum mechanics.  It is bothering me; perhaps somebody can help.  I'll consider a free Klein-Gordon field.  In standard treatments (e.g. Peskin &amp; Schroeder and Schwartz) the one-particle momentum eigenstates $| \vec{k} \rangle$ are normalized so that  $$ \langle \vec{p} | \vec{k} \rangle = 2 \omega_{\vec{p}} (2\pi)^3 \delta^{(3)}(\vec{p}-\vec{k}), \qquad 1 = \int \frac{d^3 p}{(2\pi)^3} \frac{1}{2 \omega_{\vec{p}}}| \vec{p} \rangle \langle \vec{p} |. $$ Now, assuming $\langle \vec{x}' | \vec{x} \rangle = \delta^{(3)}(x-x')$ as usual, it follows that $$ \langle \vec{x} | \vec{p} \rangle = \sqrt{2 \omega_{\vec{p}}} e^{i \vec{p} \cdot \vec{x}}. $$ Now, one can compute (here in the Schrodinger picture; see Schwartz 2.76 or P&amp;S 2.42) that $$ \langle 0 | \phi(\vec{x}) | \vec{p} \rangle = e^{i \vec{p} \cdot \vec{x}}. $$ This is supposed to mean that $\phi$ creates a particle localized at position $\vec{x}$.  P&amp;S are a little cautious about the details, but Schwartz claims that the calculation implies  $$ \phi(\vec{x}) |0 \rangle = | \vec{x} \rangle. $$ But this is false because $\langle \vec{x} | \vec{p} \rangle \neq e^{i \vec{p} \cdot \vec{x}}$ with the normalization conventions used.  I suppose it could be true with some weird normalization of $| \vec{x} \rangle$, but I can't see what that might be (and at the very least this is not spelled out on the text).    Even if this works out, it seems extremely strange for there to be a relative normalization between the one-particle states of field theory and the states of one-particle relativistic quantum mechanics.  One ought to be able to redo the correspondence to make the normalization work out, but I don't see how.  (Note that the normalizations can be easily made to agree in the non-relativistic limit $\omega \approx m$, but that's besides the point.  Even if fully relativistic quantum mechanics is inconsistent [as some texts claim without reference], at the very least the perturbative corrections for $v \ll 1$ should be recoverable from field theory.)  [Edit: This seems to go beyond normalization.  We can get a feel for what kind of state $\phi(\vec{x})|0\rangle$ is by computing its wavefunction as a function of $\vec{x}'$, $$ \langle \vec{x}' | \phi(\vec{x}) |0 \rangle = \int \frac{d^3 p}{(2\pi)^3} \frac{1}{\sqrt{2 \omega_{\vec{p}}}} e^{i\vec{p} \cdot (\vec{x}-\vec{x}')}. $$ This wavefunction is peaked (I think divergent) at $\vec{x}'=\vec{x}$, so in some sense the particle is centered at $\vec{x}$, but it seems to be quite a stretch to say that it is at $\vec{x}$ (as the books do).  I would go so far as to say the claim is incorrect, since in quantum mechanics saying the particle is at particular position means the wave function is a delta-function there. I guess the same language is used in the Heisenberg picture, when two-point functions are called amplitudes for particles to propagate from one spacetime point to another.  This similarly seems false by the conventional meaning of amplitude as the overlap between two localized states.  Words of wisdom would be appreciated.]
56020
This question is about non-normalisable states in quantum mechanics, e.g. the eigenstates of the position operator $|x\rangle$ which are defined by the eigenvalue equation  $$\tag{1} \hat{X}|x\rangle = x|x\rangle.$$  Since the spectrum of the operator is continuous, the states are not square normalisable. Instead one has an equation such as  $$\tag{2} \langle x'|x\rangle = \delta(x-x')$$  which gives the overlap meaning as a . However it is clear that there is still at least an ambiguity in choosing a constant, i.e. why no have  $$\langle x'|x\rangle = a \times \delta(x-x')$$  where $a$ is $a \in \mathbb{R} $.    So I went to see how Equation (2) is derived. In Schleich's textbook on quantum optics in phase space I found the following, very short and in my opinion not clear/complete derivation.  From Equation (1) which can be taken to be the definition of the position operator and the assumption that the operator is hermitian which is a fundamental postulate of quantum mechanics one obtains:  $$\tag{3} \left( x - x' \right) \langle x'|x\rangle = 0.$$  That was easy so far, but then Schleich jumps immediately to equation (2). But the solutions for $\langle x'|x\rangle$ of (3) are all functions/generalised functions that are non-zero everywhere except at $x=x'$. So my question is: Why is (2) the unique solution? Where does the additional information come from?  My suspicion is that we impose another requirement, which is probably the completeness of the states, which would make (2) clear since it is the identity element in the position representation.
11306
I have been going through some problems in Sakurai's Modern QM and at one point have to calculate $\langle \alpha|\hat{p}|\alpha\rangle$ where all we know about the state $|\alpha\rangle$ is that $$\langle x|\alpha\rangle=f(x)$$ for some known function $f$. ($|\alpha\rangle$ is a Gaussian wave packet.) Sakurai says that this is given by:  $$\langle p\rangle = \int\limits_{-\infty}^{+\infty}\langle\alpha|x\rangle\left(-i\hbar\frac{\partial}{\partial x}\right)\langle x|\alpha\rangle dx.$$  I am wondering how we get to this expression. I know that we can express   $$|\alpha\rangle =\int dx|x\rangle\langle x|\alpha\rangle$$  and  $$\langle\alpha|=\int dx\langle\alpha|x\rangle\langle x|,$$   so my thinking is that we have:  $$\langle\alpha|\hat{p}|\alpha\rangle =\iint dx dx'\langle\alpha|x\rangle\langle x|\hat{p}|x'\rangle \langle x'|\alpha\rangle, $$  and if we can 'commute' $|x\rangle$ and $\hat{p}$ this would become: $$\iint dxdx'\langle\alpha |x\rangle\hat{p}\langle x|x'\rangle \langle x'|\alpha\rangle,$$  which is the desired result as $$\langle x|x'\rangle=\delta(x-x').$$ Is this approach valid?  I think my question boils down to: Does the operator $\hat{p}$ act on the basis kets $|x\rangle$ or on their coefficients? In the latter case, if we had some state $|\psi\rangle = |x_0\rangle$ for some position $x_0$, then would we say that for this state $$\langle p\rangle =\langle x_0|\left(-i\hbar\frac{\partial}{\partial x}\right)|x_0\rangle = 0$$ as the single coefficient is $1$ and the derivative of $1$ is $0$?
54908
Is it logically correct to assert that the expectation of the momentum $$\langle \hat p \rangle=0$$ for any bound state because it is bound to some finite region? What is the physical interpretation of the fact that $$\langle \hat p \rangle=0$$ in an energy eigenstate $\psi_n(x,t)$  but $$\langle \hat p \rangle\neq0$$ in some superposition state $$\psi(x,t)=c_m\psi_m(x,t)+c_n\psi_n(x,t)~?$$ Here $\psi_n(x,t)$ the eigenstates of the Hamiltonian, for example, in the problem of particle in a box (say).
82473
Let $$\langle x'|p'\rangle = N \exp(\frac{ip'x'}{\hbar})$$ be the overlap between position and momentum space, where $N$ is a normalization constant to be determined.  We can then compute $N$ by  $$ \langle x'|x''\rangle = \int \mathrm{d}p'\langle x'|p'\rangle \langle p'|x''\rangle\\ \rightarrow \delta(x'-x'')=|N|^2 \int \mathrm{d}p'\exp(\frac{ip'(x'-x'')}{\hbar}) \\ =2\pi\hbar |N|^2 \delta(x'-x'') $$  see Sakurai - "Modern Quantum Mechanics" 2nd, Pearson, p. 54.  How was the factor $2\pi\hbar$ obtained? The intermediate step should look something like this: $$ \rightarrow  \delta(x'-x'')=|N|^2 \int \mathrm{d}p'\exp(\frac{ip'(x'-x'')}{\hbar}) \\ =|N|^2 \int \mathrm{d}p'\delta(x'-x'') $$  But all I can think of is that one can say $\int \mathrm{d}p'=\hbar k$ where $k$ is the wavenumber.   What am I missing?
114252
In quantum mechanics any two level system can be mapped onto effective spin variables. If the system is defined by two energy levels, $|E_1\rangle$ and $|E_2\rangle$, the Hamiltonian is  $$ H = \left(\begin{array}{cc} E_1 &amp; 0 \\ 0 &amp; E_2 \end{array}\right) \, .$$  This can be recast as  $$ H = \frac{E_1+E_2}{2} 1\!\!1 + \frac{E_1-E_2}{2} \sigma_3\, .$$  $1\!\!1$ is the identity operator and $\sigma_3$ is the third pauli matrix. This is very nice because we can now apply our knowledge and intuition of spin dynamics to any two level system.  My question is the following: for a real spin I can measure expectation values of $\sigma_{1,2}$ by physically rotating my system and align its $x$ or $y$ axis with my measuring apparatus. How do I do this (in the lab!) with a pseudo-spin system? Imagine I am looking at a cold atom and I want to know if the system is in an symmetric or anti-symmetric superposition of $|E_1\rangle$ and $|E_2\rangle$, how do I do it?
13059
Page 37 of Dirac's book The Principles of Quantum Mechanics, states  The condition for the eigenstates of $\xi$ to form a complete set must thus be formulated, that any ket $|P\rangle$ can be expressed as an integral plus a sum of eigenkets of $\xi$, i.e. $$|P\rangle = \int |\xi'c\rangle\; d\xi' + \sum\limits_{r}|\xi^rd\rangle$$ where the $|\xi'c\rangle$, $|\xi^rd\rangle$ are all eigenkets of $\xi$, the labels c and d being inserted to distinguish them when the eigenvalues $\xi'$ and $\xi^r$ are equal, and where the integral is taken over the whole range of eigenvalues and the sum is taken over any selection of them.  I find it inconsistent that the eigenkets under the integral are weighted by what appears to be a differential eigenvalue $d\xi'$, yet all the eigenkets under the summation are weighted by the value 1. Is this correct?
30841
So I'm going through my notes and I think I've confused myself. We often imply  $$ |\psi\rangle \to \psi(x)\\ \langle\psi| \to \psi(x)^* $$ for instance when we talk about eigenvalue equations we interpret  $$ \hat{H}|\psi\rangle =E|\psi\rangle $$ as simply  $$ \hat{H}\psi(x)=E\psi(x) $$ but I don't understand why we say $|\psi\rangle \to \psi(x)$ because if that was the case then  $$ \langle\psi|\psi\rangle=|\psi|^2 $$ when clearly $$ \langle\psi|\psi\rangle=\int_{-\infty}^\infty |\psi|^2 dx = 1 $$ I'm obviously missing something simple, could anyone point out where I'm going wrong?
88883
Consider a  $\phi(x)$, and let its  be $$ \frac{1}{p^2-m^2-\Pi(p^2)}=\int_0^\infty\mathrm d\mu^2\ \rho(\mu^2)\ \frac{1}{p^2-\mu^2} $$  We usually have $\Pi(m^2)=0$, which implies that there is a one-particle state with mass $m^2$. In terms of the , this reads $$ \rho(\mu^2)=\delta(\mu^2-m^2)+\sigma(\mu^2) $$ where the support of $\sigma(\mu^2)$ is disconnected from $m^2$.  On the other hand, the continuum contribution usually begins at $(2m)^2$, meaning that $\Pi(k^2)$ has a branch cut from $(2m)^2$ to $\infty$. Again, in terms of the spectral function, this is written as $\text{supp}(\sigma)=[(2m)^2,\infty)$.  My question  I would expect that the first bound state to lie close to $(2m)^2$, but slightly below, something around $(2m)^2-\mathcal O(\alpha^n)$, where $\alpha$ is the coupling constant and $n\in\mathbb N$. For example, in a simplified QED model, the bound state of an  has binding energy $\sim 7\mathrm{eV}\sim m\alpha^2$, and so I would expect the branch point to be somewhere around $(2m)^2-m^2\alpha^4$.  I know the value of the self-energy to one loop, and the branch point is indeed exactly at $(2m)^2$. I don't know where to find higher loop corrections, so I cannot conclude whether   1) at higher loops, the branch point moves a bit closer to $m^2$, or 2) it stays at $(2m)^2$.   I would expect that the correct behaviour is 1), but this contradicts the fact that all books I've read always depict the threshold of pair production as an hyperboloid with its bottom sitting exactly at $(2m)^2$. On the other hand, if it turns out that the correct option is 2), I am lead to ask why is perturbation theory unable to correctly predict the position of the branch point (I know this is a subtle issue because bound states are, to some extent, non-perturbative entities; but AFAIK, perturbative calculations do contain a lot of information about bound states).