Four-T AND

Two multiplex control inputs remain live while four T injections produce an AND output. This temporary AND component can supply the nonlinear intermediate value needed by a larger arithmetic circuit.

Block graph

BLOG source

BLOG 1.0

module main {
  in q0: data = 5
  in q1: data = 15
  out q2: data = 32

  0: T [0, 0, 0]
  1: XZX [0, 0, 1]
  2: ZZX [1, 0, 1]
  3: XZX [2, 0, 1]
  4: XZX [2, 0, 2]
  5: Port [3, 0, 1] role=multiplex <x>
  6: ZZX [1, 0, 2]
  7: ZZX [1, 1, 2]
  8: XY [0, 0, 2]
  9: XZX [2, 1, 2]
  10: ZZX [1, 1, 1]
  11: ZZX [1, 2, 1]
  12: XZX [2, 2, 1]
  13: XZX [2, 1, 1]
  14: T [2, 1, 0]
  15: Port [3, 2, 1] role=multiplex <y>
  16: XZX [2, 1, 3]
  17: XZZ [2, 2, 2]
  18: XZX [0, 1, 2]
  19: T [0, 1, 1]
  20: XY [0, 1, 3]
  21: XZX [2, 2, 3]
  22: ZZX [1, 1, 3]
  23: ZZX [1, 2, 3]
  24: XZX [0, 2, 3]
  25: T [0, 2, 2]
  26: XY [0, 2, 4]
  27: ZXX [2, 1, 4]
  28: ZZX [2, 0, 4]
  29: XZX [1, 0, 4]
  30: XZX [1, 0, 3]
  31: XZX [2, 0, 3]
  32: Port [3, 0, 3] role=output <Out_xy>
  33: XZX [0, 0, 4]
  34: Y [0, 0, 3]
  0 -> +Z
  1 -> +X
  1 -> +Z
  2 -> +X
  2 -> +Y
  3 -> +Z
  3 -> +X
  4 -> -X
  6 -> +Y
  7 -> +X
  7 -> -X
  9 -> +Z
  10 -> +Y
  10 -> +X
  11 -> +X
  12 -> +X
  12 -> +Z
  13 -> +Z
  13 -> -Z
  16 -> -X
  16 -H> +Z
  17 -> +Z
  18 -> -Z
  18 -> +Z
  21 -> -X
  23 -> -Y
  23 -> -X
  24 -> -Z
  24 -> +Z
  27 -> -Y
  28 -> -X
  29 -> -Z
  29 -> -X
  30 -> +X
  31 -> +X
  33 -> -Z

  MZxZyZxyZa = measure 1 -> +X
  resolve 8 if !MZxZyZxyZa
  MZxZxyZb = measure 18 -> +X
  resolve 20 if MZxZxyZb
  MZyZxyZc = measure 24 -> +X
  resolve 26 if MZyZxyZc

}

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