CCZ gate teleportation

Three multiplex data wires couple to an externally supplied CCZ state. Three named joint measurements choose explicit correction branches, and pairs of outcomes control the remaining Pauli feedback.

Caution

This computation contains spatial Hadamard pipes. The current construction can reduce the effective circuit distance below the requested code distance. Check the emitted circuit’s distance before relying on it. Prefer temporal Hadamards or a redesigned layout when preserving circuit distance is required. See the distance boundary.

Block graph

BLOG source

BLOG 1.0

module main {
  in x: data = 3
  in y: data = 6
  in z: data = 9
  in ccz_0: ccz = 0
  in ccz_1: ccz = 1
  in ccz_2: ccz = 2

  0: Port [0, 2, 0] role=input <CCZ_0>
  1: Port [1, 2, 0] role=input <CCZ_1>
  2: Port [2, 2, 0] role=input <CCZ_2>
  3: Port [0, 0, 1] role=multiplex <x>
  4: ZXX [0, 1, 1]
  5: ZXX [0, 2, 1]
  6: Port [1, 0, 1] role=multiplex <y>
  7: ZZX [1, 1, 1]
  8: ZXX [1, 2, 1]
  9: Port [2, 0, 1] role=multiplex <z>
  10: ZZX [2, 1, 1]
  11: ZXX [2, 2, 1]
  12: ZZX [1, 3, 1]
  13: XZX [0, 3, 1]
  14: ZXX [2, 3, 1]
  3 -> +Y
  4 -> +Z
  4 -> +Y
  0 -> +Z
  5 -> +Z
  13 -> +Z
  6 -> +Y
  7 -> +Y
  1 -> +Z
  8 -> +Z
  8 -> +Y
  12 -> -X
  9 -> +Y
  10 -> +Y
  11 -> -Z
  11 -> +Z
  11 -> +Y
  14 -> +Z
  branch b0 {
    false {
      15: X [1, 2, 2]
      16: X [2, 3, 2]
    }
    true {
      17: ZXX [1, 2, 2]
      18: ZZX [1, 3, 2]
      19: ZXZ [2, 3, 2]
      18 -> -Y
      19 -H> -X
    }
  }
  branch b1 {
    false {
      20: X [0, 1, 2]
      21: X [2, 2, 2]
    }
    true {
      22: ZXZ [0, 1, 2]
      23: ZZX [1, 1, 2]
      24: ZZX [2, 1, 2]
      25: ZXX [2, 2, 2]
      23 -H> -X
      24 -> -X
      25 -> -Y
    }
  }
  branch b2 {
    false {
      26: X [0, 2, 2]
      27: X [0, 3, 2]
    }
    true {
      28: ZXX [0, 2, 2]
      29: XZZ [0, 3, 2]
      28 -H> +Y
    }
  }

  m0x = measure 3 -> +Y
  m1y = measure 6 -> +Y
  m2z = measure 9 -> +Y
  resolve b0 if m0x
  resolve b1 if m1y
  resolve b2 if m2z
  feedback Z 9 if m0x & m1y
  feedback Z 6 if m0x & m2z
  feedback Z 3 if m1y & m2z

}

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