代码封装
Some checks failed
Build wheels / build (ubuntu-latest, 3.11) (push) Has been cancelled
Build wheels / build (ubuntu-latest, 3.12) (push) Has been cancelled
Build wheels / build (ubuntu-latest, 3.13) (push) Has been cancelled
Tests / check (push) Has been cancelled
Tests / build (ubuntu-latest, 3.11) (push) Has been cancelled
Tests / build (ubuntu-latest, 3.12) (push) Has been cancelled
Tests / build (ubuntu-latest, 3.13) (push) Has been cancelled

This commit is contained in:
2026-05-18 22:58:57 +08:00
parent eed42dcfa9
commit f93c95b3a1
56 changed files with 3414 additions and 5849 deletions

26
docs/home.md Normal file
View File

@@ -0,0 +1,26 @@
# qibotn
Core reusable code lives under `src/qibotn/`. Prefer importing from `qibotn`
or `qibotn.backends.*`; benchmark and runner helpers have been folded into the
package instead of being kept as standalone scripts.
- `backends/quimb.py`: TN + torch helpers for quimb.
- `backends/qmatchatea.py`: qmatchatea + torch MPS helpers.
- `backends/vidal.py`: Vidal + torch helpers.
- `contest_cases.py`: shared contest circuits, observables, and case specs.
- `torch_utils.py`: shared torch array/thread helpers.
Quimb TN reusable entrypoints include `build_quimb_backend_circuit`,
`build_expectation_tn`, `run_quimb_torch_expectation`,
`compare_quimb_gate_merge`, `compare_quimb_gate_merge_expectation`,
`profile_quimb_torch_expectation`, and `time_quimb_contract_implementations`.
Common public imports include `qibotn.cpu_expectation`,
`qibotn.mps_expectation`, `qibotn.run_qmatchatea_expectation`,
`qibotn.run_vidal_expectation`, `qibotn.build_contest_circuit`, and
`qibotn.build_contest_observable`.
Former script entrypoints are available as importable functions:
`qibotn.run_cpu_benchmark_cases`, `qibotn.run_contest_tn_case`,
`qibotn.run_custom_tn_expectation`, `qibotn.run_contest_mps_case`,
`qibotn.run_vidal_mpi_contest_case`, and `qibotn.run_vidal_validation_cases`.