https://blog.google/technology/research/google-willow-quantum-chip/
Willow performed a standard benchmark computation in under five minutes that would take one of today’s fastest supercomputers 10 septillion (that is, 10^25) years — a number that vastly exceeds the age of the Universe.
Early, rudimentary and unpolished skeleton of a “server side”:
import ctypes
import fcntl
import os
import sys
V4L2_LOOPBACK_DEVICE_FILE = "/dev/v4l2loopback"
V4L2_LOOPBACK_MAGIC = 0x4C
V4L2_LOOPBACK_IOC_ADD = 0xC0004C00
class V4L2LoopbackAdd(ctypes.Structure):
_fields_ = [
("card_label", ctypes.c_uint64),
("flags", ctypes.c_uint16),
("device_nr", ctypes.c_uint16),
("card_fd", ctypes.c_uint32),
]
def main():
try:
fd = os.open(V4L2_LOOPBACK_DEVICE_FILE, os.O_RDWR)
except FileNotFoundError:
sys.exit(1)
loopback = V4L2LoopbackAdd()
ctypes.memset(ctypes.addressof(loopback), 0, ctypes.sizeof(loopback))
try:
fcntl.ioctl(fd, V4L2_LOOPBACK_IOC_ADD, loopback)
print(f"{loopback.device_nr} {loopback.card_fd}")
except OSError:
sys.exit(1)
finally:
os.close(fd)
if __name__ == "__main__":
main()
Anyway shows the gist. The device name is due to change…