TensorCircuit Next Generation

https://github.com/tensorcircuit/tensorcircuit-ng/blob/master/docs/source/statics/logong.png?raw=true

Welcome and congratulations! You have found TensorCircuit: the Next Generation. 👏

Introduction

TensorCircuit-NG is an industrial-grade, open-source high-performance quantum software framework in Python. It is designed for researchers and engineers who demand Speed, Flexibility, and Elegance.

🧬 Built for Humans

Intuitive API that feels like natural quantum physics. Focus on your research, not the boilerplate.

🚀 Extreme Performance

Achieve 10-100x GPU speedup. Powered by JIT compilation and optimized tensor engines.

🤖 Deep ML Fusion

Native integration with JAX, TensorFlow, and PyTorch. Seamlessly combine AD with quantum kernels.

⛓️ Advanced Engines

State-of-the-art support for Noisy, Analog, Approximate and Stabilizer simulations.

☁️ Hardware Agnostic

Run your code anywhere: from local CPUs to distributed GPUs/TPUs and QPU providers via a unified interface.

🛠 Industrial Strength

Committed to stability and performance. Long-term support and proven by extensive research and industrial applications.

Important

Please cite our published whitepaper when using TensorCircuit or TensorCircuit-NG in your research. The bibtex information is provided by tc.cite().

Note

TensorCircuit-NG is the active continuation of TensorCircuit project. We recommend upgrading to TensorCircuit-NG for the latest features and improvements. You can upgrade by running the following command: pip uninstall tensorcircuit && pip install tensorcircuit-ng

Get Started in Seconds

Install with one line:

pip install tensorcircuit-ng

Simulate your first circuit:

import tensorcircuit as tc

c = tc.Circuit(2)
c.h(0)
c.cnot(0, 1)

print(c.state()) # Ideal Bell state: [0.707, 0, 0, 0.707]
print(c.expectation_ps(z=[0, 1])) # ZZ expectation: 1.0

Unified Quantum Programming

TensorCircuit-NG is building the future of unified quantum computing infrastructures.

🛠 Unified Backends

JAX, TensorFlow, PyTorch, Numpy, Cupy

💻 Unified Devices

CPU, GPU, and TPU support

🏛 Unified Providers

QPUs from major vendors

🌐 Unified Resources

Local, Cloud, and HPC environments

🎛 Unified Interfaces

Numerical sim and hardware experiments

⚙️ Unified Engines

Ideal, Noisy, Analog, and Stabilizer

📝 Unified Representations

Qiskit, OpenQASM, Cirq, and IR

🧊 Unified Objects

Neural Nets, Tensor Nets, and Circuits

Reference Documentation

The following documentation sections briefly introduce TensorCircuit-NG to the users and developpers.

Tutorials

The following documentation sections include integrated examples in the form of Jupyter Notebook.

API References

Indices and Tables

Join the Community

We are always looking for contributors and collaborators!

  • Check out our GitHub Discussions for questions and show-and-tell.

  • Report bugs or request features via GitHub Issues.

  • Star the repository to stay updated! ⭐