diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 73c60a4..59d638d 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -1,46 +1,46 @@ -# This workflow will install Python dependencies, run tests and lint with a single version of Python -# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python - -name: CI - -on: - push: - branches: [ "main" ] - pull_request: - branches: [ "main" ] - -permissions: - contents: read - -jobs: - build: - - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - - name: Set up Python 3.12.3 - uses: actions/setup-python@v5 - with: - python-version: "3.12.3" - cache: 'pip' - - name: Create & Activate virtualenv - run: | - python -m venv .venv - . .venv/bin/activate - echo PATH=$PATH >> $GITHUB_ENV - - name: Install dependencies - run: | - python -m pip install --upgrade pip - if [ -f requirements.txt ]; then pip install -r requirements.txt; fi - - name: Maturin Build - run: | - maturin build - pip install target/wheels/$(ls target/wheels) - - name: Lint with ruff - run: | - # stop the build if there are Python syntax errors or undefined names - ruff check . --select E999,E902,E101,F403,F821 --output-format=full --exit-non-zero-on-fix - - name: Test with pytest - run: | - pytest +# This workflow will install Python dependencies, run tests and lint with a single version of Python +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python + +name: CI + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +permissions: + contents: read + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - name: Set up Python 3.12.3 + uses: actions/setup-python@v5 + with: + python-version: "3.12.3" + cache: 'pip' + - name: Create & Activate virtualenv + run: | + python -m venv .venv + . .venv/bin/activate + echo PATH=$PATH >> $GITHUB_ENV + - name: Install dependencies + run: | + python -m pip install --upgrade pip + if [ -f requirements.txt ]; then pip install -r requirements.txt; fi + - name: Maturin Build + run: | + maturin build + pip install target/wheels/$(ls target/wheels) + - name: Lint with ruff + run: | + # stop the build if there are Python syntax errors or undefined names + ruff check . --select E999,E902,E101,F403,F821 --output-format=full --exit-non-zero-on-fix + - name: Test with pytest + run: | + pytest diff --git a/.gitignore b/.gitignore index 2012274..b776dd6 100644 --- a/.gitignore +++ b/.gitignore @@ -1,76 +1,76 @@ -/target - -# Byte-compiled / optimized / DLL files -__pycache__/ -.pytest_cache/ -*.py[cod] - -# C extensions -*.so - -# Distribution / packaging -.Python -.venv/ -env/ -bin/ -build/ -develop-eggs/ -dist/ -eggs/ -lib/ -lib64/ -parts/ -sdist/ -var/ -include/ -man/ -venv/ -*.egg-info/ -.installed.cfg -*.egg - -# Installer logs -pip-log.txt -pip-delete-this-directory.txt -pip-selfcheck.json - -# Unit test / coverage reports -htmlcov/ -.tox/ -.coverage -.cache -nosetests.xml -coverage.xml - -# Translations -*.mo - -# Mr Developer -.mr.developer.cfg -.project -.pydevproject - -# Rope -.ropeproject - -# Django stuff: -*.log -*.pot - -.DS_Store - -# Sphinx documentation -docs/_build/ - -# PyCharm -.idea/ - -# VSCode -.vscode/ - -# Pyenv -.python-version - - -# pyright config file (unnecessary for ppl on vscode lmao) -pyrightconfig.json +/target + +# Byte-compiled / optimized / DLL files +__pycache__/ +.pytest_cache/ +*.py[cod] + +# C extensions +*.so + +# Distribution / packaging +.Python +.venv/ +env/ +bin/ +build/ +develop-eggs/ +dist/ +eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +include/ +man/ +venv/ +*.egg-info/ +.installed.cfg +*.egg + +# Installer logs +pip-log.txt +pip-delete-this-directory.txt +pip-selfcheck.json + +# Unit test / coverage reports +htmlcov/ +.tox/ +.coverage +.cache +nosetests.xml +coverage.xml + +# Translations +*.mo + +# Mr Developer +.mr.developer.cfg +.project +.pydevproject + +# Rope +.ropeproject + +# Django stuff: +*.log +*.pot + +.DS_Store + +# Sphinx documentation +docs/_build/ + +# PyCharm +.idea/ + +# VSCode +.vscode/ + +# Pyenv +.python-version + + +# pyright config file (unnecessary for ppl on vscode lmao) +pyrightconfig.json diff --git a/.isort.cfg b/.isort.cfg index 2bb7052..0503994 100644 --- a/.isort.cfg +++ b/.isort.cfg @@ -1,8 +1,8 @@ -[settings] -profile = black -skip = .gitignore -line_length = 120 -# Sections -sections = FUTURE,STDLIB,THIRDPARTY,FIRSTPARTY,LOCALFOLDER -# Custom section title -import_heading_stdlib = Standard Library +[settings] +profile = black +skip = .gitignore +line_length = 120 +# Sections +sections = FUTURE,STDLIB,THIRDPARTY,FIRSTPARTY,LOCALFOLDER +# Custom section title +import_heading_stdlib = Standard Library diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index e93c425..4df1ead 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,21 +1,21 @@ -# See https://pre-commit.com for more information -# See https://pre-commit.com/hooks.html for more hooks -repos: -- repo: https://github.com/pre-commit/pre-commit-hooks - rev: v3.2.0 - hooks: - - id: trailing-whitespace - - id: end-of-file-fixer - - id: check-yaml - - id: check-added-large-files -- repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.4.8 - hooks: - - id: ruff - args: ["--fix", "--verbose"] - - id: ruff-format -- repo: https://github.com/pycqa/isort - rev: 5.13.2 - hooks: - - id: isort - name: isort (python) +# See https://pre-commit.com for more information +# See https://pre-commit.com/hooks.html for more hooks +repos: +- repo: https://github.com/pre-commit/pre-commit-hooks + rev: v3.2.0 + hooks: + - id: trailing-whitespace + - id: end-of-file-fixer + - id: check-yaml + - id: check-added-large-files +- repo: https://github.com/astral-sh/ruff-pre-commit + rev: v0.4.8 + hooks: + - id: ruff + args: ["--fix", "--verbose"] + - id: ruff-format +- repo: https://github.com/pycqa/isort + rev: 5.13.2 + hooks: + - id: isort + name: isort (python) diff --git a/Cargo.lock b/Cargo.lock index e13af09..36b6ce9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1,2793 +1,2793 @@ -# This file is automatically @generated by Cargo. -# It is not intended for manual editing. -version = 3 - -[[package]] -name = "addr2line" -version = "0.22.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e4503c46a5c0c7844e948c9a4d6acd9f50cccb4de1c48eb9e291ea17470c678" -dependencies = [ - "gimli", -] - -[[package]] -name = "adler" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" - -[[package]] -name = "ahash" -version = "0.8.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" -dependencies = [ - "cfg-if", - "once_cell", - "version_check", - "zerocopy", -] - -[[package]] -name = "aho-corasick" -version = "1.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" -dependencies = [ - "memchr", -] - -[[package]] -name = "allocator-api2" -version = "0.2.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c6cb57a04249c6480766f7f7cef5467412af1490f8d1e243141daddada3264f" - -[[package]] -name = "anstream" -version = "0.6.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "418c75fa768af9c03be99d17643f93f79bbba589895012a80e3452a19ddda15b" -dependencies = [ - "anstyle", - "anstyle-parse", - "anstyle-query", - "anstyle-wincon", - "colorchoice", - "is_terminal_polyfill", - "utf8parse", -] - -[[package]] -name = "anstyle" -version = "1.0.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "038dfcf04a5feb68e9c60b21c9625a54c2c0616e79b72b0fd87075a056ae1d1b" - -[[package]] -name = "anstyle-parse" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c03a11a9034d92058ceb6ee011ce58af4a9bf61491aa7e1e59ecd24bd40d22d4" -dependencies = [ - "utf8parse", -] - -[[package]] -name = "anstyle-query" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad186efb764318d35165f1758e7dcef3b10628e26d41a44bc5550652e6804391" -dependencies = [ - "windows-sys 0.52.0", -] - -[[package]] -name = "anstyle-wincon" -version = "3.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61a38449feb7068f52bb06c12759005cf459ee52bb4adc1d5a7c4322d716fb19" -dependencies = [ - "anstyle", - "windows-sys 0.52.0", -] - -[[package]] -name = "anyhow" -version = "1.0.86" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da" - -[[package]] -name = "anyon-braiding-simulator" -version = "0.1.0" -dependencies = [ - "maturin", - "ndarray", - "numpy", - "pyo3", -] - -[[package]] -name = "atty" -version = "0.2.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" -dependencies = [ - "hermit-abi 0.1.19", - "libc", - "winapi", -] - -[[package]] -name = "autocfg" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" - -[[package]] -name = "backtrace" -version = "0.3.73" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cc23269a4f8976d0a4d2e7109211a419fe30e8d88d677cd60b6bc79c5732e0a" -dependencies = [ - "addr2line", - "cc", - "cfg-if", - "libc", - "miniz_oxide", - "object", - "rustc-demangle", -] - -[[package]] -name = "base64" -version = "0.13.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" - -[[package]] -name = "base64" -version = "0.21.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" - -[[package]] -name = "base64" -version = "0.22.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" - -[[package]] -name = "bitflags" -version = "1.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" - -[[package]] -name = "bitflags" -version = "2.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf4b9d6a944f767f8e5e0db018570623c85f3d925ac718db4e06d0187adb21c1" - -[[package]] -name = "block-buffer" -version = "0.10.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" -dependencies = [ - "generic-array", -] - -[[package]] -name = "bstr" -version = "1.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05efc5cfd9110c8416e471df0e96702d58690178e206e61b7173706673c93706" -dependencies = [ - "memchr", - "serde", -] - -[[package]] -name = "byteorder" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" - -[[package]] -name = "bytes" -version = "1.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "514de17de45fdb8dc022b1a7975556c53c86f9f0aa5f534b98977b171857c2c9" - -[[package]] -name = "bytesize" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3e368af43e418a04d52505cf3dbc23dda4e3407ae2fa99fd0e4f308ce546acc" - -[[package]] -name = "bzip2" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bdb116a6ef3f6c3698828873ad02c3014b3c85cadb88496095628e3ef1e347f8" -dependencies = [ - "bzip2-sys", - "libc", -] - -[[package]] -name = "bzip2-sys" -version = "0.1.11+1.0.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "736a955f3fa7875102d57c82b8cac37ec45224a07fd32d58f9f7a186b6cd4cdc" -dependencies = [ - "cc", - "libc", - "pkg-config", -] - -[[package]] -name = "cab" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae6b4de23c7d39c0631fd3cc952d87951c86c75a13812d7247cb7a896e7b3551" -dependencies = [ - "byteorder", - "flate2", - "lzxd", - "time", -] - -[[package]] -name = "camino" -version = "1.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0ec6b951b160caa93cc0c7b209e5a3bff7aae9062213451ac99493cd844c239" -dependencies = [ - "serde", -] - -[[package]] -name = "cargo-options" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68dacdf12b405b432ddcb94aa5edef0766daf8cb781f484e56b518305afd45ba" -dependencies = [ - "clap 3.2.25", -] - -[[package]] -name = "cargo-platform" -version = "0.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24b1f0365a6c6bb4020cd05806fd0d33c44d38046b8bd7f0e40814b9763cabfc" -dependencies = [ - "serde", -] - -[[package]] -name = "cargo-xwin" -version = "0.8.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb40f2f01bc8ff52fbb570b4b7f8ec823ba21ce1a64352492868eab29f39b9fc" -dependencies = [ - "anyhow", - "cargo-options", - "clap 3.2.25", - "dirs", - "fs-err", - "indicatif", - "path-slash", - "which", - "xwin", -] - -[[package]] -name = "cargo-zigbuild" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed951e06c76e4580db0fec84aad5a0266f876f82c3190e323b4c09875edf5750" -dependencies = [ - "anyhow", - "cargo-options", - "cargo_metadata", - "clap 3.2.25", - "dirs", - "fs-err", - "path-slash", - "rustc_version", - "semver", - "serde", - "serde_json", - "target-lexicon", -] - -[[package]] -name = "cargo_metadata" -version = "0.14.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4acbb09d9ee8e23699b9634375c72795d095bf268439da88562cf9b501f181fa" -dependencies = [ - "camino", - "cargo-platform", - "semver", - "serde", - "serde_json", -] - -[[package]] -name = "cbindgen" -version = "0.24.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b922faaf31122819ec80c4047cc684c6979a087366c069611e33649bf98e18d" -dependencies = [ - "heck 0.4.1", - "indexmap 1.9.3", - "log", - "proc-macro2", - "quote", - "serde", - "serde_json", - "syn 1.0.109", - "tempfile", - "toml 0.5.11", -] - -[[package]] -name = "cc" -version = "1.0.99" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96c51067fd44124faa7f870b4b1c969379ad32b2ba805aa959430ceaa384f695" - -[[package]] -name = "cfb" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d38f2da7a0a2c4ccf0065be06397cc26a81f4e528be095826eee9d4adbb8c60f" -dependencies = [ - "byteorder", - "fnv", - "uuid", -] - -[[package]] -name = "cfg-if" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" - -[[package]] -name = "charset" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18e9079d1a12a2cc2bffb5db039c43661836ead4082120d5844f02555aca2d46" -dependencies = [ - "base64 0.13.1", - "encoding_rs", -] - -[[package]] -name = "chumsky" -version = "0.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8eebd66744a15ded14960ab4ccdbfb51ad3b81f51f3f04a80adac98c985396c9" -dependencies = [ - "hashbrown 0.14.5", - "stacker", -] - -[[package]] -name = "clap" -version = "3.2.25" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ea181bf566f71cb9a5d17a59e1871af638180a18fb0035c92ae62b705207123" -dependencies = [ - "atty", - "bitflags 1.3.2", - "clap_derive 3.2.25", - "clap_lex 0.2.4", - "indexmap 1.9.3", - "once_cell", - "strsim 0.10.0", - "termcolor", - "terminal_size 0.2.6", - "textwrap 0.16.1", -] - -[[package]] -name = "clap" -version = "4.5.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5db83dced34638ad474f39f250d7fea9598bdd239eaced1bdf45d597da0f433f" -dependencies = [ - "clap_builder", - "clap_derive 4.5.5", -] - -[[package]] -name = "clap_builder" -version = "4.5.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7e204572485eb3fbf28f871612191521df159bc3e15a9f5064c66dba3a8c05f" -dependencies = [ - "anstream", - "anstyle", - "clap_lex 0.7.1", - "strsim 0.11.1", - "terminal_size 0.3.0", -] - -[[package]] -name = "clap_complete" -version = "3.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f7a2e0a962c45ce25afce14220bc24f9dade0a1787f185cecf96bfba7847cd8" -dependencies = [ - "clap 3.2.25", -] - -[[package]] -name = "clap_complete_fig" -version = "3.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed37b4c0c1214673eba6ad8ea31666626bf72be98ffb323067d973c48b4964b9" -dependencies = [ - "clap 3.2.25", - "clap_complete", -] - -[[package]] -name = "clap_derive" -version = "3.2.25" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae6371b8bdc8b7d3959e9cf7b22d4435ef3e79e138688421ec654acf8c81b008" -dependencies = [ - "heck 0.4.1", - "proc-macro-error", - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "clap_derive" -version = "4.5.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c780290ccf4fb26629baa7a1081e68ced113f1d3ec302fa5948f1c381ebf06c6" -dependencies = [ - "heck 0.5.0", - "proc-macro2", - "quote", - "syn 2.0.66", -] - -[[package]] -name = "clap_lex" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2850f2f5a82cbf437dd5af4d49848fbdfc27c157c3d010345776f952765261c5" -dependencies = [ - "os_str_bytes", -] - -[[package]] -name = "clap_lex" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b82cf0babdbd58558212896d1a4272303a57bdb245c2bf1147185fb45640e70" - -[[package]] -name = "cli-table" -version = "0.4.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adfbb116d9e2c4be7011360d0c0bee565712c11e969c9609b25b619366dc379d" -dependencies = [ - "termcolor", - "unicode-width", -] - -[[package]] -name = "colorchoice" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b6a852b24ab71dffc585bcb46eaf7959d175cb865a7152e35b348d1b2960422" - -[[package]] -name = "combine" -version = "4.6.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba5a308b75df32fe02788e748662718f03fde005016435c444eea572398219fd" -dependencies = [ - "bytes", - "memchr", -] - -[[package]] -name = "configparser" -version = "3.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e57e3272f0190c3f1584272d613719ba5fc7df7f4942fe542e63d949cf3a649b" - -[[package]] -name = "console" -version = "0.15.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e1f83fc076bd6dd27517eacdf25fef6c4dfe5f1d7448bafaaf3a26f13b5e4eb" -dependencies = [ - "encode_unicode", - "lazy_static", - "libc", - "unicode-width", - "windows-sys 0.52.0", -] - -[[package]] -name = "cpufeatures" -version = "0.2.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53fe5e26ff1b7aef8bca9c6080520cfb8d9333c7568e1829cef191a9723e5504" -dependencies = [ - "libc", -] - -[[package]] -name = "crc32fast" -version = "1.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a97769d94ddab943e4510d138150169a2758b5ef3eb191a9ee688de3e23ef7b3" -dependencies = [ - "cfg-if", -] - -[[package]] -name = "crossbeam-deque" -version = "0.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "613f8cc01fe9cf1a3eb3d7f488fd2fa8388403e97039e2f73692932e291a770d" -dependencies = [ - "crossbeam-epoch", - "crossbeam-utils", -] - -[[package]] -name = "crossbeam-epoch" -version = "0.9.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e" -dependencies = [ - "crossbeam-utils", -] - -[[package]] -name = "crossbeam-utils" -version = "0.8.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22ec99545bb0ed0ea7bb9b8e1e9122ea386ff8a48c0922e43f36d45ab09e0e80" - -[[package]] -name = "crypto-common" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" -dependencies = [ - "generic-array", - "typenum", -] - -[[package]] -name = "data-encoding" -version = "2.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8566979429cf69b49a5c740c60791108e86440e8be149bbea4fe54d2c32d6e2" - -[[package]] -name = "deranged" -version = "0.3.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4" -dependencies = [ - "powerfmt", -] - -[[package]] -name = "dialoguer" -version = "0.10.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59c6f2989294b9a498d3ad5491a79c6deb604617378e1cdc4bfc1c1361fe2f87" -dependencies = [ - "console", - "shell-words", -] - -[[package]] -name = "digest" -version = "0.10.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" -dependencies = [ - "block-buffer", - "crypto-common", -] - -[[package]] -name = "dirs" -version = "4.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca3aa72a6f96ea37bbc5aa912f6788242832f75369bdfdadcb0e38423f100059" -dependencies = [ - "dirs-sys", -] - -[[package]] -name = "dirs-sys" -version = "0.3.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b1d1d91c932ef41c0f2663aa8b0ca0342d444d842c06914aa0a7e352d0bada6" -dependencies = [ - "libc", - "redox_users", - "winapi", -] - -[[package]] -name = "dunce" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56ce8c6da7551ec6c462cbaf3bfbc75131ebbfa1c944aeaa9dab51ca1c5f0c3b" - -[[package]] -name = "either" -version = "1.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3dca9240753cf90908d7e4aac30f630662b02aebaa1b58a3cadabdb23385b58b" - -[[package]] -name = "encode_unicode" -version = "0.3.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f" - -[[package]] -name = "encoding_rs" -version = "0.8.34" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b45de904aa0b010bce2ab45264d0631681847fa7b6f2eaa7dab7619943bc4f59" -dependencies = [ - "cfg-if", -] - -[[package]] -name = "env_logger" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44533bbbb3bb3c1fa17d9f2e4e38bbbaf8396ba82193c4cb1b6445d711445d36" -dependencies = [ - "atty", - "humantime", - "log", - "regex", - "termcolor", -] - -[[package]] -name = "equivalent" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" - -[[package]] -name = "errno" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba" -dependencies = [ - "libc", - "windows-sys 0.52.0", -] - -[[package]] -name = "fastrand" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fc0510504f03c51ada170672ac806f1f105a88aa97a5281117e1ddc3368e51a" - -[[package]] -name = "fat-macho" -version = "0.4.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d4c93f393add03d72bc10dd3dea43a1610ecb29e0c0a6459c70b53b82931adf" -dependencies = [ - "goblin 0.8.2", -] - -[[package]] -name = "filetime" -version = "0.2.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ee447700ac8aa0b2f2bd7bc4462ad686ba06baa6727ac149a2d6277f0d240fd" -dependencies = [ - "cfg-if", - "libc", - "redox_syscall 0.4.1", - "windows-sys 0.52.0", -] - -[[package]] -name = "flate2" -version = "1.0.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f54427cfd1c7829e2a139fcefea601bf088ebca651d2bf53ebc600eac295dae" -dependencies = [ - "crc32fast", - "miniz_oxide", -] - -[[package]] -name = "fnv" -version = "1.0.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" - -[[package]] -name = "form_urlencoded" -version = "1.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" -dependencies = [ - "percent-encoding", -] - -[[package]] -name = "fs-err" -version = "2.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88a41f105fe1d5b6b34b2055e3dc59bb79b46b48b2040b9e6c7b4b5de097aa41" -dependencies = [ - "autocfg", -] - -[[package]] -name = "generic-array" -version = "0.14.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" -dependencies = [ - "typenum", - "version_check", -] - -[[package]] -name = "getrandom" -version = "0.2.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" -dependencies = [ - "cfg-if", - "libc", - "wasi", -] - -[[package]] -name = "gimli" -version = "0.29.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40ecd4077b5ae9fd2e9e169b102c6c330d0605168eb0e8bf79952b256dbefffd" - -[[package]] -name = "glob" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" - -[[package]] -name = "globset" -version = "0.4.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57da3b9b5b85bd66f31093f8c408b90a74431672542466497dcbdfdc02034be1" -dependencies = [ - "aho-corasick", - "bstr", - "log", - "regex-automata 0.4.7", - "regex-syntax 0.8.4", -] - -[[package]] -name = "goblin" -version = "0.5.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7666983ed0dd8d21a6f6576ee00053ca0926fb281a5522577a4dbd0f1b54143" -dependencies = [ - "log", - "plain", - "scroll 0.11.0", -] - -[[package]] -name = "goblin" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b363a30c165f666402fe6a3024d3bec7ebc898f96a4a23bd1c99f8dbf3f4f47" -dependencies = [ - "log", - "plain", - "scroll 0.12.0", -] - -[[package]] -name = "hashbrown" -version = "0.12.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" - -[[package]] -name = "hashbrown" -version = "0.14.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" -dependencies = [ - "ahash", - "allocator-api2", -] - -[[package]] -name = "heck" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" - -[[package]] -name = "heck" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" - -[[package]] -name = "hermit-abi" -version = "0.1.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" -dependencies = [ - "libc", -] - -[[package]] -name = "hermit-abi" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" - -[[package]] -name = "home" -version = "0.5.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3d1354bf6b7235cb4a0576c2619fd4ed18183f689b12b006a0ee7329eeff9a5" -dependencies = [ - "windows-sys 0.52.0", -] - -[[package]] -name = "human-panic" -version = "1.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4f016c89920bbb30951a8405ecacbb4540db5524313b9445736e7e1855cf370" -dependencies = [ - "anstream", - "anstyle", - "backtrace", - "os_info", - "serde", - "serde_derive", - "toml 0.8.14", - "uuid", -] - -[[package]] -name = "humantime" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df004cfca50ef23c36850aaaa59ad52cc70d0e90243c3c7737a4dd32dc7a3c4f" -dependencies = [ - "quick-error", -] - -[[package]] -name = "idna" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" -dependencies = [ - "unicode-bidi", - "unicode-normalization", -] - -[[package]] -name = "ignore" -version = "0.4.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b46810df39e66e925525d6e38ce1e7f6e1d208f72dc39757880fcb66e2c58af1" -dependencies = [ - "crossbeam-deque", - "globset", - "log", - "memchr", - "regex-automata 0.4.7", - "same-file", - "walkdir", - "winapi-util", -] - -[[package]] -name = "indexmap" -version = "1.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" -dependencies = [ - "autocfg", - "hashbrown 0.12.3", -] - -[[package]] -name = "indexmap" -version = "2.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" -dependencies = [ - "equivalent", - "hashbrown 0.14.5", -] - -[[package]] -name = "indicatif" -version = "0.17.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "763a5a8f45087d6bcea4222e7b72c291a054edf80e4ef6efd2a4979878c7bea3" -dependencies = [ - "console", - "instant", - "number_prefix", - "portable-atomic", - "unicode-width", -] - -[[package]] -name = "indoc" -version = "2.0.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b248f5224d1d606005e02c97f5aa4e88eeb230488bcc03bc9ca4d7991399f2b5" - -[[package]] -name = "instant" -version = "0.1.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0242819d153cba4b4b05a5a8f2a7e9bbf97b6055b2a002b395c96b5ff3c0222" -dependencies = [ - "cfg-if", -] - -[[package]] -name = "io-lifetimes" -version = "1.0.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eae7b9aee968036d54dce06cebaefd919e4472e753296daccd6d344e3e2df0c2" -dependencies = [ - "hermit-abi 0.3.9", - "libc", - "windows-sys 0.48.0", -] - -[[package]] -name = "is_terminal_polyfill" -version = "1.70.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8478577c03552c21db0e2724ffb8986a5ce7af88107e6be5d2ee6e158c12800" - -[[package]] -name = "itertools" -version = "0.10.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" -dependencies = [ - "either", -] - -[[package]] -name = "itertools" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1c173a5686ce8bfa551b3563d0c2170bf24ca44da99c7ca4bfdab5418c3fe57" -dependencies = [ - "either", -] - -[[package]] -name = "itoa" -version = "1.0.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" - -[[package]] -name = "lazy_static" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" - -[[package]] -name = "lddtree" -version = "0.2.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f16a1dee00c5a3de4f7027a742568bf1e2bdf326b3888f50761225ad8c0c9413" -dependencies = [ - "fs-err", - "glob", - "goblin 0.5.4", -] - -[[package]] -name = "libc" -version = "0.2.155" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c" - -[[package]] -name = "libredox" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d" -dependencies = [ - "bitflags 2.5.0", - "libc", -] - -[[package]] -name = "linux-raw-sys" -version = "0.3.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519" - -[[package]] -name = "linux-raw-sys" -version = "0.4.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" - -[[package]] -name = "lock_api" -version = "0.4.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07af8b9cdd281b7915f413fa73f29ebd5d55d0d3f0155584dade1ff18cea1b17" -dependencies = [ - "autocfg", - "scopeguard", -] - -[[package]] -name = "log" -version = "0.4.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c" - -[[package]] -name = "lzxd" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "784462f20dddd9dfdb45de963fa4ad4a288cb10a7889ac5d2c34fb6481c6b213" - -[[package]] -name = "mailparse" -version = "0.14.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d096594926cab442e054e047eb8c1402f7d5b2272573b97ba68aa40629f9757" -dependencies = [ - "charset", - "data-encoding", - "quoted_printable 0.5.0", -] - -[[package]] -name = "matchers" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8263075bb86c5a1b1427b5ae862e8889656f126e9f77c484496e8b47cf5c5558" -dependencies = [ - "regex-automata 0.1.10", -] - -[[package]] -name = "matrixmultiply" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "916806ba0031cd542105d916a97c8572e1fa6dd79c9c51e7eb43a09ec2dd84c1" -dependencies = [ - "rawpointer", -] - -[[package]] -name = "maturin" -version = "0.12.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2fcb045680e0b9d2e6cfee6d108daee7f5a17946dbed7157e6e1caee40bdeb25" -dependencies = [ - "anyhow", - "base64 0.13.1", - "bytesize", - "cargo-xwin", - "cargo-zigbuild", - "cargo_metadata", - "cbindgen", - "cc", - "clap 3.2.25", - "clap_complete", - "clap_complete_fig", - "configparser", - "console", - "dialoguer", - "dirs", - "dunce", - "fat-macho", - "flate2", - "fs-err", - "glob", - "goblin 0.5.4", - "human-panic", - "ignore", - "lddtree", - "minijinja", - "multipart", - "once_cell", - "platform-info", - "pretty_env_logger", - "pyproject-toml", - "python-pkginfo", - "regex", - "rpassword", - "rustc_version", - "serde", - "serde_json", - "sha2", - "shlex", - "tar", - "target-lexicon", - "tempfile", - "textwrap 0.15.2", - "thiserror", - "toml_edit 0.14.4", - "tracing", - "ureq", - "zip", -] - -[[package]] -name = "memchr" -version = "2.7.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" - -[[package]] -name = "memoffset" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "488016bfae457b036d996092f6cb448677611ce4449e970ceaf42695203f218a" -dependencies = [ - "autocfg", -] - -[[package]] -name = "mime" -version = "0.3.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" - -[[package]] -name = "mime_guess" -version = "2.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4192263c238a5f0d0c6bfd21f336a313a4ce1c450542449ca191bb657b4642ef" -dependencies = [ - "mime", - "unicase", -] - -[[package]] -name = "minijinja" -version = "0.15.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "359c4820413be7706e93999171652e140578384f85faac14cb22d350bd0fbabf" -dependencies = [ - "serde", -] - -[[package]] -name = "minimal-lexical" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" - -[[package]] -name = "miniz_oxide" -version = "0.7.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8a240ddb74feaf34a79a7add65a741f3167852fba007066dcac1ca548d89c08" -dependencies = [ - "adler", -] - -[[package]] -name = "msi" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eaa7bfcd0ffc3b4dc4a555e5ada4d302b4b6b5ce8d6bc07a6ea703ea63aff149" -dependencies = [ - "byteorder", - "cfb", - "encoding_rs", - "uuid", -] - -[[package]] -name = "multipart" -version = "0.18.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00dec633863867f29cb39df64a397cdf4a6354708ddd7759f70c7fb51c5f9182" -dependencies = [ - "log", - "mime", - "mime_guess", - "rand", - "tempfile", -] - -[[package]] -name = "ndarray" -version = "0.13.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac06db03ec2f46ee0ecdca1a1c34a99c0d188a0d83439b84bf0cb4b386e4ab09" -dependencies = [ - "matrixmultiply", - "num-complex", - "num-integer", - "num-traits", - "rawpointer", -] - -[[package]] -name = "nom" -version = "7.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" -dependencies = [ - "memchr", - "minimal-lexical", -] - -[[package]] -name = "num-complex" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6b19411a9719e753aff12e5187b74d60d3dc449ec3f4dc21e3989c3f554bc95" -dependencies = [ - "autocfg", - "num-traits", -] - -[[package]] -name = "num-conv" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" - -[[package]] -name = "num-integer" -version = "0.1.46" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f" -dependencies = [ - "num-traits", -] - -[[package]] -name = "num-traits" -version = "0.2.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" -dependencies = [ - "autocfg", -] - -[[package]] -name = "number_prefix" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "830b246a0e5f20af87141b25c173cd1b609bd7779a4617d6ec582abaf90870f3" - -[[package]] -name = "numpy" -version = "0.21.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec170733ca37175f5d75a5bea5911d6ff45d2cd52849ce98b685394e4f2f37f4" -dependencies = [ - "libc", - "ndarray", - "num-complex", - "num-integer", - "num-traits", - "pyo3", - "rustc-hash", -] - -[[package]] -name = "object" -version = "0.36.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "576dfe1fc8f9df304abb159d767a29d0476f7750fbf8aa7ad07816004a207434" -dependencies = [ - "memchr", -] - -[[package]] -name = "once_cell" -version = "1.19.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" - -[[package]] -name = "os_info" -version = "3.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae99c7fa6dd38c7cafe1ec085e804f8f555a2f8659b0dbe03f1f9963a9b51092" -dependencies = [ - "log", - "serde", - "windows-sys 0.52.0", -] - -[[package]] -name = "os_str_bytes" -version = "6.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2355d85b9a3786f481747ced0e0ff2ba35213a1f9bd406ed906554d7af805a1" - -[[package]] -name = "parking_lot" -version = "0.12.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1bf18183cf54e8d6059647fc3063646a1801cf30896933ec2311622cc4b9a27" -dependencies = [ - "lock_api", - "parking_lot_core", -] - -[[package]] -name = "parking_lot_core" -version = "0.9.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" -dependencies = [ - "cfg-if", - "libc", - "redox_syscall 0.5.1", - "smallvec", - "windows-targets 0.52.5", -] - -[[package]] -name = "path-slash" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "498a099351efa4becc6a19c72aa9270598e8fd274ca47052e37455241c88b696" - -[[package]] -name = "percent-encoding" -version = "2.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" - -[[package]] -name = "pin-project-lite" -version = "0.2.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" - -[[package]] -name = "pkg-config" -version = "0.3.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" - -[[package]] -name = "plain" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4596b6d070b27117e987119b4dac604f3c58cfb0b191112e24771b2faeac1a6" - -[[package]] -name = "platform-info" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84332c4de03d567e6f5ea143e35e63ceed534a34f768218aabf57879d7edf2a0" -dependencies = [ - "libc", - "winapi", -] - -[[package]] -name = "portable-atomic" -version = "1.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7170ef9988bc169ba16dd36a7fa041e5c4cbeb6a35b76d4c03daded371eae7c0" - -[[package]] -name = "powerfmt" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" - -[[package]] -name = "ppv-lite86" -version = "0.2.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" - -[[package]] -name = "pretty_env_logger" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "926d36b9553851b8b0005f1275891b392ee4d2d833852c417ed025477350fb9d" -dependencies = [ - "env_logger", - "log", -] - -[[package]] -name = "proc-macro-error" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" -dependencies = [ - "proc-macro-error-attr", - "proc-macro2", - "quote", - "syn 1.0.109", - "version_check", -] - -[[package]] -name = "proc-macro-error-attr" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" -dependencies = [ - "proc-macro2", - "quote", - "version_check", -] - -[[package]] -name = "proc-macro2" -version = "1.0.85" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22244ce15aa966053a896d1accb3a6e68469b97c7f33f284b99f0d576879fc23" -dependencies = [ - "unicode-ident", -] - -[[package]] -name = "psm" -version = "0.1.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5787f7cda34e3033a72192c018bc5883100330f362ef279a8cbccfce8bb4e874" -dependencies = [ - "cc", -] - -[[package]] -name = "pyo3" -version = "0.21.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5e00b96a521718e08e03b1a622f01c8a8deb50719335de3f60b3b3950f069d8" -dependencies = [ - "cfg-if", - "indoc", - "libc", - "memoffset", - "parking_lot", - "portable-atomic", - "pyo3-build-config", - "pyo3-ffi", - "pyo3-macros", - "unindent", -] - -[[package]] -name = "pyo3-build-config" -version = "0.21.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7883df5835fafdad87c0d888b266c8ec0f4c9ca48a5bed6bbb592e8dedee1b50" -dependencies = [ - "once_cell", - "target-lexicon", -] - -[[package]] -name = "pyo3-ffi" -version = "0.21.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01be5843dc60b916ab4dad1dca6d20b9b4e6ddc8e15f50c47fe6d85f1fb97403" -dependencies = [ - "libc", - "pyo3-build-config", -] - -[[package]] -name = "pyo3-macros" -version = "0.21.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77b34069fc0682e11b31dbd10321cbf94808394c56fd996796ce45217dfac53c" -dependencies = [ - "proc-macro2", - "pyo3-macros-backend", - "quote", - "syn 2.0.66", -] - -[[package]] -name = "pyo3-macros-backend" -version = "0.21.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08260721f32db5e1a5beae69a55553f56b99bd0e1c3e6e0a5e8851a9d0f5a85c" -dependencies = [ - "heck 0.4.1", - "proc-macro2", - "pyo3-build-config", - "quote", - "syn 2.0.66", -] - -[[package]] -name = "pyproject-toml" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee8476266c07b589d6ed54c761181466f4e4092107869be49ae26b3c0cdde8db" -dependencies = [ - "serde", - "toml 0.7.8", -] - -[[package]] -name = "python-pkginfo" -version = "0.5.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e23988cc0f9fbe3c42ae6e399daa7c0273d6013784b744b1742c6e1060611b0e" -dependencies = [ - "flate2", - "fs-err", - "mailparse", - "rfc2047-decoder", - "tar", - "thiserror", - "zip", -] - -[[package]] -name = "quick-error" -version = "1.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" - -[[package]] -name = "quote" -version = "1.0.36" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" -dependencies = [ - "proc-macro2", -] - -[[package]] -name = "quoted_printable" -version = "0.4.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a3866219251662ec3b26fc217e3e05bf9c4f84325234dfb96bf0bf840889e49" - -[[package]] -name = "quoted_printable" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79ec282e887b434b68c18fe5c121d38e72a5cf35119b59e54ec5b992ea9c8eb0" - -[[package]] -name = "rand" -version = "0.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" -dependencies = [ - "libc", - "rand_chacha", - "rand_core", -] - -[[package]] -name = "rand_chacha" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" -dependencies = [ - "ppv-lite86", - "rand_core", -] - -[[package]] -name = "rand_core" -version = "0.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" -dependencies = [ - "getrandom", -] - -[[package]] -name = "rawpointer" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60a357793950651c4ed0f3f52338f53b2f809f32d83a07f72909fa13e4c6c1e3" - -[[package]] -name = "rayon" -version = "1.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b418a60154510ca1a002a752ca9714984e21e4241e804d32555251faf8b78ffa" -dependencies = [ - "either", - "rayon-core", -] - -[[package]] -name = "rayon-core" -version = "1.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1465873a3dfdaa8ae7cb14b4383657caab0b3e8a0aa9ae8e04b044854c8dfce2" -dependencies = [ - "crossbeam-deque", - "crossbeam-utils", -] - -[[package]] -name = "redox_syscall" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" -dependencies = [ - "bitflags 1.3.2", -] - -[[package]] -name = "redox_syscall" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "469052894dcb553421e483e4209ee581a45100d31b4018de03e5a7ad86374a7e" -dependencies = [ - "bitflags 2.5.0", -] - -[[package]] -name = "redox_users" -version = "0.4.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd283d9651eeda4b2a83a43c1c91b266c40fd76ecd39a50a8c630ae69dc72891" -dependencies = [ - "getrandom", - "libredox", - "thiserror", -] - -[[package]] -name = "regex" -version = "1.10.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b91213439dad192326a0d7c6ee3955910425f441d7038e0d6933b0aec5c4517f" -dependencies = [ - "aho-corasick", - "memchr", - "regex-automata 0.4.7", - "regex-syntax 0.8.4", -] - -[[package]] -name = "regex-automata" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" -dependencies = [ - "regex-syntax 0.6.29", -] - -[[package]] -name = "regex-automata" -version = "0.4.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38caf58cc5ef2fed281f89292ef23f6365465ed9a41b7a7754eb4e26496c92df" -dependencies = [ - "aho-corasick", - "memchr", - "regex-syntax 0.8.4", -] - -[[package]] -name = "regex-syntax" -version = "0.6.29" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" - -[[package]] -name = "regex-syntax" -version = "0.8.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a66a03ae7c801facd77a29370b4faec201768915ac14a721ba36f20bc9c209b" - -[[package]] -name = "rfc2047-decoder" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61fc4b4e52897c3e30b12b7e9b04461215b647fbe66f6def60dd8edbce14ec2e" -dependencies = [ - "base64 0.21.7", - "charset", - "chumsky", - "memchr", - "quoted_printable 0.4.8", - "thiserror", -] - -[[package]] -name = "ring" -version = "0.17.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c17fa4cb658e3583423e915b9f3acc01cceaee1860e33d59ebae66adc3a2dc0d" -dependencies = [ - "cc", - "cfg-if", - "getrandom", - "libc", - "spin", - "untrusted", - "windows-sys 0.52.0", -] - -[[package]] -name = "rpassword" -version = "6.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2bf099a1888612545b683d2661a1940089f6c2e5a8e38979b2159da876bfd956" -dependencies = [ - "libc", - "serde", - "serde_json", - "winapi", -] - -[[package]] -name = "rustc-demangle" -version = "0.1.24" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" - -[[package]] -name = "rustc-hash" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" - -[[package]] -name = "rustc_version" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" -dependencies = [ - "semver", -] - -[[package]] -name = "rustix" -version = "0.37.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fea8ca367a3a01fe35e6943c400addf443c0f57670e6ec51196f71a4b8762dd2" -dependencies = [ - "bitflags 1.3.2", - "errno", - "io-lifetimes", - "libc", - "linux-raw-sys 0.3.8", - "windows-sys 0.48.0", -] - -[[package]] -name = "rustix" -version = "0.38.34" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70dc5ec042f7a43c4a73241207cecc9873a06d45debb38b329f8541d85c2730f" -dependencies = [ - "bitflags 2.5.0", - "errno", - "libc", - "linux-raw-sys 0.4.14", - "windows-sys 0.52.0", -] - -[[package]] -name = "rustls" -version = "0.22.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf4ef73721ac7bcd79b2b315da7779d8fc09718c6b3d2d1b2d94850eb8c18432" -dependencies = [ - "log", - "ring", - "rustls-pki-types", - "rustls-webpki", - "subtle", - "zeroize", -] - -[[package]] -name = "rustls-pki-types" -version = "1.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "976295e77ce332211c0d24d92c0e83e50f5c5f046d11082cea19f3df13a3562d" - -[[package]] -name = "rustls-webpki" -version = "0.102.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff448f7e92e913c4b7d4c6d8e4540a1724b319b4152b8aef6d4cf8339712b33e" -dependencies = [ - "ring", - "rustls-pki-types", - "untrusted", -] - -[[package]] -name = "ryu" -version = "1.0.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" - -[[package]] -name = "same-file" -version = "1.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" -dependencies = [ - "winapi-util", -] - -[[package]] -name = "scopeguard" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" - -[[package]] -name = "scroll" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04c565b551bafbef4157586fa379538366e4385d42082f255bfd96e4fe8519da" -dependencies = [ - "scroll_derive 0.11.1", -] - -[[package]] -name = "scroll" -version = "0.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ab8598aa408498679922eff7fa985c25d58a90771bd6be794434c5277eab1a6" -dependencies = [ - "scroll_derive 0.12.0", -] - -[[package]] -name = "scroll_derive" -version = "0.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1db149f81d46d2deba7cd3c50772474707729550221e69588478ebf9ada425ae" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.66", -] - -[[package]] -name = "scroll_derive" -version = "0.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f81c2fde025af7e69b1d1420531c8a8811ca898919db177141a85313b1cb932" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.66", -] - -[[package]] -name = "semver" -version = "1.0.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" -dependencies = [ - "serde", -] - -[[package]] -name = "serde" -version = "1.0.203" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7253ab4de971e72fb7be983802300c30b5a7f0c2e56fab8abfc6a214307c0094" -dependencies = [ - "serde_derive", -] - -[[package]] -name = "serde_derive" -version = "1.0.203" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "500cbc0ebeb6f46627f50f3f5811ccf6bf00643be300b4c3eabc0ef55dc5b5ba" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.66", -] - -[[package]] -name = "serde_json" -version = "1.0.117" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "455182ea6142b14f93f4bc5320a2b31c1f266b66a4a5c858b013302a5d8cbfc3" -dependencies = [ - "itoa", - "ryu", - "serde", -] - -[[package]] -name = "serde_spanned" -version = "0.6.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79e674e01f999af37c49f70a6ede167a8a60b2503e56c5599532a65baa5969a0" -dependencies = [ - "serde", -] - -[[package]] -name = "sha2" -version = "0.10.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" -dependencies = [ - "cfg-if", - "cpufeatures", - "digest", -] - -[[package]] -name = "sharded-slab" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f40ca3c46823713e0d4209592e8d6e826aa57e928f09752619fc696c499637f6" -dependencies = [ - "lazy_static", -] - -[[package]] -name = "shell-words" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24188a676b6ae68c3b2cb3a01be17fbf7240ce009799bb56d5b1409051e78fde" - -[[package]] -name = "shlex" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" - -[[package]] -name = "smallvec" -version = "1.13.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" - -[[package]] -name = "smawk" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7c388c1b5e93756d0c740965c41e8822f866621d41acbdf6336a6a168f8840c" - -[[package]] -name = "socks" -version = "0.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0c3dbbd9ae980613c6dd8e28a9407b50509d3803b57624d5dfe8315218cd58b" -dependencies = [ - "byteorder", - "libc", - "winapi", -] - -[[package]] -name = "spin" -version = "0.9.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" - -[[package]] -name = "stacker" -version = "0.1.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c886bd4480155fd3ef527d45e9ac8dd7118a898a46530b7b94c3e21866259fce" -dependencies = [ - "cc", - "cfg-if", - "libc", - "psm", - "winapi", -] - -[[package]] -name = "static_assertions" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" - -[[package]] -name = "strsim" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" - -[[package]] -name = "strsim" -version = "0.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" - -[[package]] -name = "subtle" -version = "2.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d0208408ba0c3df17ed26eb06992cb1a1268d41b2c0e12e65203fbe3972cee5" - -[[package]] -name = "syn" -version = "1.0.109" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] - -[[package]] -name = "syn" -version = "2.0.66" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c42f3f41a2de00b01c0aaad383c5a45241efc8b2d1eda5661812fda5f3cdcff5" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] - -[[package]] -name = "tar" -version = "0.4.41" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb797dad5fb5b76fcf519e702f4a589483b5ef06567f160c392832c1f5e44909" -dependencies = [ - "filetime", - "libc", - "xattr", -] - -[[package]] -name = "target-lexicon" -version = "0.12.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1fc403891a21bcfb7c37834ba66a547a8f402146eba7265b5a6d88059c9ff2f" - -[[package]] -name = "tempfile" -version = "3.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85b77fafb263dd9d05cbeac119526425676db3784113aa9295c88498cbf8bff1" -dependencies = [ - "cfg-if", - "fastrand", - "rustix 0.38.34", - "windows-sys 0.52.0", -] - -[[package]] -name = "termcolor" -version = "1.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06794f8f6c5c898b3275aebefa6b8a1cb24cd2c6c79397ab15774837a0bc5755" -dependencies = [ - "winapi-util", -] - -[[package]] -name = "terminal_size" -version = "0.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e6bf6f19e9f8ed8d4048dc22981458ebcf406d67e94cd422e5ecd73d63b3237" -dependencies = [ - "rustix 0.37.27", - "windows-sys 0.48.0", -] - -[[package]] -name = "terminal_size" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21bebf2b7c9e0a515f6e0f8c51dc0f8e4696391e6f1ff30379559f8365fb0df7" -dependencies = [ - "rustix 0.38.34", - "windows-sys 0.48.0", -] - -[[package]] -name = "textwrap" -version = "0.15.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7b3e525a49ec206798b40326a44121291b530c963cfb01018f63e135bac543d" -dependencies = [ - "smawk", - "unicode-linebreak", - "unicode-width", -] - -[[package]] -name = "textwrap" -version = "0.16.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23d434d3f8967a09480fb04132ebe0a3e088c173e6d0ee7897abbdf4eab0f8b9" -dependencies = [ - "terminal_size 0.2.6", -] - -[[package]] -name = "thiserror" -version = "1.0.61" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c546c80d6be4bc6a00c0f01730c08df82eaa7a7a61f11d656526506112cc1709" -dependencies = [ - "thiserror-impl", -] - -[[package]] -name = "thiserror-impl" -version = "1.0.61" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46c3384250002a6d5af4d114f2845d37b57521033f30d5c3f46c4d70e1197533" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.66", -] - -[[package]] -name = "thread_local" -version = "1.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b9ef9bad013ada3808854ceac7b46812a6465ba368859a37e2100283d2d719c" -dependencies = [ - "cfg-if", - "once_cell", -] - -[[package]] -name = "time" -version = "0.3.36" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5dfd88e563464686c916c7e46e623e520ddc6d79fa6641390f2e3fa86e83e885" -dependencies = [ - "deranged", - "num-conv", - "powerfmt", - "serde", - "time-core", -] - -[[package]] -name = "time-core" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" - -[[package]] -name = "tinyvec" -version = "1.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" -dependencies = [ - "tinyvec_macros", -] - -[[package]] -name = "tinyvec_macros" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" - -[[package]] -name = "toml" -version = "0.5.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4f7f0dd8d50a853a531c426359045b1998f04219d88799810762cd4ad314234" -dependencies = [ - "serde", -] - -[[package]] -name = "toml" -version = "0.7.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd79e69d3b627db300ff956027cc6c3798cef26d22526befdfcd12feeb6d2257" -dependencies = [ - "serde", - "serde_spanned", - "toml_datetime", - "toml_edit 0.19.15", -] - -[[package]] -name = "toml" -version = "0.8.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f49eb2ab21d2f26bd6db7bf383edc527a7ebaee412d17af4d40fdccd442f335" -dependencies = [ - "serde", - "serde_spanned", - "toml_datetime", - "toml_edit 0.22.14", -] - -[[package]] -name = "toml_datetime" -version = "0.6.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4badfd56924ae69bcc9039335b2e017639ce3f9b001c393c1b2d1ef846ce2cbf" -dependencies = [ - "serde", -] - -[[package]] -name = "toml_edit" -version = "0.14.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5376256e44f2443f8896ac012507c19a012df0fe8758b55246ae51a2279db51f" -dependencies = [ - "combine", - "indexmap 1.9.3", - "itertools 0.10.5", - "serde", -] - -[[package]] -name = "toml_edit" -version = "0.19.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" -dependencies = [ - "indexmap 2.2.6", - "serde", - "serde_spanned", - "toml_datetime", - "winnow", -] - -[[package]] -name = "toml_edit" -version = "0.22.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f21c7aaf97f1bd9ca9d4f9e73b0a6c74bd5afef56f2bc931943a6e1c37e04e38" -dependencies = [ - "indexmap 2.2.6", - "serde", - "serde_spanned", - "toml_datetime", -] - -[[package]] -name = "tracing" -version = "0.1.40" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" -dependencies = [ - "pin-project-lite", - "tracing-attributes", - "tracing-core", -] - -[[package]] -name = "tracing-attributes" -version = "0.1.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.66", -] - -[[package]] -name = "tracing-core" -version = "0.1.32" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" -dependencies = [ - "once_cell", - "valuable", -] - -[[package]] -name = "tracing-serde" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc6b213177105856957181934e4920de57730fc69bf42c37ee5bb664d406d9e1" -dependencies = [ - "serde", - "tracing-core", -] - -[[package]] -name = "tracing-subscriber" -version = "0.3.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad0f048c97dbd9faa9b7df56362b8ebcaa52adb06b498c050d2f4e32f90a7a8b" -dependencies = [ - "matchers", - "once_cell", - "regex", - "serde", - "serde_json", - "sharded-slab", - "thread_local", - "tracing", - "tracing-core", - "tracing-serde", -] - -[[package]] -name = "twox-hash" -version = "1.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97fee6b57c6a41524a810daee9286c02d7752c4253064d0b05472833a438f675" -dependencies = [ - "cfg-if", - "rand", - "static_assertions", -] - -[[package]] -name = "typenum" -version = "1.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" - -[[package]] -name = "unicase" -version = "2.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7d2d4dafb69621809a81864c9c1b864479e1235c0dd4e199924b9742439ed89" -dependencies = [ - "version_check", -] - -[[package]] -name = "unicode-bidi" -version = "0.3.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75" - -[[package]] -name = "unicode-ident" -version = "1.0.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" - -[[package]] -name = "unicode-linebreak" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b09c83c3c29d37506a3e260c08c03743a6bb66a9cd432c6934ab501a190571f" - -[[package]] -name = "unicode-normalization" -version = "0.1.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a56d1686db2308d901306f92a263857ef59ea39678a5458e7cb17f01415101f5" -dependencies = [ - "tinyvec", -] - -[[package]] -name = "unicode-width" -version = "0.1.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0336d538f7abc86d282a4189614dfaa90810dfc2c6f6427eaf88e16311dd225d" - -[[package]] -name = "unindent" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7de7d73e1754487cb58364ee906a499937a0dfabd86bcb980fa99ec8c8fa2ce" - -[[package]] -name = "untrusted" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" - -[[package]] -name = "ureq" -version = "2.9.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d11a831e3c0b56e438a28308e7c810799e3c118417f342d30ecec080105395cd" -dependencies = [ - "base64 0.22.1", - "flate2", - "log", - "once_cell", - "rustls", - "rustls-pki-types", - "rustls-webpki", - "socks", - "url", - "webpki-roots", -] - -[[package]] -name = "url" -version = "2.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22784dbdf76fdde8af1aeda5622b546b422b6fc585325248a2bf9f5e41e94d6c" -dependencies = [ - "form_urlencoded", - "idna", - "percent-encoding", -] - -[[package]] -name = "utf8parse" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" - -[[package]] -name = "uuid" -version = "1.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a183cf7feeba97b4dd1c0d46788634f6221d87fa961b305bed08c851829efcc0" -dependencies = [ - "getrandom", -] - -[[package]] -name = "valuable" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" - -[[package]] -name = "version_check" -version = "0.9.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" - -[[package]] -name = "versions" -version = "5.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c73a36bc44e3039f51fbee93e39f41225f6b17b380eb70cc2aab942df06b34dd" -dependencies = [ - "itertools 0.11.0", - "nom", -] - -[[package]] -name = "walkdir" -version = "2.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" -dependencies = [ - "same-file", - "winapi-util", -] - -[[package]] -name = "wasi" -version = "0.11.0+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" - -[[package]] -name = "webpki-roots" -version = "0.26.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd7c23921eeb1713a4e851530e9b9756e4fb0e89978582942612524cf09f01cd" -dependencies = [ - "rustls-pki-types", -] - -[[package]] -name = "which" -version = "4.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87ba24419a2078cd2b0f2ede2691b6c66d8e47836da3b6db8265ebad47afbfc7" -dependencies = [ - "either", - "home", - "once_cell", - "rustix 0.38.34", -] - -[[package]] -name = "winapi" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" -dependencies = [ - "winapi-i686-pc-windows-gnu", - "winapi-x86_64-pc-windows-gnu", -] - -[[package]] -name = "winapi-i686-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" - -[[package]] -name = "winapi-util" -version = "0.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d4cc384e1e73b93bafa6fb4f1df8c41695c8a91cf9c4c64358067d15a7b6c6b" -dependencies = [ - "windows-sys 0.52.0", -] - -[[package]] -name = "winapi-x86_64-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" - -[[package]] -name = "windows-sys" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" -dependencies = [ - "windows-targets 0.48.5", -] - -[[package]] -name = "windows-sys" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" -dependencies = [ - "windows-targets 0.52.5", -] - -[[package]] -name = "windows-targets" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" -dependencies = [ - "windows_aarch64_gnullvm 0.48.5", - "windows_aarch64_msvc 0.48.5", - "windows_i686_gnu 0.48.5", - "windows_i686_msvc 0.48.5", - "windows_x86_64_gnu 0.48.5", - "windows_x86_64_gnullvm 0.48.5", - "windows_x86_64_msvc 0.48.5", -] - -[[package]] -name = "windows-targets" -version = "0.52.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f0713a46559409d202e70e28227288446bf7841d3211583a4b53e3f6d96e7eb" -dependencies = [ - "windows_aarch64_gnullvm 0.52.5", - "windows_aarch64_msvc 0.52.5", - "windows_i686_gnu 0.52.5", - "windows_i686_gnullvm", - "windows_i686_msvc 0.52.5", - "windows_x86_64_gnu 0.52.5", - "windows_x86_64_gnullvm 0.52.5", - "windows_x86_64_msvc 0.52.5", -] - -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" - -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.52.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7088eed71e8b8dda258ecc8bac5fb1153c5cffaf2578fc8ff5d61e23578d3263" - -[[package]] -name = "windows_aarch64_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" - -[[package]] -name = "windows_aarch64_msvc" -version = "0.52.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9985fd1504e250c615ca5f281c3f7a6da76213ebd5ccc9561496568a2752afb6" - -[[package]] -name = "windows_i686_gnu" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" - -[[package]] -name = "windows_i686_gnu" -version = "0.52.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88ba073cf16d5372720ec942a8ccbf61626074c6d4dd2e745299726ce8b89670" - -[[package]] -name = "windows_i686_gnullvm" -version = "0.52.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87f4261229030a858f36b459e748ae97545d6f1ec60e5e0d6a3d32e0dc232ee9" - -[[package]] -name = "windows_i686_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" - -[[package]] -name = "windows_i686_msvc" -version = "0.52.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db3c2bf3d13d5b658be73463284eaf12830ac9a26a90c717b7f771dfe97487bf" - -[[package]] -name = "windows_x86_64_gnu" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" - -[[package]] -name = "windows_x86_64_gnu" -version = "0.52.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e4246f76bdeff09eb48875a0fd3e2af6aada79d409d33011886d3e1581517d9" - -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" - -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.52.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "852298e482cd67c356ddd9570386e2862b5673c85bd5f88df9ab6802b334c596" - -[[package]] -name = "windows_x86_64_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" - -[[package]] -name = "windows_x86_64_msvc" -version = "0.52.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bec47e5bfd1bff0eeaf6d8b485cc1074891a197ab4225d504cb7a1ab88b02bf0" - -[[package]] -name = "winnow" -version = "0.5.40" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f593a95398737aeed53e489c785df13f3618e41dbcd6718c6addbf1395aa6876" -dependencies = [ - "memchr", -] - -[[package]] -name = "xattr" -version = "1.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8da84f1a25939b27f6820d92aed108f83ff920fdf11a7b19366c27c4cda81d4f" -dependencies = [ - "libc", - "linux-raw-sys 0.4.14", - "rustix 0.38.34", -] - -[[package]] -name = "xwin" -version = "0.2.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c16d94a0ca213c840bc7482ca9388957b0ee2eafceab13846d4189504155e62" -dependencies = [ - "anyhow", - "bytes", - "cab", - "camino", - "clap 4.5.7", - "cli-table", - "flate2", - "indicatif", - "msi", - "parking_lot", - "rayon", - "regex", - "serde", - "serde_json", - "sha2", - "tempfile", - "tracing", - "tracing-subscriber", - "twox-hash", - "ureq", - "versions", - "zip", -] - -[[package]] -name = "zerocopy" -version = "0.7.34" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae87e3fcd617500e5d106f0380cf7b77f3c6092aae37191433159dda23cfb087" -dependencies = [ - "zerocopy-derive", -] - -[[package]] -name = "zerocopy-derive" -version = "0.7.34" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15e934569e47891f7d9411f1a451d947a60e000ab3bd24fbb970f000387d1b3b" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.66", -] - -[[package]] -name = "zeroize" -version = "1.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde" - -[[package]] -name = "zip" -version = "0.6.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "760394e246e4c28189f19d488c058bf16f564016aefac5d32bb1f3b51d5e9261" -dependencies = [ - "byteorder", - "bzip2", - "crc32fast", - "crossbeam-utils", - "flate2", - "time", -] +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 3 + +[[package]] +name = "addr2line" +version = "0.22.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e4503c46a5c0c7844e948c9a4d6acd9f50cccb4de1c48eb9e291ea17470c678" +dependencies = [ + "gimli", +] + +[[package]] +name = "adler" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" + +[[package]] +name = "ahash" +version = "0.8.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" +dependencies = [ + "cfg-if", + "once_cell", + "version_check", + "zerocopy", +] + +[[package]] +name = "aho-corasick" +version = "1.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" +dependencies = [ + "memchr", +] + +[[package]] +name = "allocator-api2" +version = "0.2.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c6cb57a04249c6480766f7f7cef5467412af1490f8d1e243141daddada3264f" + +[[package]] +name = "anstream" +version = "0.6.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "418c75fa768af9c03be99d17643f93f79bbba589895012a80e3452a19ddda15b" +dependencies = [ + "anstyle", + "anstyle-parse", + "anstyle-query", + "anstyle-wincon", + "colorchoice", + "is_terminal_polyfill", + "utf8parse", +] + +[[package]] +name = "anstyle" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "038dfcf04a5feb68e9c60b21c9625a54c2c0616e79b72b0fd87075a056ae1d1b" + +[[package]] +name = "anstyle-parse" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c03a11a9034d92058ceb6ee011ce58af4a9bf61491aa7e1e59ecd24bd40d22d4" +dependencies = [ + "utf8parse", +] + +[[package]] +name = "anstyle-query" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad186efb764318d35165f1758e7dcef3b10628e26d41a44bc5550652e6804391" +dependencies = [ + "windows-sys 0.52.0", +] + +[[package]] +name = "anstyle-wincon" +version = "3.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61a38449feb7068f52bb06c12759005cf459ee52bb4adc1d5a7c4322d716fb19" +dependencies = [ + "anstyle", + "windows-sys 0.52.0", +] + +[[package]] +name = "anyhow" +version = "1.0.86" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da" + +[[package]] +name = "anyon-braiding-simulator" +version = "0.1.0" +dependencies = [ + "maturin", + "ndarray", + "numpy", + "pyo3", +] + +[[package]] +name = "atty" +version = "0.2.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" +dependencies = [ + "hermit-abi 0.1.19", + "libc", + "winapi", +] + +[[package]] +name = "autocfg" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" + +[[package]] +name = "backtrace" +version = "0.3.73" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5cc23269a4f8976d0a4d2e7109211a419fe30e8d88d677cd60b6bc79c5732e0a" +dependencies = [ + "addr2line", + "cc", + "cfg-if", + "libc", + "miniz_oxide", + "object", + "rustc-demangle", +] + +[[package]] +name = "base64" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" + +[[package]] +name = "base64" +version = "0.21.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" + +[[package]] +name = "base64" +version = "0.22.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" + +[[package]] +name = "bitflags" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" + +[[package]] +name = "bitflags" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf4b9d6a944f767f8e5e0db018570623c85f3d925ac718db4e06d0187adb21c1" + +[[package]] +name = "block-buffer" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" +dependencies = [ + "generic-array", +] + +[[package]] +name = "bstr" +version = "1.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05efc5cfd9110c8416e471df0e96702d58690178e206e61b7173706673c93706" +dependencies = [ + "memchr", + "serde", +] + +[[package]] +name = "byteorder" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" + +[[package]] +name = "bytes" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "514de17de45fdb8dc022b1a7975556c53c86f9f0aa5f534b98977b171857c2c9" + +[[package]] +name = "bytesize" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a3e368af43e418a04d52505cf3dbc23dda4e3407ae2fa99fd0e4f308ce546acc" + +[[package]] +name = "bzip2" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bdb116a6ef3f6c3698828873ad02c3014b3c85cadb88496095628e3ef1e347f8" +dependencies = [ + "bzip2-sys", + "libc", +] + +[[package]] +name = "bzip2-sys" +version = "0.1.11+1.0.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "736a955f3fa7875102d57c82b8cac37ec45224a07fd32d58f9f7a186b6cd4cdc" +dependencies = [ + "cc", + "libc", + "pkg-config", +] + +[[package]] +name = "cab" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae6b4de23c7d39c0631fd3cc952d87951c86c75a13812d7247cb7a896e7b3551" +dependencies = [ + "byteorder", + "flate2", + "lzxd", + "time", +] + +[[package]] +name = "camino" +version = "1.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e0ec6b951b160caa93cc0c7b209e5a3bff7aae9062213451ac99493cd844c239" +dependencies = [ + "serde", +] + +[[package]] +name = "cargo-options" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68dacdf12b405b432ddcb94aa5edef0766daf8cb781f484e56b518305afd45ba" +dependencies = [ + "clap 3.2.25", +] + +[[package]] +name = "cargo-platform" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24b1f0365a6c6bb4020cd05806fd0d33c44d38046b8bd7f0e40814b9763cabfc" +dependencies = [ + "serde", +] + +[[package]] +name = "cargo-xwin" +version = "0.8.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb40f2f01bc8ff52fbb570b4b7f8ec823ba21ce1a64352492868eab29f39b9fc" +dependencies = [ + "anyhow", + "cargo-options", + "clap 3.2.25", + "dirs", + "fs-err", + "indicatif", + "path-slash", + "which", + "xwin", +] + +[[package]] +name = "cargo-zigbuild" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed951e06c76e4580db0fec84aad5a0266f876f82c3190e323b4c09875edf5750" +dependencies = [ + "anyhow", + "cargo-options", + "cargo_metadata", + "clap 3.2.25", + "dirs", + "fs-err", + "path-slash", + "rustc_version", + "semver", + "serde", + "serde_json", + "target-lexicon", +] + +[[package]] +name = "cargo_metadata" +version = "0.14.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4acbb09d9ee8e23699b9634375c72795d095bf268439da88562cf9b501f181fa" +dependencies = [ + "camino", + "cargo-platform", + "semver", + "serde", + "serde_json", +] + +[[package]] +name = "cbindgen" +version = "0.24.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4b922faaf31122819ec80c4047cc684c6979a087366c069611e33649bf98e18d" +dependencies = [ + "heck 0.4.1", + "indexmap 1.9.3", + "log", + "proc-macro2", + "quote", + "serde", + "serde_json", + "syn 1.0.109", + "tempfile", + "toml 0.5.11", +] + +[[package]] +name = "cc" +version = "1.0.99" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96c51067fd44124faa7f870b4b1c969379ad32b2ba805aa959430ceaa384f695" + +[[package]] +name = "cfb" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d38f2da7a0a2c4ccf0065be06397cc26a81f4e528be095826eee9d4adbb8c60f" +dependencies = [ + "byteorder", + "fnv", + "uuid", +] + +[[package]] +name = "cfg-if" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" + +[[package]] +name = "charset" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "18e9079d1a12a2cc2bffb5db039c43661836ead4082120d5844f02555aca2d46" +dependencies = [ + "base64 0.13.1", + "encoding_rs", +] + +[[package]] +name = "chumsky" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8eebd66744a15ded14960ab4ccdbfb51ad3b81f51f3f04a80adac98c985396c9" +dependencies = [ + "hashbrown 0.14.5", + "stacker", +] + +[[package]] +name = "clap" +version = "3.2.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ea181bf566f71cb9a5d17a59e1871af638180a18fb0035c92ae62b705207123" +dependencies = [ + "atty", + "bitflags 1.3.2", + "clap_derive 3.2.25", + "clap_lex 0.2.4", + "indexmap 1.9.3", + "once_cell", + "strsim 0.10.0", + "termcolor", + "terminal_size 0.2.6", + "textwrap 0.16.1", +] + +[[package]] +name = "clap" +version = "4.5.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5db83dced34638ad474f39f250d7fea9598bdd239eaced1bdf45d597da0f433f" +dependencies = [ + "clap_builder", + "clap_derive 4.5.5", +] + +[[package]] +name = "clap_builder" +version = "4.5.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7e204572485eb3fbf28f871612191521df159bc3e15a9f5064c66dba3a8c05f" +dependencies = [ + "anstream", + "anstyle", + "clap_lex 0.7.1", + "strsim 0.11.1", + "terminal_size 0.3.0", +] + +[[package]] +name = "clap_complete" +version = "3.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f7a2e0a962c45ce25afce14220bc24f9dade0a1787f185cecf96bfba7847cd8" +dependencies = [ + "clap 3.2.25", +] + +[[package]] +name = "clap_complete_fig" +version = "3.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed37b4c0c1214673eba6ad8ea31666626bf72be98ffb323067d973c48b4964b9" +dependencies = [ + "clap 3.2.25", + "clap_complete", +] + +[[package]] +name = "clap_derive" +version = "3.2.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae6371b8bdc8b7d3959e9cf7b22d4435ef3e79e138688421ec654acf8c81b008" +dependencies = [ + "heck 0.4.1", + "proc-macro-error", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "clap_derive" +version = "4.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c780290ccf4fb26629baa7a1081e68ced113f1d3ec302fa5948f1c381ebf06c6" +dependencies = [ + "heck 0.5.0", + "proc-macro2", + "quote", + "syn 2.0.66", +] + +[[package]] +name = "clap_lex" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2850f2f5a82cbf437dd5af4d49848fbdfc27c157c3d010345776f952765261c5" +dependencies = [ + "os_str_bytes", +] + +[[package]] +name = "clap_lex" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4b82cf0babdbd58558212896d1a4272303a57bdb245c2bf1147185fb45640e70" + +[[package]] +name = "cli-table" +version = "0.4.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "adfbb116d9e2c4be7011360d0c0bee565712c11e969c9609b25b619366dc379d" +dependencies = [ + "termcolor", + "unicode-width", +] + +[[package]] +name = "colorchoice" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b6a852b24ab71dffc585bcb46eaf7959d175cb865a7152e35b348d1b2960422" + +[[package]] +name = "combine" +version = "4.6.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba5a308b75df32fe02788e748662718f03fde005016435c444eea572398219fd" +dependencies = [ + "bytes", + "memchr", +] + +[[package]] +name = "configparser" +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e57e3272f0190c3f1584272d613719ba5fc7df7f4942fe542e63d949cf3a649b" + +[[package]] +name = "console" +version = "0.15.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0e1f83fc076bd6dd27517eacdf25fef6c4dfe5f1d7448bafaaf3a26f13b5e4eb" +dependencies = [ + "encode_unicode", + "lazy_static", + "libc", + "unicode-width", + "windows-sys 0.52.0", +] + +[[package]] +name = "cpufeatures" +version = "0.2.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53fe5e26ff1b7aef8bca9c6080520cfb8d9333c7568e1829cef191a9723e5504" +dependencies = [ + "libc", +] + +[[package]] +name = "crc32fast" +version = "1.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a97769d94ddab943e4510d138150169a2758b5ef3eb191a9ee688de3e23ef7b3" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "crossbeam-deque" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "613f8cc01fe9cf1a3eb3d7f488fd2fa8388403e97039e2f73692932e291a770d" +dependencies = [ + "crossbeam-epoch", + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-epoch" +version = "0.9.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e" +dependencies = [ + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-utils" +version = "0.8.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22ec99545bb0ed0ea7bb9b8e1e9122ea386ff8a48c0922e43f36d45ab09e0e80" + +[[package]] +name = "crypto-common" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" +dependencies = [ + "generic-array", + "typenum", +] + +[[package]] +name = "data-encoding" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e8566979429cf69b49a5c740c60791108e86440e8be149bbea4fe54d2c32d6e2" + +[[package]] +name = "deranged" +version = "0.3.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4" +dependencies = [ + "powerfmt", +] + +[[package]] +name = "dialoguer" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59c6f2989294b9a498d3ad5491a79c6deb604617378e1cdc4bfc1c1361fe2f87" +dependencies = [ + "console", + "shell-words", +] + +[[package]] +name = "digest" +version = "0.10.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" +dependencies = [ + "block-buffer", + "crypto-common", +] + +[[package]] +name = "dirs" +version = "4.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca3aa72a6f96ea37bbc5aa912f6788242832f75369bdfdadcb0e38423f100059" +dependencies = [ + "dirs-sys", +] + +[[package]] +name = "dirs-sys" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b1d1d91c932ef41c0f2663aa8b0ca0342d444d842c06914aa0a7e352d0bada6" +dependencies = [ + "libc", + "redox_users", + "winapi", +] + +[[package]] +name = "dunce" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56ce8c6da7551ec6c462cbaf3bfbc75131ebbfa1c944aeaa9dab51ca1c5f0c3b" + +[[package]] +name = "either" +version = "1.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3dca9240753cf90908d7e4aac30f630662b02aebaa1b58a3cadabdb23385b58b" + +[[package]] +name = "encode_unicode" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f" + +[[package]] +name = "encoding_rs" +version = "0.8.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b45de904aa0b010bce2ab45264d0631681847fa7b6f2eaa7dab7619943bc4f59" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "env_logger" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44533bbbb3bb3c1fa17d9f2e4e38bbbaf8396ba82193c4cb1b6445d711445d36" +dependencies = [ + "atty", + "humantime", + "log", + "regex", + "termcolor", +] + +[[package]] +name = "equivalent" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" + +[[package]] +name = "errno" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba" +dependencies = [ + "libc", + "windows-sys 0.52.0", +] + +[[package]] +name = "fastrand" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9fc0510504f03c51ada170672ac806f1f105a88aa97a5281117e1ddc3368e51a" + +[[package]] +name = "fat-macho" +version = "0.4.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d4c93f393add03d72bc10dd3dea43a1610ecb29e0c0a6459c70b53b82931adf" +dependencies = [ + "goblin 0.8.2", +] + +[[package]] +name = "filetime" +version = "0.2.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ee447700ac8aa0b2f2bd7bc4462ad686ba06baa6727ac149a2d6277f0d240fd" +dependencies = [ + "cfg-if", + "libc", + "redox_syscall 0.4.1", + "windows-sys 0.52.0", +] + +[[package]] +name = "flate2" +version = "1.0.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f54427cfd1c7829e2a139fcefea601bf088ebca651d2bf53ebc600eac295dae" +dependencies = [ + "crc32fast", + "miniz_oxide", +] + +[[package]] +name = "fnv" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" + +[[package]] +name = "form_urlencoded" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" +dependencies = [ + "percent-encoding", +] + +[[package]] +name = "fs-err" +version = "2.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "88a41f105fe1d5b6b34b2055e3dc59bb79b46b48b2040b9e6c7b4b5de097aa41" +dependencies = [ + "autocfg", +] + +[[package]] +name = "generic-array" +version = "0.14.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" +dependencies = [ + "typenum", + "version_check", +] + +[[package]] +name = "getrandom" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" +dependencies = [ + "cfg-if", + "libc", + "wasi", +] + +[[package]] +name = "gimli" +version = "0.29.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "40ecd4077b5ae9fd2e9e169b102c6c330d0605168eb0e8bf79952b256dbefffd" + +[[package]] +name = "glob" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" + +[[package]] +name = "globset" +version = "0.4.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57da3b9b5b85bd66f31093f8c408b90a74431672542466497dcbdfdc02034be1" +dependencies = [ + "aho-corasick", + "bstr", + "log", + "regex-automata 0.4.7", + "regex-syntax 0.8.4", +] + +[[package]] +name = "goblin" +version = "0.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7666983ed0dd8d21a6f6576ee00053ca0926fb281a5522577a4dbd0f1b54143" +dependencies = [ + "log", + "plain", + "scroll 0.11.0", +] + +[[package]] +name = "goblin" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b363a30c165f666402fe6a3024d3bec7ebc898f96a4a23bd1c99f8dbf3f4f47" +dependencies = [ + "log", + "plain", + "scroll 0.12.0", +] + +[[package]] +name = "hashbrown" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" + +[[package]] +name = "hashbrown" +version = "0.14.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" +dependencies = [ + "ahash", + "allocator-api2", +] + +[[package]] +name = "heck" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" + +[[package]] +name = "heck" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" + +[[package]] +name = "hermit-abi" +version = "0.1.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" +dependencies = [ + "libc", +] + +[[package]] +name = "hermit-abi" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" + +[[package]] +name = "home" +version = "0.5.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3d1354bf6b7235cb4a0576c2619fd4ed18183f689b12b006a0ee7329eeff9a5" +dependencies = [ + "windows-sys 0.52.0", +] + +[[package]] +name = "human-panic" +version = "1.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4f016c89920bbb30951a8405ecacbb4540db5524313b9445736e7e1855cf370" +dependencies = [ + "anstream", + "anstyle", + "backtrace", + "os_info", + "serde", + "serde_derive", + "toml 0.8.14", + "uuid", +] + +[[package]] +name = "humantime" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df004cfca50ef23c36850aaaa59ad52cc70d0e90243c3c7737a4dd32dc7a3c4f" +dependencies = [ + "quick-error", +] + +[[package]] +name = "idna" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" +dependencies = [ + "unicode-bidi", + "unicode-normalization", +] + +[[package]] +name = "ignore" +version = "0.4.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b46810df39e66e925525d6e38ce1e7f6e1d208f72dc39757880fcb66e2c58af1" +dependencies = [ + "crossbeam-deque", + "globset", + "log", + "memchr", + "regex-automata 0.4.7", + "same-file", + "walkdir", + "winapi-util", +] + +[[package]] +name = "indexmap" +version = "1.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" +dependencies = [ + "autocfg", + "hashbrown 0.12.3", +] + +[[package]] +name = "indexmap" +version = "2.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" +dependencies = [ + "equivalent", + "hashbrown 0.14.5", +] + +[[package]] +name = "indicatif" +version = "0.17.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "763a5a8f45087d6bcea4222e7b72c291a054edf80e4ef6efd2a4979878c7bea3" +dependencies = [ + "console", + "instant", + "number_prefix", + "portable-atomic", + "unicode-width", +] + +[[package]] +name = "indoc" +version = "2.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b248f5224d1d606005e02c97f5aa4e88eeb230488bcc03bc9ca4d7991399f2b5" + +[[package]] +name = "instant" +version = "0.1.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e0242819d153cba4b4b05a5a8f2a7e9bbf97b6055b2a002b395c96b5ff3c0222" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "io-lifetimes" +version = "1.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eae7b9aee968036d54dce06cebaefd919e4472e753296daccd6d344e3e2df0c2" +dependencies = [ + "hermit-abi 0.3.9", + "libc", + "windows-sys 0.48.0", +] + +[[package]] +name = "is_terminal_polyfill" +version = "1.70.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8478577c03552c21db0e2724ffb8986a5ce7af88107e6be5d2ee6e158c12800" + +[[package]] +name = "itertools" +version = "0.10.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" +dependencies = [ + "either", +] + +[[package]] +name = "itertools" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1c173a5686ce8bfa551b3563d0c2170bf24ca44da99c7ca4bfdab5418c3fe57" +dependencies = [ + "either", +] + +[[package]] +name = "itoa" +version = "1.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" + +[[package]] +name = "lazy_static" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" + +[[package]] +name = "lddtree" +version = "0.2.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f16a1dee00c5a3de4f7027a742568bf1e2bdf326b3888f50761225ad8c0c9413" +dependencies = [ + "fs-err", + "glob", + "goblin 0.5.4", +] + +[[package]] +name = "libc" +version = "0.2.155" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c" + +[[package]] +name = "libredox" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d" +dependencies = [ + "bitflags 2.5.0", + "libc", +] + +[[package]] +name = "linux-raw-sys" +version = "0.3.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519" + +[[package]] +name = "linux-raw-sys" +version = "0.4.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" + +[[package]] +name = "lock_api" +version = "0.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07af8b9cdd281b7915f413fa73f29ebd5d55d0d3f0155584dade1ff18cea1b17" +dependencies = [ + "autocfg", + "scopeguard", +] + +[[package]] +name = "log" +version = "0.4.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c" + +[[package]] +name = "lzxd" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "784462f20dddd9dfdb45de963fa4ad4a288cb10a7889ac5d2c34fb6481c6b213" + +[[package]] +name = "mailparse" +version = "0.14.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d096594926cab442e054e047eb8c1402f7d5b2272573b97ba68aa40629f9757" +dependencies = [ + "charset", + "data-encoding", + "quoted_printable 0.5.0", +] + +[[package]] +name = "matchers" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8263075bb86c5a1b1427b5ae862e8889656f126e9f77c484496e8b47cf5c5558" +dependencies = [ + "regex-automata 0.1.10", +] + +[[package]] +name = "matrixmultiply" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "916806ba0031cd542105d916a97c8572e1fa6dd79c9c51e7eb43a09ec2dd84c1" +dependencies = [ + "rawpointer", +] + +[[package]] +name = "maturin" +version = "0.12.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2fcb045680e0b9d2e6cfee6d108daee7f5a17946dbed7157e6e1caee40bdeb25" +dependencies = [ + "anyhow", + "base64 0.13.1", + "bytesize", + "cargo-xwin", + "cargo-zigbuild", + "cargo_metadata", + "cbindgen", + "cc", + "clap 3.2.25", + "clap_complete", + "clap_complete_fig", + "configparser", + "console", + "dialoguer", + "dirs", + "dunce", + "fat-macho", + "flate2", + "fs-err", + "glob", + "goblin 0.5.4", + "human-panic", + "ignore", + "lddtree", + "minijinja", + "multipart", + "once_cell", + "platform-info", + "pretty_env_logger", + "pyproject-toml", + "python-pkginfo", + "regex", + "rpassword", + "rustc_version", + "serde", + "serde_json", + "sha2", + "shlex", + "tar", + "target-lexicon", + "tempfile", + "textwrap 0.15.2", + "thiserror", + "toml_edit 0.14.4", + "tracing", + "ureq", + "zip", +] + +[[package]] +name = "memchr" +version = "2.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" + +[[package]] +name = "memoffset" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "488016bfae457b036d996092f6cb448677611ce4449e970ceaf42695203f218a" +dependencies = [ + "autocfg", +] + +[[package]] +name = "mime" +version = "0.3.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" + +[[package]] +name = "mime_guess" +version = "2.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4192263c238a5f0d0c6bfd21f336a313a4ce1c450542449ca191bb657b4642ef" +dependencies = [ + "mime", + "unicase", +] + +[[package]] +name = "minijinja" +version = "0.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "359c4820413be7706e93999171652e140578384f85faac14cb22d350bd0fbabf" +dependencies = [ + "serde", +] + +[[package]] +name = "minimal-lexical" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" + +[[package]] +name = "miniz_oxide" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8a240ddb74feaf34a79a7add65a741f3167852fba007066dcac1ca548d89c08" +dependencies = [ + "adler", +] + +[[package]] +name = "msi" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eaa7bfcd0ffc3b4dc4a555e5ada4d302b4b6b5ce8d6bc07a6ea703ea63aff149" +dependencies = [ + "byteorder", + "cfb", + "encoding_rs", + "uuid", +] + +[[package]] +name = "multipart" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00dec633863867f29cb39df64a397cdf4a6354708ddd7759f70c7fb51c5f9182" +dependencies = [ + "log", + "mime", + "mime_guess", + "rand", + "tempfile", +] + +[[package]] +name = "ndarray" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac06db03ec2f46ee0ecdca1a1c34a99c0d188a0d83439b84bf0cb4b386e4ab09" +dependencies = [ + "matrixmultiply", + "num-complex", + "num-integer", + "num-traits", + "rawpointer", +] + +[[package]] +name = "nom" +version = "7.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" +dependencies = [ + "memchr", + "minimal-lexical", +] + +[[package]] +name = "num-complex" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6b19411a9719e753aff12e5187b74d60d3dc449ec3f4dc21e3989c3f554bc95" +dependencies = [ + "autocfg", + "num-traits", +] + +[[package]] +name = "num-conv" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" + +[[package]] +name = "num-integer" +version = "0.1.46" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f" +dependencies = [ + "num-traits", +] + +[[package]] +name = "num-traits" +version = "0.2.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" +dependencies = [ + "autocfg", +] + +[[package]] +name = "number_prefix" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "830b246a0e5f20af87141b25c173cd1b609bd7779a4617d6ec582abaf90870f3" + +[[package]] +name = "numpy" +version = "0.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec170733ca37175f5d75a5bea5911d6ff45d2cd52849ce98b685394e4f2f37f4" +dependencies = [ + "libc", + "ndarray", + "num-complex", + "num-integer", + "num-traits", + "pyo3", + "rustc-hash", +] + +[[package]] +name = "object" +version = "0.36.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "576dfe1fc8f9df304abb159d767a29d0476f7750fbf8aa7ad07816004a207434" +dependencies = [ + "memchr", +] + +[[package]] +name = "once_cell" +version = "1.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" + +[[package]] +name = "os_info" +version = "3.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae99c7fa6dd38c7cafe1ec085e804f8f555a2f8659b0dbe03f1f9963a9b51092" +dependencies = [ + "log", + "serde", + "windows-sys 0.52.0", +] + +[[package]] +name = "os_str_bytes" +version = "6.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2355d85b9a3786f481747ced0e0ff2ba35213a1f9bd406ed906554d7af805a1" + +[[package]] +name = "parking_lot" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1bf18183cf54e8d6059647fc3063646a1801cf30896933ec2311622cc4b9a27" +dependencies = [ + "lock_api", + "parking_lot_core", +] + +[[package]] +name = "parking_lot_core" +version = "0.9.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" +dependencies = [ + "cfg-if", + "libc", + "redox_syscall 0.5.1", + "smallvec", + "windows-targets 0.52.5", +] + +[[package]] +name = "path-slash" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "498a099351efa4becc6a19c72aa9270598e8fd274ca47052e37455241c88b696" + +[[package]] +name = "percent-encoding" +version = "2.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" + +[[package]] +name = "pin-project-lite" +version = "0.2.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" + +[[package]] +name = "pkg-config" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" + +[[package]] +name = "plain" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4596b6d070b27117e987119b4dac604f3c58cfb0b191112e24771b2faeac1a6" + +[[package]] +name = "platform-info" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "84332c4de03d567e6f5ea143e35e63ceed534a34f768218aabf57879d7edf2a0" +dependencies = [ + "libc", + "winapi", +] + +[[package]] +name = "portable-atomic" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7170ef9988bc169ba16dd36a7fa041e5c4cbeb6a35b76d4c03daded371eae7c0" + +[[package]] +name = "powerfmt" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" + +[[package]] +name = "ppv-lite86" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" + +[[package]] +name = "pretty_env_logger" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "926d36b9553851b8b0005f1275891b392ee4d2d833852c417ed025477350fb9d" +dependencies = [ + "env_logger", + "log", +] + +[[package]] +name = "proc-macro-error" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" +dependencies = [ + "proc-macro-error-attr", + "proc-macro2", + "quote", + "syn 1.0.109", + "version_check", +] + +[[package]] +name = "proc-macro-error-attr" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" +dependencies = [ + "proc-macro2", + "quote", + "version_check", +] + +[[package]] +name = "proc-macro2" +version = "1.0.85" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22244ce15aa966053a896d1accb3a6e68469b97c7f33f284b99f0d576879fc23" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "psm" +version = "0.1.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5787f7cda34e3033a72192c018bc5883100330f362ef279a8cbccfce8bb4e874" +dependencies = [ + "cc", +] + +[[package]] +name = "pyo3" +version = "0.21.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a5e00b96a521718e08e03b1a622f01c8a8deb50719335de3f60b3b3950f069d8" +dependencies = [ + "cfg-if", + "indoc", + "libc", + "memoffset", + "parking_lot", + "portable-atomic", + "pyo3-build-config", + "pyo3-ffi", + "pyo3-macros", + "unindent", +] + +[[package]] +name = "pyo3-build-config" +version = "0.21.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7883df5835fafdad87c0d888b266c8ec0f4c9ca48a5bed6bbb592e8dedee1b50" +dependencies = [ + "once_cell", + "target-lexicon", +] + +[[package]] +name = "pyo3-ffi" +version = "0.21.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01be5843dc60b916ab4dad1dca6d20b9b4e6ddc8e15f50c47fe6d85f1fb97403" +dependencies = [ + "libc", + "pyo3-build-config", +] + +[[package]] +name = "pyo3-macros" +version = "0.21.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77b34069fc0682e11b31dbd10321cbf94808394c56fd996796ce45217dfac53c" +dependencies = [ + "proc-macro2", + "pyo3-macros-backend", + "quote", + "syn 2.0.66", +] + +[[package]] +name = "pyo3-macros-backend" +version = "0.21.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08260721f32db5e1a5beae69a55553f56b99bd0e1c3e6e0a5e8851a9d0f5a85c" +dependencies = [ + "heck 0.4.1", + "proc-macro2", + "pyo3-build-config", + "quote", + "syn 2.0.66", +] + +[[package]] +name = "pyproject-toml" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee8476266c07b589d6ed54c761181466f4e4092107869be49ae26b3c0cdde8db" +dependencies = [ + "serde", + "toml 0.7.8", +] + +[[package]] +name = "python-pkginfo" +version = "0.5.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e23988cc0f9fbe3c42ae6e399daa7c0273d6013784b744b1742c6e1060611b0e" +dependencies = [ + "flate2", + "fs-err", + "mailparse", + "rfc2047-decoder", + "tar", + "thiserror", + "zip", +] + +[[package]] +name = "quick-error" +version = "1.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" + +[[package]] +name = "quote" +version = "1.0.36" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "quoted_printable" +version = "0.4.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a3866219251662ec3b26fc217e3e05bf9c4f84325234dfb96bf0bf840889e49" + +[[package]] +name = "quoted_printable" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "79ec282e887b434b68c18fe5c121d38e72a5cf35119b59e54ec5b992ea9c8eb0" + +[[package]] +name = "rand" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" +dependencies = [ + "libc", + "rand_chacha", + "rand_core", +] + +[[package]] +name = "rand_chacha" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" +dependencies = [ + "ppv-lite86", + "rand_core", +] + +[[package]] +name = "rand_core" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" +dependencies = [ + "getrandom", +] + +[[package]] +name = "rawpointer" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60a357793950651c4ed0f3f52338f53b2f809f32d83a07f72909fa13e4c6c1e3" + +[[package]] +name = "rayon" +version = "1.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b418a60154510ca1a002a752ca9714984e21e4241e804d32555251faf8b78ffa" +dependencies = [ + "either", + "rayon-core", +] + +[[package]] +name = "rayon-core" +version = "1.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1465873a3dfdaa8ae7cb14b4383657caab0b3e8a0aa9ae8e04b044854c8dfce2" +dependencies = [ + "crossbeam-deque", + "crossbeam-utils", +] + +[[package]] +name = "redox_syscall" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" +dependencies = [ + "bitflags 1.3.2", +] + +[[package]] +name = "redox_syscall" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "469052894dcb553421e483e4209ee581a45100d31b4018de03e5a7ad86374a7e" +dependencies = [ + "bitflags 2.5.0", +] + +[[package]] +name = "redox_users" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd283d9651eeda4b2a83a43c1c91b266c40fd76ecd39a50a8c630ae69dc72891" +dependencies = [ + "getrandom", + "libredox", + "thiserror", +] + +[[package]] +name = "regex" +version = "1.10.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b91213439dad192326a0d7c6ee3955910425f441d7038e0d6933b0aec5c4517f" +dependencies = [ + "aho-corasick", + "memchr", + "regex-automata 0.4.7", + "regex-syntax 0.8.4", +] + +[[package]] +name = "regex-automata" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" +dependencies = [ + "regex-syntax 0.6.29", +] + +[[package]] +name = "regex-automata" +version = "0.4.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38caf58cc5ef2fed281f89292ef23f6365465ed9a41b7a7754eb4e26496c92df" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax 0.8.4", +] + +[[package]] +name = "regex-syntax" +version = "0.6.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" + +[[package]] +name = "regex-syntax" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a66a03ae7c801facd77a29370b4faec201768915ac14a721ba36f20bc9c209b" + +[[package]] +name = "rfc2047-decoder" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61fc4b4e52897c3e30b12b7e9b04461215b647fbe66f6def60dd8edbce14ec2e" +dependencies = [ + "base64 0.21.7", + "charset", + "chumsky", + "memchr", + "quoted_printable 0.4.8", + "thiserror", +] + +[[package]] +name = "ring" +version = "0.17.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c17fa4cb658e3583423e915b9f3acc01cceaee1860e33d59ebae66adc3a2dc0d" +dependencies = [ + "cc", + "cfg-if", + "getrandom", + "libc", + "spin", + "untrusted", + "windows-sys 0.52.0", +] + +[[package]] +name = "rpassword" +version = "6.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2bf099a1888612545b683d2661a1940089f6c2e5a8e38979b2159da876bfd956" +dependencies = [ + "libc", + "serde", + "serde_json", + "winapi", +] + +[[package]] +name = "rustc-demangle" +version = "0.1.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" + +[[package]] +name = "rustc-hash" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" + +[[package]] +name = "rustc_version" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" +dependencies = [ + "semver", +] + +[[package]] +name = "rustix" +version = "0.37.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fea8ca367a3a01fe35e6943c400addf443c0f57670e6ec51196f71a4b8762dd2" +dependencies = [ + "bitflags 1.3.2", + "errno", + "io-lifetimes", + "libc", + "linux-raw-sys 0.3.8", + "windows-sys 0.48.0", +] + +[[package]] +name = "rustix" +version = "0.38.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70dc5ec042f7a43c4a73241207cecc9873a06d45debb38b329f8541d85c2730f" +dependencies = [ + "bitflags 2.5.0", + "errno", + "libc", + "linux-raw-sys 0.4.14", + "windows-sys 0.52.0", +] + +[[package]] +name = "rustls" +version = "0.22.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf4ef73721ac7bcd79b2b315da7779d8fc09718c6b3d2d1b2d94850eb8c18432" +dependencies = [ + "log", + "ring", + "rustls-pki-types", + "rustls-webpki", + "subtle", + "zeroize", +] + +[[package]] +name = "rustls-pki-types" +version = "1.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "976295e77ce332211c0d24d92c0e83e50f5c5f046d11082cea19f3df13a3562d" + +[[package]] +name = "rustls-webpki" +version = "0.102.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff448f7e92e913c4b7d4c6d8e4540a1724b319b4152b8aef6d4cf8339712b33e" +dependencies = [ + "ring", + "rustls-pki-types", + "untrusted", +] + +[[package]] +name = "ryu" +version = "1.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" + +[[package]] +name = "same-file" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" +dependencies = [ + "winapi-util", +] + +[[package]] +name = "scopeguard" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" + +[[package]] +name = "scroll" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04c565b551bafbef4157586fa379538366e4385d42082f255bfd96e4fe8519da" +dependencies = [ + "scroll_derive 0.11.1", +] + +[[package]] +name = "scroll" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ab8598aa408498679922eff7fa985c25d58a90771bd6be794434c5277eab1a6" +dependencies = [ + "scroll_derive 0.12.0", +] + +[[package]] +name = "scroll_derive" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1db149f81d46d2deba7cd3c50772474707729550221e69588478ebf9ada425ae" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.66", +] + +[[package]] +name = "scroll_derive" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f81c2fde025af7e69b1d1420531c8a8811ca898919db177141a85313b1cb932" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.66", +] + +[[package]] +name = "semver" +version = "1.0.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" +dependencies = [ + "serde", +] + +[[package]] +name = "serde" +version = "1.0.203" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7253ab4de971e72fb7be983802300c30b5a7f0c2e56fab8abfc6a214307c0094" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_derive" +version = "1.0.203" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "500cbc0ebeb6f46627f50f3f5811ccf6bf00643be300b4c3eabc0ef55dc5b5ba" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.66", +] + +[[package]] +name = "serde_json" +version = "1.0.117" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "455182ea6142b14f93f4bc5320a2b31c1f266b66a4a5c858b013302a5d8cbfc3" +dependencies = [ + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "serde_spanned" +version = "0.6.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "79e674e01f999af37c49f70a6ede167a8a60b2503e56c5599532a65baa5969a0" +dependencies = [ + "serde", +] + +[[package]] +name = "sha2" +version = "0.10.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest", +] + +[[package]] +name = "sharded-slab" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f40ca3c46823713e0d4209592e8d6e826aa57e928f09752619fc696c499637f6" +dependencies = [ + "lazy_static", +] + +[[package]] +name = "shell-words" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24188a676b6ae68c3b2cb3a01be17fbf7240ce009799bb56d5b1409051e78fde" + +[[package]] +name = "shlex" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" + +[[package]] +name = "smallvec" +version = "1.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" + +[[package]] +name = "smawk" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b7c388c1b5e93756d0c740965c41e8822f866621d41acbdf6336a6a168f8840c" + +[[package]] +name = "socks" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0c3dbbd9ae980613c6dd8e28a9407b50509d3803b57624d5dfe8315218cd58b" +dependencies = [ + "byteorder", + "libc", + "winapi", +] + +[[package]] +name = "spin" +version = "0.9.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" + +[[package]] +name = "stacker" +version = "0.1.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c886bd4480155fd3ef527d45e9ac8dd7118a898a46530b7b94c3e21866259fce" +dependencies = [ + "cc", + "cfg-if", + "libc", + "psm", + "winapi", +] + +[[package]] +name = "static_assertions" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" + +[[package]] +name = "strsim" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" + +[[package]] +name = "strsim" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" + +[[package]] +name = "subtle" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d0208408ba0c3df17ed26eb06992cb1a1268d41b2c0e12e65203fbe3972cee5" + +[[package]] +name = "syn" +version = "1.0.109" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "syn" +version = "2.0.66" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c42f3f41a2de00b01c0aaad383c5a45241efc8b2d1eda5661812fda5f3cdcff5" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "tar" +version = "0.4.41" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb797dad5fb5b76fcf519e702f4a589483b5ef06567f160c392832c1f5e44909" +dependencies = [ + "filetime", + "libc", + "xattr", +] + +[[package]] +name = "target-lexicon" +version = "0.12.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1fc403891a21bcfb7c37834ba66a547a8f402146eba7265b5a6d88059c9ff2f" + +[[package]] +name = "tempfile" +version = "3.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85b77fafb263dd9d05cbeac119526425676db3784113aa9295c88498cbf8bff1" +dependencies = [ + "cfg-if", + "fastrand", + "rustix 0.38.34", + "windows-sys 0.52.0", +] + +[[package]] +name = "termcolor" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06794f8f6c5c898b3275aebefa6b8a1cb24cd2c6c79397ab15774837a0bc5755" +dependencies = [ + "winapi-util", +] + +[[package]] +name = "terminal_size" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e6bf6f19e9f8ed8d4048dc22981458ebcf406d67e94cd422e5ecd73d63b3237" +dependencies = [ + "rustix 0.37.27", + "windows-sys 0.48.0", +] + +[[package]] +name = "terminal_size" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "21bebf2b7c9e0a515f6e0f8c51dc0f8e4696391e6f1ff30379559f8365fb0df7" +dependencies = [ + "rustix 0.38.34", + "windows-sys 0.48.0", +] + +[[package]] +name = "textwrap" +version = "0.15.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b7b3e525a49ec206798b40326a44121291b530c963cfb01018f63e135bac543d" +dependencies = [ + "smawk", + "unicode-linebreak", + "unicode-width", +] + +[[package]] +name = "textwrap" +version = "0.16.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23d434d3f8967a09480fb04132ebe0a3e088c173e6d0ee7897abbdf4eab0f8b9" +dependencies = [ + "terminal_size 0.2.6", +] + +[[package]] +name = "thiserror" +version = "1.0.61" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c546c80d6be4bc6a00c0f01730c08df82eaa7a7a61f11d656526506112cc1709" +dependencies = [ + "thiserror-impl", +] + +[[package]] +name = "thiserror-impl" +version = "1.0.61" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "46c3384250002a6d5af4d114f2845d37b57521033f30d5c3f46c4d70e1197533" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.66", +] + +[[package]] +name = "thread_local" +version = "1.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b9ef9bad013ada3808854ceac7b46812a6465ba368859a37e2100283d2d719c" +dependencies = [ + "cfg-if", + "once_cell", +] + +[[package]] +name = "time" +version = "0.3.36" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5dfd88e563464686c916c7e46e623e520ddc6d79fa6641390f2e3fa86e83e885" +dependencies = [ + "deranged", + "num-conv", + "powerfmt", + "serde", + "time-core", +] + +[[package]] +name = "time-core" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" + +[[package]] +name = "tinyvec" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" +dependencies = [ + "tinyvec_macros", +] + +[[package]] +name = "tinyvec_macros" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" + +[[package]] +name = "toml" +version = "0.5.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4f7f0dd8d50a853a531c426359045b1998f04219d88799810762cd4ad314234" +dependencies = [ + "serde", +] + +[[package]] +name = "toml" +version = "0.7.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd79e69d3b627db300ff956027cc6c3798cef26d22526befdfcd12feeb6d2257" +dependencies = [ + "serde", + "serde_spanned", + "toml_datetime", + "toml_edit 0.19.15", +] + +[[package]] +name = "toml" +version = "0.8.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f49eb2ab21d2f26bd6db7bf383edc527a7ebaee412d17af4d40fdccd442f335" +dependencies = [ + "serde", + "serde_spanned", + "toml_datetime", + "toml_edit 0.22.14", +] + +[[package]] +name = "toml_datetime" +version = "0.6.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4badfd56924ae69bcc9039335b2e017639ce3f9b001c393c1b2d1ef846ce2cbf" +dependencies = [ + "serde", +] + +[[package]] +name = "toml_edit" +version = "0.14.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5376256e44f2443f8896ac012507c19a012df0fe8758b55246ae51a2279db51f" +dependencies = [ + "combine", + "indexmap 1.9.3", + "itertools 0.10.5", + "serde", +] + +[[package]] +name = "toml_edit" +version = "0.19.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" +dependencies = [ + "indexmap 2.2.6", + "serde", + "serde_spanned", + "toml_datetime", + "winnow", +] + +[[package]] +name = "toml_edit" +version = "0.22.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f21c7aaf97f1bd9ca9d4f9e73b0a6c74bd5afef56f2bc931943a6e1c37e04e38" +dependencies = [ + "indexmap 2.2.6", + "serde", + "serde_spanned", + "toml_datetime", +] + +[[package]] +name = "tracing" +version = "0.1.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" +dependencies = [ + "pin-project-lite", + "tracing-attributes", + "tracing-core", +] + +[[package]] +name = "tracing-attributes" +version = "0.1.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.66", +] + +[[package]] +name = "tracing-core" +version = "0.1.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" +dependencies = [ + "once_cell", + "valuable", +] + +[[package]] +name = "tracing-serde" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc6b213177105856957181934e4920de57730fc69bf42c37ee5bb664d406d9e1" +dependencies = [ + "serde", + "tracing-core", +] + +[[package]] +name = "tracing-subscriber" +version = "0.3.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad0f048c97dbd9faa9b7df56362b8ebcaa52adb06b498c050d2f4e32f90a7a8b" +dependencies = [ + "matchers", + "once_cell", + "regex", + "serde", + "serde_json", + "sharded-slab", + "thread_local", + "tracing", + "tracing-core", + "tracing-serde", +] + +[[package]] +name = "twox-hash" +version = "1.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97fee6b57c6a41524a810daee9286c02d7752c4253064d0b05472833a438f675" +dependencies = [ + "cfg-if", + "rand", + "static_assertions", +] + +[[package]] +name = "typenum" +version = "1.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" + +[[package]] +name = "unicase" +version = "2.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7d2d4dafb69621809a81864c9c1b864479e1235c0dd4e199924b9742439ed89" +dependencies = [ + "version_check", +] + +[[package]] +name = "unicode-bidi" +version = "0.3.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75" + +[[package]] +name = "unicode-ident" +version = "1.0.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" + +[[package]] +name = "unicode-linebreak" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b09c83c3c29d37506a3e260c08c03743a6bb66a9cd432c6934ab501a190571f" + +[[package]] +name = "unicode-normalization" +version = "0.1.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a56d1686db2308d901306f92a263857ef59ea39678a5458e7cb17f01415101f5" +dependencies = [ + "tinyvec", +] + +[[package]] +name = "unicode-width" +version = "0.1.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0336d538f7abc86d282a4189614dfaa90810dfc2c6f6427eaf88e16311dd225d" + +[[package]] +name = "unindent" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7de7d73e1754487cb58364ee906a499937a0dfabd86bcb980fa99ec8c8fa2ce" + +[[package]] +name = "untrusted" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" + +[[package]] +name = "ureq" +version = "2.9.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d11a831e3c0b56e438a28308e7c810799e3c118417f342d30ecec080105395cd" +dependencies = [ + "base64 0.22.1", + "flate2", + "log", + "once_cell", + "rustls", + "rustls-pki-types", + "rustls-webpki", + "socks", + "url", + "webpki-roots", +] + +[[package]] +name = "url" +version = "2.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22784dbdf76fdde8af1aeda5622b546b422b6fc585325248a2bf9f5e41e94d6c" +dependencies = [ + "form_urlencoded", + "idna", + "percent-encoding", +] + +[[package]] +name = "utf8parse" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" + +[[package]] +name = "uuid" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a183cf7feeba97b4dd1c0d46788634f6221d87fa961b305bed08c851829efcc0" +dependencies = [ + "getrandom", +] + +[[package]] +name = "valuable" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" + +[[package]] +name = "version_check" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" + +[[package]] +name = "versions" +version = "5.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c73a36bc44e3039f51fbee93e39f41225f6b17b380eb70cc2aab942df06b34dd" +dependencies = [ + "itertools 0.11.0", + "nom", +] + +[[package]] +name = "walkdir" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" +dependencies = [ + "same-file", + "winapi-util", +] + +[[package]] +name = "wasi" +version = "0.11.0+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" + +[[package]] +name = "webpki-roots" +version = "0.26.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd7c23921eeb1713a4e851530e9b9756e4fb0e89978582942612524cf09f01cd" +dependencies = [ + "rustls-pki-types", +] + +[[package]] +name = "which" +version = "4.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87ba24419a2078cd2b0f2ede2691b6c66d8e47836da3b6db8265ebad47afbfc7" +dependencies = [ + "either", + "home", + "once_cell", + "rustix 0.38.34", +] + +[[package]] +name = "winapi" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" +dependencies = [ + "winapi-i686-pc-windows-gnu", + "winapi-x86_64-pc-windows-gnu", +] + +[[package]] +name = "winapi-i686-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" + +[[package]] +name = "winapi-util" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4d4cc384e1e73b93bafa6fb4f1df8c41695c8a91cf9c4c64358067d15a7b6c6b" +dependencies = [ + "windows-sys 0.52.0", +] + +[[package]] +name = "winapi-x86_64-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" + +[[package]] +name = "windows-sys" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" +dependencies = [ + "windows-targets 0.48.5", +] + +[[package]] +name = "windows-sys" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +dependencies = [ + "windows-targets 0.52.5", +] + +[[package]] +name = "windows-targets" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" +dependencies = [ + "windows_aarch64_gnullvm 0.48.5", + "windows_aarch64_msvc 0.48.5", + "windows_i686_gnu 0.48.5", + "windows_i686_msvc 0.48.5", + "windows_x86_64_gnu 0.48.5", + "windows_x86_64_gnullvm 0.48.5", + "windows_x86_64_msvc 0.48.5", +] + +[[package]] +name = "windows-targets" +version = "0.52.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f0713a46559409d202e70e28227288446bf7841d3211583a4b53e3f6d96e7eb" +dependencies = [ + "windows_aarch64_gnullvm 0.52.5", + "windows_aarch64_msvc 0.52.5", + "windows_i686_gnu 0.52.5", + "windows_i686_gnullvm", + "windows_i686_msvc 0.52.5", + "windows_x86_64_gnu 0.52.5", + "windows_x86_64_gnullvm 0.52.5", + "windows_x86_64_msvc 0.52.5", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.52.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7088eed71e8b8dda258ecc8bac5fb1153c5cffaf2578fc8ff5d61e23578d3263" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.52.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9985fd1504e250c615ca5f281c3f7a6da76213ebd5ccc9561496568a2752afb6" + +[[package]] +name = "windows_i686_gnu" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" + +[[package]] +name = "windows_i686_gnu" +version = "0.52.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "88ba073cf16d5372720ec942a8ccbf61626074c6d4dd2e745299726ce8b89670" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.52.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87f4261229030a858f36b459e748ae97545d6f1ec60e5e0d6a3d32e0dc232ee9" + +[[package]] +name = "windows_i686_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" + +[[package]] +name = "windows_i686_msvc" +version = "0.52.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db3c2bf3d13d5b658be73463284eaf12830ac9a26a90c717b7f771dfe97487bf" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.52.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e4246f76bdeff09eb48875a0fd3e2af6aada79d409d33011886d3e1581517d9" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.52.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "852298e482cd67c356ddd9570386e2862b5673c85bd5f88df9ab6802b334c596" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bec47e5bfd1bff0eeaf6d8b485cc1074891a197ab4225d504cb7a1ab88b02bf0" + +[[package]] +name = "winnow" +version = "0.5.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f593a95398737aeed53e489c785df13f3618e41dbcd6718c6addbf1395aa6876" +dependencies = [ + "memchr", +] + +[[package]] +name = "xattr" +version = "1.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8da84f1a25939b27f6820d92aed108f83ff920fdf11a7b19366c27c4cda81d4f" +dependencies = [ + "libc", + "linux-raw-sys 0.4.14", + "rustix 0.38.34", +] + +[[package]] +name = "xwin" +version = "0.2.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c16d94a0ca213c840bc7482ca9388957b0ee2eafceab13846d4189504155e62" +dependencies = [ + "anyhow", + "bytes", + "cab", + "camino", + "clap 4.5.7", + "cli-table", + "flate2", + "indicatif", + "msi", + "parking_lot", + "rayon", + "regex", + "serde", + "serde_json", + "sha2", + "tempfile", + "tracing", + "tracing-subscriber", + "twox-hash", + "ureq", + "versions", + "zip", +] + +[[package]] +name = "zerocopy" +version = "0.7.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae87e3fcd617500e5d106f0380cf7b77f3c6092aae37191433159dda23cfb087" +dependencies = [ + "zerocopy-derive", +] + +[[package]] +name = "zerocopy-derive" +version = "0.7.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "15e934569e47891f7d9411f1a451d947a60e000ab3bd24fbb970f000387d1b3b" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.66", +] + +[[package]] +name = "zeroize" +version = "1.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde" + +[[package]] +name = "zip" +version = "0.6.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "760394e246e4c28189f19d488c058bf16f564016aefac5d32bb1f3b51d5e9261" +dependencies = [ + "byteorder", + "bzip2", + "crc32fast", + "crossbeam-utils", + "flate2", + "time", +] diff --git a/Cargo.toml b/Cargo.toml index cce7cb0..edb13ca 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,17 +1,17 @@ -[package] -name = "anyon-braiding-simulator" -version = "0.1.0" -edition = "2021" - -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html -[lib] -name = "anyon_braiding_simulator" -crate-type = ["cdylib"] - -[dependencies] -pyo3 = { version = "0.21", features = ["extension-module"] } -numpy = "0.21" -ndarray = "0.13" - -[dev-dependencies] -maturin = "0.12" +[package] +name = "anyon-braiding-simulator" +version = "0.1.0" +edition = "2021" + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html +[lib] +name = "anyon_braiding_simulator" +crate-type = ["cdylib"] + +[dependencies] +pyo3 = { version = "0.21", features = ["extension-module"] } +numpy = "0.21" +ndarray = "0.13" + +[dev-dependencies] +maturin = "0.12" diff --git a/README.md b/README.md index f2b5bc1..5fd3d44 100644 --- a/README.md +++ b/README.md @@ -1,18 +1,18 @@ -# Anyon Braiding Simulator -## A Brief Overview of Anyon Braiding -*Anyons* are special (quasi)particles that could allow for the realization of topological quantum computation (TQC). The topology of a system of anyons can be **resistant to perturbations** that would produce unwanted errors in other types of qubits, such that TQC is expected to be more physically robust. As anyons travel along paths through space and time, the process of *braiding* these paths (by swapping the positions of the anyons) can change the state of the anyon system. In particular, the braiding of non-Abelian anyons can apply non-commutative unitary operations to the overall state, which could result in the generation of **any sequence of quantum gate operations** with arbitrary precision, depending on the given anyon model. -## Purpose of This Project -The concepts involved in the braiding and subsequent fusion/measurement of anyons can be abstract for beginners, but there are useful diagrams that already exist which can illustrate both of these processes. This project will use these braiding and fusion diagrams to build a **graphical interface** that keeps track of user-applied changes to a system’s topology, automating the construction of anyon braid matrices and the qubit states encoded by different fusion outcomes. - -The user will be able to: -- Initialize a system of anyons using a particular non-Abelian anyon model (such as the *Ising model*), thereby selecting: - - The total number of anyons - - The *topological charge* of each anyon - - The relative position of each anyon - - Optionally, the desired computational basis, which corresponds to a default fusion ordering -- Apply an arbitrary number of swaps between adjacent anyons, viewing the resulting braid that accumulates at each time step -- View the unitary matrix that corresponds to the given braid -- Access the qubit states encoded in the possible fusion outcomes that are consistent with the initialized system -- If possible, view the braid that corresponds to a given quantum gate (i.e. the reverse process of what was described above) - -We hope that this project will act as a tool for beginners to learn about anyon braiding and TQC, along with related subfields like *topological error correction*. By experimenting with different input systems, the user can also gain intuition for how different anyon models affect the encoding of qubits and the resulting braid matrices. +# Anyon Braiding Simulator +## A Brief Overview of Anyon Braiding +*Anyons* are special (quasi)particles that could allow for the realization of topological quantum computation (TQC). The topology of a system of anyons can be **resistant to perturbations** that would produce unwanted errors in other types of qubits, such that TQC is expected to be more physically robust. As anyons travel along paths through space and time, the process of *braiding* these paths (by swapping the positions of the anyons) can change the state of the anyon system. In particular, the braiding of non-Abelian anyons can apply non-commutative unitary operations to the overall state, which could result in the generation of **any sequence of quantum gate operations** with arbitrary precision, depending on the given anyon model. +## Purpose of This Project +The concepts involved in the braiding and subsequent fusion/measurement of anyons can be abstract for beginners, but there are useful diagrams that already exist which can illustrate both of these processes. This project will use these braiding and fusion diagrams to build a **graphical interface** that keeps track of user-applied changes to a system’s topology, automating the construction of anyon braid matrices and the qubit states encoded by different fusion outcomes. + +The user will be able to: +- Initialize a system of anyons using a particular non-Abelian anyon model (such as the *Ising model*), thereby selecting: + - The total number of anyons + - The *topological charge* of each anyon + - The relative position of each anyon + - Optionally, the desired computational basis, which corresponds to a default fusion ordering +- Apply an arbitrary number of swaps between adjacent anyons, viewing the resulting braid that accumulates at each time step +- View the unitary matrix that corresponds to the given braid +- Access the qubit states encoded in the possible fusion outcomes that are consistent with the initialized system +- If possible, view the braid that corresponds to a given quantum gate (i.e. the reverse process of what was described above) + +We hope that this project will act as a tool for beginners to learn about anyon braiding and TQC, along with related subfields like *topological error correction*. By experimenting with different input systems, the user can also gain intuition for how different anyon models affect the encoding of qubits and the resulting braid matrices. diff --git a/pyproject.toml b/pyproject.toml index 3c87552..77521de 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,50 +1,50 @@ -[build-system] -requires = ["maturin>=1.6,<2.0"] -build-backend = "maturin" - -[project] -name = "anyon-braiding-simulator" -requires-python = ">=3.12" -classifiers = [ - "Programming Language :: Rust", - "Programming Language :: Python :: Implementation :: CPython", - "Programming Language :: Python :: Implementation :: PyPy", -] -dynamic = ["version"] - -[tool.pytest.ini_options] -markers = [ - "main", - "fusion", - "braiding", - "state", - "model", - "anyon", - "basis" -] - -[tool.maturin] -features = ["pyo3/extension-module"] - -[tool.ruff] -lint.select = ["E", "F"] -lint.ignore = ["F405", "F403"] -exclude = [ - "build", - "dist", - "venv", - ".venv" -] -line-length = 120 - -[tool.ruff.lint.per-file-ignores] -"tools/ignore.py" = ["F401"] -"python/anyon_braiding_simulator/__init__.py" = ["ALL"] - -[tool.ruff.format] -quote-style = "single" -indent-style = "space" -docstring-code-format = true - -[tool.pyright] -include = ["python/anyon_braiding_simulator"] +[build-system] +requires = ["maturin>=1.6,<2.0"] +build-backend = "maturin" + +[project] +name = "anyon-braiding-simulator" +requires-python = ">=3.12" +classifiers = [ + "Programming Language :: Rust", + "Programming Language :: Python :: Implementation :: CPython", + "Programming Language :: Python :: Implementation :: PyPy", +] +dynamic = ["version"] + +[tool.pytest.ini_options] +markers = [ + "main", + "fusion", + "braiding", + "state", + "model", + "anyon", + "basis" +] + +[tool.maturin] +features = ["pyo3/extension-module"] + +[tool.ruff] +lint.select = ["E", "F"] +lint.ignore = ["F405", "F403"] +exclude = [ + "build", + "dist", + "venv", + ".venv" +] +line-length = 120 + +[tool.ruff.lint.per-file-ignores] +"tools/ignore.py" = ["F401"] +"python/anyon_braiding_simulator/__init__.py" = ["ALL"] + +[tool.ruff.format] +quote-style = "single" +indent-style = "space" +docstring-code-format = true + +[tool.pyright] +include = ["python/anyon_braiding_simulator"] diff --git a/python/anyon_braiding_simulator/Braiding.py b/python/anyon_braiding_simulator/Braiding.py index 3679c18..8f49e3f 100644 --- a/python/anyon_braiding_simulator/Braiding.py +++ b/python/anyon_braiding_simulator/Braiding.py @@ -1,162 +1,201 @@ -import numpy as np -from anyon_braiding_simulator import Anyon -from Model import Model - - -def apply_unitary(state: np.ndarray, unitary: np.ndarray) -> np.ndarray: - """ - Apply unitary to a given state vector - - Parameters: - state (numpy.ndarray): State vector to which the unitary matrix will be applied - unitary (numpy.ndarray): Unitary matrix representing the quantum operation - - Returns: - numpy.ndarray: Updated state vector after applying the unitary - """ - return np.dot(unitary, state) - - -def track_state_history(model: Model, initial_state: np.ndarray, operations: list) -> list: - """ - Track the state history of a state vector under a series of operations - - Parameters: - model (Model): Instance of the Model class containing the R and F matrices - initial_state (numpy.ndarray): Initial state vector - operations (list): List of operations to be applied to the state vector - - Returns: - list: List containing the state vectors at different time steps during the evolution - """ - state_history = [initial_state.copy()] - state = initial_state - - # Iterate through each operation in the sequence - for operation in operations: - if operation[0] == 'F': - a, b, c, d = operation[1], operation[2], operation[3], operation[4] - f_mtx = model.getFMatrix(a, b, c, d) - state = apply_unitary(state, f_mtx) - state_history.append(state.copy()) - elif operation[0] == 'R': - state = apply_unitary(state, model._r_mtx) - state_history.append(state.copy()) - else: - raise ValueError('Unknown operation') - - return state_history - - -class Braid: - def __init__(self, anyons: list[Anyon]): - """ - Parameters: - anyons (list): List of Anyon objects - swaps (list): List of swaps executed - """ - # Check if there are fewer than 3 anyons - if len(anyons) < 3: - raise ValueError('There must be at least 3 anyons') - - # Check for duplicate anyon names - names = [anyon.name for anyon in anyons] - if len(names) != len(set(names)): - raise ValueError('Duplicate anyon names detected') - - self.anyons = anyons - self.swaps = [] - - def swap(self, time: int, swaps: list[tuple[int, int]]) -> None: - """ - Swaps the positions of anyons in list "anyons" based on provided swaps to occur at a given time - - Parameters: - time (int): Time step at which the swaps are performed - swaps (list): List of tuples where each tuple is a pair of anyon indices to swap - - Swaps only adjacent anyons - """ - used_indices = set() # Set to keep track of used indices - - for swap in swaps: - if len(swap) != 2: - print(f'Invalid swap tuple {swap} at time {time}') - continue - - index_A, index_B = swap - - # Perform the swap if indices are adjacent and not already used - if abs(index_A - index_B) == 1 and index_A not in used_indices and index_B not in used_indices: - self.anyons[index_A], self.anyons[index_B] = self.anyons[index_B], self.anyons[index_A] - self.swaps.append((time, index_A, index_B)) # Update the swaps list - used_indices.add(index_A) - used_indices.add(index_B) - else: - print(f'The pair {swap} could not be swapped at time {time}') - - def __str__(self) -> str: - """ - Prints the ASCII representation of the swaps performed - """ - if not self.swaps: - print('No swaps to print') - return '' - - # Initialize the output for each anyon - num_anyons = len(self.anyons) - max_time = max([op[0] for op in self.swaps]) # Maximum time value - max_rows = max_time * 5 - output = [[' ' for _ in range(num_anyons * 5)] for _ in range(max_rows)] - spacing = 4 # 3 spaces between cols - - # Iterate through each time step - for time_step in range(1, max_time + 1): - # Add '|' for non-swap columns - for col in range(num_anyons): - base = (time_step - 1) * 5 - # Check if the column is not involved in any swap at the current time step - if not any(col in swap[1:3] and swap[0] == time_step for swap in self.swaps): - for i in range(5): - output[base + i][col * spacing + 4] = '|' - - # Iterate through each swap operation at the current time step - for time, index_A, index_B in [op for op in self.swaps if op[0] == time_step]: - base = (time - 1) * 5 # Base for each swap operation - if index_A < index_B: - for i in range(3): - output[base + i][index_A * spacing + 4 + i] = '\\' - output[base + i][index_B * spacing + 4 - i] = '/' - for i in range(3, 5): - output[base + i][index_A * spacing + 4 + (5 - i - 1)] = '/' - output[base + i][index_B * spacing + 4 - (5 - i - 1)] = '\\' - output[base + 2][index_A * spacing + 4 + 2] = '\\' - - else: - for i in range(3): - output[base + i][index_B * spacing + 4 + i] = '\\' - output[base + i][index_A * spacing + 4 - i] = '/' - for i in range(3, 5): - output[base + i][index_B * spacing + 4 + (5 - i - 1)] = '/' - output[base + i][index_A * spacing + 4 - (5 - i - 1)] = '\\' - - # Convert the output grid to a string and remove trailing empty rows - return '\n'.join([''.join(row) for row in output if any(c != ' ' for c in row)]) - - -# Function to test __str__ after each timestep -def print_anyons_state(braid: Braid, swap_number: int) -> None: - """ - Print the state of anyons before and after a swap - - Parameters: - braid (Braid): The braid object containing the anyons and operations - swap_number (int): The swap operation number to print - """ - # Perform the swap operation - if swap_number <= len(braid.swaps): - print(braid) - anyon_names = [anyon.name for anyon in braid.anyons] - print(f"After swap {swap_number}: [{', '.join(anyon_names)}]") - else: - print('Invalid swap number') +from typing import List, Tuple +import numpy as np +from anyon_braiding_simulator import State, Fusion, Model + +class Braid: + def __init__(self, state: State, model: Model): + """ + Parameters: + - state (State): The state of the system containing anyons and fusion operations + - model (Model): Model to use for the braid simulation + """ + self.state = state + self.anyons = state.anyons + self.swaps = [] + self.model = model + self.fusion = Fusion(state) + + # Check if there are fewer than 3 anyons + if len(state.anyons) < 3: + raise ValueError('There must be at least 3 anyons') + + # Check for duplicate anyon names + names = [anyon.name for anyon in self.anyons] + if len(names) != len(set(names)): + raise ValueError('Duplicate anyon names detected') + + def swap(self, swaps: List[Tuple[int, int]]) -> None: + """ + Swaps the positions of anyons in list "anyons" based on provided swaps to occur at the present time + + Parameters: + - time (int): Time step at which the swaps are performed + - swaps (list): List of tuples where each tuple is a pair of anyon indices to swap + + Swaps only adjacent anyons + """ + time = len(self.swaps) + self.swaps.append([]) + + # Track used indices directly in the swaps list + used_indices = set([swap for sublist in self.swaps[:time] for swap in sublist]) + + for index_A, index_B in swaps: + if len(set([index_A, index_B])) != 2: + print(f'Invalid swap tuple ({index_A}, {index_B}) at time {time}') + continue + + if abs(index_A - index_B) != 1: + print(f'The pair ({index_A}, {index_B}) could not be swapped at time {time}') + continue + + if index_A in used_indices or index_B in used_indices: + print(f'One or both indices ({index_A}, {index_B}) are already used at time {time}') + continue + + # Perform the swap + self.anyons[index_A], self.anyons[index_B] = self.anyons[index_B], self.anyons[index_A] + self.swaps[time].append((index_A, index_B)) + used_indices.add(index_A) + used_indices.add(index_B) + + def swap_to_qubit(self, time: int, swap_index: int) -> int: + """ + Determines which qubit the swap operation is acting on + + Parameters: + - time (int): Time step at which the swap(s) are performed + - swap_index (int): Index of the swap operation in the swaps list + """ + # Get the swap at the desired time + swap = self.swaps[time-1] if time > 0 else [] + + # Get the indices of the swap anyons + index_A, index_B = swap[swap_index] + + # Iterate through the qubit encoding to find the matching qubit + for qubit_index, fusion_pair in enumerate(self.fusion.qubit_enc(self.model.model_type)): + if {index_A, index_B} == {fusion_pair.anyon_1, fusion_pair.anyon_2}: + return qubit_index + + # If no matching qubit is found or if indices are out of range + return None + + def generate_swap_matrix(self, time: int, swap_index: int) -> np.ndarray: + """ + Generates the swap matrix for swapping anyons at given time + + Parameters: + - time (int): Time step at which the swap(s) are performed + - swap_index (int): Index of the swap operation in the swaps list + + Returns: + - np.ndarray: Swap matrix F^{-1}RF or R depending on fusion tree + """ + # Get the indices of the anyons to swap + index_A, index_B = self.swaps[time-1][swap_index] + + # Check if indices are valid + if index_A < 0 or index_A >= len(self.anyons) or index_B < 0 or index_B >= len(self.anyons): + raise ValueError("Invalid anyon indices") + + # Check if index_A and index_B are adjacent in fusion operations + if self.is_direct_swap(index_A, index_B): + # Direct swap using R matrix + swap_matrix = self.model._r_mtx + else: + # Indices not adjacent, need basis transformation + swap_matrix = np.linalg.inv(self.model._f_mtx) + swap_matrix = np.dot(swap_matrix, self.model._r_mtx) + swap_matrix = np.dot(swap_matrix, self.model._f_mtx) + + return swap_matrix + + def generate_overall_unitary(self, time: int, swap_index: int) -> np.ndarray: + qubit_encoding = self.fusion.qubit_enc(self.model.model_type) + if qubit_encoding is None: + raise ValueError("Fusion qubit encoding returned None") + + num_qubits = len(self.fusion.qubit_enc(self.model.model_type)) + unitary = np.eye(2**num_qubits) # Start with identity matrix of appropriate size + + for i in range(num_qubits): + swap_qubit_index = self.swap_to_qubit(time, swap_index) + if i == swap_qubit_index: + swap_matrix = self.generate_swap_matrix(time, swap_index) + unitary = np.kron(unitary, swap_matrix) + else: + unitary = np.kron(unitary, np.eye(2)) # Kronecker with identity for non-involved qubits + + return unitary + + def is_direct_swap(self, index_A: int, index_B: int) -> bool: + """ + Checks if two anyons at indices index_A and index_B have a fusion operation at time 1 + + Parameters: + - index_A (int): Index of anyon A + - index_B (int): Index of anyon B + + Returns: + - bool: True if index_A and index_B have a fusion operation at time 1, False otherwise + """ + # Get most recent fusion operation at time step 1 + fusion_operations = self.state.operations + + # Check if anyon indices index_A and index_B are adjacent in fusion operations at time 1 + for fusion in fusion_operations: + if fusion[0] == 1: + if {index_A, index_B} == {fusion[1].anyon_1, fusion[1].anyon_2}: + return True + + # No fusion operation found at time 1 for the given indices + return False + + def __str__(self) -> str: + """ + Prints the ASCII representation of the swaps performed. + """ + if not self.swaps: + print('No swaps to print') + return '' + + # Initialize the output for each anyon + num_anyons = len(self.anyons) + max_time = len(self.swaps) # Max time is now the length of the swaps list + max_rows = max_time * 5 + output = [[' ' for _ in range(num_anyons * 5)] for _ in range(max_rows)] + spacing = 4 # 3 spaces between cols + + # Iterate through each time step + for time_step in range(1, max_time + 1): + # Add '|' for non-swap columns + for col in range(num_anyons): + base = (time_step - 1) * 5 + # Check if the column is not involved in any swap at the current time step + if not any(col in swap for swap in self.swaps[time_step - 1]): + for i in range(5): + output[base + i][col * spacing + 4] = '|' + + # Iterate through each swap operation at the current time step + for index_A, index_B in self.swaps[time_step - 1]: + base = (time_step - 1) * 5 # Base for each swap operation + if index_A < index_B: + for i in range(3): + output[base + i][index_A * spacing + 4 + i] = '\\' + output[base + i][index_B * spacing + 4 - i] = '/' + for i in range(3, 5): + output[base + i][index_A * spacing + 4 + (5 - i - 1)] = '/' + output[base + i][index_B * spacing + 4 - (5 - i - 1)] = '\\' + output[base + 2][index_A * spacing + 4 + 2] = '\\' + + else: + for i in range(3): + output[base + i][index_B * spacing + 4 + i] = '\\' + output[base + i][index_A * spacing + 4 - i] = '/' + for i in range(3, 5): + output[base + i][index_B * spacing + 4 + (5 - i - 1)] = '/' + output[base + i][index_A * spacing + 4 - (5 - i - 1)] = '\\' + + # Convert the output grid to a string and remove trailing empty rows + return '\n'.join([''.join(row) for row in output if any(c != ' ' for c in row)]) diff --git a/python/anyon_braiding_simulator/Simulator.py b/python/anyon_braiding_simulator/Simulator.py index 250f9d6..c151ede 100644 --- a/python/anyon_braiding_simulator/Simulator.py +++ b/python/anyon_braiding_simulator/Simulator.py @@ -1,71 +1,106 @@ -from Model import Model - - -class Simulator: - def __init__(self): - """ - Creates a the simulator. In order for the simulator to be function, the - user must first initialize the model and anyons. - """ - self._anyons = [] - self._model = None - self._dim_of_anyon_pos = 2 # Default is 2D anyon positions - - def update_anyons(self, is_increasing: bool, anyons: list) -> None: - """ - Update the anyons stored in memory. - - is_increasing: bool - True if the anyons are being added, False if the - anyons are being removed. - anyons: list - List of anyons to add or remove. - """ - - if is_increasing: - # Check if any anyons are being added that are already in the simulator - for anyon in anyons: - for anyon_in_sim in self._anyons: - if anyon_in_sim.name == anyon.name: - raise ValueError('Anyon name is already in simulator') - self._anyons.extend(anyons) - else: - self._anyons = [anyon for anyon in self._anyons if anyon not in anyons] - - def set_model(self, model: Model) -> None: - """ - Set the model for the simulator. - """ - self._model = model - - def get_model(self) -> Model: - """ - Get the model for the simulator. - """ - if self._model is None: - raise ValueError('Model has not been set') - return self._model - - def list_anyons(self) -> list: - """ - List the anyons currently in the simulator. - """ - return self._anyons - - def get_dim_of_anyon_pos(self) -> int: - """ - Provides the dimension of anyon positions. - """ - return self._dim_of_anyon_pos - - def switch_to_1D(self) -> None: - """ - Sets the dimension of anyon positions to be 1. - """ - self._dim_of_anyon_pos = 1 - - def contains_anyon(self, anyon_name: str) -> bool: - """ - Check if the anyon is in the simulator. - """ - return anyon_name in [anyon.name for anyon in self._anyons] - - # waiting on other classes to be implemented +from Model import Model +from anyon_braiding_simulator import State + + +class Simulator: + def __init__(self): + """ + Creates a the simulator. In order for the simulator to be function, the + user must first initialize the model and anyons. + """ + self._anyons = [] + self._fusion = None + self._braid = None + self._model = None + self._dim_of_anyon_pos = 2 # Default is 2D anyon positions + + def update_anyons(self, is_increasing: bool, anyons: list) -> None: + """ + Update the anyons stored in memory. + + is_increasing: bool - True if the anyons are being added, False if the + anyons are being removed. + anyons: list - List of anyons to add or remove. + """ + + if is_increasing: + # Check if any anyons are being added that are already in the simulator + for anyon in anyons: + for anyon_in_sim in self._anyons: + if anyon_in_sim.name == anyon.name: + raise ValueError('Anyon name is already in simulator') + self._anyons.extend(anyons) + else: + self._anyons = [anyon for anyon in self._anyons if anyon not in anyons] + + def set_model(self, model: Model) -> None: + """ + Set the model for the simulator. + """ + self._model = model + + def get_model(self) -> Model: + """ + Get the model for the simulator. + """ + if self._model is None: + raise ValueError('Model has not been set') + return self._model + + def list_anyons(self) -> list: + """ + List the anyons currently in the simulator. + """ + return self._anyons + + def get_state(self) -> State: + """ + Initializes the state of the simulator. + """ + state = State() + for anyon in self._anyons: + state.add_anyon(anyon) + return state + + def pairs_to_indices(self, anyon_pairs: list) -> list: + """ + Convert anyon names to indices and collect them in a list of tuples. + """ + anyon_indices = [] + for anyon_A, anyon_B in anyon_pairs: + try: + index_1 = self.get_anyon_index(anyon_A) + index_2 = self.get_anyon_index(anyon_B) + anyon_indices.append((index_1, index_2)) + except ValueError: + raise + return anyon_indices + + def get_anyon_index(self, anyon_name: str) -> int: + """ + Get the index of two anyons from their names. + """ + for index, anyon in enumerate(self._anyons): + if anyon.name == anyon_name: + return index + raise ValueError(f'Anyon with name {anyon_name} not found.') + + def get_dim_of_anyon_pos(self) -> int: + """ + Provides the dimension of anyon positions. + """ + return self._dim_of_anyon_pos + + def switch_to_1D(self) -> None: + """ + Sets the dimension of anyon positions to be 1. + """ + self._dim_of_anyon_pos = 1 + + def contains_anyon(self, anyon_name: str) -> bool: + """ + Check if the anyon is in the simulator. + """ + return anyon_name in [anyon.name for anyon in self._anyons] + + # waiting on other classes to be implemented diff --git a/python/anyon_braiding_simulator/State.py b/python/anyon_braiding_simulator/State.py new file mode 100644 index 0000000..bbf6f95 --- /dev/null +++ b/python/anyon_braiding_simulator/State.py @@ -0,0 +1,3 @@ +import numpy as np +from Model import Model + diff --git a/python/anyon_braiding_simulator/__init__.py b/python/anyon_braiding_simulator/__init__.py index cb7d49a..b9561fd 100644 --- a/python/anyon_braiding_simulator/__init__.py +++ b/python/anyon_braiding_simulator/__init__.py @@ -1,5 +1,5 @@ -from .anyon_braiding_simulator import * - -__doc__ = anyon_braiding_simulator.__doc__ -if hasattr(anyon_braiding_simulator, '__all__'): - __all__ = anyon_braiding_simulator.__all__ +from .anyon_braiding_simulator import * + +__doc__ = anyon_braiding_simulator.__doc__ +if hasattr(anyon_braiding_simulator, '__all__'): + __all__ = anyon_braiding_simulator.__all__ diff --git a/python/anyon_braiding_simulator/anyon_braiding_simulator.pyi b/python/anyon_braiding_simulator/anyon_braiding_simulator.pyi index 9e2b096..778c2ac 100644 --- a/python/anyon_braiding_simulator/anyon_braiding_simulator.pyi +++ b/python/anyon_braiding_simulator/anyon_braiding_simulator.pyi @@ -1,123 +1,123 @@ -# Standard Library -from typing import List, Optional, Tuple - -class IsingTopoCharge: - """ - Options for the topological charge for an Ising Model anyon - """ - - Psi: 'IsingTopoCharge' - Vacuum: 'IsingTopoCharge' - Sigma: 'IsingTopoCharge' - - def value(self) -> int: ... - def to_string(self) -> str: ... - -class FibonacciTopoCharge: - """ - Options for the topological charge for a Fibonacci Model anyon - """ - - Tau: 'FibonacciTopoCharge' - Vacuum: 'FibonacciTopoCharge' - -class TopoCharge: - """ - Options for the topological charge for an anyon. - Currently only supports Ising and Fibonacci models. - """ - - ising: Optional[IsingTopoCharge] - fibonacci: Optional[FibonacciTopoCharge] - - def __init__( - self, ising: Optional[IsingTopoCharge] = ..., fibonacci: Optional[FibonacciTopoCharge] = ... - ) -> None: ... - @staticmethod - def from_ising(ising: IsingTopoCharge) -> 'TopoCharge': ... - @staticmethod - def from_fibonacci(fibonacci: FibonacciTopoCharge) -> 'TopoCharge': ... - def is_ising(self) -> bool: ... - def is_fibonacci(self) -> bool: ... - def get_ising(self) -> IsingTopoCharge: ... - def get_fibonacci(self) -> FibonacciTopoCharge: ... - def to_string(self) -> str: ... - -class Anyon: - """ - In Topological Quantum Computing, anyons are the fundamental quasiparticles - which enable the computation. Anyons have an associated topological charge - given by the model used. This struct represents an anyon with a name, - charge, and position. - """ - - name: str - charge: TopoCharge - position: Tuple[float, float] - - def __init__(self, name: str, charge: TopoCharge, position: Tuple[float, float]) -> None: ... - def __str__(self) -> str: ... - -class AnyonModel: - """ - Different Anyon models that can be used to simulate the system - """ - - Ising: 'AnyonModel' - Fibonacci: 'AnyonModel' - Custom: 'AnyonModel' - - def __init__(self) -> None: ... - -class FusionPair: - """ - Represents a pair of anyons indices that are fused. The indices are derived - from the relative ordering in the list of anyons stored in State. - FusionPair is used to represent the fusion events along the fusion tree. - - When two anyons are fused, the resulting anyon carries the lower index. i.e. - the anyon resulting from the fusion (1,2) is later referenced as 1. - """ - - anyon_1: int - anyon_2: int - - def __init__(self, anyon_1: int, anyon_2: int) -> None: ... - def __str__(self) -> str: ... - -class Fusion: - """ - Stores the state of the system and all fusion operations that occur in the - fusion tree. The vector is 2D, where the outer vector represents the time - step and the inner vector represents the fusion operations that occur at - that time step. - """ - def __init__(self, state: State) -> None: ... - def verify_basis(self, basis: Basis) -> bool: ... - def qubit_enc(self, anyon_model: AnyonModel) -> List[FusionPair]: ... - def __str__(self) -> str: ... - def apply_fusion(self, anyon_1: List[int], anyon_2: List[int], anyon_model: AnyonModel) -> List[int]: ... - def verify_fusion_result(self, init_charge: TopoCharge, anyon_model: AnyonModel) -> bool: ... - -class State: - """ - Stores the overall state of the system. Use this struct to keep track of any - common information throughout the simulation (e.g. anyons, operations, - statevector). - """ - - anyons: List[Anyon] - operations: List[Tuple[int, FusionPair]] - - def __init__(self) -> None: ... - def add_anyon(self, anyon: Anyon) -> bool: ... - def add_operation(self, time: int, operation: FusionPair) -> bool: ... - -class Basis: - """ - The basis is represented as a vector of tuples (time, FusionPair). In TQC, - the basis is a sequence of fusion operations that occur in the fusion tree, - and a different fusion ordering is a different basis. - """ - def __init__(self, ops: List[Tuple[int, FusionPair]]) -> None: ... - def verify_basis(self, anyons: int) -> bool: ... +# Standard Library +from typing import List, Optional, Tuple + +class IsingTopoCharge: + """ + Options for the topological charge for an Ising Model anyon + """ + + Psi: 'IsingTopoCharge' + Vacuum: 'IsingTopoCharge' + Sigma: 'IsingTopoCharge' + + def value(self) -> int: ... + def to_string(self) -> str: ... + +class FibonacciTopoCharge: + """ + Options for the topological charge for a Fibonacci Model anyon + """ + + Tau: 'FibonacciTopoCharge' + Vacuum: 'FibonacciTopoCharge' + +class TopoCharge: + """ + Options for the topological charge for an anyon. + Currently only supports Ising and Fibonacci models. + """ + + ising: Optional[IsingTopoCharge] + fibonacci: Optional[FibonacciTopoCharge] + + def __init__( + self, ising: Optional[IsingTopoCharge] = ..., fibonacci: Optional[FibonacciTopoCharge] = ... + ) -> None: ... + @staticmethod + def from_ising(ising: IsingTopoCharge) -> 'TopoCharge': ... + @staticmethod + def from_fibonacci(fibonacci: FibonacciTopoCharge) -> 'TopoCharge': ... + def is_ising(self) -> bool: ... + def is_fibonacci(self) -> bool: ... + def get_ising(self) -> IsingTopoCharge: ... + def get_fibonacci(self) -> FibonacciTopoCharge: ... + def to_string(self) -> str: ... + +class Anyon: + """ + In Topological Quantum Computing, anyons are the fundamental quasiparticles + which enable the computation. Anyons have an associated topological charge + given by the model used. This struct represents an anyon with a name, + charge, and position. + """ + + name: str + charge: TopoCharge + position: Tuple[float, float] + + def __init__(self, name: str, charge: TopoCharge, position: Tuple[float, float]) -> None: ... + def __str__(self) -> str: ... + +class AnyonModel: + """ + Different Anyon models that can be used to simulate the system + """ + + Ising: 'AnyonModel' + Fibonacci: 'AnyonModel' + Custom: 'AnyonModel' + + def __init__(self) -> None: ... + +class FusionPair: + """ + Represents a pair of anyons indices that are fused. The indices are derived + from the relative ordering in the list of anyons stored in State. + FusionPair is used to represent the fusion events along the fusion tree. + + When two anyons are fused, the resulting anyon carries the lower index. i.e. + the anyon resulting from the fusion (1,2) is later referenced as 1. + """ + + anyon_1: int + anyon_2: int + + def __init__(self, anyon_1: int, anyon_2: int) -> None: ... + def __str__(self) -> str: ... + +class Fusion: + """ + Stores the state of the system and all fusion operations that occur in the + fusion tree. The vector is 2D, where the outer vector represents the time + step and the inner vector represents the fusion operations that occur at + that time step. + """ + def __init__(self, state: State) -> None: ... + def verify_basis(self, basis: Basis) -> bool: ... + def qubit_enc(self, anyon_model: AnyonModel) -> List[FusionPair]: ... + def __str__(self) -> str: ... + def apply_fusion(self, anyon_1: List[int], anyon_2: List[int], anyon_model: AnyonModel) -> List[int]: ... + def verify_fusion_result(self, init_charge: TopoCharge, anyon_model: AnyonModel) -> bool: ... + +class State: + """ + Stores the overall state of the system. Use this struct to keep track of any + common information throughout the simulation (e.g. anyons, operations, + statevector). + """ + + anyons: List[Anyon] + operations: List[Tuple[int, FusionPair]] + + def __init__(self) -> None: ... + def add_anyon(self, anyon: Anyon) -> bool: ... + def add_operation(self, time: int, operation: FusionPair) -> bool: ... + +class Basis: + """ + The basis is represented as a vector of tuples (time, FusionPair). In TQC, + the basis is a sequence of fusion operations that occur in the fusion tree, + and a different fusion ordering is a different basis. + """ + def __init__(self, ops: List[Tuple[int, FusionPair]]) -> None: ... + def verify_basis(self, anyons: int) -> bool: ... diff --git a/python/anyon_braiding_simulator/main.py b/python/anyon_braiding_simulator/main.py index 83b76dc..b8c365f 100644 --- a/python/anyon_braiding_simulator/main.py +++ b/python/anyon_braiding_simulator/main.py @@ -1,288 +1,308 @@ -# Standard Library -import cmd -import subprocess -import sys - -from anyon_braiding_simulator.anyon_braiding_simulator import ( - Anyon, - AnyonModel, - FibonacciTopoCharge, - IsingTopoCharge, - TopoCharge, -) -from Braiding import Braid -from Model import Model -from Simulator import Simulator - -sim = Simulator() - - -def anyon(*args): - """ - Handle the anyon command. This command adds an anyon to the simulation. - """ - if len(args) != 2 and len(args) != 3: - print('Error: There should be either 2 or 3 arguments') - return - - name = args[0] - topological_charge = args[1] - position = () - - topo_charge = {} - if sim.get_model().get_model_type() == AnyonModel.Ising: - topo_charge = { - 'psi': IsingTopoCharge.Psi, - 'sigma': IsingTopoCharge.Sigma, - 'vac': IsingTopoCharge.Vacuum, - } - elif sim.get_model().get_model_type() == AnyonModel.Fibonacci: - topo_charge = { - 'tau': FibonacciTopoCharge.Tau, - 'Vacuum': FibonacciTopoCharge.Vacuum, - } - else: - print('Error: Model not set') - return - - try: - topological_charge = topo_charge[args[1].lower()] - except KeyError: - print(f'Error: topological charge must be in {list(topo_charge.keys())}') - return - - if len(args) == 2: - anyons = sim.list_anyons() - # Make sure any previous anyons were specified in 1D space (i.e. without a position argument) - if anyons and sim.get_dim_of_anyon_pos() == 2: - print( - 'Error: you have already provided an anyon in 2D space, so the rest must also have a \ - specified 2D position' - ) - return - elif not anyons: - sim.switch_to_1D() - - position_1D = len(anyons) # Index/position of new anyon in 1D - position = (position_1D, 0) - else: - # Make sure any previous anyons were specified in 2D space - if sim.get_dim_of_anyon_pos() == 1: - print( - 'Error: you have already provided an anyon in 1D space, so the positions of the rest \ - cannot be specified in 2D' - ) - return - - try: - position = tuple(map(float, args[2].replace('{', '').replace('}', '').split(','))) - position[1] - except ValueError: - print('Error: position must be formatted as {x,y} where x and y are numbers') - return - except IndexError: - print('Error: position must be formatted as {x,y} where x and y are numbers') - return - - new_anyon = Anyon(name, TopoCharge(topological_charge), position) - try: - sim.update_anyons(True, [new_anyon]) - if len(args) == 2: - print(f'Created anyon {name} with TC {topological_charge} at position {position[0]} in 1D') - else: - print(f'Created anyon {name} with TC {topological_charge} at position {position} in 2D') - except ValueError: - print('Error: An anyon with the same name already exists') - - -def model(*args): - """ - Handle the model command. This command sets the model for the simulation. - """ - - if len(args) < 1: - print('Error: Not enough arguments') - return - - model_type = str(args[0]) - if model_type.lower() != 'ising' and model_type.lower() != 'fibonacci': - print('Error: Model must be Ising or Fibonacci') - return - - model_convert = {'ising': AnyonModel.Ising, 'fibonacci': AnyonModel.Fibonacci} - - model = Model(model_convert[model_type.lower()]) - sim.set_model(model) - - -def fusion(*args): - """ - Handle the fusion command. This command executes the various fusion operations. - """ - if len(args) < 1: - print('Error: Not enough arguments') - return - - # fusion = Fusion() - cmd = args[0] - - if cmd.lower() == 'fuse': - # anyon_indices = [sim.list_anyons().index(anyon) for anyon in args[1:]] - # fusion.fuse(*anyon_indices) - pass - - elif cmd.lower() == 'print': - # print(fusion) - pass - else: - print('Error: Unknown fusion command') - - -def braid(*args): - """ - Handle the braid command. This command executes the various braid operations. - """ - - if len(args) < 1: - print('Error: Not enough arguments') - return - - braid = Braid(sim.list_anyons()) - cmd = args[0] - - if cmd.lower() == 'swap': - braid.swap(args[1], args[2]) - elif cmd.lower() == 'print': - print(braid) - else: - print('Error: Unknown braid command') - - -class SimulatorShell(cmd.Cmd): - last_command = '' - - def __init__(self): - super().__init__() - self.prompt = 'simulator> ' - - self.command_options = { - 'anyon': 'anyon <{x,y} coords>', - 'model': 'model ', - 'fusion': 'fusion anyon_name_1 anyon_name_2 ...', - 'braid': 'braid anyon_name_1 anyon_name_2 ...', - 'list': 'list', - } - - # Flag to indicate whether initialization (model & anyon choice) is completed - self.init_completed = False - - # Prompt the user to input the anyon model - while True: - user_input = input('Enter the anyon model ("ising" or "fibonacci"): ') - if user_input.lower() == 'ising' or user_input.lower() == 'fibonacci': - break - elif user_input.lower() == 'exit': - sys.exit(0) - else: - print('\nError: Invalid model.') - - model(user_input) - - # Prompt the user to input the anyon details - no_anyons = True - while True: - if no_anyons: - user_input = input( - '\nEnter the anyon name, topological charge, and optionally, the 2D position.' - '\nUse the format <{x,y}>.\n' - '> ' - ) - else: - user_input = input('\nContinue adding anyons, or type "done" when finished initializing.\n' '> ') - - if user_input.lower() == 'exit': - sys.exit(0) - elif user_input.lower() == 'done': - break - - args = user_input.split(' ') - if len(args) < 2 or len(args) > 3: - print('Error: There should be either 2 or 3 arguments') - continue - - anyon(*args) - no_anyons = False - - self.init_complete = True - - def do_shell(self, arg): - "Run a shell command" - print('running shell command:', arg) - subprocess.run( - arg, - shell=True, - ) - - def do_anyon(self, arg): - "Add an anyon to the simulation" - if self.init_complete: - print('Error: Cannot add anyons after initialization') - return - - args = arg.split(' ') - if args[0] == 'help' or args[0] == '-h': - print(self.command_options['anyon']) - else: - anyon(*args) - - def do_model(self, arg): - "Set the model for the simulation" - if self.init_complete: - print('Error: Cannot change model after initialization') - return - - args = arg.split(' ') - model(*args) - if args[0] == 'help' or args[0] == '-h': - print(self.command_options['model']) - else: - model(*args) - - def do_fusion(self, arg): - "Fuse anyons together" - args = arg.split(' ') - if args[0] == 'help' or args[0] == '-h': - print(self.command_options['fusion']) - else: - fusion(*args) - - def do_braid(self, arg): - "Braid anyons together" - args = arg.split(' ') - - if args[0].lower() == 'help' or args[0].lower() == '-h': - print(self.command_options['braid']) - else: - braid(*args) - - def do_list(self, arg): - "Lists anyons present" - args = arg.split(' ') - if args[0] == 'help' or args[0] == '-h': - print(self.command_options['list']) - else: - print(f'Anyons: {"\n\t".join([str(anyon) for anyon in sim.list_anyons()])}') - - def do_exit(self, arg): - "Exit the simulator" - return True - - def do_help(self, arg): - "Print help" - cmds = ['anyon', 'model', 'fusion', 'braid', 'exit', 'list'] - print(f'Commands: {", ".join(sorted(cmds))}') - - -if __name__ == '__main__': - shell = SimulatorShell() - shell.cmdloop() +# Standard Library +import cmd +import subprocess +import sys + +from anyon_braiding_simulator.anyon_braiding_simulator import ( + Anyon, + AnyonModel, + FibonacciTopoCharge, + Fusion, + IsingTopoCharge, + TopoCharge, +) +from Braiding import Braid +from Model import Model +from Simulator import Simulator + +sim = Simulator() + + +def anyon(*args): + """ + Handle the anyon command. This command adds an anyon to the simulation. + """ + if len(args) != 2 and len(args) != 3: + print('Error: There should be either 2 or 3 arguments') + return + + name = args[0] + topological_charge = args[1] + position = () + + topo_charge = {} + if sim.get_model().get_model_type() == AnyonModel.Ising: + topo_charge = { + 'psi': IsingTopoCharge.Psi, + 'sigma': IsingTopoCharge.Sigma, + 'vac': IsingTopoCharge.Vacuum, + } + elif sim.get_model().get_model_type() == AnyonModel.Fibonacci: + topo_charge = { + 'tau': FibonacciTopoCharge.Tau, + 'Vacuum': FibonacciTopoCharge.Vacuum, + } + else: + print('Error: Model not set') + return + + try: + topological_charge = topo_charge[args[1].lower()] + except KeyError: + print(f'Error: topological charge must be in {list(topo_charge.keys())}') + return + + if len(args) == 2: + anyons = sim.list_anyons() + # Make sure any previous anyons were specified in 1D space (i.e. without a position argument) + if anyons and sim.get_dim_of_anyon_pos() == 2: + print( + 'Error: you have already provided an anyon in 2D space, so the rest must also have a \ + specified 2D position' + ) + return + elif not anyons: + sim.switch_to_1D() + + position_1D = len(anyons) # Index/position of new anyon in 1D + position = (position_1D, 0) + else: + # Make sure any previous anyons were specified in 2D space + if sim.get_dim_of_anyon_pos() == 1: + print( + 'Error: you have already provided an anyon in 1D space, so the positions of the rest \ + cannot be specified in 2D' + ) + return + + try: + position = tuple(map(float, args[2].replace('{', '').replace('}', '').split(','))) + position[1] + except ValueError: + print('Error: position must be formatted as {x,y} where x and y are numbers') + return + except IndexError: + print('Error: position must be formatted as {x,y} where x and y are numbers') + return + + new_anyon = Anyon(name, TopoCharge(topological_charge), position) + try: + sim.update_anyons(True, [new_anyon]) + if len(args) == 2: + print(f'\nCreated anyon {name} with TC {topological_charge} at position {position[0]} in 1D') + else: + print(f'\nCreated anyon {name} with TC {topological_charge} at position {position} in 2D') + except ValueError: + print('\nError: An anyon with the same name already exists') + + +def model(*args): + """ + Handle the model command. This command sets the model for the simulation. + """ + + if len(args) < 1: + print('Error: Not enough arguments') + return + + model_type = str(args[0]) + if model_type.lower() != 'ising' and model_type.lower() != 'fibonacci': + print('Error: Model must be Ising or Fibonacci') + return + + model_convert = {'ising': AnyonModel.Ising, 'fibonacci': AnyonModel.Fibonacci} + + model = Model(model_convert[model_type.lower()]) + sim.set_model(model) + + +def fusion(*args): + """ + Handle the fusion command. This command executes the various fusion operations. + """ + if len(args) < 1: + print('Error: Not enough arguments') + return + + fusion = sim._fusion + cmd = args[0] + + if cmd.lower() == 'fuse': + # anyon_pairs = [tuple(anyon.replace('-', ' ').split()) for anyon in args[1:]] + # anyon_indices = sim.pairs_to_indices(anyon_pairs) + # fusion.fuse(anyon_indices) + pass + + elif cmd.lower() == 'print': + # print(fusion) + pass + else: + print('Error: Unknown fusion command') + + +def braid(*args): + """ + Handle the braid command. This command executes the various braid operations. + """ + + if len(args) < 1: + print('Error: Not enough arguments') + return + + braid = sim._braid + cmd = args[0] + + if cmd.lower() == 'swap': + if len(args) < 2: + print('Error: Not enough arguments for swap') + return + + # Parse the anyon name pairs and convert to indices + try: + anyon_pairs = [tuple(anyon.replace('-', ' ').split()) for anyon in args[1:]] + anyon_indices = sim.pairs_to_indices(anyon_pairs) + except ValueError: + print('\nError: A given anyon name does not exist in the simulator.') + return + + # Perform the swap operations + braid.swap(anyon_indices) + elif cmd.lower() == 'print': + print(braid) + else: + print('Error: Unknown braid command') + + +class SimulatorShell(cmd.Cmd): + last_command = '' + + def __init__(self): + super().__init__() + self.prompt = 'simulator> ' + + self.command_options = { + 'anyon': 'anyon <{x,y} coords>', + 'model': 'model ', + 'fusion': 'fusion anyon_name_1-anyon_name_2 ...', + 'braid': 'braid anyon_name_1-anyon_name_2 ...', + 'list': 'list', + } + + # Flag to indicate whether initialization (model & anyon choice) is completed + self.init_completed = False + + # Prompt the user to input the anyon model + while True: + user_input = input('Enter the anyon model ("ising" or "fibonacci"): ') + if user_input.lower() == 'ising' or user_input.lower() == 'fibonacci': + break + elif user_input.lower() == 'exit': + sys.exit(0) + else: + print('\nError: Invalid model.') + + model(user_input) + + # Prompt the user to input the anyon details + no_anyons = True + while True: + if no_anyons: + user_input = input( + '\nEnter the anyon name, topological charge, and optionally, the 2D position.' + '\nUse the format <{x,y}>.\n' + '> ' + ) + else: + user_input = input('\nContinue adding anyons (at least 3 total), or type "done" when finished initializing.\n' '> ') + + if user_input.lower() == 'exit': + sys.exit(0) + elif user_input.lower() == 'done' and len(sim.list_anyons()) >= 3: + sim._fusion = Fusion(sim.get_state()) + sim._braid = Braid(sim.get_state(), sim.get_model()) + break + elif user_input.lower() == 'done' and len(sim.list_anyons()) < 3: + print('\nError: At least 3 anyons are required to initialize the simulation.') + continue + + args = user_input.split(' ') + if len(args) < 2 or len(args) > 3: + print('Error: There should be either 2 or 3 arguments') + continue + + anyon(*args) + no_anyons = False + + self.init_complete = True + + def do_shell(self, arg): + "Run a shell command" + print('running shell command:', arg) + subprocess.run( + arg, + shell=True, + ) + + def do_anyon(self, arg): + "Add an anyon to the simulation" + if self.init_complete: + print('Error: Cannot add anyons after initialization') + return + + args = arg.split(' ') + if args[0] == 'help' or args[0] == '-h': + print(self.command_options['anyon']) + else: + anyon(*args) + + def do_model(self, arg): + "Set the model for the simulation" + if self.init_complete: + print('Error: Cannot change model after initialization') + return + + args = arg.split(' ') + model(*args) + if args[0] == 'help' or args[0] == '-h': + print(self.command_options['model']) + else: + model(*args) + + def do_fusion(self, arg): + "Fuse anyons together" + args = arg.split(' ') + if args[0] == 'help' or args[0] == '-h': + print(self.command_options['fusion']) + else: + fusion(*args) + + def do_braid(self, arg): + "Braid anyons together" + args = arg.split(' ') + + if args[0].lower() == 'help' or args[0].lower() == '-h': + print(self.command_options['braid']) + else: + braid(*args) + + def do_list(self, arg): + "Lists anyons present" + args = arg.split(' ') + if args[0] == 'help' or args[0] == '-h': + print(self.command_options['list']) + else: + print(f'Anyons: {"\n\t".join([str(anyon) for anyon in sim.list_anyons()])}') + + def do_exit(self, arg): + "Exit the simulator" + return True + + def do_help(self, arg): + "Print help" + cmds = ['anyon', 'model', 'fusion', 'braid', 'exit', 'list'] + print(f'Commands: {", ".join(sorted(cmds))}') + + +if __name__ == '__main__': + shell = SimulatorShell() + shell.cmdloop() diff --git a/python/tests/test_anyon.py b/python/tests/test_anyon.py index f16c186..dd04977 100644 --- a/python/tests/test_anyon.py +++ b/python/tests/test_anyon.py @@ -1,10 +1,10 @@ -import pytest -from anyon_braiding_simulator.anyon_braiding_simulator import Anyon, IsingTopoCharge, TopoCharge - - -@pytest.mark.anyon -def test_anyon(): - anyon = Anyon('thisisatest', TopoCharge.from_ising(IsingTopoCharge.Psi), (1, 1)) - assert anyon.name == 'thisisatest' - assert anyon.charge.get_ising() == IsingTopoCharge.Psi - assert anyon.position == (1, 1) +import pytest +from anyon_braiding_simulator.anyon_braiding_simulator import Anyon, IsingTopoCharge, TopoCharge + + +@pytest.mark.anyon +def test_anyon(): + anyon = Anyon('thisisatest', TopoCharge.from_ising(IsingTopoCharge.Psi), (1, 1)) + assert anyon.name == 'thisisatest' + assert anyon.charge.get_ising() == IsingTopoCharge.Psi + assert anyon.position == (1, 1) diff --git a/python/tests/test_basis.py b/python/tests/test_basis.py index 192d92f..4fb71eb 100644 --- a/python/tests/test_basis.py +++ b/python/tests/test_basis.py @@ -1,43 +1,43 @@ -import pytest -from anyon_braiding_simulator.anyon_braiding_simulator import Basis, FusionPair - - -@pytest.fixture -def anyons(): - return 10 - - -@pytest.mark.basis -def test_basis(anyons): - anyons = 10 - operations = [] - for t in range(1, 10): - operations.append((t, FusionPair(0, t))) - - assert Basis(operations).verify_basis(anyons) - - -@pytest.mark.basis -def test_empty_basis(anyons): - operations = [] - - assert not Basis(operations).verify_basis(anyons) - - -@pytest.mark.basis -def test_swapped_basis(anyons): - operations = [] - for t in range(1, 10): - operations.append((t, FusionPair(t, 0))) - - assert not Basis(operations).verify_basis(anyons) - - -@pytest.mark.basis -def test_invalid_time_basis(anyons): - operations = [] - - for t in range(1, 10): - operations.append((1, FusionPair(0, t))) - - assert not Basis(operations).verify_basis(anyons) +import pytest +from anyon_braiding_simulator.anyon_braiding_simulator import Basis, FusionPair + + +@pytest.fixture +def anyons(): + return 10 + + +@pytest.mark.basis +def test_basis(anyons): + anyons = 10 + operations = [] + for t in range(1, 10): + operations.append((t, FusionPair(0, t))) + + assert Basis(operations).verify_basis(anyons) + + +@pytest.mark.basis +def test_empty_basis(anyons): + operations = [] + + assert not Basis(operations).verify_basis(anyons) + + +@pytest.mark.basis +def test_swapped_basis(anyons): + operations = [] + for t in range(1, 10): + operations.append((t, FusionPair(t, 0))) + + assert not Basis(operations).verify_basis(anyons) + + +@pytest.mark.basis +def test_invalid_time_basis(anyons): + operations = [] + + for t in range(1, 10): + operations.append((1, FusionPair(0, t))) + + assert not Basis(operations).verify_basis(anyons) diff --git a/python/tests/test_braiding.py b/python/tests/test_braiding.py index 674b0c6..e4efefd 100644 --- a/python/tests/test_braiding.py +++ b/python/tests/test_braiding.py @@ -1,142 +1,223 @@ -# Standard Library -import os -import sys - -import pytest - -sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', 'anyon_braiding_simulator'))) - -from Braiding import Braid - -sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', 'model'))) - -from anyon_braiding_simulator.anyon_braiding_simulator import Anyon, IsingTopoCharge, TopoCharge - - -@pytest.fixture -def setup_anyons(): - return [ - Anyon('A', TopoCharge.from_ising(IsingTopoCharge.Psi), (1, 1)), - Anyon('B', TopoCharge.from_ising(IsingTopoCharge.Psi), (2, 2)), - Anyon('C', TopoCharge.from_ising(IsingTopoCharge.Psi), (3, 3)), - Anyon('D', TopoCharge.from_ising(IsingTopoCharge.Psi), (4, 4)), - ] - - -@pytest.mark.braiding -def test_braid_initialization(setup_anyons): - # Test with valid anyons - braid = Braid(setup_anyons) - assert len(braid.anyons) == 4 - assert len(braid.swaps) == 0 - - # Test with fewer than 3 anyons - with pytest.raises(ValueError, match='There must be at least 3 anyons'): - Braid(setup_anyons[:2]) - - # Test with duplicate anyon names - duplicate_anyons = setup_anyons[:] - duplicate_anyons[3] = Anyon('A', TopoCharge.from_ising(IsingTopoCharge.Psi), (4, 4)) - with pytest.raises(ValueError, match='Duplicate anyon names detected'): - Braid(duplicate_anyons) - - -@pytest.mark.braiding -def test_braid_swap(setup_anyons): - braid = Braid(setup_anyons) - - # Test valid swaps - braid.swap(1, [(0, 1), (2, 3)]) - assert braid.anyons[0].name == 'B' - assert braid.anyons[1].name == 'A' - assert braid.anyons[2].name == 'D' - assert braid.anyons[3].name == 'C' - assert len(braid.swaps) == 2 - - # Test non-adjacent swap (should not occur) - braid.swap(2, [(0, 2)]) - assert braid.anyons[0].name == 'B' - assert braid.anyons[1].name == 'A' - assert braid.anyons[2].name == 'D' - assert braid.anyons[3].name == 'C' - assert len(braid.swaps) == 2 - - # Test adjacent swap with reused indices (should not occur) - braid.swap(3, [(1, 2), (2, 3)]) - assert braid.anyons[0].name == 'B' - assert braid.anyons[1].name == 'D' - assert braid.anyons[2].name == 'A' - assert braid.anyons[3].name == 'C' - assert len(braid.swaps) == 3 - - -@pytest.mark.braiding -def test_braid_str(setup_anyons): - braid = Braid(setup_anyons) - - # Perform swaps - braid.swap(1, [(0, 1), (2, 3)]) - braid.swap(2, [(1, 2)]) - braid.swap(3, [(3, 2)]) - - expected = [ - ' \\ / \\ /', - ' \\ / \\ /', - ' \\ \\', - ' / \\ / \\', - ' / \\ / \\', - ' | \\ / |', - ' | \\ / |', - ' | \\ |', - ' | / \\ |', - ' | / \\ |', - ' | | \\ /', - ' | | \\ /', - ' | | /', - ' | | / \\ ', - ' | | / \\', - ] - # Get string representation of the braid - output = str(braid).strip().split('\n') - - # Assert each line matches expected - for output_line, expected_line in zip(output, expected): - assert output_line.strip() == expected_line.strip() - - -@pytest.mark.parametrize( - 'swaps, expected', - [ - ([(0, 1)], ['B', 'A', 'C', 'D']), - ([(1, 2)], ['A', 'C', 'B', 'D']), - ([(2, 3)], ['A', 'B', 'D', 'C']), - ([(0, 1), (2, 3)], ['B', 'A', 'D', 'C']), - ([(1, 2), (2, 3)], ['A', 'C', 'B', 'D']), - ([(0, 1), (1, 2)], ['B', 'A', 'C', 'D']), - ], -) -@pytest.mark.braiding -def test_swap_operations(setup_anyons, swaps, expected): - braid = Braid(setup_anyons) - braid.swap(1, swaps) - anyon_names = [anyon.name for anyon in braid.anyons] - assert anyon_names == expected - - -""" -Need to test these two functions later (after implementing some FRF stuff) -""" - - -@pytest.mark.braiding -def test_apply_unitary(): - pass - - -@pytest.mark.braiding -def test_track_state_history(): - pass - - -if __name__ == '__main__': - pytest.main(['-v', __file__]) +import pytest +import os +import sys +import numpy as np + +sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', 'anyon_braiding_simulator'))) + +from Braiding import Braid +from Model import Model +from anyon_braiding_simulator import Anyon, AnyonModel, IsingTopoCharge, TopoCharge, State, FusionPair + + +@pytest.fixture +def setup_state_and_anyons(): + model = Model(AnyonModel.Ising) + state = State() + anyons = [ + Anyon('A', TopoCharge.from_ising(IsingTopoCharge.Psi), (1, 1)), + Anyon('B', TopoCharge.from_ising(IsingTopoCharge.Psi), (2, 2)), + Anyon('C', TopoCharge.from_ising(IsingTopoCharge.Psi), (3, 3)), + Anyon('D', TopoCharge.from_ising(IsingTopoCharge.Psi), (4, 4)) + ] + for anyon in anyons: + state.add_anyon(anyon) + return state, anyons, model + +def test_braid_initialization(setup_state_and_anyons): + state, anyons, model = setup_state_and_anyons + + # Test with valid anyons + braid = Braid(state, model) + assert len(braid.anyons) == 4 + assert len(braid.swaps) == 0 + + # Test with fewer than 3 anyons + with pytest.raises(ValueError, match='There must be at least 3 anyons'): + state_few = State() + for anyon in anyons[:2]: + state_few.add_anyon(anyon) + Braid(state_few, model) + + # Test with duplicate anyon names + state_duplicate = State() + duplicate_anyons = anyons[:] + duplicate_anyons[3] = Anyon('A', TopoCharge.from_ising(IsingTopoCharge.Psi), (4, 4)) + for anyon in duplicate_anyons: + state_duplicate.add_anyon(anyon) + with pytest.raises(ValueError, match='Duplicate anyon names detected'): + Braid(state_duplicate, model) + +def test_braid_swap(setup_state_and_anyons): + state, _, model = setup_state_and_anyons + braid = Braid(state, model) + + # Test valid swaps + braid.swap([(0, 1), (2, 3)]) + assert braid.anyons[0].name == 'B' + assert braid.anyons[1].name == 'A' + assert braid.anyons[2].name == 'D' + assert braid.anyons[3].name == 'C' + assert len(braid.swaps) == 1 + assert braid.swaps[0] == [(0, 1), (2, 3)] + + # Test non-adjacent swap (should not occur) + braid.swap([(0, 2)]) + assert braid.anyons[0].name == 'B' + assert braid.anyons[1].name == 'A' + assert braid.anyons[2].name == 'D' + assert braid.anyons[3].name == 'C' + assert len(braid.swaps) == 2 + assert braid.swaps[1] == [] + + # Test adjacent swap with reused indices (should not occur) + braid.swap([(1, 2), (2, 3)]) + assert braid.anyons[0].name == 'B' + assert braid.anyons[1].name == 'D' + assert braid.anyons[2].name == 'A' + assert braid.anyons[3].name == 'C' + assert len(braid.swaps) == 3 + assert braid.swaps[2] == [(1, 2)] + +def test_braid_str(setup_state_and_anyons): + state, _, model = setup_state_and_anyons + braid = Braid(state, model) + + # Perform swaps + braid.swap([(0, 1), (2, 3)]) + braid.swap([(1, 2)]) + braid.swap([(3, 2)]) + + expected = [ + ' \\ / \\ /', + ' \\ / \\ /', + ' \\ \\', + ' / \\ / \\', + ' / \\ / \\', + ' | \\ / |', + ' | \\ / |', + ' | \\ |', + ' | / \\ |', + ' | / \\ |', + ' | | \\ /', + ' | | \\ /', + ' | | /', + ' | | / \\ ', + ' | | / \\' + ] + # Get string representation of the braid + output = str(braid).strip().split('\n') + + # Assert each line matches expected + for output_line, expected_line in zip(output, expected): + assert output_line.strip() == expected_line.strip() + +@pytest.mark.parametrize("swaps, expected", [ + ([(0, 1)], ['B', 'A', 'C', 'D']), + ([(1, 2)], ['A', 'C', 'B', 'D']), + ([(2, 3)], ['A', 'B', 'D', 'C']), + ([(0, 1), (2, 3)], ['B', 'A', 'D', 'C']), + ([(1, 2), (2, 3)], ['A', 'C', 'B', 'D']), + ([(0, 1), (1, 2)], ['B', 'A', 'C', 'D']) +]) + +def test_parametrized_swaps(swaps, expected, setup_state_and_anyons): + state, _, model = setup_state_and_anyons + braid = Braid(state, model) + + # Perform swaps + braid.swap(swaps) + + # Extract the names of anyons after swaps + resulting_names = [anyon.name for anyon in braid.anyons] + + # Assert the result matches the expected output + assert resulting_names == expected + +@pytest.fixture +def setup_state(): + # Initialize the state with 6 anyons + state = State() + for i in range(6): + state.add_anyon(Anyon(f'{i}', TopoCharge.from_ising(IsingTopoCharge.Sigma), (0, 0))) + + # Add fusion operations + state.add_operation(1, FusionPair(0, 1)) + state.add_operation(1, FusionPair(2, 3)) + state.add_operation(1, FusionPair(4, 5)) + state.add_operation(2, FusionPair(2, 4)) + state.add_operation(3, FusionPair(0, 2)) + + # Initialize the braid with the given state and model type + braid = Braid(state, Model(AnyonModel.Ising)) + + return braid + +def test_qubit_enc(setup_state): + braid = setup_state + + correct = [FusionPair(0, 1), FusionPair(2, 4), FusionPair(2, 3)] + + # Confirm qubit_enc is working as expected + assert set(map(str, braid.fusion.qubit_enc(braid.model.model_type))) == set(map(str, correct)) + +def test_swap_to_qubit(setup_state): + braid = setup_state + + # Swap (0, 1) + braid.swap([(0, 1)]) + assert braid.swap_to_qubit(1, 0) == 0 # Verify the qubit index is 0 + + # Swap (2, 3) at time 2 + braid.swap([(2, 3)]) + assert braid.swap_to_qubit(2, 0) == 1 # Verify the qubit index is 1 + + +@pytest.fixture +def setup_braid(): + state = State() + anyons = [Anyon(f'{i}', TopoCharge.from_ising(IsingTopoCharge.Sigma), (0,0)) for i in range(6)] + for anyon in anyons: + state.add_anyon(anyon) + model = Model(AnyonModel.Ising) + + state.add_operation(1, FusionPair(0, 1)) + state.add_operation(1, FusionPair(2, 3)) + state.add_operation(1, FusionPair(4, 5)) + state.add_operation(2, FusionPair(2, 4)) + state.add_operation(3, FusionPair(0, 2)) + + return Braid(state, model) + +def test_direct_swap(setup_braid): + braid = setup_braid + + # Perform valid adjacent swaps + braid.swap([(0, 1)]) + assert braid.is_direct_swap(0, 1) == True + + # Perform invalid adjacent swaps + braid.swap([(2, 4)]) + assert braid.is_direct_swap(2, 4) == False + + # Perform valid non-adjacent swaps + braid.swap([(0, 2)]) + assert braid.is_direct_swap(0, 2) == False + + # Perform invalid non-adjacent swaps + braid.swap([(0, 3)]) + assert braid.is_direct_swap(0, 3) == False + +def test_generate_overall_unitary(setup_braid): + braid = setup_braid + + # Perform valid adjacent swaps + braid.swap([(0, 1)]) + unitary = braid.generate_overall_unitary(1, 0) + + # Assert the unitary matrix matches the expected matrix + assert np.shape(unitary) == (64, 64) + + +if __name__ == '__main__': + pytest.main(['-v', __file__]) diff --git a/python/tests/test_main.py b/python/tests/test_main.py index 6ec8fe0..337c2f4 100644 --- a/python/tests/test_main.py +++ b/python/tests/test_main.py @@ -1,162 +1,151 @@ -# Standard Library -import os - -import pytest -from unittest.mock import patch -import sh - - -def exec(cmds: list[str]): - os.chdir('python/anyon_braiding_simulator') - - cmd_string = '\n'.join(cmds) - - try: - sh.python(['main.py'], _in=cmd_string) - except sh.ErrorReturnCode as e: - print(e) - assert False - finally: - os.chdir('../..') - -class TestInit: - @pytest.mark.main - def test_model_ising(self): - cmds = ['ising', 'exit'] - exec(cmds) - - @pytest.mark.main - def test_model_fibonacci(self): - cmds = ['fibonacci', 'exit'] - exec(cmds) - - @pytest.mark.main - def test_one_anyon_vac(self): - cmds = ['ising', 'anyon1 vac', 'done', 'exit'] - exec(cmds) - - @pytest.mark.main - def test_one_anyon_sigma(self): - cmds = ['ising', 'anyon1 sigma', 'done', 'exit'] - exec(cmds) - - @pytest.mark.main - def test_one_anyon_psi(self): - cmds = ['ising', 'anyon1 psi', 'done', 'exit'] - exec(cmds) - - @pytest.mark.main - def test_one_anyon_2D(self): - cmds = ['ising', 'anyon1 psi {1,2}', 'done', 'exit'] - exec(cmds) - - @pytest.mark.main - def test_two_anyons(self): - cmds = ['ising', 'anyon1 psi', 'anyon2 vac', 'done', 'exit'] - exec(cmds) - - @pytest.mark.main - def test_three_anyons(self): - cmds = ['ising', 'anyon1 vac', 'anyon2 sigma', 'anyon3 sigma', 'done', 'exit'] - exec(cmds) - - @pytest.mark.main - def test_three_anyons_2D(self): - cmds = ['ising', 'anyon1 psi {-1,-1}', 'anyon2 vac {2,-1}', 'anyon3 vac {0,0}', 'done', 'exit'] - exec(cmds) - - @pytest.mark.main - def test_three_anyons_2D_overlapping(self): - cmds = ['ising', 'anyon1 psi {-1,-1}', 'anyon2 vac {2,-1}', 'anyon3 vac {2,-1}', 'done', 'exit'] - exec(cmds) - - @pytest.mark.main - def test_four_anyons(self): - cmds = ['ising', 'anyon1 psi', 'anyon2 psi', 'anyon3 psi', 'anyon4 psi', 'done', 'exit'] - exec(cmds) - -class TestBraidAndFuse: - @pytest.mark.main - def test_braid_and_print(self): - cmds = ['ising', 'anyon1 psi', 'anyon2 sigma', 'anyon3 psi', 'done', 'braid swap anyon1 anyon2', 'braid print', 'exit'] - exec(cmds) - - @pytest.mark.main - def test_braid_and_print_2D(self): - cmds = ['ising', 'anyon1 psi {8,-4}', 'anyon2 sigma {5,5}', 'anyon3 psi {1,-1}', 'done', 'braid swap anyon1 anyon2', 'braid print', 'exit'] - exec(cmds) - - @pytest.mark.main - def test_fusion(self): - cmds = ['ising', 'anyon1 psi', 'anyon2 sigma', 'done', 'fusion anyon1 anyon2', 'exit'] - exec(cmds) - - @pytest.mark.main - def test_fusion_2D(self): - cmds = ['ising', 'anyon1 psi {0,1}', 'anyon2 sigma {-1,500}', 'done', 'fusion anyon1 anyon2', 'exit'] - exec(cmds) - -class TestListAndHelp: - @pytest.mark.main - def test_list_one_anyon(self): - cmds = ['ising', 'anyon1 psi', 'done', 'list', 'exit'] - exec(cmds) - - @pytest.mark.main - def test_list_three_anyons(self): - cmds = ['ising', 'anyon1 psi', 'anyon2 psi', 'anyon3 vac', 'done', 'list', 'exit'] - exec(cmds) - - @pytest.mark.main - def test_list_three_anyons_2D(self): - cmds = ['ising', 'anyon1 psi {9,17}', 'anyon2 psi {4,-106}', 'anyon3 vac {-1,4}', 'done', 'list', 'exit'] - exec(cmds) - - @pytest.mark.main - def test_help_command(self): - cmds = ['ising', 'anyon1 psi', 'done', 'help', 'exit'] - exec(cmds) - -class TestInvalidCommands: - @pytest.mark.main - def test_model_invalid(self): - cmds = ['derp', 'exit'] - exec(cmds) - - @pytest.mark.main - def test_anyon_invalid_charge(self): - cmds = ['ising', 'anyon1 derp', 'exit'] - exec(cmds) - - @pytest.mark.main - def test_invalid_command_post_init(self): - cmds = ['ising', 'anyon1 psi', 'anyon2 psi', 'anyon3 psi', 'done', 'derp', 'exit'] - exec(cmds) - - @pytest.mark.main - def test_invalid_braid_syntax(self): - cmds = ['ising', 'anyon1 psi', 'anyon2 psi', 'anyon3 psi', 'done', 'braid swap derp derp', 'exit'] - exec(cmds) - - @pytest.mark.main - def test_invalid_fusion_syntax(self): - cmds = ['ising', 'anyon1 psi', 'anyon2 psi', 'anyon3 psi', 'done', 'fusion derp derp', 'exit'] - exec(cmds) - - @pytest.mark.main - def test_model_post_init(self): - cmds = ['ising', 'anyon1 psi', 'done', 'model fibonacci', 'exit'] - exec(cmds) - - @pytest.mark.main - def test_anyon_post_init(self): - cmds = ['ising', 'anyon1 psi', 'done', 'anyon anyon2 psi', 'exit'] - exec(cmds) - - -# @pytest.mark.main -# def test_shell(): -# with patch('subprocess.run') as mock_run: -# shell = SimulatorShell() -# shell.do_shell('echo Let\'s go, Brandon!') -# mock_run.assert_called_once_with('echo Hello, World!', shell=True) +# Standard Library +import os + +import pytest +from unittest.mock import patch +import sh + +def exec(cmds: list[str]): + os.chdir('python/anyon_braiding_simulator') + + cmd_string = '\n'.join(cmds) + + try: + sh.python(['main.py'], _in=cmd_string) + except sh.ErrorReturnCode as e: + print(e) + assert False + finally: + os.chdir('../..') + +class TestInit: + @pytest.mark.main + def test_model_ising(self): + cmds = ['ising', 'exit'] + exec(cmds) + + @pytest.mark.main + def test_model_fibonacci(self): + cmds = ['fibonacci', 'exit'] + exec(cmds) + + @pytest.mark.main + def test_three_anyons(self): + cmds = ['ising', 'anyon1 vac', 'anyon2 sigma', 'anyon3 sigma', 'done', 'exit'] + exec(cmds) + + @pytest.mark.main + def test_three_anyons_2D(self): + cmds = ['ising', 'anyon1 psi {-1,-1}', 'anyon2 vac {2,-1}', 'anyon3 vac {0,0}', 'done', 'exit'] + exec(cmds) + + @pytest.mark.main + def test_three_anyons_2D_overlapping(self): + cmds = ['ising', 'anyon1 psi {-1,-1}', 'anyon2 vac {2,-1}', 'anyon3 vac {2,-1}', 'done', 'exit'] + exec(cmds) + + @pytest.mark.main + def test_four_anyons(self): + cmds = ['ising', 'anyon1 psi', 'anyon2 psi', 'anyon3 psi', 'anyon4 psi', 'done', 'exit'] + exec(cmds) + +class TestBraidAndFuse: + @pytest.mark.main + def test_braid_and_print(self): + cmds = ['ising', 'anyon1 psi', 'anyon2 sigma', 'anyon3 psi', 'done', 'braid swap anyon1-anyon2', 'braid print', 'exit'] + exec(cmds) + + @pytest.mark.main + def test_braid_and_print_2D(self): + cmds = ['ising', 'anyon1 psi {8,-4}', 'anyon2 sigma {5,5}', 'anyon3 psi {1,-1}', 'done', 'braid swap anyon1-anyon2', 'braid print', 'exit'] + exec(cmds) + +class TestListAndHelp: + @pytest.mark.main + def test_list_one_anyon(self): + cmds = ['ising', 'anyon1 psi', 'done', 'list', 'exit'] + exec(cmds) + + @pytest.mark.main + def test_list_three_anyons(self): + cmds = ['ising', 'anyon1 psi', 'anyon2 psi', 'anyon3 vac', 'done', 'list', 'exit'] + exec(cmds) + + @pytest.mark.main + def test_list_three_anyons_2D(self): + cmds = ['ising', 'anyon1 psi {9,17}', 'anyon2 psi {4,-106}', 'anyon3 vac {-1,4}', 'done', 'list', 'exit'] + exec(cmds) + + @pytest.mark.main + def test_help_command(self): + cmds = ['ising', 'anyon1 psi', 'done', 'help', 'exit'] + exec(cmds) + +class TestInvalidCommands: + @pytest.mark.main + def test_model_invalid(self): + cmds = ['derp', 'exit'] + exec(cmds) + + @pytest.mark.main + def test_anyon_invalid_charge(self): + cmds = ['ising', 'anyon1 derp', 'exit'] + exec(cmds) + + @pytest.mark.main + def test_one_anyon_vac(self): + cmds = ['ising', 'anyon1 vac', 'done', 'exit'] + exec(cmds) + + @pytest.mark.main + def test_one_anyon_sigma(self): + cmds = ['ising', 'anyon1 sigma', 'done', 'exit'] + exec(cmds) + + @pytest.mark.main + def test_one_anyon_psi(self): + cmds = ['ising', 'anyon1 psi', 'done', 'exit'] + exec(cmds) + + @pytest.mark.main + def test_one_anyon_2D(self): + cmds = ['ising', 'anyon1 psi {1,2}', 'done', 'exit'] + exec(cmds) + + @pytest.mark.main + def test_two_anyons(self): + cmds = ['ising', 'anyon1 psi', 'anyon2 vac', 'done', 'exit'] + exec(cmds) + + @pytest.mark.main + def test_invalid_command_post_init(self): + cmds = ['ising', 'anyon1 psi', 'anyon2 psi', 'anyon3 psi', 'done', 'derp', 'exit'] + exec(cmds) + + @pytest.mark.main + def test_invalid_braid_syntax(self): + cmds = ['ising', 'anyon1 psi', 'anyon2 psi', 'anyon3 psi', 'done', 'braid swap derp-derp', 'exit'] + exec(cmds) + + @pytest.mark.main + def test_invalid_fusion_syntax(self): + cmds = ['ising', 'anyon1 psi', 'anyon2 psi', 'anyon3 psi', 'done', 'fusion derp-derp', 'exit'] + exec(cmds) + + @pytest.mark.main + def test_model_post_init(self): + cmds = ['ising', 'anyon1 psi', 'done', 'model fibonacci', 'exit'] + exec(cmds) + + @pytest.mark.main + def test_anyon_post_init(self): + cmds = ['ising', 'anyon1 psi', 'done', 'anyon anyon2 psi', 'exit'] + exec(cmds) + + +# @pytest.mark.main +# def test_shell(): +# with patch('subprocess.run') as mock_run: +# shell = SimulatorShell() +# shell.do_shell('echo Let\'s go, Brandon!') +# mock_run.assert_called_once_with('echo Hello, World!', shell=True) \ No newline at end of file diff --git a/python/tests/test_model.py b/python/tests/test_model.py index a2e025f..1591022 100644 --- a/python/tests/test_model.py +++ b/python/tests/test_model.py @@ -69,4 +69,4 @@ def test_FinvRF(initialize_ising): assert np.isclose(ising.getFInvRF('psi', 'sigma', 'sigma', 'vacuum'), np.linalg.inv(ising.getFMatrix('psi', 'sigma', 'sigma', 'vacuum')) @ ising._r_mtx @ ising.getFMatrix('psi', 'sigma', 'sigma', 'vacuum')).all() # check identity matrices - assert np.isclose(ising.getFInvRF('psi', 'psi', 'psi', 'vacuum'), np.linalg.inv(ising.getFMatrix('psi', 'psi', 'psi', 'vacuum')) @ ising._r_mtx @ ising.getFMatrix('psi', 'psi', 'psi', 'vacuum')).all() \ No newline at end of file + assert np.isclose(ising.getFInvRF('psi', 'psi', 'psi', 'vacuum'), np.linalg.inv(ising.getFMatrix('psi', 'psi', 'psi', 'vacuum')) @ ising._r_mtx @ ising.getFMatrix('psi', 'psi', 'psi', 'vacuum')).all() diff --git a/python/tests/test_simulator.py b/python/tests/test_simulator.py new file mode 100644 index 0000000..9c12e9c --- /dev/null +++ b/python/tests/test_simulator.py @@ -0,0 +1,16 @@ +import pytest +from Simulator import Simulator +from anyon_braiding_simulator import Anyon, TopoCharge, IsingTopoCharge + +@pytest.mark.simulator +def test_pairs_to_indices(): + simulator = Simulator() + anyon1 = Anyon("anyon1", TopoCharge(IsingTopoCharge.Sigma), (1, 2)) + anyon2 = Anyon("anyon2", TopoCharge(IsingTopoCharge.Psi), (3, 4)) + anyon3 = Anyon("anyon3", TopoCharge(IsingTopoCharge.Vacuum), (5, 6)) + simulator.update_anyons(True, [anyon1, anyon2, anyon3]) + + pairs = [("anyon1", "anyon2"), ("anyon2", "anyon3")] + indices = simulator.pairs_to_indices(pairs) + + assert indices == [(0, 1), (1, 2)] \ No newline at end of file diff --git a/python/tests/test_state.py b/python/tests/test_state.py index 1575fdd..2c63203 100644 --- a/python/tests/test_state.py +++ b/python/tests/test_state.py @@ -1,37 +1,37 @@ -import pytest -from anyon_braiding_simulator.anyon_braiding_simulator import Anyon, FusionPair, IsingTopoCharge, State, TopoCharge - - -@pytest.fixture -def state() -> State: - return State() - - -@pytest.mark.state -def test_add_anyon(state): - for i in range(100): - anyon = Anyon(f'{i}', TopoCharge.from_ising(IsingTopoCharge.Sigma), (0, 0)) - state.add_anyon(anyon) - - for anyon in state.anyons: - assert anyon.name in [f'{i}' for i in range(100)] - assert anyon.charge.get_ising() == IsingTopoCharge.Sigma - assert anyon.position == (0, 0) - - assert len(state.anyons) == 100 - - -def test_add_operation(state): - for i in range(101): - anyon = Anyon(f'{i}', TopoCharge.from_ising(IsingTopoCharge.Sigma), (0, 0)) - state.add_anyon(anyon) - - assert state.add_operation(1, FusionPair(0, 1)) - assert state.add_operation(1, FusionPair(2, 3)) - - assert not state.add_operation(1, FusionPair(1, 2)) - assert not state.add_operation(1, FusionPair(2, 4)) - - assert state.add_operation(1, FusionPair(4, 5)) - assert state.add_operation(2, FusionPair(2, 4)) - assert state.add_operation(3, FusionPair(0, 2)) +import pytest +from anyon_braiding_simulator.anyon_braiding_simulator import Anyon, FusionPair, IsingTopoCharge, State, TopoCharge + + +@pytest.fixture +def state() -> State: + return State() + + +@pytest.mark.state +def test_add_anyon(state): + for i in range(100): + anyon = Anyon(f'{i}', TopoCharge.from_ising(IsingTopoCharge.Sigma), (0, 0)) + state.add_anyon(anyon) + + for anyon in state.anyons: + assert anyon.name in [f'{i}' for i in range(100)] + assert anyon.charge.get_ising() == IsingTopoCharge.Sigma + assert anyon.position == (0, 0) + + assert len(state.anyons) == 100 + + +def test_add_operation(state): + for i in range(101): + anyon = Anyon(f'{i}', TopoCharge.from_ising(IsingTopoCharge.Sigma), (0, 0)) + state.add_anyon(anyon) + + assert state.add_operation(1, FusionPair(0, 1)) + assert state.add_operation(1, FusionPair(2, 3)) + + assert not state.add_operation(1, FusionPair(1, 2)) + assert not state.add_operation(1, FusionPair(2, 4)) + + assert state.add_operation(1, FusionPair(4, 5)) + assert state.add_operation(2, FusionPair(2, 4)) + assert state.add_operation(3, FusionPair(0, 2)) diff --git a/python/tests/test_state_vec.py b/python/tests/test_state_vec.py index 9c17195..bfceeeb 100644 --- a/python/tests/test_state_vec.py +++ b/python/tests/test_state_vec.py @@ -1,41 +1,41 @@ -import numpy as np -import pytest -from anyon_braiding_simulator.anyon_braiding_simulator import StateVec - - -@pytest.mark.state_vec -def test_state_vec_init(): - test_arr = np.array([1, 0], dtype=complex) - state = StateVec(1, None) - for i in range(len(state.vec)): - assert state.vec[i] == test_arr[i] - - test_arr = np.array([1, 0, 0, 0], dtype=complex) - state = StateVec(2, None) - for i in range(len(state.vec)): - assert state.vec[i] == test_arr[i] - - -@pytest.mark.state_vec -def test_state_vec(): - test_arr = np.array([1, 0], dtype=complex) - state = StateVec(1, test_arr) - for i in range(len(test_arr)): - assert state.vec[i] == test_arr[i] - - -@pytest.mark.state_vec -def test_state_vec_norm(): - test_arr = np.array([1, 0], dtype=complex) - state = StateVec(1, test_arr) - assert np.linalg.norm(state.vec) == 1 - - test_arr = np.array([1234 + 5j, 6], dtype=complex) - state = StateVec(1, test_arr) - assert np.linalg.norm(state.vec) == 1 - - -@pytest.mark.state_vec -def test_state_vec_str(): - state_vec = StateVec(1, np.array([1, 0], dtype=complex)) - assert str(state_vec) == '[\n\t1.0 + 0.0i\n\t0.0 + 0.0i\n]' +import numpy as np +import pytest +from anyon_braiding_simulator.anyon_braiding_simulator import StateVec + + +@pytest.mark.state_vec +def test_state_vec_init(): + test_arr = np.array([1, 0], dtype=complex) + state = StateVec(1, None) + for i in range(len(state.vec)): + assert state.vec[i] == test_arr[i] + + test_arr = np.array([1, 0, 0, 0], dtype=complex) + state = StateVec(2, None) + for i in range(len(state.vec)): + assert state.vec[i] == test_arr[i] + + +@pytest.mark.state_vec +def test_state_vec(): + test_arr = np.array([1, 0], dtype=complex) + state = StateVec(1, test_arr) + for i in range(len(test_arr)): + assert state.vec[i] == test_arr[i] + + +@pytest.mark.state_vec +def test_state_vec_norm(): + test_arr = np.array([1, 0], dtype=complex) + state = StateVec(1, test_arr) + assert np.linalg.norm(state.vec) == 1 + + test_arr = np.array([1234 + 5j, 6], dtype=complex) + state = StateVec(1, test_arr) + assert np.linalg.norm(state.vec) == 1 + + +@pytest.mark.state_vec +def test_state_vec_str(): + state_vec = StateVec(1, np.array([1, 0], dtype=complex)) + assert str(state_vec) == '[\n\t1.0 + 0.0i\n\t0.0 + 0.0i\n]' diff --git a/requirements.txt b/requirements.txt index d66e2ca..b35d4cd 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,84 +1,84 @@ -appnope==0.1.4 -asttokens==2.4.1 -attrs==23.2.0 -backcall==0.2.0 -beautifulsoup4==4.12.3 -bleach==6.1.0 -certifi==2024.6.2 -cffi==1.16.0 -cfgv==3.4.0 -charset-normalizer==3.3.2 -contourpy==1.2.1 -cycler==0.12.1 -decorator==5.1.1 -defusedxml==0.7.1 -distlib==0.3.8 -docopt==0.6.2 -executing==2.0.1 -fastjsonschema==2.19.1 -filelock==3.14.0 -fonttools==4.53.0 -identify==2.5.36 -idna==3.7 -iniconfig==2.0.0 -ipython==8.12.3 -isort==5.13.2 -jedi==0.19.1 -Jinja2==3.1.4 -jsonschema==4.22.0 -jsonschema-specifications==2023.12.1 -jupyter_client==8.6.2 -jupyter_core==5.7.2 -jupyterlab_pygments==0.3.0 -kiwisolver==1.4.5 -llvmlite==0.42.0 -MarkupSafe==2.1.5 -matplotlib==3.9.0 -matplotlib-inline==0.1.7 -maturin==1.6.0 -mistune==3.0.2 -nbclient==0.10.0 -nbconvert==7.16.4 -nbformat==5.10.4 -nodeenv==1.9.1 -numba==0.59.1 -numpy==1.26.4 -packaging==24.0 -pandocfilters==1.5.1 -parso==0.8.4 -pexpect==4.9.0 -pickleshare==0.7.5 -pillow==10.3.0 -pipreqs==0.5.0 -platformdirs==4.2.2 -pluggy==1.5.0 -pre-commit==3.7.1 -prompt_toolkit==3.0.45 -ptyprocess==0.7.0 -pure-eval==0.2.2 -pycparser==2.22 -Pygments==2.18.0 -pyparsing==3.1.2 -pytest==8.2.2 -python-dateutil==2.9.0.post0 -PyYAML==6.0.1 -pyzmq==26.0.3 -referencing==0.35.1 -requests==2.32.3 -rpds-py==0.18.1 -ruff==0.4.8 -rustimport==1.5.0 -scipy==1.13.1 -sh==2.0.7 -six==1.16.0 -soupsieve==2.5 -stack-data==0.6.3 -tinycss2==1.3.0 -toml==0.10.2 -tornado==6.4 -traitlets==5.14.3 -urllib3==2.2.1 -virtualenv==20.26.2 -wcwidth==0.2.13 -webencodings==0.5.1 -yarg==0.1.9 +appnope==0.1.4 +asttokens==2.4.1 +attrs==23.2.0 +backcall==0.2.0 +beautifulsoup4==4.12.3 +bleach==6.1.0 +certifi==2024.6.2 +cffi==1.16.0 +cfgv==3.4.0 +charset-normalizer==3.3.2 +contourpy==1.2.1 +cycler==0.12.1 +decorator==5.1.1 +defusedxml==0.7.1 +distlib==0.3.8 +docopt==0.6.2 +executing==2.0.1 +fastjsonschema==2.19.1 +filelock==3.14.0 +fonttools==4.53.0 +identify==2.5.36 +idna==3.7 +iniconfig==2.0.0 +ipython==8.12.3 +isort==5.13.2 +jedi==0.19.1 +Jinja2==3.1.4 +jsonschema==4.22.0 +jsonschema-specifications==2023.12.1 +jupyter_client==8.6.2 +jupyter_core==5.7.2 +jupyterlab_pygments==0.3.0 +kiwisolver==1.4.5 +llvmlite==0.42.0 +MarkupSafe==2.1.5 +matplotlib==3.9.0 +matplotlib-inline==0.1.7 +maturin==1.6.0 +mistune==3.0.2 +nbclient==0.10.0 +nbconvert==7.16.4 +nbformat==5.10.4 +nodeenv==1.9.1 +numba==0.59.1 +numpy==1.26.4 +packaging==24.0 +pandocfilters==1.5.1 +parso==0.8.4 +pexpect==4.9.0 +pickleshare==0.7.5 +pillow==10.3.0 +pipreqs==0.5.0 +platformdirs==4.2.2 +pluggy==1.5.0 +pre-commit==3.7.1 +prompt_toolkit==3.0.45 +ptyprocess==0.7.0 +pure-eval==0.2.2 +pycparser==2.22 +Pygments==2.18.0 +pyparsing==3.1.2 +pytest==8.2.2 +python-dateutil==2.9.0.post0 +PyYAML==6.0.1 +pyzmq==26.0.3 +referencing==0.35.1 +requests==2.32.3 +rpds-py==0.18.1 +ruff==0.4.8 +rustimport==1.5.0 +scipy==1.13.1 +sh==2.0.7 +six==1.16.0 +soupsieve==2.5 +stack-data==0.6.3 +tinycss2==1.3.0 +toml==0.10.2 +tornado==6.4 +traitlets==5.14.3 +urllib3==2.2.1 +virtualenv==20.26.2 +wcwidth==0.2.13 +webencodings==0.5.1 +yarg==0.1.9 diff --git a/src/fusion.rs b/src/fusion.rs index fba1cc9..e30ca5d 100644 --- a/src/fusion.rs +++ b/src/fusion.rs @@ -1,2 +1,2 @@ -pub mod fusion; -pub mod state; +pub mod fusion; +pub mod state; diff --git a/src/fusion/state.rs b/src/fusion/state.rs index 5c19a11..737cff9 100644 --- a/src/fusion/state.rs +++ b/src/fusion/state.rs @@ -1,85 +1,85 @@ -use crate::{fusion::fusion::FusionPair, model::anyon::Anyon}; -use crate::util::statevec::StateVec; -use pyo3::prelude::*; - -/// The state of the system -#[pyclass] -#[derive(Clone, Debug)] -/// Stores the overall state of the system. Use this struct to keep track of any -/// common information throughout the simulation (e.g. anyons, operations, -/// statevector). -pub struct State { - #[pyo3(get)] - anyons: Vec, - #[pyo3(get)] - operations: Vec<(u32, FusionPair)>, - #[pyo3(get)] - state_vec: StateVec, -} - -/// Internal Methods -impl State { - pub fn anyons(&self) -> Vec { - self.anyons.clone() - } - - pub fn operations(&self) -> Vec<(u32, FusionPair)> { - self.operations.clone() - } - - /// Verify the operation - /// TODO: Provide better error for panic when no anyons loaded - pub fn verify_operation(&self, time: u32, operation: &FusionPair) -> bool { - assert!(operation.anyon_1() < operation.anyon_2()); - assert!(operation.anyon_2() < self.anyons.len()); - let mut fusible_anyons = vec![true; self.anyons.len()]; - - for (t, op) in &self.operations { - fusible_anyons[op.anyon_2()] = false; - if *t == time { - fusible_anyons[op.anyon_1()] = false; - } - } - - if !fusible_anyons[operation.anyon_1()] || !fusible_anyons[operation.anyon_2()] { - return false; - } - - for i in operation.anyon_1() + 1..operation.anyon_2() - 1 { - if fusible_anyons[i] { - return false; - } - } - true - } -} - -/// Python Methods -#[pymethods] -impl State { - #[new] - fn new() -> Self { - State { - anyons: Vec::new(), - operations: Vec::new(), - state_vec: StateVec::new(1, None), - } - } - - /// Add an anyon to the state - fn add_anyon(&mut self, anyon: Anyon) -> PyResult { - self.anyons.push(anyon); - Ok(true) - } - - /// Verifies and then adds an operation to the state - fn add_operation(&mut self, time: u32, operation: FusionPair) -> PyResult { - let result = Self::verify_operation(self, time, &operation); - if !result { - return Ok(false); - } - self.operations.push((time, operation)); - - Ok(true) - } -} +use crate::{fusion::fusion::FusionPair, model::anyon::Anyon}; +use crate::util::statevec::StateVec; +use pyo3::prelude::*; + +/// The state of the system +#[pyclass] +#[derive(Clone, Debug)] +/// Stores the overall state of the system. Use this struct to keep track of any +/// common information throughout the simulation (e.g. anyons, operations, +/// statevector). +pub struct State { + #[pyo3(get)] + anyons: Vec, + #[pyo3(get)] + operations: Vec<(u32, FusionPair)>, + #[pyo3(get)] + state_vec: StateVec, +} + +/// Internal Methods +impl State { + pub fn anyons(&self) -> Vec { + self.anyons.clone() + } + + pub fn operations(&self) -> Vec<(u32, FusionPair)> { + self.operations.clone() + } + + /// Verify the operation + /// TODO: Provide better error for panic when no anyons loaded + pub fn verify_operation(&self, time: u32, operation: &FusionPair) -> bool { + assert!(operation.anyon_1() < operation.anyon_2()); + assert!(operation.anyon_2() < self.anyons.len()); + let mut fusible_anyons = vec![true; self.anyons.len()]; + + for (t, op) in &self.operations { + fusible_anyons[op.anyon_2()] = false; + if *t == time { + fusible_anyons[op.anyon_1()] = false; + } + } + + if !fusible_anyons[operation.anyon_1()] || !fusible_anyons[operation.anyon_2()] { + return false; + } + + for i in operation.anyon_1() + 1..operation.anyon_2() - 1 { + if fusible_anyons[i] { + return false; + } + } + true + } +} + +/// Python Methods +#[pymethods] +impl State { + #[new] + fn new() -> Self { + State { + anyons: Vec::new(), + operations: Vec::new(), + state_vec: StateVec::new(1, None), + } + } + + /// Add an anyon to the state + fn add_anyon(&mut self, anyon: Anyon) -> PyResult { + self.anyons.push(anyon); + Ok(true) + } + + /// Verifies and then adds an operation to the state + fn add_operation(&mut self, time: u32, operation: FusionPair) -> PyResult { + let result = Self::verify_operation(self, time, &operation); + if !result { + return Ok(false); + } + self.operations.push((time, operation)); + + Ok(true) + } +} diff --git a/src/lib.rs b/src/lib.rs index 5a807d6..c756b57 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,27 +1,27 @@ -use pyo3::prelude::*; -mod fusion; -mod model; -mod util; - -/// This builds the bindings for maturin and enables the python module to be -/// imported. For any new class which should be accessible by python, add it -/// here following the same format -#[pymodule] -fn anyon_braiding_simulator(m: &Bound<'_, PyModule>) -> PyResult<()> { - m.add_class::()?; - m.add_class::()?; - m.add_class::()?; - m.add_class::()?; - - m.add_class::()?; - m.add_class::()?; - - m.add_class::()?; - m.add_class::()?; - - m.add_class::()?; - - m.add_class::()?; - m.add_class::()?; - Ok(()) -} +use pyo3::prelude::*; +mod fusion; +mod model; +mod util; + +/// This builds the bindings for maturin and enables the python module to be +/// imported. For any new class which should be accessible by python, add it +/// here following the same format +#[pymodule] +fn anyon_braiding_simulator(m: &Bound<'_, PyModule>) -> PyResult<()> { + m.add_class::()?; + m.add_class::()?; + m.add_class::()?; + m.add_class::()?; + + m.add_class::()?; + m.add_class::()?; + + m.add_class::()?; + m.add_class::()?; + + m.add_class::()?; + + m.add_class::()?; + m.add_class::()?; + Ok(()) +} diff --git a/src/model.rs b/src/model.rs index cfb50d5..53431b6 100644 --- a/src/model.rs +++ b/src/model.rs @@ -1,2 +1,2 @@ -pub mod anyon; -pub mod model; +pub mod anyon; +pub mod model; diff --git a/src/model/anyon.rs b/src/model/anyon.rs index 28c02c2..5c90624 100644 --- a/src/model/anyon.rs +++ b/src/model/anyon.rs @@ -1,158 +1,158 @@ -use pyo3::prelude::*; - -#[pyclass] -#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash)] -/// Options for the topological charge for an Ising Model anyon -pub enum IsingTopoCharge { - Psi, - Vacuum, - Sigma, -} - -#[pyclass] -#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash)] -/// Options for the topological charge for an Fibonacci Model anyon -pub enum FibonacciTopoCharge { - Tau, - Vacuum, -} - -#[pyclass] -#[derive(Clone, Debug, PartialEq, Eq, Hash)] -/// Options for the topological charge for an anyon -/// Currently only supports Ising and Fibonacci models -pub struct TopoCharge { - ising: Option, - fibonacci: Option, -} - -// Implement TryFrom trait to convert from TopoCharge to specific enums -impl TryFrom<&TopoCharge> for IsingTopoCharge { - type Error = &'static str; - - fn try_from(value: &TopoCharge) -> Result { - value.ising.ok_or("Not an IsingTopoCharge") - } -} - -impl TryFrom<&TopoCharge> for FibonacciTopoCharge { - type Error = &'static str; - - fn try_from(value: &TopoCharge) -> Result { - value.fibonacci.ok_or("Not a FibonacciTopoCharge") - } -} - -#[pymethods] -impl TopoCharge { - #[new] - pub fn new(ising: Option, fibonacci: Option) -> Self { - TopoCharge { ising, fibonacci } - } - - #[staticmethod] - pub fn from_ising(ising: IsingTopoCharge) -> Self { - TopoCharge { - ising: Some(ising), - fibonacci: None, - } - } - - #[staticmethod] - pub fn from_fibonacci(fibonacci: FibonacciTopoCharge) -> Self { - TopoCharge { - ising: None, - fibonacci: Some(fibonacci), - } - } - - pub fn is_ising(&self) -> bool { - self.ising.is_some() - } - - pub fn is_fibonacci(&self) -> bool { - self.fibonacci.is_some() - } - - pub fn get_ising(&self) -> IsingTopoCharge { - self.ising.unwrap() - } - - pub fn get_fibonacci(&self) -> FibonacciTopoCharge { - self.fibonacci.unwrap() - } - - pub fn to_string(&self) -> String { - if let Some(ising) = self.ising { - format!("{:?}", ising) - } else if let Some(fibonacci) = self.fibonacci { - format!("{:?}", fibonacci) - } else { - "None".to_string() - } - } -} - -impl IsingTopoCharge { - pub fn value(&self) -> usize { - *self as usize - } - - pub fn to_string(&self) -> &str { - match self { - IsingTopoCharge::Psi => "Psi", - IsingTopoCharge::Vacuum => "Vacuum", - IsingTopoCharge::Sigma => "Sigma", - } - } -} - -#[pyclass] -#[derive(Clone, Debug, PartialEq)] -/// In Topological Quantum Computing, anyons are the fundamental quasiparticles -/// which enable the computation. Anyons have an associated topological charge -/// given by the model used. This struct represents an anyon with a name, -/// charge, and position. -pub struct Anyon { - #[pyo3(get)] - name: String, - #[pyo3(get)] - charge: TopoCharge, - #[pyo3(get)] - position: (f64, f64), -} - -impl Anyon { - pub fn name(&self) -> &str { - &self.name - } - - pub fn charge(&self) -> TopoCharge { - self.charge.clone() - } - - pub fn position(&self) -> (f64, f64) { - self.position - } -} - -#[pymethods] -impl Anyon { - #[new] - pub fn new(name: String, charge: TopoCharge, position: (f64, f64)) -> Self { - Anyon { - name, - charge, - position, - } - } - - fn __str__(&self) -> PyResult { - Ok(format!( - "Anyon: name={}, charge={}, position={:?}", - self.name, - self.charge.to_string(), - self.position - )) - } -} +use pyo3::prelude::*; + +#[pyclass] +#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash)] +/// Options for the topological charge for an Ising Model anyon +pub enum IsingTopoCharge { + Psi, + Vacuum, + Sigma, +} + +#[pyclass] +#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash)] +/// Options for the topological charge for an Fibonacci Model anyon +pub enum FibonacciTopoCharge { + Tau, + Vacuum, +} + +#[pyclass] +#[derive(Clone, Debug, PartialEq, Eq, Hash)] +/// Options for the topological charge for an anyon +/// Currently only supports Ising and Fibonacci models +pub struct TopoCharge { + ising: Option, + fibonacci: Option, +} + +// Implement TryFrom trait to convert from TopoCharge to specific enums +impl TryFrom<&TopoCharge> for IsingTopoCharge { + type Error = &'static str; + + fn try_from(value: &TopoCharge) -> Result { + value.ising.ok_or("Not an IsingTopoCharge") + } +} + +impl TryFrom<&TopoCharge> for FibonacciTopoCharge { + type Error = &'static str; + + fn try_from(value: &TopoCharge) -> Result { + value.fibonacci.ok_or("Not a FibonacciTopoCharge") + } +} + +#[pymethods] +impl TopoCharge { + #[new] + pub fn new(ising: Option, fibonacci: Option) -> Self { + TopoCharge { ising, fibonacci } + } + + #[staticmethod] + pub fn from_ising(ising: IsingTopoCharge) -> Self { + TopoCharge { + ising: Some(ising), + fibonacci: None, + } + } + + #[staticmethod] + pub fn from_fibonacci(fibonacci: FibonacciTopoCharge) -> Self { + TopoCharge { + ising: None, + fibonacci: Some(fibonacci), + } + } + + pub fn is_ising(&self) -> bool { + self.ising.is_some() + } + + pub fn is_fibonacci(&self) -> bool { + self.fibonacci.is_some() + } + + pub fn get_ising(&self) -> IsingTopoCharge { + self.ising.unwrap() + } + + pub fn get_fibonacci(&self) -> FibonacciTopoCharge { + self.fibonacci.unwrap() + } + + pub fn to_string(&self) -> String { + if let Some(ising) = self.ising { + format!("{:?}", ising) + } else if let Some(fibonacci) = self.fibonacci { + format!("{:?}", fibonacci) + } else { + "None".to_string() + } + } +} + +impl IsingTopoCharge { + pub fn value(&self) -> usize { + *self as usize + } + + pub fn to_string(&self) -> &str { + match self { + IsingTopoCharge::Psi => "Psi", + IsingTopoCharge::Vacuum => "Vacuum", + IsingTopoCharge::Sigma => "Sigma", + } + } +} + +#[pyclass] +#[derive(Clone, Debug, PartialEq)] +/// In Topological Quantum Computing, anyons are the fundamental quasiparticles +/// which enable the computation. Anyons have an associated topological charge +/// given by the model used. This struct represents an anyon with a name, +/// charge, and position. +pub struct Anyon { + #[pyo3(get)] + name: String, + #[pyo3(get)] + charge: TopoCharge, + #[pyo3(get)] + position: (f64, f64), +} + +impl Anyon { + pub fn name(&self) -> &str { + &self.name + } + + pub fn charge(&self) -> TopoCharge { + self.charge.clone() + } + + pub fn position(&self) -> (f64, f64) { + self.position + } +} + +#[pymethods] +impl Anyon { + #[new] + pub fn new(name: String, charge: TopoCharge, position: (f64, f64)) -> Self { + Anyon { + name, + charge, + position, + } + } + + fn __str__(&self) -> PyResult { + Ok(format!( + "Anyon: name={}, charge={}, position={:?}", + self.name, + self.charge.to_string(), + self.position + )) + } +} diff --git a/src/model/model.rs b/src/model/model.rs index 0d5f3ef..9578f27 100644 --- a/src/model/model.rs +++ b/src/model/model.rs @@ -1,43 +1,43 @@ -use pyo3::prelude::*; - -// use super::anyon::{Anyon, IsingTopoCharge}; - -/// Different Anyon models that can be used to simulate the system -#[pyclass] -#[derive(PartialEq, Eq)] -pub enum AnyonModel { - Ising, - Fibonacci, - Custom, -} - -#[pymethods] -impl AnyonModel { - #[new] - fn new() -> Self { - AnyonModel::Ising - } -} - -// Commenting out Model for now because it has no use atm We might port the -// python stuff to rust later, but for now we have no use - -/// The parameters accompanying a model -/// More docs later when we impl stuff from python -#[pyclass] -pub struct Model { - model_type: AnyonModel, - // more fields which we'll impl later -} - -#[pymethods] -impl Model { - #[new] - fn new() -> Self { - // Model { model_type } - Model { - model_type: AnyonModel::Ising, - } - } - -} +use pyo3::prelude::*; + +// use super::anyon::{Anyon, IsingTopoCharge}; + +/// Different Anyon models that can be used to simulate the system +#[pyclass] +#[derive(PartialEq, Eq)] +pub enum AnyonModel { + Ising, + Fibonacci, + Custom, +} + +#[pymethods] +impl AnyonModel { + #[new] + fn new() -> Self { + AnyonModel::Ising + } +} + +// Commenting out Model for now because it has no use atm We might port the +// python stuff to rust later, but for now we have no use + +/// The parameters accompanying a model +/// More docs later when we impl stuff from python +#[pyclass] +pub struct Model { + model_type: AnyonModel, + // more fields which we'll impl later +} + +#[pymethods] +impl Model { + #[new] + fn new() -> Self { + // Model { model_type } + Model { + model_type: AnyonModel::Ising, + } + } + +} diff --git a/src/util.rs b/src/util.rs index 266de1a..b8ba143 100644 --- a/src/util.rs +++ b/src/util.rs @@ -1,2 +1,2 @@ -pub mod basis; -pub mod statevec; +pub mod basis; +pub mod statevec; diff --git a/src/util/basis.rs b/src/util/basis.rs index f89dc2b..2b95a78 100644 --- a/src/util/basis.rs +++ b/src/util/basis.rs @@ -1,67 +1,67 @@ -use pyo3::prelude::*; - -use crate::fusion::fusion::FusionPair; - -#[pyclass] -#[derive(Clone, Debug, PartialEq)] -/// The basis is represented as a vector of tuples (time, FusionPair). In TQC, -/// the basis is a sequence of fusion operations that occur in the fusion tree, -/// and a different fusion ordering is a different basis. -pub struct Basis { - ops: Vec<(u32, FusionPair)>, -} - -#[pymethods] -impl Basis { - #[new] - fn new(ops: Vec<(u32, FusionPair)>) -> Self { - Basis { ops } - } - - /// Verifies the basis - /// Preconditions: sorted by time - pub fn verify_basis(&self, anyons: usize) -> bool { - if self.ops.len() != anyons - 1 { - return false; - } - - let mut fusible_anyons = vec![true; anyons]; - let mut unused_anyons = vec![true; anyons]; - - let mut current_time: u32 = 0; - - for (t, op) in &self.ops { - if *t != current_time { - unused_anyons = vec![true; anyons]; - current_time = *t; - } - - // Anyons in fuision pair is not in range [0,anyons) - if !(op.anyon_1() < op.anyon_2() && op.anyon_2() < anyons) { - return false; - } - - // Anyons have been fusioned away at a previous time - if !fusible_anyons[op.anyon_1()] || !fusible_anyons[op.anyon_2()] { - return false; - } - - // Anyons have already been fusioned at the current time - if !unused_anyons[op.anyon_1()] || !unused_anyons[op.anyon_2()] { - return false; - } - - // Checks for adjacency of anyon_1 and anyon_2 - for anyon in op.anyon_1() + 1..op.anyon_2() - 1 { - if fusible_anyons[anyon] && unused_anyons[anyon] { - return false; - } - } - - fusible_anyons[op.anyon_2()] = false; - unused_anyons[op.anyon_1()] = false; - } - - true - } -} +use pyo3::prelude::*; + +use crate::fusion::fusion::FusionPair; + +#[pyclass] +#[derive(Clone, Debug, PartialEq)] +/// The basis is represented as a vector of tuples (time, FusionPair). In TQC, +/// the basis is a sequence of fusion operations that occur in the fusion tree, +/// and a different fusion ordering is a different basis. +pub struct Basis { + ops: Vec<(u32, FusionPair)>, +} + +#[pymethods] +impl Basis { + #[new] + fn new(ops: Vec<(u32, FusionPair)>) -> Self { + Basis { ops } + } + + /// Verifies the basis + /// Preconditions: sorted by time + pub fn verify_basis(&self, anyons: usize) -> bool { + if self.ops.len() != anyons - 1 { + return false; + } + + let mut fusible_anyons = vec![true; anyons]; + let mut unused_anyons = vec![true; anyons]; + + let mut current_time: u32 = 0; + + for (t, op) in &self.ops { + if *t != current_time { + unused_anyons = vec![true; anyons]; + current_time = *t; + } + + // Anyons in fuision pair is not in range [0,anyons) + if !(op.anyon_1() < op.anyon_2() && op.anyon_2() < anyons) { + return false; + } + + // Anyons have been fusioned away at a previous time + if !fusible_anyons[op.anyon_1()] || !fusible_anyons[op.anyon_2()] { + return false; + } + + // Anyons have already been fusioned at the current time + if !unused_anyons[op.anyon_1()] || !unused_anyons[op.anyon_2()] { + return false; + } + + // Checks for adjacency of anyon_1 and anyon_2 + for anyon in op.anyon_1() + 1..op.anyon_2() - 1 { + if fusible_anyons[anyon] && unused_anyons[anyon] { + return false; + } + } + + fusible_anyons[op.anyon_2()] = false; + unused_anyons[op.anyon_1()] = false; + } + + true + } +} diff --git a/src/util/statevec.rs b/src/util/statevec.rs index 249bf49..e2a195a 100644 --- a/src/util/statevec.rs +++ b/src/util/statevec.rs @@ -1,77 +1,77 @@ -use numpy::ndarray::Array1; -use numpy::{Complex64, PyArray1, PyReadonlyArray1, ToPyArray}; -use pyo3::prelude::*; - -#[pyclass] -#[derive(Clone, Debug)] -/// State Vector for the system -pub struct StateVec { - vec: Array1, - #[pyo3(get)] - init_size: usize, -} - -/// Internal Methods -impl StateVec { - /// Returns a clone of the state vector - pub fn get_vec(&self) -> Array1 { - self.vec.clone() - } - /// Modifies the norm of the state vector to 1 - pub fn normalize(&mut self) { - let norm = self.vec.iter().map(|x| x.norm_sqr()).sum::().sqrt(); - for i in 0..self.vec.len() { - self.vec[i] /= Complex64::new(norm, 0.0); - } - } -} - -/// Python Methods -#[pymethods] -impl StateVec { - #[new] - /// Creates a new state vector. If no vector is provided, it will be - /// initialized to |0> for all qubits. Additionally, the vector will be - /// normalized. - pub fn new(qubit_num: usize, vec: Option>) -> Self { - let init_size = 2 << (qubit_num - 1); - let vec = match vec { - Some(vec) => vec.as_array().to_owned(), - None => { - let mut vec = vec![Complex64::new(1.0, 0.0)]; - vec.extend(vec![Complex64::new(0.0, 0.0); init_size - 1]); - Array1::from(vec) - } - }; - - // normalize the vector - let mut state_vec = StateVec { vec, init_size }; - state_vec.normalize(); - state_vec - } - - #[getter] - fn vec(&self, py: Python<'_>) -> PyResult>> { - Ok(self.vec.to_pyarray_bound(py).to_owned().into()) - } - - #[setter] - fn set_vec(&mut self, vec: PyReadonlyArray1) { - self.vec = vec.as_array().to_owned(); - } - - #[setter] - pub fn set_size(&mut self, qubit_num: usize) { - self.init_size = 2 << qubit_num; - self.vec = Array1::zeros(self.init_size); - } - - pub fn __str__(&self) -> PyResult { - let mut output: String = "[\n".to_string(); - for val in self.vec.iter() { - output.push_str(&format!("\t{:?} + {:?}i\n", val.re, val.im)); - } - output.push_str("]"); - Ok(output) - } -} +use numpy::ndarray::Array1; +use numpy::{Complex64, PyArray1, PyReadonlyArray1, ToPyArray}; +use pyo3::prelude::*; + +#[pyclass] +#[derive(Clone, Debug)] +/// State Vector for the system +pub struct StateVec { + vec: Array1, + #[pyo3(get)] + init_size: usize, +} + +/// Internal Methods +impl StateVec { + /// Returns a clone of the state vector + pub fn get_vec(&self) -> Array1 { + self.vec.clone() + } + /// Modifies the norm of the state vector to 1 + pub fn normalize(&mut self) { + let norm = self.vec.iter().map(|x| x.norm_sqr()).sum::().sqrt(); + for i in 0..self.vec.len() { + self.vec[i] /= Complex64::new(norm, 0.0); + } + } +} + +/// Python Methods +#[pymethods] +impl StateVec { + #[new] + /// Creates a new state vector. If no vector is provided, it will be + /// initialized to |0> for all qubits. Additionally, the vector will be + /// normalized. + pub fn new(qubit_num: usize, vec: Option>) -> Self { + let init_size = 2 << (qubit_num - 1); + let vec = match vec { + Some(vec) => vec.as_array().to_owned(), + None => { + let mut vec = vec![Complex64::new(1.0, 0.0)]; + vec.extend(vec![Complex64::new(0.0, 0.0); init_size - 1]); + Array1::from(vec) + } + }; + + // normalize the vector + let mut state_vec = StateVec { vec, init_size }; + state_vec.normalize(); + state_vec + } + + #[getter] + fn vec(&self, py: Python<'_>) -> PyResult>> { + Ok(self.vec.to_pyarray_bound(py).to_owned().into()) + } + + #[setter] + fn set_vec(&mut self, vec: PyReadonlyArray1) { + self.vec = vec.as_array().to_owned(); + } + + #[setter] + pub fn set_size(&mut self, qubit_num: usize) { + self.init_size = 2 << qubit_num; + self.vec = Array1::zeros(self.init_size); + } + + pub fn __str__(&self) -> PyResult { + let mut output: String = "[\n".to_string(); + for val in self.vec.iter() { + output.push_str(&format!("\t{:?} + {:?}i\n", val.re, val.im)); + } + output.push_str("]"); + Ok(output) + } +}