TensorCircuit Documentation#

Welcome and congratulations! You have found TensorCircuit. 👏
Introduction#
TensorCircuit is an open-source high-performance quantum computing software framework in Python.
It is built for humans. 👽
It is designed for speed, flexibility and elegance. 🚀
It is empowered by advanced tensor network simulator engine. 🔋
It is ready for quantum hardware access with CPU/GPU/QPU (local/cloud) hybrid solutions. 🖥
It is implemented with industry-standard machine learning frameworks: TensorFlow, JAX, and PyTorch. 🤖
It is compatible with machine learning engineering paradigms: automatic differentiation, just-in-time compilation, vectorized parallelism and GPU acceleration. 🛠
With the help of TensorCircuit, now get ready to efficiently and elegantly solve interesting and challenging quantum computing problems: from academic research prototype to industry application deployment.
Relevant Links#
TensorCircuit is created and maintained by Shi-Xin Zhang and this version is released by Tencent Quantum Lab.
The current core authors of TensorCircuit are Shi-Xin Zhang and Yu-Qin Chen. We also thank contributions from the open source community.
If you have any further questions or collaboration ideas, please use the issue tracker or forum below, or send email to shixinzhang#tencent.com.
Unified Quantum Programming#
TensorCircuit is unifying infrastructures and interfaces for quantum computing.
Jax/TensorFlow/PyTorch/Numpy/Cupy
CPU/GPU/TPU
QPUs from different vendors
local/cloud/HPC
numerical sim/hardware exp
ideal/noisy/approximate simulation
from/to_IR/qiskit/openqasm/json
stateless functional programming/stateful ML models
Reference Documentation#
The following documentation sections briefly introduce TensorCircuit to the users and developpers.
- Quick Start
- Advanced Usage
- Frequently Asked Questions
- How can I run TensorCircuit on GPU?
- When should I use GPU for the quantum simulation?
- When should I jit the function?
- Which ML framework backend should I use?
- What is the counterpart of
QuantumLayer
for PyTorch and Jax backend? - When do I need to customize the contractor and how?
- Is there some API less cumbersome than
expectation
for Pauli string? - Can I apply quantum operation based on previous classical measurement results in TensorCircuit?
- How to understand the difference between different measurement methods for
Circuit
? - How to understand difference between
tc.array_to_tensor
andtc.backend.convert_to_tensor
? - How to arrange the circuit gate placement in the visualization from
c.tex()
? - How to get the entanglement entropy from the circuit output?
- TensorCircuit: The Sharp Bits 🔪
- TensorCircuit: What is inside?
- Guide for Contributors
Tutorials#
The following documentation sections include integrated examples in the form of Jupyter Notebook.
- Jupyter Tutorials
- Circuit Basics
- Quantum Approximation Optimization Algorithm (QAOA)
- Optimizing QAOA by Bayesian Optimization (BO)
- Quantum Approximation Optimization Algorithm (QAOA) for Not-all-equal 3-satisfiability (NAE3SAT)
- Quantum Dropout for QAOA
- VQE on 1D TFIM
- QML on MNIST Classification
- QML in PyTorch
- Quantum Machine Learning for Classification Task
- Variational Quantum Eigensolver (VQE) on Molecules
- VQE on 1D TFIM with Different Hamiltonian Representation
- MERA
- Gradient Evaluation Efficiency Comparison
- The usage of contractor
- Operator spreading
- Optimization vs. expressibility of the circuit
- Probing Many-body Localization by Excited-state VQE
- Differentiable Quantum Architecture Search
- Barren Plateaus
- Solving QUBO Problem using QAOA
- Portfolio Optimization
- Solving the Ground State of Hamiltonian by Imaginary-time Evolution
- Classical Shadows in Pauli Basis
- Support Vector Classification with SKLearn
- Demo on TensorCircuit SDK for Tencent Quantum Cloud
- Whitepaper Tutorials
API References#
- tensorcircuit
- tensorcircuit.about
- tensorcircuit.abstractcircuit
- tensorcircuit.applications
- tensorcircuit.backends
- tensorcircuit.basecircuit
- tensorcircuit.channels
- tensorcircuit.circuit
- tensorcircuit.cloud
- tensorcircuit.compiler
- tensorcircuit.cons
- tensorcircuit.densitymatrix
- tensorcircuit.experimental
- tensorcircuit.fgs
- tensorcircuit.gates
- tensorcircuit.interfaces
- tensorcircuit.keras
- tensorcircuit.mps_base
- tensorcircuit.mpscircuit
- tensorcircuit.noisemodel
- tensorcircuit.quantum
- tensorcircuit.results
- tensorcircuit.shadows
- tensorcircuit.simplify
- tensorcircuit.templates
- tensorcircuit.torchnn
- tensorcircuit.translation
- tensorcircuit.utils
- tensorcircuit.vis