tensorcircuit-nightly 1.3.0.dev20250731__tar.gz → 1.3.0.dev20250802__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.

Files changed (149) hide show
  1. {tensorcircuit_nightly-1.3.0.dev20250731/tensorcircuit_nightly.egg-info → tensorcircuit_nightly-1.3.0.dev20250802}/PKG-INFO +1 -1
  2. {tensorcircuit_nightly-1.3.0.dev20250731 → tensorcircuit_nightly-1.3.0.dev20250802}/tensorcircuit/__init__.py +1 -1
  3. {tensorcircuit_nightly-1.3.0.dev20250731 → tensorcircuit_nightly-1.3.0.dev20250802}/tensorcircuit/templates/lattice.py +52 -0
  4. {tensorcircuit_nightly-1.3.0.dev20250731 → tensorcircuit_nightly-1.3.0.dev20250802/tensorcircuit_nightly.egg-info}/PKG-INFO +1 -1
  5. {tensorcircuit_nightly-1.3.0.dev20250731 → tensorcircuit_nightly-1.3.0.dev20250802}/tests/test_lattice.py +84 -0
  6. {tensorcircuit_nightly-1.3.0.dev20250731 → tensorcircuit_nightly-1.3.0.dev20250802}/CHANGELOG.md +0 -0
  7. {tensorcircuit_nightly-1.3.0.dev20250731 → tensorcircuit_nightly-1.3.0.dev20250802}/HISTORY.md +0 -0
  8. {tensorcircuit_nightly-1.3.0.dev20250731 → tensorcircuit_nightly-1.3.0.dev20250802}/LICENSE +0 -0
  9. {tensorcircuit_nightly-1.3.0.dev20250731 → tensorcircuit_nightly-1.3.0.dev20250802}/MANIFEST.in +0 -0
  10. {tensorcircuit_nightly-1.3.0.dev20250731 → tensorcircuit_nightly-1.3.0.dev20250802}/README.md +0 -0
  11. {tensorcircuit_nightly-1.3.0.dev20250731 → tensorcircuit_nightly-1.3.0.dev20250802}/README_cn.md +0 -0
  12. {tensorcircuit_nightly-1.3.0.dev20250731 → tensorcircuit_nightly-1.3.0.dev20250802}/docs/source/advance.rst +0 -0
  13. {tensorcircuit_nightly-1.3.0.dev20250731 → tensorcircuit_nightly-1.3.0.dev20250802}/docs/source/cnconf.py +0 -0
  14. {tensorcircuit_nightly-1.3.0.dev20250731 → tensorcircuit_nightly-1.3.0.dev20250802}/docs/source/conf.py +0 -0
  15. {tensorcircuit_nightly-1.3.0.dev20250731 → tensorcircuit_nightly-1.3.0.dev20250802}/docs/source/contribution.rst +0 -0
  16. {tensorcircuit_nightly-1.3.0.dev20250731 → tensorcircuit_nightly-1.3.0.dev20250802}/docs/source/faq.rst +0 -0
  17. {tensorcircuit_nightly-1.3.0.dev20250731 → tensorcircuit_nightly-1.3.0.dev20250802}/docs/source/generate_rst.py +0 -0
  18. {tensorcircuit_nightly-1.3.0.dev20250731 → tensorcircuit_nightly-1.3.0.dev20250802}/docs/source/index.rst +0 -0
  19. {tensorcircuit_nightly-1.3.0.dev20250731 → tensorcircuit_nightly-1.3.0.dev20250802}/docs/source/infras.rst +0 -0
  20. {tensorcircuit_nightly-1.3.0.dev20250731 → tensorcircuit_nightly-1.3.0.dev20250802}/docs/source/modules.rst +0 -0
  21. {tensorcircuit_nightly-1.3.0.dev20250731 → tensorcircuit_nightly-1.3.0.dev20250802}/docs/source/quickstart.rst +0 -0
  22. {tensorcircuit_nightly-1.3.0.dev20250731 → tensorcircuit_nightly-1.3.0.dev20250802}/docs/source/sharpbits.rst +0 -0
  23. {tensorcircuit_nightly-1.3.0.dev20250731 → tensorcircuit_nightly-1.3.0.dev20250802}/docs/source/textbooktoc.rst +0 -0
  24. {tensorcircuit_nightly-1.3.0.dev20250731 → tensorcircuit_nightly-1.3.0.dev20250802}/docs/source/tutorial.rst +0 -0
  25. {tensorcircuit_nightly-1.3.0.dev20250731 → tensorcircuit_nightly-1.3.0.dev20250802}/docs/source/tutorial_cn.rst +0 -0
  26. {tensorcircuit_nightly-1.3.0.dev20250731 → tensorcircuit_nightly-1.3.0.dev20250802}/docs/source/whitepapertoc.rst +0 -0
  27. {tensorcircuit_nightly-1.3.0.dev20250731 → tensorcircuit_nightly-1.3.0.dev20250802}/docs/source/whitepapertoc_cn.rst +0 -0
  28. {tensorcircuit_nightly-1.3.0.dev20250731 → tensorcircuit_nightly-1.3.0.dev20250802}/setup.cfg +0 -0
  29. {tensorcircuit_nightly-1.3.0.dev20250731 → tensorcircuit_nightly-1.3.0.dev20250802}/setup.py +0 -0
  30. {tensorcircuit_nightly-1.3.0.dev20250731 → tensorcircuit_nightly-1.3.0.dev20250802}/tensorcircuit/about.py +0 -0
  31. {tensorcircuit_nightly-1.3.0.dev20250731 → tensorcircuit_nightly-1.3.0.dev20250802}/tensorcircuit/abstractcircuit.py +0 -0
  32. {tensorcircuit_nightly-1.3.0.dev20250731 → tensorcircuit_nightly-1.3.0.dev20250802}/tensorcircuit/applications/__init__.py +0 -0
  33. {tensorcircuit_nightly-1.3.0.dev20250731 → tensorcircuit_nightly-1.3.0.dev20250802}/tensorcircuit/applications/ai/__init__.py +0 -0
  34. {tensorcircuit_nightly-1.3.0.dev20250731 → tensorcircuit_nightly-1.3.0.dev20250802}/tensorcircuit/applications/ai/ensemble.py +0 -0
  35. {tensorcircuit_nightly-1.3.0.dev20250731 → tensorcircuit_nightly-1.3.0.dev20250802}/tensorcircuit/applications/dqas.py +0 -0
  36. {tensorcircuit_nightly-1.3.0.dev20250731 → tensorcircuit_nightly-1.3.0.dev20250802}/tensorcircuit/applications/finance/__init__.py +0 -0
  37. {tensorcircuit_nightly-1.3.0.dev20250731 → tensorcircuit_nightly-1.3.0.dev20250802}/tensorcircuit/applications/finance/portfolio.py +0 -0
  38. {tensorcircuit_nightly-1.3.0.dev20250731 → tensorcircuit_nightly-1.3.0.dev20250802}/tensorcircuit/applications/graphdata.py +0 -0
  39. {tensorcircuit_nightly-1.3.0.dev20250731 → tensorcircuit_nightly-1.3.0.dev20250802}/tensorcircuit/applications/layers.py +0 -0
  40. {tensorcircuit_nightly-1.3.0.dev20250731 → tensorcircuit_nightly-1.3.0.dev20250802}/tensorcircuit/applications/optimization.py +0 -0
  41. {tensorcircuit_nightly-1.3.0.dev20250731 → tensorcircuit_nightly-1.3.0.dev20250802}/tensorcircuit/applications/physics/__init__.py +0 -0
  42. {tensorcircuit_nightly-1.3.0.dev20250731 → tensorcircuit_nightly-1.3.0.dev20250802}/tensorcircuit/applications/physics/baseline.py +0 -0
  43. {tensorcircuit_nightly-1.3.0.dev20250731 → tensorcircuit_nightly-1.3.0.dev20250802}/tensorcircuit/applications/physics/fss.py +0 -0
  44. {tensorcircuit_nightly-1.3.0.dev20250731 → tensorcircuit_nightly-1.3.0.dev20250802}/tensorcircuit/applications/utils.py +0 -0
  45. {tensorcircuit_nightly-1.3.0.dev20250731 → tensorcircuit_nightly-1.3.0.dev20250802}/tensorcircuit/applications/vags.py +0 -0
  46. {tensorcircuit_nightly-1.3.0.dev20250731 → tensorcircuit_nightly-1.3.0.dev20250802}/tensorcircuit/applications/van.py +0 -0
  47. {tensorcircuit_nightly-1.3.0.dev20250731 → tensorcircuit_nightly-1.3.0.dev20250802}/tensorcircuit/applications/vqes.py +0 -0
  48. {tensorcircuit_nightly-1.3.0.dev20250731 → tensorcircuit_nightly-1.3.0.dev20250802}/tensorcircuit/asciiart.py +0 -0
  49. {tensorcircuit_nightly-1.3.0.dev20250731 → tensorcircuit_nightly-1.3.0.dev20250802}/tensorcircuit/backends/__init__.py +0 -0
  50. {tensorcircuit_nightly-1.3.0.dev20250731 → tensorcircuit_nightly-1.3.0.dev20250802}/tensorcircuit/backends/abstract_backend.py +0 -0
  51. {tensorcircuit_nightly-1.3.0.dev20250731 → tensorcircuit_nightly-1.3.0.dev20250802}/tensorcircuit/backends/backend_factory.py +0 -0
  52. {tensorcircuit_nightly-1.3.0.dev20250731 → tensorcircuit_nightly-1.3.0.dev20250802}/tensorcircuit/backends/cupy_backend.py +0 -0
  53. {tensorcircuit_nightly-1.3.0.dev20250731 → tensorcircuit_nightly-1.3.0.dev20250802}/tensorcircuit/backends/jax_backend.py +0 -0
  54. {tensorcircuit_nightly-1.3.0.dev20250731 → tensorcircuit_nightly-1.3.0.dev20250802}/tensorcircuit/backends/jax_ops.py +0 -0
  55. {tensorcircuit_nightly-1.3.0.dev20250731 → tensorcircuit_nightly-1.3.0.dev20250802}/tensorcircuit/backends/numpy_backend.py +0 -0
  56. {tensorcircuit_nightly-1.3.0.dev20250731 → tensorcircuit_nightly-1.3.0.dev20250802}/tensorcircuit/backends/pytorch_backend.py +0 -0
  57. {tensorcircuit_nightly-1.3.0.dev20250731 → tensorcircuit_nightly-1.3.0.dev20250802}/tensorcircuit/backends/pytorch_ops.py +0 -0
  58. {tensorcircuit_nightly-1.3.0.dev20250731 → tensorcircuit_nightly-1.3.0.dev20250802}/tensorcircuit/backends/tensorflow_backend.py +0 -0
  59. {tensorcircuit_nightly-1.3.0.dev20250731 → tensorcircuit_nightly-1.3.0.dev20250802}/tensorcircuit/backends/tf_ops.py +0 -0
  60. {tensorcircuit_nightly-1.3.0.dev20250731 → tensorcircuit_nightly-1.3.0.dev20250802}/tensorcircuit/basecircuit.py +0 -0
  61. {tensorcircuit_nightly-1.3.0.dev20250731 → tensorcircuit_nightly-1.3.0.dev20250802}/tensorcircuit/channels.py +0 -0
  62. {tensorcircuit_nightly-1.3.0.dev20250731 → tensorcircuit_nightly-1.3.0.dev20250802}/tensorcircuit/circuit.py +0 -0
  63. {tensorcircuit_nightly-1.3.0.dev20250731 → tensorcircuit_nightly-1.3.0.dev20250802}/tensorcircuit/cloud/__init__.py +0 -0
  64. {tensorcircuit_nightly-1.3.0.dev20250731 → tensorcircuit_nightly-1.3.0.dev20250802}/tensorcircuit/cloud/abstraction.py +0 -0
  65. {tensorcircuit_nightly-1.3.0.dev20250731 → tensorcircuit_nightly-1.3.0.dev20250802}/tensorcircuit/cloud/apis.py +0 -0
  66. {tensorcircuit_nightly-1.3.0.dev20250731 → tensorcircuit_nightly-1.3.0.dev20250802}/tensorcircuit/cloud/config.py +0 -0
  67. {tensorcircuit_nightly-1.3.0.dev20250731 → tensorcircuit_nightly-1.3.0.dev20250802}/tensorcircuit/cloud/local.py +0 -0
  68. {tensorcircuit_nightly-1.3.0.dev20250731 → tensorcircuit_nightly-1.3.0.dev20250802}/tensorcircuit/cloud/quafu_provider.py +0 -0
  69. {tensorcircuit_nightly-1.3.0.dev20250731 → tensorcircuit_nightly-1.3.0.dev20250802}/tensorcircuit/cloud/tencent.py +0 -0
  70. {tensorcircuit_nightly-1.3.0.dev20250731 → tensorcircuit_nightly-1.3.0.dev20250802}/tensorcircuit/cloud/utils.py +0 -0
  71. {tensorcircuit_nightly-1.3.0.dev20250731 → tensorcircuit_nightly-1.3.0.dev20250802}/tensorcircuit/cloud/wrapper.py +0 -0
  72. {tensorcircuit_nightly-1.3.0.dev20250731 → tensorcircuit_nightly-1.3.0.dev20250802}/tensorcircuit/compiler/__init__.py +0 -0
  73. {tensorcircuit_nightly-1.3.0.dev20250731 → tensorcircuit_nightly-1.3.0.dev20250802}/tensorcircuit/compiler/composed_compiler.py +0 -0
  74. {tensorcircuit_nightly-1.3.0.dev20250731 → tensorcircuit_nightly-1.3.0.dev20250802}/tensorcircuit/compiler/qiskit_compiler.py +0 -0
  75. {tensorcircuit_nightly-1.3.0.dev20250731 → tensorcircuit_nightly-1.3.0.dev20250802}/tensorcircuit/compiler/simple_compiler.py +0 -0
  76. {tensorcircuit_nightly-1.3.0.dev20250731 → tensorcircuit_nightly-1.3.0.dev20250802}/tensorcircuit/cons.py +0 -0
  77. {tensorcircuit_nightly-1.3.0.dev20250731 → tensorcircuit_nightly-1.3.0.dev20250802}/tensorcircuit/densitymatrix.py +0 -0
  78. {tensorcircuit_nightly-1.3.0.dev20250731 → tensorcircuit_nightly-1.3.0.dev20250802}/tensorcircuit/experimental.py +0 -0
  79. {tensorcircuit_nightly-1.3.0.dev20250731 → tensorcircuit_nightly-1.3.0.dev20250802}/tensorcircuit/fgs.py +0 -0
  80. {tensorcircuit_nightly-1.3.0.dev20250731 → tensorcircuit_nightly-1.3.0.dev20250802}/tensorcircuit/gates.py +0 -0
  81. {tensorcircuit_nightly-1.3.0.dev20250731 → tensorcircuit_nightly-1.3.0.dev20250802}/tensorcircuit/interfaces/__init__.py +0 -0
  82. {tensorcircuit_nightly-1.3.0.dev20250731 → tensorcircuit_nightly-1.3.0.dev20250802}/tensorcircuit/interfaces/jax.py +0 -0
  83. {tensorcircuit_nightly-1.3.0.dev20250731 → tensorcircuit_nightly-1.3.0.dev20250802}/tensorcircuit/interfaces/numpy.py +0 -0
  84. {tensorcircuit_nightly-1.3.0.dev20250731 → tensorcircuit_nightly-1.3.0.dev20250802}/tensorcircuit/interfaces/scipy.py +0 -0
  85. {tensorcircuit_nightly-1.3.0.dev20250731 → tensorcircuit_nightly-1.3.0.dev20250802}/tensorcircuit/interfaces/tensorflow.py +0 -0
  86. {tensorcircuit_nightly-1.3.0.dev20250731 → tensorcircuit_nightly-1.3.0.dev20250802}/tensorcircuit/interfaces/tensortrans.py +0 -0
  87. {tensorcircuit_nightly-1.3.0.dev20250731 → tensorcircuit_nightly-1.3.0.dev20250802}/tensorcircuit/interfaces/torch.py +0 -0
  88. {tensorcircuit_nightly-1.3.0.dev20250731 → tensorcircuit_nightly-1.3.0.dev20250802}/tensorcircuit/keras.py +0 -0
  89. {tensorcircuit_nightly-1.3.0.dev20250731 → tensorcircuit_nightly-1.3.0.dev20250802}/tensorcircuit/mps_base.py +0 -0
  90. {tensorcircuit_nightly-1.3.0.dev20250731 → tensorcircuit_nightly-1.3.0.dev20250802}/tensorcircuit/mpscircuit.py +0 -0
  91. {tensorcircuit_nightly-1.3.0.dev20250731 → tensorcircuit_nightly-1.3.0.dev20250802}/tensorcircuit/noisemodel.py +0 -0
  92. {tensorcircuit_nightly-1.3.0.dev20250731 → tensorcircuit_nightly-1.3.0.dev20250802}/tensorcircuit/quantum.py +0 -0
  93. {tensorcircuit_nightly-1.3.0.dev20250731 → tensorcircuit_nightly-1.3.0.dev20250802}/tensorcircuit/results/__init__.py +0 -0
  94. {tensorcircuit_nightly-1.3.0.dev20250731 → tensorcircuit_nightly-1.3.0.dev20250802}/tensorcircuit/results/counts.py +0 -0
  95. {tensorcircuit_nightly-1.3.0.dev20250731 → tensorcircuit_nightly-1.3.0.dev20250802}/tensorcircuit/results/qem/__init__.py +0 -0
  96. {tensorcircuit_nightly-1.3.0.dev20250731 → tensorcircuit_nightly-1.3.0.dev20250802}/tensorcircuit/results/qem/benchmark_circuits.py +0 -0
  97. {tensorcircuit_nightly-1.3.0.dev20250731 → tensorcircuit_nightly-1.3.0.dev20250802}/tensorcircuit/results/qem/qem_methods.py +0 -0
  98. {tensorcircuit_nightly-1.3.0.dev20250731 → tensorcircuit_nightly-1.3.0.dev20250802}/tensorcircuit/results/readout_mitigation.py +0 -0
  99. {tensorcircuit_nightly-1.3.0.dev20250731 → tensorcircuit_nightly-1.3.0.dev20250802}/tensorcircuit/shadows.py +0 -0
  100. {tensorcircuit_nightly-1.3.0.dev20250731 → tensorcircuit_nightly-1.3.0.dev20250802}/tensorcircuit/simplify.py +0 -0
  101. {tensorcircuit_nightly-1.3.0.dev20250731 → tensorcircuit_nightly-1.3.0.dev20250802}/tensorcircuit/stabilizercircuit.py +0 -0
  102. {tensorcircuit_nightly-1.3.0.dev20250731 → tensorcircuit_nightly-1.3.0.dev20250802}/tensorcircuit/templates/__init__.py +0 -0
  103. {tensorcircuit_nightly-1.3.0.dev20250731 → tensorcircuit_nightly-1.3.0.dev20250802}/tensorcircuit/templates/ansatz.py +0 -0
  104. {tensorcircuit_nightly-1.3.0.dev20250731 → tensorcircuit_nightly-1.3.0.dev20250802}/tensorcircuit/templates/blocks.py +0 -0
  105. {tensorcircuit_nightly-1.3.0.dev20250731 → tensorcircuit_nightly-1.3.0.dev20250802}/tensorcircuit/templates/chems.py +0 -0
  106. {tensorcircuit_nightly-1.3.0.dev20250731 → tensorcircuit_nightly-1.3.0.dev20250802}/tensorcircuit/templates/conversions.py +0 -0
  107. {tensorcircuit_nightly-1.3.0.dev20250731 → tensorcircuit_nightly-1.3.0.dev20250802}/tensorcircuit/templates/dataset.py +0 -0
  108. {tensorcircuit_nightly-1.3.0.dev20250731 → tensorcircuit_nightly-1.3.0.dev20250802}/tensorcircuit/templates/graphs.py +0 -0
  109. {tensorcircuit_nightly-1.3.0.dev20250731 → tensorcircuit_nightly-1.3.0.dev20250802}/tensorcircuit/templates/hamiltonians.py +0 -0
  110. {tensorcircuit_nightly-1.3.0.dev20250731 → tensorcircuit_nightly-1.3.0.dev20250802}/tensorcircuit/templates/measurements.py +0 -0
  111. {tensorcircuit_nightly-1.3.0.dev20250731 → tensorcircuit_nightly-1.3.0.dev20250802}/tensorcircuit/timeevol.py +0 -0
  112. {tensorcircuit_nightly-1.3.0.dev20250731 → tensorcircuit_nightly-1.3.0.dev20250802}/tensorcircuit/torchnn.py +0 -0
  113. {tensorcircuit_nightly-1.3.0.dev20250731 → tensorcircuit_nightly-1.3.0.dev20250802}/tensorcircuit/translation.py +0 -0
  114. {tensorcircuit_nightly-1.3.0.dev20250731 → tensorcircuit_nightly-1.3.0.dev20250802}/tensorcircuit/utils.py +0 -0
  115. {tensorcircuit_nightly-1.3.0.dev20250731 → tensorcircuit_nightly-1.3.0.dev20250802}/tensorcircuit/vis.py +0 -0
  116. {tensorcircuit_nightly-1.3.0.dev20250731 → tensorcircuit_nightly-1.3.0.dev20250802}/tensorcircuit_nightly.egg-info/SOURCES.txt +0 -0
  117. {tensorcircuit_nightly-1.3.0.dev20250731 → tensorcircuit_nightly-1.3.0.dev20250802}/tensorcircuit_nightly.egg-info/dependency_links.txt +0 -0
  118. {tensorcircuit_nightly-1.3.0.dev20250731 → tensorcircuit_nightly-1.3.0.dev20250802}/tensorcircuit_nightly.egg-info/requires.txt +0 -0
  119. {tensorcircuit_nightly-1.3.0.dev20250731 → tensorcircuit_nightly-1.3.0.dev20250802}/tensorcircuit_nightly.egg-info/top_level.txt +0 -0
  120. {tensorcircuit_nightly-1.3.0.dev20250731 → tensorcircuit_nightly-1.3.0.dev20250802}/tests/__init__.py +0 -0
  121. {tensorcircuit_nightly-1.3.0.dev20250731 → tensorcircuit_nightly-1.3.0.dev20250802}/tests/conftest.py +0 -0
  122. {tensorcircuit_nightly-1.3.0.dev20250731 → tensorcircuit_nightly-1.3.0.dev20250802}/tests/test_backends.py +0 -0
  123. {tensorcircuit_nightly-1.3.0.dev20250731 → tensorcircuit_nightly-1.3.0.dev20250802}/tests/test_calibrating.py +0 -0
  124. {tensorcircuit_nightly-1.3.0.dev20250731 → tensorcircuit_nightly-1.3.0.dev20250802}/tests/test_channels.py +0 -0
  125. {tensorcircuit_nightly-1.3.0.dev20250731 → tensorcircuit_nightly-1.3.0.dev20250802}/tests/test_circuit.py +0 -0
  126. {tensorcircuit_nightly-1.3.0.dev20250731 → tensorcircuit_nightly-1.3.0.dev20250802}/tests/test_cloud.py +0 -0
  127. {tensorcircuit_nightly-1.3.0.dev20250731 → tensorcircuit_nightly-1.3.0.dev20250802}/tests/test_compiler.py +0 -0
  128. {tensorcircuit_nightly-1.3.0.dev20250731 → tensorcircuit_nightly-1.3.0.dev20250802}/tests/test_dmcircuit.py +0 -0
  129. {tensorcircuit_nightly-1.3.0.dev20250731 → tensorcircuit_nightly-1.3.0.dev20250802}/tests/test_ensemble.py +0 -0
  130. {tensorcircuit_nightly-1.3.0.dev20250731 → tensorcircuit_nightly-1.3.0.dev20250802}/tests/test_fgs.py +0 -0
  131. {tensorcircuit_nightly-1.3.0.dev20250731 → tensorcircuit_nightly-1.3.0.dev20250802}/tests/test_gates.py +0 -0
  132. {tensorcircuit_nightly-1.3.0.dev20250731 → tensorcircuit_nightly-1.3.0.dev20250802}/tests/test_hamiltonians.py +0 -0
  133. {tensorcircuit_nightly-1.3.0.dev20250731 → tensorcircuit_nightly-1.3.0.dev20250802}/tests/test_interfaces.py +0 -0
  134. {tensorcircuit_nightly-1.3.0.dev20250731 → tensorcircuit_nightly-1.3.0.dev20250802}/tests/test_keras.py +0 -0
  135. {tensorcircuit_nightly-1.3.0.dev20250731 → tensorcircuit_nightly-1.3.0.dev20250802}/tests/test_miscs.py +0 -0
  136. {tensorcircuit_nightly-1.3.0.dev20250731 → tensorcircuit_nightly-1.3.0.dev20250802}/tests/test_mpscircuit.py +0 -0
  137. {tensorcircuit_nightly-1.3.0.dev20250731 → tensorcircuit_nightly-1.3.0.dev20250802}/tests/test_noisemodel.py +0 -0
  138. {tensorcircuit_nightly-1.3.0.dev20250731 → tensorcircuit_nightly-1.3.0.dev20250802}/tests/test_qaoa.py +0 -0
  139. {tensorcircuit_nightly-1.3.0.dev20250731 → tensorcircuit_nightly-1.3.0.dev20250802}/tests/test_qem.py +0 -0
  140. {tensorcircuit_nightly-1.3.0.dev20250731 → tensorcircuit_nightly-1.3.0.dev20250802}/tests/test_quantum.py +0 -0
  141. {tensorcircuit_nightly-1.3.0.dev20250731 → tensorcircuit_nightly-1.3.0.dev20250802}/tests/test_quantum_attr.py +0 -0
  142. {tensorcircuit_nightly-1.3.0.dev20250731 → tensorcircuit_nightly-1.3.0.dev20250802}/tests/test_results.py +0 -0
  143. {tensorcircuit_nightly-1.3.0.dev20250731 → tensorcircuit_nightly-1.3.0.dev20250802}/tests/test_shadows.py +0 -0
  144. {tensorcircuit_nightly-1.3.0.dev20250731 → tensorcircuit_nightly-1.3.0.dev20250802}/tests/test_simplify.py +0 -0
  145. {tensorcircuit_nightly-1.3.0.dev20250731 → tensorcircuit_nightly-1.3.0.dev20250802}/tests/test_stabilizer.py +0 -0
  146. {tensorcircuit_nightly-1.3.0.dev20250731 → tensorcircuit_nightly-1.3.0.dev20250802}/tests/test_templates.py +0 -0
  147. {tensorcircuit_nightly-1.3.0.dev20250731 → tensorcircuit_nightly-1.3.0.dev20250802}/tests/test_timeevol.py +0 -0
  148. {tensorcircuit_nightly-1.3.0.dev20250731 → tensorcircuit_nightly-1.3.0.dev20250802}/tests/test_torchnn.py +0 -0
  149. {tensorcircuit_nightly-1.3.0.dev20250731 → tensorcircuit_nightly-1.3.0.dev20250802}/tests/test_van.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: tensorcircuit-nightly
3
- Version: 1.3.0.dev20250731
3
+ Version: 1.3.0.dev20250802
4
4
  Summary: nightly release for tensorcircuit
5
5
  Home-page: https://github.com/refraction-ray/tensorcircuit-dev
6
6
  Author: TensorCircuit Authors
@@ -1,4 +1,4 @@
1
- __version__ = "1.3.0.dev20250731"
1
+ __version__ = "1.3.0.dev20250802"
2
2
  __author__ = "TensorCircuit Authors"
3
3
  __creator__ = "refraction-ray"
4
4
 
@@ -15,6 +15,7 @@ from typing import (
15
15
  Union,
16
16
  TYPE_CHECKING,
17
17
  cast,
18
+ Set,
18
19
  )
19
20
 
20
21
  logger = logging.getLogger(__name__)
@@ -1446,3 +1447,54 @@ class CustomizeLattice(AbstractLattice):
1446
1447
  logger.info(
1447
1448
  f"{len(ids_to_remove)} sites removed. Lattice now has {self.num_sites} sites."
1448
1449
  )
1450
+
1451
+
1452
+ def get_compatible_layers(bonds: List[Tuple[int, int]]) -> List[List[Tuple[int, int]]]:
1453
+ """
1454
+ Partitions a list of pairs (bonds) into compatible layers for parallel
1455
+ gate application using a greedy edge-coloring algorithm.
1456
+
1457
+ This function takes a list of pairs, representing connections like
1458
+ nearest-neighbor (NN) or next-nearest-neighbor (NNN) bonds, and
1459
+ partitions them into the minimum number of sets ("layers") where no two
1460
+ pairs in a set share an index. This is a general utility for scheduling
1461
+ non-overlapping operations.
1462
+
1463
+ :Example:
1464
+
1465
+ >>> from tensorcircuit.templates.lattice import SquareLattice
1466
+ >>> sq_lattice = SquareLattice(size=(2, 2), pbc=False)
1467
+ >>> nn_bonds = sq_lattice.get_neighbor_pairs(k=1, unique=True)
1468
+
1469
+ >>> gate_layers = get_compatible_layers(nn_bonds)
1470
+ >>> print(gate_layers)
1471
+ [[[0, 1], [2, 3]], [[0, 2], [1, 3]]]
1472
+
1473
+ :param bonds: A list of tuples, where each tuple represents a bond (i, j)
1474
+ of site indices to be scheduled.
1475
+ :type bonds: List[Tuple[int, int]]
1476
+ :return: A list of layers. Each layer is a list of tuples, where each
1477
+ tuple represents a bond. All bonds within a layer are non-overlapping.
1478
+ :rtype: List[List[Tuple[int, int]]]
1479
+ """
1480
+ uncolored_edges: Set[Tuple[int, int]] = {(min(bond), max(bond)) for bond in bonds}
1481
+
1482
+ layers: List[List[Tuple[int, int]]] = []
1483
+
1484
+ while uncolored_edges:
1485
+ current_layer: List[Tuple[int, int]] = []
1486
+ qubits_in_this_layer: Set[int] = set()
1487
+
1488
+ edges_to_process = sorted(list(uncolored_edges))
1489
+
1490
+ for edge in edges_to_process:
1491
+ i, j = edge
1492
+ if i not in qubits_in_this_layer and j not in qubits_in_this_layer:
1493
+ current_layer.append(edge)
1494
+ qubits_in_this_layer.add(i)
1495
+ qubits_in_this_layer.add(j)
1496
+
1497
+ uncolored_edges -= set(current_layer)
1498
+ layers.append(sorted(current_layer))
1499
+
1500
+ return layers
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: tensorcircuit-nightly
3
- Version: 1.3.0.dev20250731
3
+ Version: 1.3.0.dev20250802
4
4
  Summary: nightly release for tensorcircuit
5
5
  Home-page: https://github.com/refraction-ray/tensorcircuit-dev
6
6
  Author: TensorCircuit Authors
@@ -23,6 +23,8 @@ from tensorcircuit.templates.lattice import (
23
23
  RectangularLattice,
24
24
  SquareLattice,
25
25
  TriangularLattice,
26
+ AbstractLattice,
27
+ get_compatible_layers,
26
28
  )
27
29
 
28
30
 
@@ -1664,3 +1666,85 @@ class TestDistanceMatrix:
1664
1666
  # "The specialized PBC implementation is significantly slower "
1665
1667
  # "than the general-purpose implementation."
1666
1668
  # )
1669
+
1670
+
1671
+ def _validate_layers(bonds, layers) -> None:
1672
+ """
1673
+ A helper function to scientifically validate the output of get_compatible_layers.
1674
+ """
1675
+ # MODIFICATION: This function now takes the original bonds list for comparison.
1676
+ expected_edges = set(tuple(sorted(b)) for b in bonds)
1677
+ actual_edges = set(tuple(sorted(edge)) for layer in layers for edge in layer)
1678
+
1679
+ assert (
1680
+ expected_edges == actual_edges
1681
+ ), "Completeness check failed: The set of all edges in the layers must "
1682
+ "exactly match the input bonds."
1683
+
1684
+ for i, layer in enumerate(layers):
1685
+ qubits_in_layer: set[int] = set()
1686
+ for edge in layer:
1687
+ q1, q2 = edge
1688
+ assert (
1689
+ q1 not in qubits_in_layer
1690
+ ), f"Compatibility check failed: Qubit {q1} is reused in layer {i}."
1691
+ qubits_in_layer.add(q1)
1692
+ assert (
1693
+ q2 not in qubits_in_layer
1694
+ ), f"Compatibility check failed: Qubit {q2} is reused in layer {i}."
1695
+ qubits_in_layer.add(q2)
1696
+
1697
+
1698
+ @pytest.mark.parametrize(
1699
+ "lattice_instance",
1700
+ [
1701
+ SquareLattice(size=(3, 2), pbc=False),
1702
+ SquareLattice(size=(3, 3), pbc=True),
1703
+ HoneycombLattice(size=(2, 2), pbc=False),
1704
+ ],
1705
+ ids=[
1706
+ "SquareLattice_3x2_OBC",
1707
+ "SquareLattice_3x3_PBC",
1708
+ "HoneycombLattice_2x2_OBC",
1709
+ ],
1710
+ )
1711
+ def test_layering_on_various_lattices(lattice_instance: AbstractLattice):
1712
+ """Tests gate layering for various standard lattice types."""
1713
+ bonds = lattice_instance.get_neighbor_pairs(k=1, unique=True)
1714
+ layers = get_compatible_layers(bonds)
1715
+
1716
+ assert len(layers) > 0, "Layers should not be empty for non-trivial lattices."
1717
+ _validate_layers(bonds, layers)
1718
+
1719
+
1720
+ def test_layering_on_1d_chain_pbc():
1721
+ """Test layering on a 1D chain with periodic boundaries (a cycle graph)."""
1722
+ lattice_even = ChainLattice(size=(6,), pbc=True)
1723
+ bonds_even = lattice_even.get_neighbor_pairs(k=1, unique=True)
1724
+ layers_even = get_compatible_layers(bonds_even)
1725
+ _validate_layers(bonds_even, layers_even)
1726
+
1727
+ lattice_odd = ChainLattice(size=(5,), pbc=True)
1728
+ bonds_odd = lattice_odd.get_neighbor_pairs(k=1, unique=True)
1729
+ layers_odd = get_compatible_layers(bonds_odd)
1730
+ assert len(layers_odd) == 3, "A 5-site cycle graph should be 3-colorable."
1731
+ _validate_layers(bonds_odd, layers_odd)
1732
+
1733
+
1734
+ def test_layering_on_custom_star_graph():
1735
+ """Test layering on a custom lattice forming a star graph."""
1736
+ star_edges = [(0, 1), (0, 2), (0, 3)]
1737
+ layers = get_compatible_layers(star_edges)
1738
+ assert len(layers) == 3, "A star graph S_4 requires 3 layers."
1739
+ _validate_layers(star_edges, layers)
1740
+
1741
+
1742
+ def test_layering_on_edge_cases():
1743
+ """Test various edge cases: empty, single-site, and no-edge lattices."""
1744
+ layers_empty = get_compatible_layers([])
1745
+ assert layers_empty == [], "Layers should be empty for an empty set of bonds."
1746
+
1747
+ single_edge = [(0, 1)]
1748
+ layers_single = get_compatible_layers(single_edge)
1749
+ assert layers_single == [[(0, 1)]]
1750
+ _validate_layers(single_edge, layers_single)