Fig. 2: Operation principle of the SUANPAN.

a The mechanism of performing a × b, where b is 1-bit quantization with 1 BEAD. Right inset: the on-off state of 1 BEAD in the SUANPAN comparing with 1 bead in Chinese Suanpan. b The mechanism of performing a × b, where b is 2-bit quantization with 2 BEADs. Right inset: the on-off states of 2 BEADs in the SUANPAN comparing with 2 beads in the Chinese Suanpan. c The mechanism of performing a × b, where b is M-bit quantization with M BEADs. The white box represents a set of M BEADs. Inset: M beads in Chinese Suanpan as a comparison. d An example for the time-space encoding, where a = 0, 1, …, 100 by controlling the duty ratio as 0–100%, and b is 4-bit quantization by employing 4 BEADs. Since all these 4 detectors are connected, the total photocurrent is proportional to a × b. e The mechanism of performing vector inner product A·B with N sets of M BEADs. Inset: N sets of Chinese Suanpan as a comparison