Scientists have developed a new software platform, TensorCircuit-NG, to unify quantum computing and simulation with artificial intelligence and high-performance computing. Shi-Xin Zhang from the Institute of Physics, Chinese Academy of Sciences, Yu-Qin Chen from the Graduate School of China Academy of Engineering Physics, and Weitang Li, working with colleagues including Jiace Sun from the Division of Chemistry and Chemical Engineering at the California Institute of Technology, and Pei-Lin Zheng from the Future Research Lab, China Mobile Research Institute, have created a tensor-native programming paradigm. This framework integrates circuits, tensor networks, and neural networks into a single differentiable computational graph, leveraging backends such as JAX, TensorFlow, and PyTorch. Significantly, TensorCircuit-NG addresses the limitations of existing simulators by offering scalable noise modelling and distributed computing strategies, enabling complex applications like end-to-end quantum machine learning and differentiable optimisation of tensor network states, and represents a substantial advance in the field of quantum software development with contributions from researchers at the University of Chinese Academy of Sciences and further collaborators.
TensorCircuit-NG promises to accelerate progress by allowing researchers to simulate and optimise quantum systems with unprecedented scale and flexibility, potentially unlocking practical applications in fields ranging from materials science to machine learning.
TensorCircuit-NG is a next-generation software platform redefining the intersection of quantum physics, artificial intelligence, and high-performance computing. The framework directly addresses the exponential computational demands of complex quantum circuits through innovative distributed computing strategies, including automated data parallelism and model-parallel tensor network slicing.
Validation on GPU clusters demonstrates a near-linear speedup in distributed variational quantum algorithms, signifying a substantial advancement in computational efficiency. TensorCircuit-NG unlocks flagship applications, notably end-to-end quantum machine learning for image recognition using the CIFAR-100 dataset, and streamlined pipelines for converting quantum states into neural networks via classical shadows, a technique for efficiently characterising quantum systems.
Furthermore, the platform facilitates the differentiable optimisation of tensor network states, a crucial step in tackling complex problems in many-body physics. The core innovation lies in the unification of disparate computational approaches, allowing researchers to seamlessly integrate quantum simulations with machine learning workflows, enabling the exploration of hybrid algorithms and the modelling of physical systems at unprecedented scales.
By representing quantum computations as differentiable graphs, TensorCircuit-NG allows for gradient-based optimisation, a cornerstone of modern machine learning, to be applied directly to quantum circuit design and parameter tuning, promising to accelerate the discovery of new quantum algorithms and improve the performance of existing ones. TensorCircuit-NG’s architecture is built around a dual-layer design, unifying infrastructure and representation through a tensor-native philosophy.
This approach allows for a flexible and interoperable ecosystem, supporting a wide range of quantum systems, including qudit systems and fermion Gaussian states. The platform’s advanced simulation engines, encompassing analogue, stabilizer, and approximate matrix product state simulators, provide researchers with a versatile toolkit for exploring diverse quantum phenomena, alongside tools for modelling physical systems, including lattices, Hamiltonians, and time evolution, with comprehensive noise modelling and mitigation strategies.
GPU acceleration substantially reduces Hamiltonian construction times for qubits and qudits
Constructing a sparse Hamiltonian matrix, specifically the transverse-field Ising model (TFIM), takes 0.059 seconds on a GPU using TensorCircuit-NG with a system size of 24 qubits, a substantial performance gain compared to traditional CPU-based methods requiring approximately 66.7 seconds for the same calculation. For a 22-qubit system, the GPU-accelerated construction completes in 0.019 seconds, while CPU implementations using NumPy, QuSpin, and Quimb take 8.5, 4.3, and 10.9 seconds respectively.
These timings, measured in complex128 precision on an NVIDIA H200 GPU, demonstrate orders-of-magnitude speedups compared to standard libraries. The framework extends beyond qubits to efficiently simulate qudit systems, achieving seamless operation with local Hilbert space dimensions greater than two. Simulating a quantum clock model with qutrits (d = 3) is performed using a dedicated QuditCircuit class, generalizing gate operations for rotations within any two-level subspace.
This capability is demonstrated through the optimisation of a ground state using a just-in-time compiled, batched variational quantum eigensolver workflow. The implementation allows researchers to explore quantum systems with high-dimensional local Hilbert spaces while leveraging the full performance of the differentiable engine. TensorCircuit-NG incorporates a dedicated module for fermion Gaussian states, enabling the simulation of systems containing thousands of fermions with a computational complexity of O(N3).
This module tracks the two-body correlation matrix, reducing computational demands while retaining the ability to compute multi-point correlations. Simulations of the 1D Kitaev chain reveal that the framework’s differentiable pipeline allows for the automated discovery of phase boundaries, locating the critical chemical potential μc at 2t through gradient ascent maximisation of entanglement entropy. The ability to compute gradients of macroscopic properties with respect to Hamiltonian parameters facilitates Hamiltonian learning and inverse engineering.
Lattice definition, visualisation and automated Hamiltonian generation
TensorCircuit-NG employs a lattice-based approach to constructing and manipulating quantum systems, beginning with the CustomizeLattice class which allows for the creation of bespoke connectivity graphs. This class facilitates the dynamic addition or removal of sites, effectively modelling physical defects or impurities within a system while preserving underlying coordinate information.
A built-in visualization utility, utilising matplotlib, renders these lattices, displaying sites at their physical coordinates and illustrating nearest-neighbour connectivity, providing crucial visual feedback for debugging and verifying geometric setups before computationally intensive simulations. The framework further automates Hamiltonian construction via the tc.templates.hamiltonians module, generating operator lists directly from defined lattice objects.
This entire pipeline, from coordinate definition to Hamiltonian construction, is designed to be end-to-end differentiable and ‘jittable’, meaning it can be compiled for improved performance. This capability enables the optimisation of physical geometric parameters, such as lattice constant, to minimise ground state energy or target specific spectral properties.
An example demonstrates this by optimising the lattice constant of a Rydberg Hamiltonian on a triangular lattice towards a desired ground state energy, utilising the optax library for gradient-based optimisation. Addressing a common bottleneck in many-body quantum simulation, TensorCircuit-NG incorporates the PauliStringSum2COO function, a JIT-compiled implementation for GPU acceleration.
This function constructs sparse Hamiltonian matrices in a fully vectorized manner, computing coordinate list indices and non-zero values for all Pauli terms in parallel, rather than sequentially. Benchmarking against standard CPU-based libraries (NumPy, QuSpin, Quimb) on an NVIDIA H200 GPU reveals substantial performance gains; a L = 24 sparse matrix is constructed in under 60 milliseconds, compared to tens of seconds required by traditional methods. This accelerated construction is also end-to-end differentiable and jittable, further enhancing the framework’s versatility.
Unifying quantum circuits, tensor networks and machine learning for scalable simulation
The relentless pursuit of simulating quantum systems has long been hampered by computational cost. While quantum computers promise to overcome this, they remain nascent and error-prone. TensorCircuit-NG represents a significant advance in tackling this challenge not by circumventing classical limitations, but by radically optimising them. This isn’t merely a faster simulator; it’s a fundamentally different approach, unifying the languages of quantum circuits, tensor networks, and machine learning into a single, differentiable framework.
The implications extend beyond simply modelling larger systems. For years, researchers have struggled to bridge the divide between theoretical quantum algorithms and practical machine learning applications. TensorCircuit-NG offers a pathway to seamlessly integrate these fields, enabling end-to-end differentiable quantum machine learning, a crucial step towards realising the potential of quantum-enhanced artificial intelligence.
The framework’s ability to handle complex dynamics, including those found in many-body physics, opens doors to materials discovery and fundamental scientific inquiry. However, the reliance on classical machine learning backends introduces inherent limitations; the speedups, while substantial, are still bound by classical computational resources. Furthermore, the accuracy of approximate simulations remains a critical concern.
While the platform incorporates sophisticated noise modelling, accurately capturing the full complexity of real quantum hardware is an ongoing battle. Future development will likely focus on refining these approximations and exploring hybrid quantum-classical algorithms that leverage the strengths of both paradigms. The true test will be whether this unified framework can scale to tackle problems currently intractable for both classical and quantum computers, and whether it can genuinely accelerate the development of practical quantum technologies.
👉 More information
🗞 TensorCircuit-NG: A Universal, Composable, and Scalable Platform for Quantum Computing and Quantum Simulation
🧠 ArXiv: https://arxiv.org/abs/2602.14167
