T–H–T–H sequence

Two T teleportations and two Hadamards form a single-qubit gate sequence. Its resource and adaptive-measurement stages also make it useful for examining execution dependencies and live-patch waiting.

Block graph

BLOG source

BLOG 1.0

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

  0: Port [0, 0, 0] <In>
  1: T [1, 0, 0]
  2: Y [3, 0, 0]
  3: ZXX [-1, 0, 0]
  4: Y [3, 2, 0]
  5: T [1, 2, 0]
  6: XZX [0, 2, 0]
  7: ZZX [-1, 2, 0]
  8: ZXX [-1, 1, 0]
  9: XZX [-1, 0, 1]
  10: XZX [0, 0, 1]
  11: XZX [1, 0, 1]
  12: ZZX [2, 0, 1]
  13: XZX [3, 0, 1]
  14: XZX [3, 2, 1]
  15: ZZX [2, 2, 1]
  16: XZX [1, 2, 1]
  17: XZX [0, 2, 1]
  18: ZXX [2, 1, 1]
  19: ZXX [2, 3, 1]
  20: XZ [2, 3, 2]
  21: XZ [2, 1, 2]
  22: XZX [-1, 2, 1]
  23: Port [-1, 2, 2] <Out>
  1 -> +Z
  2 -> +Z
  3 -> +Y
  3 -H> +Z
  4 -> +Z
  5 -> +Z
  6 -> +Z
  7 -> +X
  8 -> +Y
  9 -> +X
  10 -> -Z
  10 -> +X
  11 -> +X
  12 -> +X
  12 -> +Y
  15 -> +X
  15 -> +Y
  16 -> +X
  17 -> +X
  18 -> +Z
  20 -> -Z
  22 -> +X
  22 -H> +Z

  mzz1 = measure 10 -> +X
  mzz2 = measure 17 -> +X
  feedback Z 2, Z 4
  resolve 21 if !mzz1
  resolve 20 if !mzz2

}

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