2
$\begingroup$

I found an answer that shows how to detect the phase in cases like $0$, $\pi/8$, $\pi/2$, $\pi/4$ or $\pi$ for circuit to prepare state as H P, where P is a phase gate like $I$, $U1(\pi/8)$, $S$, $T$ or $Z$.

But in my case the circuit to prepare state is $X H P$, where $P$ is $X$ gate (conditionally phase $\pi$) or $ID$ (conditionally phase 0).

This circuit in Qasm with conditionally phase equal to $\pi$:

x q[0];
h q[0];
x q[0];

with conditionally phase equal to $0$:

x q[0];
h q[0];
id q[0];

Appending $H$ gate (as in the above answer) don't detect a difference for conditionally phase $\pi$ and phase $0$ (but does detect for phases $\pi/2$, $\pi/4$, $\pi/8$ if $P$ is $S$, $T$, $U1(\pi/8)$, respectively).

Is it possible to detect the conditionally phase $P$ $\pi$ or 0 for this circuit to prepare state?

$\endgroup$
1
$\begingroup$

I think unlike the relative phase in the answer you reference, it is a global phase in your case:

Your XHP-circuit where P=ID, prepares the state: [0.707+0j,-0.707+0j], where P=X, prepares the state: [-0.707+0j, 0.707+0j]. These states are differ by a global phase ${e}^{i\pi}=-1$.

But the global phase is undetectable $|ψ⟩:={e}^{iδ}|ψ⟩$, also see the answer.

| improve this answer | |
$\endgroup$
  • $\begingroup$ Thanks! Could you please clarify how you understood this? $\endgroup$ – Psanfi Jul 16 at 14:12
  • 1
    $\begingroup$ Your XHP-circuit where P=ID, prepares the state: [0.707+0j,-0.707+0j], where P=X, prepares the state: [-0.707+0j, 0.707+0j]. These states are differ by a global phase ${e}^{i\pi}=-1$. About that a global phase is undetectable ($|ψ⟩:={e}^{iδ}|ψ⟩$), you can read e.g. here. $\endgroup$ – Aleksey Zhuravlev Jul 16 at 14:32
  • $\begingroup$ Thanks a lot for the clarification and links! $\endgroup$ – Psanfi Jul 16 at 15:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.