liveBook · Manning

S† gate

As explained in Quantum Programming in Depth

The S† gate is the adjoint of the S phase gate and applies a phase of negative pi over two to the one computational-basis state relative to zero.

The S† gate is the inverse of S, with matrix [[1, 0], [0, -i]]. It multiplies the relative phase of |1⟩ by −i while leaving |0⟩ unchanged. section 5.3.3

Use S† as a classically controlled phase correction:

  • In adaptive phase estimation, apply controlled U, then apply S† to the control qubit only when the previously measured phase bit θ₂ equals 1. section 5.3.3
  • The correction removes the factor i contributed by θ₂ = 1, leaving the control state ready for a Hadamard gate and measurement of θ₁. section 5.3.3

Correcting a known phase contribution

When θ₂ = 1, the control state contains a relative phase factor e^(πi/2) = i. Applying S† contributes −i and cancels this factor; when θ₂ = 0, no correction is needed. section 5.3.3

Figure 5.7 In adaptive phase estimation, we learn the phase one binary digit at a time. We start by running a circuit that allows us to learn the least significant binary digit. After this, we use a different circuit, parts of which depend on the information we’ve discovered so far, to learn the second least significant binary digit. If there are more digits to learn, the process is repeated, with different circuits for each digit.
figure

Trace how adaptive phase estimation changes its circuit after each measured binary phase digit. section 5.3.3

How Quantum Programming in Depth covers it

How deep it goes
Defines the matrix and derives its phase-cancellation role, but does not provide code-level implementation.
Examples
Demonstrates conditional application when θ₂ equals 1 to cancel a relative phase of i.
What it assumes
Assumes familiarity with computational-basis states, relative phase, controlled-U gates, Hadamard gates, and measurement.
What you can do after
Apply it in adaptive phase estimation to remove a known phase contribution before extracting the next phase bit.
How it connects
Connects S† with the S gate, controlled-U gates, Hadamard gates, measurement, and adaptive phase estimation.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Quantum Programming in Depth. The section links point to the parts of the book it draws on.