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$ quantum-computing.ibm.com/composer/docs/iqx/guide/… The IBM page has a clear analogy, clear answer, and interactive lesson for this query. While it may not be directly relevant to your own quantum computer, it easily explains this to the layperson (albeit using IBM Quantum Composer). I hope that helps. $\endgroup$
    – user22377
    Commented Dec 2, 2022 at 11:32

1 Answer 1

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.

$\endgroup$
3
  • $\begingroup$ Thanks! Could you please clarify how you understood this? $\endgroup$
    – Psanfi
    Commented Jul 16, 2020 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$ Commented Jul 16, 2020 at 14:32
  • $\begingroup$ Thanks a lot for the clarification and links! $\endgroup$
    – Psanfi
    Commented Jul 16, 2020 at 15:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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