tensorcircuit-nightly 1.3.0.dev20250729__tar.gz → 1.3.0.dev20250730__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of tensorcircuit-nightly might be problematic. Click here for more details.
- {tensorcircuit_nightly-1.3.0.dev20250729 → tensorcircuit_nightly-1.3.0.dev20250730}/CHANGELOG.md +10 -0
- {tensorcircuit_nightly-1.3.0.dev20250729 → tensorcircuit_nightly-1.3.0.dev20250730}/PKG-INFO +1 -1
- {tensorcircuit_nightly-1.3.0.dev20250729 → tensorcircuit_nightly-1.3.0.dev20250730}/docs/source/advance.rst +291 -0
- {tensorcircuit_nightly-1.3.0.dev20250729 → tensorcircuit_nightly-1.3.0.dev20250730}/tensorcircuit/__init__.py +1 -1
- {tensorcircuit_nightly-1.3.0.dev20250729 → tensorcircuit_nightly-1.3.0.dev20250730}/tensorcircuit/backends/abstract_backend.py +14 -2
- {tensorcircuit_nightly-1.3.0.dev20250729 → tensorcircuit_nightly-1.3.0.dev20250730}/tensorcircuit/backends/numpy_backend.py +1 -0
- {tensorcircuit_nightly-1.3.0.dev20250729 → tensorcircuit_nightly-1.3.0.dev20250730}/tensorcircuit/backends/tensorflow_backend.py +4 -1
- tensorcircuit_nightly-1.3.0.dev20250730/tensorcircuit/timeevol.py +594 -0
- {tensorcircuit_nightly-1.3.0.dev20250729 → tensorcircuit_nightly-1.3.0.dev20250730}/tensorcircuit_nightly.egg-info/PKG-INFO +1 -1
- {tensorcircuit_nightly-1.3.0.dev20250729 → tensorcircuit_nightly-1.3.0.dev20250730}/tests/test_timeevol.py +224 -8
- tensorcircuit_nightly-1.3.0.dev20250729/tensorcircuit/timeevol.py +0 -346
- {tensorcircuit_nightly-1.3.0.dev20250729 → tensorcircuit_nightly-1.3.0.dev20250730}/HISTORY.md +0 -0
- {tensorcircuit_nightly-1.3.0.dev20250729 → tensorcircuit_nightly-1.3.0.dev20250730}/LICENSE +0 -0
- {tensorcircuit_nightly-1.3.0.dev20250729 → tensorcircuit_nightly-1.3.0.dev20250730}/MANIFEST.in +0 -0
- {tensorcircuit_nightly-1.3.0.dev20250729 → tensorcircuit_nightly-1.3.0.dev20250730}/README.md +0 -0
- {tensorcircuit_nightly-1.3.0.dev20250729 → tensorcircuit_nightly-1.3.0.dev20250730}/README_cn.md +0 -0
- {tensorcircuit_nightly-1.3.0.dev20250729 → tensorcircuit_nightly-1.3.0.dev20250730}/docs/source/cnconf.py +0 -0
- {tensorcircuit_nightly-1.3.0.dev20250729 → tensorcircuit_nightly-1.3.0.dev20250730}/docs/source/conf.py +0 -0
- {tensorcircuit_nightly-1.3.0.dev20250729 → tensorcircuit_nightly-1.3.0.dev20250730}/docs/source/contribution.rst +0 -0
- {tensorcircuit_nightly-1.3.0.dev20250729 → tensorcircuit_nightly-1.3.0.dev20250730}/docs/source/faq.rst +0 -0
- {tensorcircuit_nightly-1.3.0.dev20250729 → tensorcircuit_nightly-1.3.0.dev20250730}/docs/source/generate_rst.py +0 -0
- {tensorcircuit_nightly-1.3.0.dev20250729 → tensorcircuit_nightly-1.3.0.dev20250730}/docs/source/index.rst +0 -0
- {tensorcircuit_nightly-1.3.0.dev20250729 → tensorcircuit_nightly-1.3.0.dev20250730}/docs/source/infras.rst +0 -0
- {tensorcircuit_nightly-1.3.0.dev20250729 → tensorcircuit_nightly-1.3.0.dev20250730}/docs/source/modules.rst +0 -0
- {tensorcircuit_nightly-1.3.0.dev20250729 → tensorcircuit_nightly-1.3.0.dev20250730}/docs/source/quickstart.rst +0 -0
- {tensorcircuit_nightly-1.3.0.dev20250729 → tensorcircuit_nightly-1.3.0.dev20250730}/docs/source/sharpbits.rst +0 -0
- {tensorcircuit_nightly-1.3.0.dev20250729 → tensorcircuit_nightly-1.3.0.dev20250730}/docs/source/textbooktoc.rst +0 -0
- {tensorcircuit_nightly-1.3.0.dev20250729 → tensorcircuit_nightly-1.3.0.dev20250730}/docs/source/tutorial.rst +0 -0
- {tensorcircuit_nightly-1.3.0.dev20250729 → tensorcircuit_nightly-1.3.0.dev20250730}/docs/source/tutorial_cn.rst +0 -0
- {tensorcircuit_nightly-1.3.0.dev20250729 → tensorcircuit_nightly-1.3.0.dev20250730}/docs/source/whitepapertoc.rst +0 -0
- {tensorcircuit_nightly-1.3.0.dev20250729 → tensorcircuit_nightly-1.3.0.dev20250730}/docs/source/whitepapertoc_cn.rst +0 -0
- {tensorcircuit_nightly-1.3.0.dev20250729 → tensorcircuit_nightly-1.3.0.dev20250730}/setup.cfg +0 -0
- {tensorcircuit_nightly-1.3.0.dev20250729 → tensorcircuit_nightly-1.3.0.dev20250730}/setup.py +0 -0
- {tensorcircuit_nightly-1.3.0.dev20250729 → tensorcircuit_nightly-1.3.0.dev20250730}/tensorcircuit/about.py +0 -0
- {tensorcircuit_nightly-1.3.0.dev20250729 → tensorcircuit_nightly-1.3.0.dev20250730}/tensorcircuit/abstractcircuit.py +0 -0
- {tensorcircuit_nightly-1.3.0.dev20250729 → tensorcircuit_nightly-1.3.0.dev20250730}/tensorcircuit/applications/__init__.py +0 -0
- {tensorcircuit_nightly-1.3.0.dev20250729 → tensorcircuit_nightly-1.3.0.dev20250730}/tensorcircuit/applications/ai/__init__.py +0 -0
- {tensorcircuit_nightly-1.3.0.dev20250729 → tensorcircuit_nightly-1.3.0.dev20250730}/tensorcircuit/applications/ai/ensemble.py +0 -0
- {tensorcircuit_nightly-1.3.0.dev20250729 → tensorcircuit_nightly-1.3.0.dev20250730}/tensorcircuit/applications/dqas.py +0 -0
- {tensorcircuit_nightly-1.3.0.dev20250729 → tensorcircuit_nightly-1.3.0.dev20250730}/tensorcircuit/applications/finance/__init__.py +0 -0
- {tensorcircuit_nightly-1.3.0.dev20250729 → tensorcircuit_nightly-1.3.0.dev20250730}/tensorcircuit/applications/finance/portfolio.py +0 -0
- {tensorcircuit_nightly-1.3.0.dev20250729 → tensorcircuit_nightly-1.3.0.dev20250730}/tensorcircuit/applications/graphdata.py +0 -0
- {tensorcircuit_nightly-1.3.0.dev20250729 → tensorcircuit_nightly-1.3.0.dev20250730}/tensorcircuit/applications/layers.py +0 -0
- {tensorcircuit_nightly-1.3.0.dev20250729 → tensorcircuit_nightly-1.3.0.dev20250730}/tensorcircuit/applications/optimization.py +0 -0
- {tensorcircuit_nightly-1.3.0.dev20250729 → tensorcircuit_nightly-1.3.0.dev20250730}/tensorcircuit/applications/physics/__init__.py +0 -0
- {tensorcircuit_nightly-1.3.0.dev20250729 → tensorcircuit_nightly-1.3.0.dev20250730}/tensorcircuit/applications/physics/baseline.py +0 -0
- {tensorcircuit_nightly-1.3.0.dev20250729 → tensorcircuit_nightly-1.3.0.dev20250730}/tensorcircuit/applications/physics/fss.py +0 -0
- {tensorcircuit_nightly-1.3.0.dev20250729 → tensorcircuit_nightly-1.3.0.dev20250730}/tensorcircuit/applications/utils.py +0 -0
- {tensorcircuit_nightly-1.3.0.dev20250729 → tensorcircuit_nightly-1.3.0.dev20250730}/tensorcircuit/applications/vags.py +0 -0
- {tensorcircuit_nightly-1.3.0.dev20250729 → tensorcircuit_nightly-1.3.0.dev20250730}/tensorcircuit/applications/van.py +0 -0
- {tensorcircuit_nightly-1.3.0.dev20250729 → tensorcircuit_nightly-1.3.0.dev20250730}/tensorcircuit/applications/vqes.py +0 -0
- {tensorcircuit_nightly-1.3.0.dev20250729 → tensorcircuit_nightly-1.3.0.dev20250730}/tensorcircuit/asciiart.py +0 -0
- {tensorcircuit_nightly-1.3.0.dev20250729 → tensorcircuit_nightly-1.3.0.dev20250730}/tensorcircuit/backends/__init__.py +0 -0
- {tensorcircuit_nightly-1.3.0.dev20250729 → tensorcircuit_nightly-1.3.0.dev20250730}/tensorcircuit/backends/backend_factory.py +0 -0
- {tensorcircuit_nightly-1.3.0.dev20250729 → tensorcircuit_nightly-1.3.0.dev20250730}/tensorcircuit/backends/cupy_backend.py +0 -0
- {tensorcircuit_nightly-1.3.0.dev20250729 → tensorcircuit_nightly-1.3.0.dev20250730}/tensorcircuit/backends/jax_backend.py +0 -0
- {tensorcircuit_nightly-1.3.0.dev20250729 → tensorcircuit_nightly-1.3.0.dev20250730}/tensorcircuit/backends/jax_ops.py +0 -0
- {tensorcircuit_nightly-1.3.0.dev20250729 → tensorcircuit_nightly-1.3.0.dev20250730}/tensorcircuit/backends/pytorch_backend.py +0 -0
- {tensorcircuit_nightly-1.3.0.dev20250729 → tensorcircuit_nightly-1.3.0.dev20250730}/tensorcircuit/backends/pytorch_ops.py +0 -0
- {tensorcircuit_nightly-1.3.0.dev20250729 → tensorcircuit_nightly-1.3.0.dev20250730}/tensorcircuit/backends/tf_ops.py +0 -0
- {tensorcircuit_nightly-1.3.0.dev20250729 → tensorcircuit_nightly-1.3.0.dev20250730}/tensorcircuit/basecircuit.py +0 -0
- {tensorcircuit_nightly-1.3.0.dev20250729 → tensorcircuit_nightly-1.3.0.dev20250730}/tensorcircuit/channels.py +0 -0
- {tensorcircuit_nightly-1.3.0.dev20250729 → tensorcircuit_nightly-1.3.0.dev20250730}/tensorcircuit/circuit.py +0 -0
- {tensorcircuit_nightly-1.3.0.dev20250729 → tensorcircuit_nightly-1.3.0.dev20250730}/tensorcircuit/cloud/__init__.py +0 -0
- {tensorcircuit_nightly-1.3.0.dev20250729 → tensorcircuit_nightly-1.3.0.dev20250730}/tensorcircuit/cloud/abstraction.py +0 -0
- {tensorcircuit_nightly-1.3.0.dev20250729 → tensorcircuit_nightly-1.3.0.dev20250730}/tensorcircuit/cloud/apis.py +0 -0
- {tensorcircuit_nightly-1.3.0.dev20250729 → tensorcircuit_nightly-1.3.0.dev20250730}/tensorcircuit/cloud/config.py +0 -0
- {tensorcircuit_nightly-1.3.0.dev20250729 → tensorcircuit_nightly-1.3.0.dev20250730}/tensorcircuit/cloud/local.py +0 -0
- {tensorcircuit_nightly-1.3.0.dev20250729 → tensorcircuit_nightly-1.3.0.dev20250730}/tensorcircuit/cloud/quafu_provider.py +0 -0
- {tensorcircuit_nightly-1.3.0.dev20250729 → tensorcircuit_nightly-1.3.0.dev20250730}/tensorcircuit/cloud/tencent.py +0 -0
- {tensorcircuit_nightly-1.3.0.dev20250729 → tensorcircuit_nightly-1.3.0.dev20250730}/tensorcircuit/cloud/utils.py +0 -0
- {tensorcircuit_nightly-1.3.0.dev20250729 → tensorcircuit_nightly-1.3.0.dev20250730}/tensorcircuit/cloud/wrapper.py +0 -0
- {tensorcircuit_nightly-1.3.0.dev20250729 → tensorcircuit_nightly-1.3.0.dev20250730}/tensorcircuit/compiler/__init__.py +0 -0
- {tensorcircuit_nightly-1.3.0.dev20250729 → tensorcircuit_nightly-1.3.0.dev20250730}/tensorcircuit/compiler/composed_compiler.py +0 -0
- {tensorcircuit_nightly-1.3.0.dev20250729 → tensorcircuit_nightly-1.3.0.dev20250730}/tensorcircuit/compiler/qiskit_compiler.py +0 -0
- {tensorcircuit_nightly-1.3.0.dev20250729 → tensorcircuit_nightly-1.3.0.dev20250730}/tensorcircuit/compiler/simple_compiler.py +0 -0
- {tensorcircuit_nightly-1.3.0.dev20250729 → tensorcircuit_nightly-1.3.0.dev20250730}/tensorcircuit/cons.py +0 -0
- {tensorcircuit_nightly-1.3.0.dev20250729 → tensorcircuit_nightly-1.3.0.dev20250730}/tensorcircuit/densitymatrix.py +0 -0
- {tensorcircuit_nightly-1.3.0.dev20250729 → tensorcircuit_nightly-1.3.0.dev20250730}/tensorcircuit/experimental.py +0 -0
- {tensorcircuit_nightly-1.3.0.dev20250729 → tensorcircuit_nightly-1.3.0.dev20250730}/tensorcircuit/fgs.py +0 -0
- {tensorcircuit_nightly-1.3.0.dev20250729 → tensorcircuit_nightly-1.3.0.dev20250730}/tensorcircuit/gates.py +0 -0
- {tensorcircuit_nightly-1.3.0.dev20250729 → tensorcircuit_nightly-1.3.0.dev20250730}/tensorcircuit/interfaces/__init__.py +0 -0
- {tensorcircuit_nightly-1.3.0.dev20250729 → tensorcircuit_nightly-1.3.0.dev20250730}/tensorcircuit/interfaces/jax.py +0 -0
- {tensorcircuit_nightly-1.3.0.dev20250729 → tensorcircuit_nightly-1.3.0.dev20250730}/tensorcircuit/interfaces/numpy.py +0 -0
- {tensorcircuit_nightly-1.3.0.dev20250729 → tensorcircuit_nightly-1.3.0.dev20250730}/tensorcircuit/interfaces/scipy.py +0 -0
- {tensorcircuit_nightly-1.3.0.dev20250729 → tensorcircuit_nightly-1.3.0.dev20250730}/tensorcircuit/interfaces/tensorflow.py +0 -0
- {tensorcircuit_nightly-1.3.0.dev20250729 → tensorcircuit_nightly-1.3.0.dev20250730}/tensorcircuit/interfaces/tensortrans.py +0 -0
- {tensorcircuit_nightly-1.3.0.dev20250729 → tensorcircuit_nightly-1.3.0.dev20250730}/tensorcircuit/interfaces/torch.py +0 -0
- {tensorcircuit_nightly-1.3.0.dev20250729 → tensorcircuit_nightly-1.3.0.dev20250730}/tensorcircuit/keras.py +0 -0
- {tensorcircuit_nightly-1.3.0.dev20250729 → tensorcircuit_nightly-1.3.0.dev20250730}/tensorcircuit/mps_base.py +0 -0
- {tensorcircuit_nightly-1.3.0.dev20250729 → tensorcircuit_nightly-1.3.0.dev20250730}/tensorcircuit/mpscircuit.py +0 -0
- {tensorcircuit_nightly-1.3.0.dev20250729 → tensorcircuit_nightly-1.3.0.dev20250730}/tensorcircuit/noisemodel.py +0 -0
- {tensorcircuit_nightly-1.3.0.dev20250729 → tensorcircuit_nightly-1.3.0.dev20250730}/tensorcircuit/quantum.py +0 -0
- {tensorcircuit_nightly-1.3.0.dev20250729 → tensorcircuit_nightly-1.3.0.dev20250730}/tensorcircuit/results/__init__.py +0 -0
- {tensorcircuit_nightly-1.3.0.dev20250729 → tensorcircuit_nightly-1.3.0.dev20250730}/tensorcircuit/results/counts.py +0 -0
- {tensorcircuit_nightly-1.3.0.dev20250729 → tensorcircuit_nightly-1.3.0.dev20250730}/tensorcircuit/results/qem/__init__.py +0 -0
- {tensorcircuit_nightly-1.3.0.dev20250729 → tensorcircuit_nightly-1.3.0.dev20250730}/tensorcircuit/results/qem/benchmark_circuits.py +0 -0
- {tensorcircuit_nightly-1.3.0.dev20250729 → tensorcircuit_nightly-1.3.0.dev20250730}/tensorcircuit/results/qem/qem_methods.py +0 -0
- {tensorcircuit_nightly-1.3.0.dev20250729 → tensorcircuit_nightly-1.3.0.dev20250730}/tensorcircuit/results/readout_mitigation.py +0 -0
- {tensorcircuit_nightly-1.3.0.dev20250729 → tensorcircuit_nightly-1.3.0.dev20250730}/tensorcircuit/shadows.py +0 -0
- {tensorcircuit_nightly-1.3.0.dev20250729 → tensorcircuit_nightly-1.3.0.dev20250730}/tensorcircuit/simplify.py +0 -0
- {tensorcircuit_nightly-1.3.0.dev20250729 → tensorcircuit_nightly-1.3.0.dev20250730}/tensorcircuit/stabilizercircuit.py +0 -0
- {tensorcircuit_nightly-1.3.0.dev20250729 → tensorcircuit_nightly-1.3.0.dev20250730}/tensorcircuit/templates/__init__.py +0 -0
- {tensorcircuit_nightly-1.3.0.dev20250729 → tensorcircuit_nightly-1.3.0.dev20250730}/tensorcircuit/templates/ansatz.py +0 -0
- {tensorcircuit_nightly-1.3.0.dev20250729 → tensorcircuit_nightly-1.3.0.dev20250730}/tensorcircuit/templates/blocks.py +0 -0
- {tensorcircuit_nightly-1.3.0.dev20250729 → tensorcircuit_nightly-1.3.0.dev20250730}/tensorcircuit/templates/chems.py +0 -0
- {tensorcircuit_nightly-1.3.0.dev20250729 → tensorcircuit_nightly-1.3.0.dev20250730}/tensorcircuit/templates/conversions.py +0 -0
- {tensorcircuit_nightly-1.3.0.dev20250729 → tensorcircuit_nightly-1.3.0.dev20250730}/tensorcircuit/templates/dataset.py +0 -0
- {tensorcircuit_nightly-1.3.0.dev20250729 → tensorcircuit_nightly-1.3.0.dev20250730}/tensorcircuit/templates/graphs.py +0 -0
- {tensorcircuit_nightly-1.3.0.dev20250729 → tensorcircuit_nightly-1.3.0.dev20250730}/tensorcircuit/templates/hamiltonians.py +0 -0
- {tensorcircuit_nightly-1.3.0.dev20250729 → tensorcircuit_nightly-1.3.0.dev20250730}/tensorcircuit/templates/lattice.py +0 -0
- {tensorcircuit_nightly-1.3.0.dev20250729 → tensorcircuit_nightly-1.3.0.dev20250730}/tensorcircuit/templates/measurements.py +0 -0
- {tensorcircuit_nightly-1.3.0.dev20250729 → tensorcircuit_nightly-1.3.0.dev20250730}/tensorcircuit/torchnn.py +0 -0
- {tensorcircuit_nightly-1.3.0.dev20250729 → tensorcircuit_nightly-1.3.0.dev20250730}/tensorcircuit/translation.py +0 -0
- {tensorcircuit_nightly-1.3.0.dev20250729 → tensorcircuit_nightly-1.3.0.dev20250730}/tensorcircuit/utils.py +0 -0
- {tensorcircuit_nightly-1.3.0.dev20250729 → tensorcircuit_nightly-1.3.0.dev20250730}/tensorcircuit/vis.py +0 -0
- {tensorcircuit_nightly-1.3.0.dev20250729 → tensorcircuit_nightly-1.3.0.dev20250730}/tensorcircuit_nightly.egg-info/SOURCES.txt +0 -0
- {tensorcircuit_nightly-1.3.0.dev20250729 → tensorcircuit_nightly-1.3.0.dev20250730}/tensorcircuit_nightly.egg-info/dependency_links.txt +0 -0
- {tensorcircuit_nightly-1.3.0.dev20250729 → tensorcircuit_nightly-1.3.0.dev20250730}/tensorcircuit_nightly.egg-info/requires.txt +0 -0
- {tensorcircuit_nightly-1.3.0.dev20250729 → tensorcircuit_nightly-1.3.0.dev20250730}/tensorcircuit_nightly.egg-info/top_level.txt +0 -0
- {tensorcircuit_nightly-1.3.0.dev20250729 → tensorcircuit_nightly-1.3.0.dev20250730}/tests/__init__.py +0 -0
- {tensorcircuit_nightly-1.3.0.dev20250729 → tensorcircuit_nightly-1.3.0.dev20250730}/tests/conftest.py +0 -0
- {tensorcircuit_nightly-1.3.0.dev20250729 → tensorcircuit_nightly-1.3.0.dev20250730}/tests/test_backends.py +0 -0
- {tensorcircuit_nightly-1.3.0.dev20250729 → tensorcircuit_nightly-1.3.0.dev20250730}/tests/test_calibrating.py +0 -0
- {tensorcircuit_nightly-1.3.0.dev20250729 → tensorcircuit_nightly-1.3.0.dev20250730}/tests/test_channels.py +0 -0
- {tensorcircuit_nightly-1.3.0.dev20250729 → tensorcircuit_nightly-1.3.0.dev20250730}/tests/test_circuit.py +0 -0
- {tensorcircuit_nightly-1.3.0.dev20250729 → tensorcircuit_nightly-1.3.0.dev20250730}/tests/test_cloud.py +0 -0
- {tensorcircuit_nightly-1.3.0.dev20250729 → tensorcircuit_nightly-1.3.0.dev20250730}/tests/test_compiler.py +0 -0
- {tensorcircuit_nightly-1.3.0.dev20250729 → tensorcircuit_nightly-1.3.0.dev20250730}/tests/test_dmcircuit.py +0 -0
- {tensorcircuit_nightly-1.3.0.dev20250729 → tensorcircuit_nightly-1.3.0.dev20250730}/tests/test_ensemble.py +0 -0
- {tensorcircuit_nightly-1.3.0.dev20250729 → tensorcircuit_nightly-1.3.0.dev20250730}/tests/test_fgs.py +0 -0
- {tensorcircuit_nightly-1.3.0.dev20250729 → tensorcircuit_nightly-1.3.0.dev20250730}/tests/test_gates.py +0 -0
- {tensorcircuit_nightly-1.3.0.dev20250729 → tensorcircuit_nightly-1.3.0.dev20250730}/tests/test_hamiltonians.py +0 -0
- {tensorcircuit_nightly-1.3.0.dev20250729 → tensorcircuit_nightly-1.3.0.dev20250730}/tests/test_interfaces.py +0 -0
- {tensorcircuit_nightly-1.3.0.dev20250729 → tensorcircuit_nightly-1.3.0.dev20250730}/tests/test_keras.py +0 -0
- {tensorcircuit_nightly-1.3.0.dev20250729 → tensorcircuit_nightly-1.3.0.dev20250730}/tests/test_lattice.py +0 -0
- {tensorcircuit_nightly-1.3.0.dev20250729 → tensorcircuit_nightly-1.3.0.dev20250730}/tests/test_miscs.py +0 -0
- {tensorcircuit_nightly-1.3.0.dev20250729 → tensorcircuit_nightly-1.3.0.dev20250730}/tests/test_mpscircuit.py +0 -0
- {tensorcircuit_nightly-1.3.0.dev20250729 → tensorcircuit_nightly-1.3.0.dev20250730}/tests/test_noisemodel.py +0 -0
- {tensorcircuit_nightly-1.3.0.dev20250729 → tensorcircuit_nightly-1.3.0.dev20250730}/tests/test_qaoa.py +0 -0
- {tensorcircuit_nightly-1.3.0.dev20250729 → tensorcircuit_nightly-1.3.0.dev20250730}/tests/test_qem.py +0 -0
- {tensorcircuit_nightly-1.3.0.dev20250729 → tensorcircuit_nightly-1.3.0.dev20250730}/tests/test_quantum.py +0 -0
- {tensorcircuit_nightly-1.3.0.dev20250729 → tensorcircuit_nightly-1.3.0.dev20250730}/tests/test_quantum_attr.py +0 -0
- {tensorcircuit_nightly-1.3.0.dev20250729 → tensorcircuit_nightly-1.3.0.dev20250730}/tests/test_results.py +0 -0
- {tensorcircuit_nightly-1.3.0.dev20250729 → tensorcircuit_nightly-1.3.0.dev20250730}/tests/test_shadows.py +0 -0
- {tensorcircuit_nightly-1.3.0.dev20250729 → tensorcircuit_nightly-1.3.0.dev20250730}/tests/test_simplify.py +0 -0
- {tensorcircuit_nightly-1.3.0.dev20250729 → tensorcircuit_nightly-1.3.0.dev20250730}/tests/test_stabilizer.py +0 -0
- {tensorcircuit_nightly-1.3.0.dev20250729 → tensorcircuit_nightly-1.3.0.dev20250730}/tests/test_templates.py +0 -0
- {tensorcircuit_nightly-1.3.0.dev20250729 → tensorcircuit_nightly-1.3.0.dev20250730}/tests/test_torchnn.py +0 -0
- {tensorcircuit_nightly-1.3.0.dev20250729 → tensorcircuit_nightly-1.3.0.dev20250730}/tests/test_van.py +0 -0
{tensorcircuit_nightly-1.3.0.dev20250729 → tensorcircuit_nightly-1.3.0.dev20250730}/CHANGELOG.md
RENAMED
|
@@ -6,6 +6,16 @@
|
|
|
6
6
|
|
|
7
7
|
- Add new module `tc.timeevol` for different types of time evolution solvers.
|
|
8
8
|
|
|
9
|
+
### Fixed
|
|
10
|
+
|
|
11
|
+
- Fixed `one_hot` in numpy backend.
|
|
12
|
+
|
|
13
|
+
- Fixed `scan` in tensorflow backend and numpy backend.
|
|
14
|
+
|
|
15
|
+
### Changed
|
|
16
|
+
|
|
17
|
+
- The order of arguments of `tc.timeevol.ed_evol` are changed for consistent interface with other evolution methods.
|
|
18
|
+
|
|
9
19
|
## v1.3.0
|
|
10
20
|
|
|
11
21
|
### Added
|
|
@@ -149,6 +149,297 @@ We support two modes of analog simulation, where :py:meth:`tensorcircuit.experim
|
|
|
149
149
|
v, gs = hybrid_evol(b)
|
|
150
150
|
|
|
151
151
|
|
|
152
|
+
Time Evolution
|
|
153
|
+
------------------
|
|
154
|
+
|
|
155
|
+
TensorCircuit-NG provides several methods for simulating quantum time evolution, including exact diagonalization, Krylov subspace methods, and ODE-based approaches.
|
|
156
|
+
These methods are essential for studying quantum dynamics, particularly in many-body systems, and all support automatic differentiation (AD) and JIT compilation for enhanced performance.
|
|
157
|
+
|
|
158
|
+
**Exact Diagonalization:**
|
|
159
|
+
|
|
160
|
+
For small systems where full diagonalization is feasible, the :py:meth:`tensorcircuit.timeevol.ed_evol` method provides exact time evolution by directly computing matrix exponentials
|
|
161
|
+
(alias :py:meth:`tensorcircuit.timeevol.hamiltonian_evol`):
|
|
162
|
+
|
|
163
|
+
.. code-block:: python
|
|
164
|
+
|
|
165
|
+
import tensorcircuit as tc
|
|
166
|
+
|
|
167
|
+
n = 4
|
|
168
|
+
g = tc.templates.graphs.Line1D(n, pbc=False)
|
|
169
|
+
h = tc.quantum.heisenberg_hamiltonian(g, hzz=1.0, hxx=1.0, hyy=1.0, sparse=False)
|
|
170
|
+
|
|
171
|
+
# Initial Neel state: |↑↓↑↓⟩
|
|
172
|
+
c = tc.Circuit(n)
|
|
173
|
+
c.x([1, 3]) # Apply X gates to qubits 1 and 3
|
|
174
|
+
psi0 = c.state()
|
|
175
|
+
|
|
176
|
+
# Imaginary time evolution times
|
|
177
|
+
times = tc.backend.convert_to_tensor([0.0, 0.5, 1.0, 2.0])
|
|
178
|
+
|
|
179
|
+
# Evolve and get states
|
|
180
|
+
states = tc.timeevol.ed_evol(h, psi0, times)
|
|
181
|
+
print(states)
|
|
182
|
+
|
|
183
|
+
|
|
184
|
+
def evolve_and_measure(params):
|
|
185
|
+
# Parametrized Hamiltonian
|
|
186
|
+
h_param = tc.quantum.heisenberg_hamiltonian(
|
|
187
|
+
g, hzz=params[0], hxx=params[1], hyy=params[2], sparse=False
|
|
188
|
+
)
|
|
189
|
+
states = tc.timeevol.ed_evol(h_param, psi0, times)
|
|
190
|
+
# Measure observable on final state
|
|
191
|
+
circuit = tc.Circuit(n, inputs=states[-1])
|
|
192
|
+
return tc.backend.real(circuit.expectation_ps(z=[0]))
|
|
193
|
+
|
|
194
|
+
evolve_and_measure(tc.backend.ones([3]))
|
|
195
|
+
|
|
196
|
+
This method is particularly efficient for time-independent Hamiltonians as it uses eigendecomposition to compute the evolution.
|
|
197
|
+
It provides exact results but is limited to small systems (typically <16 qubits) due to the exponential growth of the Hilbert space.
|
|
198
|
+
|
|
199
|
+
.. note::
|
|
200
|
+
|
|
201
|
+
For real time evolution, the time should be chosen as ``times = 1.j * tc.backend.convert_to_tensor([0.0, 0.5, 1.0, 2.0])``
|
|
202
|
+
|
|
203
|
+
|
|
204
|
+
**Krylov Subspace Methods:**
|
|
205
|
+
|
|
206
|
+
For larger systems where exact diagonalization becomes intractable, the Krylov subspace method provides an efficient approximation.
|
|
207
|
+
The :py:meth:`tensorcircuit.timeevol.krylov_evol` function implements this approach:
|
|
208
|
+
|
|
209
|
+
.. code-block:: python
|
|
210
|
+
|
|
211
|
+
import tensorcircuit as tc
|
|
212
|
+
|
|
213
|
+
# Create a Heisenberg Hamiltonian for a 1D chain
|
|
214
|
+
n = 10
|
|
215
|
+
g = tc.templates.graphs.Line1D(n, pbc=False)
|
|
216
|
+
h = tc.quantum.heisenberg_hamiltonian(g, hzz=1.0, hxx=1.0, hyy=1.0, sparse=True)
|
|
217
|
+
|
|
218
|
+
# Initial domain wall state: |↑↑↑↑↑↓↓↓↓↓⟩
|
|
219
|
+
c = tc.Circuit(n)
|
|
220
|
+
c.x(range(n//2, n))
|
|
221
|
+
psi0 = c.state()
|
|
222
|
+
|
|
223
|
+
# Real time evolution points
|
|
224
|
+
times = tc.backend.convert_to_tensor([0.0, 0.5, 1.0, 2.0])
|
|
225
|
+
|
|
226
|
+
# Perform Krylov evolution with a 30-dimensional subspace
|
|
227
|
+
states = tc.timeevol.krylov_evol(h, psi0, times, subspace_dimension=30)
|
|
228
|
+
|
|
229
|
+
# Krylov method also supports AD and JIT
|
|
230
|
+
|
|
231
|
+
def krylov_evolution(params):
|
|
232
|
+
# Parametrized initial state
|
|
233
|
+
c = tc.Circuit(n)
|
|
234
|
+
for i in range(n):
|
|
235
|
+
c.rx(i, theta=params[i])
|
|
236
|
+
psi0_param = c.state()
|
|
237
|
+
states = tc.timeevol.krylov_evol(h, psi0_param, [1.0], subspace_dimension=20)
|
|
238
|
+
# Measure total magnetization
|
|
239
|
+
circuit = tc.Circuit(n, inputs=states[0])
|
|
240
|
+
mz = sum(circuit.expectation_ps(z=[i]) for i in range(n))
|
|
241
|
+
return tc.backend.real(mz)
|
|
242
|
+
|
|
243
|
+
The Krylov method constructs a small subspace that captures the essential dynamics, making it possible to simulate larger systems efficiently.
|
|
244
|
+
It supports both standard and scan-based jit-friendly implementations:
|
|
245
|
+
|
|
246
|
+
.. code-block:: python
|
|
247
|
+
|
|
248
|
+
# Standard implementation (default)
|
|
249
|
+
states = tc.timeevol.krylov_evol(h, psi0, times, subspace_dimension=20, scan_impl=False)
|
|
250
|
+
|
|
251
|
+
# Scan-based implementation for better JIT performance
|
|
252
|
+
states = tc.timeevol.krylov_evol(h, psi0, times, subspace_dimension=20, scan_impl=True)
|
|
253
|
+
|
|
254
|
+
**ODE-Based Evolution:**
|
|
255
|
+
|
|
256
|
+
For time-dependent Hamiltonians or when fine control over the evolution process is needed, TensorCircuit provides ODE-based evolution methods.
|
|
257
|
+
These methods solve the time-dependent Schrödinger equation directly by integrating the equation :math:`i\frac{d}{dt}|\psi(t)\rangle = H(t)|\psi(t)\rangle`.
|
|
258
|
+
|
|
259
|
+
TensorCircuit provides two ODE-based evolution methods depending on whether the Hamiltonian acts on the entire system or just a local subsystem:
|
|
260
|
+
|
|
261
|
+
1. **Global Evolution** (:py:meth:`tensorcircuit.timeevol.ode_evol_global`): For time-dependent Hamiltonians acting on the entire system. The Hamiltonian should be provided in sparse matrix format for efficiency.
|
|
262
|
+
|
|
263
|
+
.. code-block:: python
|
|
264
|
+
|
|
265
|
+
import tensorcircuit as tc
|
|
266
|
+
from jax import jit, value_and_grad
|
|
267
|
+
|
|
268
|
+
# Set JAX backend for ODE support
|
|
269
|
+
K = tc.set_backend("jax")
|
|
270
|
+
|
|
271
|
+
# H(t) = -∑ᵢ Jᵢ(t) ZᵢZᵢ₊₁ - ∑ᵢ hᵢ(t) Xᵢ
|
|
272
|
+
|
|
273
|
+
# Time-dependent coefficients
|
|
274
|
+
def time_dep_J(t):
|
|
275
|
+
return 1.0 + 0.5 * tc.backend.sin(2.0 * t)
|
|
276
|
+
|
|
277
|
+
def time_dep_h(t):
|
|
278
|
+
return 0.5 * tc.backend.cos(1.5 * t)
|
|
279
|
+
|
|
280
|
+
zz_ham = tc.quantum.PauliStringSum2COO(
|
|
281
|
+
[[3, 3, 0, 0], [0, 3, 3, 0], [0, 0, 3, 3]], [1, 1, 1]
|
|
282
|
+
)
|
|
283
|
+
x_ham = tc.quantum.PauliStringSum2COO(
|
|
284
|
+
[[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]], [1, 1, 1, 1]
|
|
285
|
+
)
|
|
286
|
+
|
|
287
|
+
# Hamiltonian construction function
|
|
288
|
+
def hamiltonian_func(t):
|
|
289
|
+
# Create time-dependent ZZ terms
|
|
290
|
+
zz_coeff = time_dep_J(t)
|
|
291
|
+
|
|
292
|
+
# Create time-dependent X terms
|
|
293
|
+
x_coeff = time_dep_h(t)
|
|
294
|
+
|
|
295
|
+
return zz_coeff * zz_ham + x_coeff * x_ham
|
|
296
|
+
|
|
297
|
+
# Initial state: |↑↓↑↓⟩
|
|
298
|
+
c = tc.Circuit(4)
|
|
299
|
+
c.x([1, 3])
|
|
300
|
+
psi0 = c.state()
|
|
301
|
+
|
|
302
|
+
# Time points for evolution
|
|
303
|
+
times = tc.backend.arange(0, 5, 0.5)
|
|
304
|
+
|
|
305
|
+
# Perform global ODE evolution
|
|
306
|
+
states = tc.timeevol.ode_evol_global(hamiltonian_func, psi0, times)
|
|
307
|
+
assert tc.backend.shape_tuple(states) == (10, 16)
|
|
308
|
+
|
|
309
|
+
zz_ham = tc.quantum.PauliStringSum2COO([[3, 3, 0, 0], [0, 3, 3, 0]], [1, 1])
|
|
310
|
+
x_ham = tc.quantum.PauliStringSum2COO([[1, 0, 0, 0], [0, 1, 0, 0]], [1, 1])
|
|
311
|
+
|
|
312
|
+
# Example with parameterized Hamiltonian and optimization
|
|
313
|
+
def parametrized_hamiltonian(t, params):
|
|
314
|
+
# params = [J0, J1, h0, h1] - parameters to optimize
|
|
315
|
+
J_t = params[0] + params[1] * tc.backend.sin(2.0 * t)
|
|
316
|
+
h_t = params[2] + params[3] * tc.backend.cos(1.5 * t)
|
|
317
|
+
|
|
318
|
+
return J_t * zz_ham + h_t * x_ham
|
|
319
|
+
|
|
320
|
+
# Observable function: measure ZZ correlation
|
|
321
|
+
def zz_correlation(state):
|
|
322
|
+
n = int(np.log2(state.shape[0]))
|
|
323
|
+
circuit = tc.Circuit(n, inputs=state)
|
|
324
|
+
return circuit.expectation_ps(z=[0, 1])
|
|
325
|
+
|
|
326
|
+
@tc.backend.jit
|
|
327
|
+
@tc.backend.value_and_grad
|
|
328
|
+
def objective_function(params):
|
|
329
|
+
states = tc.timeevol.ode_evol_global(
|
|
330
|
+
parametrized_hamiltonian,
|
|
331
|
+
psi0,
|
|
332
|
+
tc.backend.convert_to_tensor([0, 1.0]),
|
|
333
|
+
None,
|
|
334
|
+
params,
|
|
335
|
+
)
|
|
336
|
+
# Measure ZZ correlation at final time
|
|
337
|
+
final_state = states[-1]
|
|
338
|
+
return tc.backend.real(zz_correlation(final_state))
|
|
339
|
+
|
|
340
|
+
print(objective_function(tc.backend.ones([4])))
|
|
341
|
+
|
|
342
|
+
|
|
343
|
+
|
|
344
|
+
2. **Local Evolution** (:py:meth:`tensorcircuit.timeevol.ode_evol_local`): For time-dependent Hamiltonians acting on a subsystem of qubits. The Hamiltonian should be provided in dense matrix format.
|
|
345
|
+
|
|
346
|
+
.. code-block:: python
|
|
347
|
+
|
|
348
|
+
import tensorcircuit as tc
|
|
349
|
+
import jax.numpy as jnp
|
|
350
|
+
from jax import jit
|
|
351
|
+
|
|
352
|
+
# Set JAX backend for ODE support
|
|
353
|
+
tc.set_backend("jax")
|
|
354
|
+
K = tc.backend
|
|
355
|
+
|
|
356
|
+
# Time-dependent local Hamiltonian on qubits 1 and 2
|
|
357
|
+
# H(t) = Ω(t) * (cos(φ(t)) * X + sin(φ(t)) * Y)
|
|
358
|
+
def local_hamiltonian(t, Omega, phi):
|
|
359
|
+
# Rabi oscillation Hamiltonian
|
|
360
|
+
angle = phi * t
|
|
361
|
+
coeff = Omega * jnp.cos(2.0 * t) # Amplitude modulation
|
|
362
|
+
|
|
363
|
+
# Single-qubit Rabi Hamiltonian (2x2 matrix)
|
|
364
|
+
hx = coeff * jnp.cos(angle) * tc.gates.x().tensor
|
|
365
|
+
hy = coeff * jnp.sin(angle) * tc.gates.y().tensor
|
|
366
|
+
return hx + hy
|
|
367
|
+
|
|
368
|
+
# Initial state: GHZ state |0000⟩ + |1111⟩
|
|
369
|
+
c = tc.Circuit(4)
|
|
370
|
+
c.h(0)
|
|
371
|
+
for i in range(3):
|
|
372
|
+
c.cnot(i, i+1)
|
|
373
|
+
psi0 = c.state()
|
|
374
|
+
|
|
375
|
+
times = tc.backend.arange(0.0, 3.0, 0.1)
|
|
376
|
+
|
|
377
|
+
# Evolve with local Hamiltonian acting on qubit 1
|
|
378
|
+
states = tc.timeevol.ode_evol_local(
|
|
379
|
+
local_hamiltonian,
|
|
380
|
+
psi0,
|
|
381
|
+
times,
|
|
382
|
+
[1], # Apply to qubit 1
|
|
383
|
+
None,
|
|
384
|
+
1.0,
|
|
385
|
+
2.0 # Omega=1.0, phi=2.0
|
|
386
|
+
)
|
|
387
|
+
|
|
388
|
+
|
|
389
|
+
Both ODE-based methods support automatic differentiation and JIT compilation when using the JAX backend, making them suitable for optimization tasks in quantum control and variational quantum algorithms.
|
|
390
|
+
The methods integrate the time-dependent Schrödinger equation using JAX's ODE solvers, providing flexible and efficient simulation of quantum dynamics with time-dependent Hamiltonians.
|
|
391
|
+
|
|
392
|
+
.. note::
|
|
393
|
+
|
|
394
|
+
1. ODE-based methods currently only support the JAX backend due to the dependency on JAX's ODE solvers.
|
|
395
|
+
2. Global evolution requires sparse Hamiltonian matrices for efficiency with large systems.
|
|
396
|
+
3. Local evolution requires dense Hamiltonian matrices and is suitable for subsystems with few qubits.
|
|
397
|
+
4. Both methods support callback functions to compute observables during evolution without storing all state vectors.
|
|
398
|
+
|
|
399
|
+
**Comparison of Time Evolution Methods:**
|
|
400
|
+
|
|
401
|
+
+--------------------------+----------------+------------------+------------------+------------------+
|
|
402
|
+
| Method | System Size | Accuracy | AD Support | JIT Support |
|
|
403
|
+
+==========================+================+==================+==================+==================+
|
|
404
|
+
| ED Evolution | < 16 qubits | Exact | ✅ | ✅ |
|
|
405
|
+
+--------------------------+----------------+------------------+------------------+------------------+
|
|
406
|
+
| Krylov Evolution | 16-30+ qubits | Approximate | ✅ | ✅ (JAX only) |
|
|
407
|
+
+--------------------------+----------------+------------------+------------------+------------------+
|
|
408
|
+
| ODE Local Evolution | Any size | Solver-dependent | ✅ (JAX only) | ✅ (JAX only) |
|
|
409
|
+
+--------------------------+----------------+------------------+------------------+------------------+
|
|
410
|
+
| ODE Global Evolution | ~ 20 qubits | Solver-dependent | ✅ (JAX only) | ✅ (JAX only) |
|
|
411
|
+
+--------------------------+----------------+------------------+------------------+------------------+
|
|
412
|
+
|
|
413
|
+
**Method Selection Guidelines:**
|
|
414
|
+
|
|
415
|
+
1. **Exact diagonalization Evolution**: Best for small systems where exact results are required. Most efficient for time-independent Hamiltonians. Support imaginary time evolution.
|
|
416
|
+
|
|
417
|
+
2. **Krylov Evolution**: Ideal for large systems with time-independent Hamiltonians. Provides a good balance between accuracy and computational efficiency. The subspace dimension controls the trade-off between accuracy and speed.
|
|
418
|
+
|
|
419
|
+
3. **ODE Local Evolution**: Suitable for time-dependent Hamiltonians acting on a few qubits. Most flexible for complex control protocols or digital-analog hybrid programs.
|
|
420
|
+
|
|
421
|
+
4. **ODE Global Evolution**: Best for time-dependent Hamiltonians acting on the entire system.
|
|
422
|
+
|
|
423
|
+
**Advanced Usage:**
|
|
424
|
+
|
|
425
|
+
Callback functions can be used to compute observables during evolution without storing all state vectors:
|
|
426
|
+
|
|
427
|
+
.. code-block:: python
|
|
428
|
+
|
|
429
|
+
def compute_total_magnetization(state):
|
|
430
|
+
# Compute total magnetization ⟨∑Zᵢ⟩
|
|
431
|
+
n = int(tc.backend.log2(tc.backend.shape_tuple(state)[0]))
|
|
432
|
+
circuit = tc.Circuit(n, inputs=state)
|
|
433
|
+
total_mz = sum(circuit.expectation_ps(z=[i]) for i in range(n))
|
|
434
|
+
return tc.backend.real(total_mz)
|
|
435
|
+
|
|
436
|
+
# Evolve with callback
|
|
437
|
+
magnetizations = tc.timeevol.krylov_evol(
|
|
438
|
+
h, psi0, times, subspace_dimension=20, callback=compute_total_magnetization
|
|
439
|
+
)
|
|
440
|
+
|
|
441
|
+
All time evolution methods in TensorCircuit support automatic differentiation and JIT compilation, making them suitable for variational optimization and other machine learning applications in quantum physics.
|
|
442
|
+
|
|
152
443
|
|
|
153
444
|
Jitted Function Save/Load
|
|
154
445
|
-----------------------------
|
|
@@ -1389,9 +1389,21 @@ class ExtendedBackend:
|
|
|
1389
1389
|
:rtype: Tensor
|
|
1390
1390
|
"""
|
|
1391
1391
|
carry = init
|
|
1392
|
-
|
|
1393
|
-
|
|
1392
|
+
# Check if `xs` is a PyTree (tuple or list) of arrays.
|
|
1393
|
+
if isinstance(xs, (tuple, list)):
|
|
1394
|
+
for x_slice_tuple in zip(*xs):
|
|
1395
|
+
# x_slice_tuple will be (k_elems[i], j_elems[i]) at each step.
|
|
1396
|
+
carry = f(carry, x_slice_tuple)
|
|
1397
|
+
else:
|
|
1398
|
+
# If xs is a single array, iterate normally.
|
|
1399
|
+
for x in xs:
|
|
1400
|
+
carry = f(carry, x)
|
|
1401
|
+
|
|
1394
1402
|
return carry
|
|
1403
|
+
# carry = init
|
|
1404
|
+
# for x in xs:
|
|
1405
|
+
# carry = f(carry, x)
|
|
1406
|
+
# return carry
|
|
1395
1407
|
|
|
1396
1408
|
def stop_gradient(self: Any, a: Tensor) -> Tensor:
|
|
1397
1409
|
"""
|
|
@@ -200,6 +200,7 @@ class NumpyBackend(numpy_backend.NumPyBackend, ExtendedBackend): # type: ignore
|
|
|
200
200
|
return softmax(a, axis=axis)
|
|
201
201
|
|
|
202
202
|
def onehot(self, a: Tensor, num: int) -> Tensor:
|
|
203
|
+
a = np.asarray(a)
|
|
203
204
|
res = np.eye(num)[a.reshape([-1])]
|
|
204
205
|
return res.reshape(list(a.shape) + [num])
|
|
205
206
|
# https://stackoverflow.com/questions/38592324/one-hot-encoding-using-numpy
|
|
@@ -719,7 +719,10 @@ class TensorFlowBackend(tensorflow_backend.TensorFlowBackend, ExtendedBackend):
|
|
|
719
719
|
def scan(
|
|
720
720
|
self, f: Callable[[Tensor, Tensor], Tensor], xs: Tensor, init: Tensor
|
|
721
721
|
) -> Tensor:
|
|
722
|
-
|
|
722
|
+
stacked_results = tf.scan(f, xs, init)
|
|
723
|
+
final_state = tf.nest.map_structure(lambda x: x[-1], stacked_results)
|
|
724
|
+
return final_state
|
|
725
|
+
# return tf.scan(f, xs, init)[-1]
|
|
723
726
|
|
|
724
727
|
def device(self, a: Tensor) -> str:
|
|
725
728
|
dev = a.device
|