# Quantum Neural Network Realization of XOR on a Desktop Quantum Computer

**Authors:** Tee Hui Teo, Qianrui Lin, Yiyang Fu

PMC · DOI: 10.3390/s26030854 · Sensors (Basel, Switzerland) · 2026-01-28

## TL;DR

This paper shows a quantum neural network successfully solving the XOR problem on a small desktop quantum computer.

## Contribution

The first realization of a quantum neural network solving XOR on a room-temperature desktop quantum computer.

## Key findings

- Quantum neural network achieved high fidelity (98.85% Ry, 99.35% Rx) on real hardware.
- Experimental results closely matched simulations, validating quantum machine learning feasibility.
- Demonstrated practical benchmark for small-scale quantum computing.

## Abstract

Quantum neural networks leverage quantum computing to address machine learning problems beyond the capabilities of classical computing. In this study, we demonstrate a quantum neural network that learns the nonlinear exclusive OR function on a desktop quantum computer. The exclusive OR task is a nonlinear benchmark that cannot be solved by a single-layer perceptron, making it an excellent test for quantum machine learning. We trained a variational quantum circuit model in a simulation using the PennyLane framework to learn the two-bit exclusive OR mapping. After obtaining the circuit parameters in the simulation, the trained quantum neural network was deployed on a two-qubit Nuclear Magnetic Resonance-based desktop quantum computer operating at room temperature to evaluate the actual hardware performance. The experimental quantum state fidelity reached approximately 98.85%(Ry) and 99.35%(Rx), and the overall average purity was 95.16%(Ry) and 97.43%(Rx), indicating excellent agreement between the expected and measured results. These positive outcomes underscore the feasibility of quantum machine learning on small-scale quantum hardware, marking a minimal yet physically meaningful benchmark.

## Full-text entities

- **Genes:** XDH (xanthine dehydrogenase) [NCBI Gene 7498] {aka XAN1, XDH/XO, XO, XOR}

## Full text

_Full body text omitted from this summary view._ Fetch the complete paper as Markdown: https://tomesphere.com/paper/PMC12899742/full.md

## Figures

10 figures with captions in the complete paper: https://tomesphere.com/paper/PMC12899742/full.md

## References

25 references — full list in the complete paper: https://tomesphere.com/paper/PMC12899742/full.md

---
Source: https://tomesphere.com/paper/PMC12899742