S gate

The data patch interacts with an ancilla that ends in a Y-basis measurement. The data input and output stay open, so this component can be placed between other gates.

Block graph

BLOG source

BLOG 1.0

module main {
  in q_in: data = 0
  out q_out: data = 2

  0: Port [0, 0, 0] <In>
  1: XZX [0, 0, 1]
  2: Port [0, 0, 2] <Out>
  3: XZX [1, 0, 1]
  4: Y [1, 0, 2]
  0 -> +Z
  1 -> +Z
  1 -> +X
  3 -> +Z

  feedback Z 2

}

See BLOG Format for the syntax or return to all examples.