diff --git a/Cargo.lock b/Cargo.lock
index 2d2bb8fd..b89c3e87 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -121,9 +121,9 @@ checksum = "230c5f1ca6a325a32553f8640d31ac9b49f2411e901e427570154868b46da4f7"
[[package]]
name = "bitflags"
-version = "2.5.0"
+version = "2.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "cf4b9d6a944f767f8e5e0db018570623c85f3d925ac718db4e06d0187adb21c1"
+checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de"
[[package]]
name = "bitvec"
@@ -179,9 +179,9 @@ checksum = "37b2a672a2cb129a2e41c10b1224bb368f9f37a2b16b612598138befd7b37eb5"
[[package]]
name = "cc"
-version = "1.0.98"
+version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "41c270e7540d725e65ac7f1b212ac8ce349719624d7bcff99f8e2e488e8cf03f"
+checksum = "eaff6f8ce506b9773fa786672d63fc7a191ffea1be33f72bbd4aeacefca9ffc8"
[[package]]
name = "cesu8"
@@ -217,7 +217,7 @@ dependencies = [
"js-sys",
"num-traits",
"wasm-bindgen",
- "windows-targets 0.52.5",
+ "windows-targets 0.52.6",
]
[[package]]
@@ -249,9 +249,9 @@ dependencies = [
[[package]]
name = "clap"
-version = "4.5.8"
+version = "4.5.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "84b3edb18336f4df585bc9aa31dd99c036dfa5dc5e9a2939a722a188f3a8970d"
+checksum = "64acc1846d54c1fe936a78dc189c34e28d3f5afc348403f28ecf53660b9b8462"
dependencies = [
"clap_builder",
"clap_derive",
@@ -278,9 +278,9 @@ dependencies = [
[[package]]
name = "clap_builder"
-version = "4.5.8"
+version = "4.5.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c1c09dd5ada6c6c78075d6fd0da3f90d8080651e2d6cc8eb2f1aaa4034ced708"
+checksum = "6fb8393d67ba2e7bfaf28a23458e4e2b543cc73a99595511eb207fdb8aede942"
dependencies = [
"anstream",
"anstyle",
@@ -297,7 +297,7 @@ dependencies = [
"heck 0.5.0",
"proc-macro2",
"quote",
- "syn 2.0.66",
+ "syn 2.0.70",
]
[[package]]
@@ -485,7 +485,7 @@ checksum = "4e018fccbeeb50ff26562ece792ed06659b9c2dae79ece77c4456bb10d9bf79b"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.66",
+ "syn 2.0.70",
]
[[package]]
@@ -507,7 +507,7 @@ dependencies = [
"proc-macro2",
"quote",
"rustc_version",
- "syn 2.0.66",
+ "syn 2.0.70",
]
[[package]]
@@ -518,9 +518,9 @@ checksum = "75b325c5dbd37f80359721ad39aca5a29fb04c89279657cffdda8736d0c0b9d2"
[[package]]
name = "either"
-version = "1.12.0"
+version = "1.13.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3dca9240753cf90908d7e4aac30f630662b02aebaa1b58a3cadabdb23385b58b"
+checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0"
[[package]]
name = "enum_dispatch"
@@ -531,7 +531,7 @@ dependencies = [
"once_cell",
"proc-macro2",
"quote",
- "syn 2.0.66",
+ "syn 2.0.70",
]
[[package]]
@@ -627,7 +627,7 @@ checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.66",
+ "syn 2.0.70",
]
[[package]]
@@ -958,15 +958,15 @@ dependencies = [
[[package]]
name = "log"
-version = "0.4.21"
+version = "0.4.22"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c"
+checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24"
[[package]]
name = "memchr"
-version = "2.7.2"
+version = "2.7.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6c8640c5d730cb13ebd907d8d04b52f55ac9a2eec55b440c8892f40d56c76c1d"
+checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3"
[[package]]
name = "memoffset"
@@ -995,9 +995,9 @@ dependencies = [
[[package]]
name = "num-bigint"
-version = "0.4.5"
+version = "0.4.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c165a9ab64cf766f73521c0dd2cfdff64f488b8f0b3e621face3462d3db536d7"
+checksum = "a5e44f723f1133c9deac646763579fdb3ac745e418f2a7af9cd0c431da1f20b9"
dependencies = [
"num-integer",
"num-traits",
@@ -1100,9 +1100,9 @@ checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92"
[[package]]
name = "oorandom"
-version = "11.1.3"
+version = "11.1.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0ab1bc2a289d34bd04a330323ac98a1b4bc82c9d9fcb1e66b63caa84da26b575"
+checksum = "b410bbe7e14ab526a0e86877eb47c6996a2bd7746f027ba551028c925390e4e9"
[[package]]
name = "overload"
@@ -1130,7 +1130,7 @@ dependencies = [
"libc",
"redox_syscall",
"smallvec",
- "windows-targets 0.52.5",
+ "windows-targets 0.52.6",
]
[[package]]
@@ -1272,9 +1272,9 @@ dependencies = [
[[package]]
name = "proc-macro2"
-version = "1.0.85"
+version = "1.0.86"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "22244ce15aa966053a896d1accb3a6e68469b97c7f33f284b99f0d576879fc23"
+checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77"
dependencies = [
"unicode-ident",
]
@@ -1326,7 +1326,7 @@ dependencies = [
"proc-macro2",
"pyo3-macros-backend",
"quote",
- "syn 2.0.66",
+ "syn 2.0.70",
]
[[package]]
@@ -1339,7 +1339,7 @@ dependencies = [
"proc-macro2",
"pyo3-build-config",
"quote",
- "syn 2.0.66",
+ "syn 2.0.70",
]
[[package]]
@@ -1389,18 +1389,18 @@ dependencies = [
[[package]]
name = "redox_syscall"
-version = "0.5.1"
+version = "0.5.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "469052894dcb553421e483e4209ee581a45100d31b4018de03e5a7ad86374a7e"
+checksum = "c82cf8cff14456045f55ec4241383baeff27af886adb72ffb2162f99911de0fd"
dependencies = [
"bitflags",
]
[[package]]
name = "regex"
-version = "1.10.4"
+version = "1.10.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c117dbdfde9c8308975b6a18d71f3f385c89461f7b3fb054288ecf2a2058ba4c"
+checksum = "b91213439dad192326a0d7c6ee3955910425f441d7038e0d6933b0aec5c4517f"
dependencies = [
"aho-corasick",
"memchr",
@@ -1410,9 +1410,9 @@ dependencies = [
[[package]]
name = "regex-automata"
-version = "0.4.6"
+version = "0.4.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "86b83b8b9847f9bf95ef68afb0b8e6cdb80f498442f5179a29fad448fcc1eaea"
+checksum = "38caf58cc5ef2fed281f89292ef23f6365465ed9a41b7a7754eb4e26496c92df"
dependencies = [
"aho-corasick",
"memchr",
@@ -1421,9 +1421,9 @@ dependencies = [
[[package]]
name = "regex-syntax"
-version = "0.8.3"
+version = "0.8.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "adad44e29e4c806119491a7f06f03de4d1af22c3a680dd47f1e6e179439d1f56"
+checksum = "7a66a03ae7c801facd77a29370b4faec201768915ac14a721ba36f20bc9c209b"
[[package]]
name = "relative-path"
@@ -1478,7 +1478,7 @@ dependencies = [
"regex",
"relative-path",
"rustc_version",
- "syn 2.0.66",
+ "syn 2.0.70",
"unicode-ident",
]
@@ -1547,7 +1547,7 @@ checksum = "e0cd7e117be63d3c3678776753929474f3b04a43a080c744d6b0ae2a8c28e222"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.66",
+ "syn 2.0.70",
]
[[package]]
@@ -1635,7 +1635,7 @@ dependencies = [
"proc-macro2",
"quote",
"rustversion",
- "syn 2.0.66",
+ "syn 2.0.70",
]
[[package]]
@@ -1651,9 +1651,9 @@ dependencies = [
[[package]]
name = "syn"
-version = "2.0.66"
+version = "2.0.70"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c42f3f41a2de00b01c0aaad383c5a45241efc8b2d1eda5661812fda5f3cdcff5"
+checksum = "2f0209b68b3613b093e0ec905354eccaedcfe83b8cb37cbdeae64026c3064c16"
dependencies = [
"proc-macro2",
"quote",
@@ -1668,9 +1668,9 @@ checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369"
[[package]]
name = "target-lexicon"
-version = "0.12.14"
+version = "0.12.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e1fc403891a21bcfb7c37834ba66a547a8f402146eba7265b5a6d88059c9ff2f"
+checksum = "4873307b7c257eddcb50c9bedf158eb669578359fb28428bef438fec8e6ba7c2"
[[package]]
name = "thiserror"
@@ -1689,7 +1689,7 @@ checksum = "46c3384250002a6d5af4d114f2845d37b57521033f30d5c3f46c4d70e1197533"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.66",
+ "syn 2.0.70",
]
[[package]]
@@ -1765,9 +1765,9 @@ dependencies = [
[[package]]
name = "tinyvec"
-version = "1.6.0"
+version = "1.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50"
+checksum = "445e881f4f6d382d5f27c034e25eb92edd7c784ceab92a0937db7f2e9471b938"
dependencies = [
"tinyvec_macros",
]
@@ -1897,7 +1897,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.66",
+ "syn 2.0.70",
]
[[package]]
@@ -1962,7 +1962,7 @@ checksum = "ac73887f47b9312552aa90ef477927ff014d63d1920ca8037c6c1951eab64bb1"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.66",
+ "syn 2.0.70",
]
[[package]]
@@ -2000,9 +2000,9 @@ checksum = "673aac59facbab8a9007c7f6108d11f63b603f7cabff99fabf650fea5c32b861"
[[package]]
name = "url"
-version = "2.5.0"
+version = "2.5.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "31e6302e3bb753d46e83516cae55ae196fc0c309407cf11ab35cc51a4c2a4633"
+checksum = "22784dbdf76fdde8af1aeda5622b546b422b6fc585325248a2bf9f5e41e94d6c"
dependencies = [
"form_urlencoded",
"idna",
@@ -2023,15 +2023,15 @@ checksum = "86bd8d4e895da8537e5315b8254664e6b769c4ff3db18321b297a1e7004392e3"
[[package]]
name = "utf8parse"
-version = "0.2.1"
+version = "0.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a"
+checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821"
[[package]]
name = "uuid"
-version = "1.8.0"
+version = "1.10.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a183cf7feeba97b4dd1c0d46788634f6221d87fa961b305bed08c851829efcc0"
+checksum = "81dfa00651efa65069b0b6b651f4aaa31ba9e3c3ce0137aaad053604ee7e0314"
dependencies = [
"serde",
]
@@ -2073,7 +2073,7 @@ dependencies = [
"once_cell",
"proc-macro2",
"quote",
- "syn 2.0.66",
+ "syn 2.0.70",
"wasm-bindgen-shared",
]
@@ -2095,7 +2095,7 @@ checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.66",
+ "syn 2.0.70",
"wasm-bindgen-backend",
"wasm-bindgen-shared",
]
@@ -2171,7 +2171,7 @@ version = "0.52.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9"
dependencies = [
- "windows-targets 0.52.5",
+ "windows-targets 0.52.6",
]
[[package]]
@@ -2189,7 +2189,7 @@ version = "0.52.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d"
dependencies = [
- "windows-targets 0.52.5",
+ "windows-targets 0.52.6",
]
[[package]]
@@ -2209,18 +2209,18 @@ dependencies = [
[[package]]
name = "windows-targets"
-version = "0.52.5"
+version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6f0713a46559409d202e70e28227288446bf7841d3211583a4b53e3f6d96e7eb"
+checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973"
dependencies = [
- "windows_aarch64_gnullvm 0.52.5",
- "windows_aarch64_msvc 0.52.5",
- "windows_i686_gnu 0.52.5",
+ "windows_aarch64_gnullvm 0.52.6",
+ "windows_aarch64_msvc 0.52.6",
+ "windows_i686_gnu 0.52.6",
"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",
+ "windows_i686_msvc 0.52.6",
+ "windows_x86_64_gnu 0.52.6",
+ "windows_x86_64_gnullvm 0.52.6",
+ "windows_x86_64_msvc 0.52.6",
]
[[package]]
@@ -2231,9 +2231,9 @@ checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8"
[[package]]
name = "windows_aarch64_gnullvm"
-version = "0.52.5"
+version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7088eed71e8b8dda258ecc8bac5fb1153c5cffaf2578fc8ff5d61e23578d3263"
+checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3"
[[package]]
name = "windows_aarch64_msvc"
@@ -2243,9 +2243,9 @@ checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43"
[[package]]
name = "windows_aarch64_msvc"
-version = "0.52.5"
+version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9985fd1504e250c615ca5f281c3f7a6da76213ebd5ccc9561496568a2752afb6"
+checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469"
[[package]]
name = "windows_i686_gnu"
@@ -2255,15 +2255,15 @@ checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f"
[[package]]
name = "windows_i686_gnu"
-version = "0.52.5"
+version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "88ba073cf16d5372720ec942a8ccbf61626074c6d4dd2e745299726ce8b89670"
+checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b"
[[package]]
name = "windows_i686_gnullvm"
-version = "0.52.5"
+version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "87f4261229030a858f36b459e748ae97545d6f1ec60e5e0d6a3d32e0dc232ee9"
+checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66"
[[package]]
name = "windows_i686_msvc"
@@ -2273,9 +2273,9 @@ checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060"
[[package]]
name = "windows_i686_msvc"
-version = "0.52.5"
+version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "db3c2bf3d13d5b658be73463284eaf12830ac9a26a90c717b7f771dfe97487bf"
+checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66"
[[package]]
name = "windows_x86_64_gnu"
@@ -2285,9 +2285,9 @@ checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36"
[[package]]
name = "windows_x86_64_gnu"
-version = "0.52.5"
+version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4e4246f76bdeff09eb48875a0fd3e2af6aada79d409d33011886d3e1581517d9"
+checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78"
[[package]]
name = "windows_x86_64_gnullvm"
@@ -2297,9 +2297,9 @@ checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3"
[[package]]
name = "windows_x86_64_gnullvm"
-version = "0.52.5"
+version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "852298e482cd67c356ddd9570386e2862b5673c85bd5f88df9ab6802b334c596"
+checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d"
[[package]]
name = "windows_x86_64_msvc"
@@ -2309,9 +2309,9 @@ checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0"
[[package]]
name = "windows_x86_64_msvc"
-version = "0.52.5"
+version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bec47e5bfd1bff0eeaf6d8b485cc1074891a197ab4225d504cb7a1ab88b02bf0"
+checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec"
[[package]]
name = "wyz"
diff --git a/poetry.lock b/poetry.lock
index d25f75d7..e72428c9 100644
--- a/poetry.lock
+++ b/poetry.lock
@@ -1,4 +1,4 @@
-# This file is automatically @generated by Poetry 1.8.3 and should not be changed by hand.
+# This file is automatically @generated by Poetry 1.7.1 and should not be changed by hand.
[[package]]
name = "annotated-types"
@@ -54,63 +54,63 @@ files = [
[[package]]
name = "coverage"
-version = "7.5.3"
+version = "7.5.4"
description = "Code coverage measurement for Python"
optional = false
python-versions = ">=3.8"
files = [
- {file = "coverage-7.5.3-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:a6519d917abb15e12380406d721e37613e2a67d166f9fb7e5a8ce0375744cd45"},
- {file = "coverage-7.5.3-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:aea7da970f1feccf48be7335f8b2ca64baf9b589d79e05b9397a06696ce1a1ec"},
- {file = "coverage-7.5.3-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:923b7b1c717bd0f0f92d862d1ff51d9b2b55dbbd133e05680204465f454bb286"},
- {file = "coverage-7.5.3-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:62bda40da1e68898186f274f832ef3e759ce929da9a9fd9fcf265956de269dbc"},
- {file = "coverage-7.5.3-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d8b7339180d00de83e930358223c617cc343dd08e1aa5ec7b06c3a121aec4e1d"},
- {file = "coverage-7.5.3-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:25a5caf742c6195e08002d3b6c2dd6947e50efc5fc2c2205f61ecb47592d2d83"},
- {file = "coverage-7.5.3-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:05ac5f60faa0c704c0f7e6a5cbfd6f02101ed05e0aee4d2822637a9e672c998d"},
- {file = "coverage-7.5.3-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:239a4e75e09c2b12ea478d28815acf83334d32e722e7433471fbf641c606344c"},
- {file = "coverage-7.5.3-cp310-cp310-win32.whl", hash = "sha256:a5812840d1d00eafae6585aba38021f90a705a25b8216ec7f66aebe5b619fb84"},
- {file = "coverage-7.5.3-cp310-cp310-win_amd64.whl", hash = "sha256:33ca90a0eb29225f195e30684ba4a6db05dbef03c2ccd50b9077714c48153cac"},
- {file = "coverage-7.5.3-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:f81bc26d609bf0fbc622c7122ba6307993c83c795d2d6f6f6fd8c000a770d974"},
- {file = "coverage-7.5.3-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:7cec2af81f9e7569280822be68bd57e51b86d42e59ea30d10ebdbb22d2cb7232"},
- {file = "coverage-7.5.3-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:55f689f846661e3f26efa535071775d0483388a1ccfab899df72924805e9e7cd"},
- {file = "coverage-7.5.3-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:50084d3516aa263791198913a17354bd1dc627d3c1639209640b9cac3fef5807"},
- {file = "coverage-7.5.3-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:341dd8f61c26337c37988345ca5c8ccabeff33093a26953a1ac72e7d0103c4fb"},
- {file = "coverage-7.5.3-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:ab0b028165eea880af12f66086694768f2c3139b2c31ad5e032c8edbafca6ffc"},
- {file = "coverage-7.5.3-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:5bc5a8c87714b0c67cfeb4c7caa82b2d71e8864d1a46aa990b5588fa953673b8"},
- {file = "coverage-7.5.3-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:38a3b98dae8a7c9057bd91fbf3415c05e700a5114c5f1b5b0ea5f8f429ba6614"},
- {file = "coverage-7.5.3-cp311-cp311-win32.whl", hash = "sha256:fcf7d1d6f5da887ca04302db8e0e0cf56ce9a5e05f202720e49b3e8157ddb9a9"},
- {file = "coverage-7.5.3-cp311-cp311-win_amd64.whl", hash = "sha256:8c836309931839cca658a78a888dab9676b5c988d0dd34ca247f5f3e679f4e7a"},
- {file = "coverage-7.5.3-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:296a7d9bbc598e8744c00f7a6cecf1da9b30ae9ad51c566291ff1314e6cbbed8"},
- {file = "coverage-7.5.3-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:34d6d21d8795a97b14d503dcaf74226ae51eb1f2bd41015d3ef332a24d0a17b3"},
- {file = "coverage-7.5.3-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8e317953bb4c074c06c798a11dbdd2cf9979dbcaa8ccc0fa4701d80042d4ebf1"},
- {file = "coverage-7.5.3-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:705f3d7c2b098c40f5b81790a5fedb274113373d4d1a69e65f8b68b0cc26f6db"},
- {file = "coverage-7.5.3-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b1196e13c45e327d6cd0b6e471530a1882f1017eb83c6229fc613cd1a11b53cd"},
- {file = "coverage-7.5.3-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:015eddc5ccd5364dcb902eaecf9515636806fa1e0d5bef5769d06d0f31b54523"},
- {file = "coverage-7.5.3-cp312-cp312-musllinux_1_1_i686.whl", hash = "sha256:fd27d8b49e574e50caa65196d908f80e4dff64d7e592d0c59788b45aad7e8b35"},
- {file = "coverage-7.5.3-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:33fc65740267222fc02975c061eb7167185fef4cc8f2770267ee8bf7d6a42f84"},
- {file = "coverage-7.5.3-cp312-cp312-win32.whl", hash = "sha256:7b2a19e13dfb5c8e145c7a6ea959485ee8e2204699903c88c7d25283584bfc08"},
- {file = "coverage-7.5.3-cp312-cp312-win_amd64.whl", hash = "sha256:0bbddc54bbacfc09b3edaec644d4ac90c08ee8ed4844b0f86227dcda2d428fcb"},
- {file = "coverage-7.5.3-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:f78300789a708ac1f17e134593f577407d52d0417305435b134805c4fb135adb"},
- {file = "coverage-7.5.3-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:b368e1aee1b9b75757942d44d7598dcd22a9dbb126affcbba82d15917f0cc155"},
- {file = "coverage-7.5.3-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f836c174c3a7f639bded48ec913f348c4761cbf49de4a20a956d3431a7c9cb24"},
- {file = "coverage-7.5.3-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:244f509f126dc71369393ce5fea17c0592c40ee44e607b6d855e9c4ac57aac98"},
- {file = "coverage-7.5.3-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c4c2872b3c91f9baa836147ca33650dc5c172e9273c808c3c3199c75490e709d"},
- {file = "coverage-7.5.3-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:dd4b3355b01273a56b20c219e74e7549e14370b31a4ffe42706a8cda91f19f6d"},
- {file = "coverage-7.5.3-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:f542287b1489c7a860d43a7d8883e27ca62ab84ca53c965d11dac1d3a1fab7ce"},
- {file = "coverage-7.5.3-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:75e3f4e86804023e991096b29e147e635f5e2568f77883a1e6eed74512659ab0"},
- {file = "coverage-7.5.3-cp38-cp38-win32.whl", hash = "sha256:c59d2ad092dc0551d9f79d9d44d005c945ba95832a6798f98f9216ede3d5f485"},
- {file = "coverage-7.5.3-cp38-cp38-win_amd64.whl", hash = "sha256:fa21a04112c59ad54f69d80e376f7f9d0f5f9123ab87ecd18fbb9ec3a2beed56"},
- {file = "coverage-7.5.3-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:f5102a92855d518b0996eb197772f5ac2a527c0ec617124ad5242a3af5e25f85"},
- {file = "coverage-7.5.3-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:d1da0a2e3b37b745a2b2a678a4c796462cf753aebf94edcc87dcc6b8641eae31"},
- {file = "coverage-7.5.3-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8383a6c8cefba1b7cecc0149415046b6fc38836295bc4c84e820872eb5478b3d"},
- {file = "coverage-7.5.3-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:9aad68c3f2566dfae84bf46295a79e79d904e1c21ccfc66de88cd446f8686341"},
- {file = "coverage-7.5.3-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2e079c9ec772fedbade9d7ebc36202a1d9ef7291bc9b3a024ca395c4d52853d7"},
- {file = "coverage-7.5.3-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:bde997cac85fcac227b27d4fb2c7608a2c5f6558469b0eb704c5726ae49e1c52"},
- {file = "coverage-7.5.3-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:990fb20b32990b2ce2c5f974c3e738c9358b2735bc05075d50a6f36721b8f303"},
- {file = "coverage-7.5.3-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:3d5a67f0da401e105753d474369ab034c7bae51a4c31c77d94030d59e41df5bd"},
- {file = "coverage-7.5.3-cp39-cp39-win32.whl", hash = "sha256:e08c470c2eb01977d221fd87495b44867a56d4d594f43739a8028f8646a51e0d"},
- {file = "coverage-7.5.3-cp39-cp39-win_amd64.whl", hash = "sha256:1d2a830ade66d3563bb61d1e3c77c8def97b30ed91e166c67d0632c018f380f0"},
- {file = "coverage-7.5.3-pp38.pp39.pp310-none-any.whl", hash = "sha256:3538d8fb1ee9bdd2e2692b3b18c22bb1c19ffbefd06880f5ac496e42d7bb3884"},
- {file = "coverage-7.5.3.tar.gz", hash = "sha256:04aefca5190d1dc7a53a4c1a5a7f8568811306d7a8ee231c42fb69215571944f"},
+ {file = "coverage-7.5.4-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:6cfb5a4f556bb51aba274588200a46e4dd6b505fb1a5f8c5ae408222eb416f99"},
+ {file = "coverage-7.5.4-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:2174e7c23e0a454ffe12267a10732c273243b4f2d50d07544a91198f05c48f47"},
+ {file = "coverage-7.5.4-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2214ee920787d85db1b6a0bd9da5f8503ccc8fcd5814d90796c2f2493a2f4d2e"},
+ {file = "coverage-7.5.4-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1137f46adb28e3813dec8c01fefadcb8c614f33576f672962e323b5128d9a68d"},
+ {file = "coverage-7.5.4-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b385d49609f8e9efc885790a5a0e89f2e3ae042cdf12958b6034cc442de428d3"},
+ {file = "coverage-7.5.4-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:b4a474f799456e0eb46d78ab07303286a84a3140e9700b9e154cfebc8f527016"},
+ {file = "coverage-7.5.4-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:5cd64adedf3be66f8ccee418473c2916492d53cbafbfcff851cbec5a8454b136"},
+ {file = "coverage-7.5.4-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:e564c2cf45d2f44a9da56f4e3a26b2236504a496eb4cb0ca7221cd4cc7a9aca9"},
+ {file = "coverage-7.5.4-cp310-cp310-win32.whl", hash = "sha256:7076b4b3a5f6d2b5d7f1185fde25b1e54eb66e647a1dfef0e2c2bfaf9b4c88c8"},
+ {file = "coverage-7.5.4-cp310-cp310-win_amd64.whl", hash = "sha256:018a12985185038a5b2bcafab04ab833a9a0f2c59995b3cec07e10074c78635f"},
+ {file = "coverage-7.5.4-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:db14f552ac38f10758ad14dd7b983dbab424e731588d300c7db25b6f89e335b5"},
+ {file = "coverage-7.5.4-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:3257fdd8e574805f27bb5342b77bc65578e98cbc004a92232106344053f319ba"},
+ {file = "coverage-7.5.4-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3a6612c99081d8d6134005b1354191e103ec9705d7ba2754e848211ac8cacc6b"},
+ {file = "coverage-7.5.4-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d45d3cbd94159c468b9b8c5a556e3f6b81a8d1af2a92b77320e887c3e7a5d080"},
+ {file = "coverage-7.5.4-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ed550e7442f278af76d9d65af48069f1fb84c9f745ae249c1a183c1e9d1b025c"},
+ {file = "coverage-7.5.4-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:7a892be37ca35eb5019ec85402c3371b0f7cda5ab5056023a7f13da0961e60da"},
+ {file = "coverage-7.5.4-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:8192794d120167e2a64721d88dbd688584675e86e15d0569599257566dec9bf0"},
+ {file = "coverage-7.5.4-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:820bc841faa502e727a48311948e0461132a9c8baa42f6b2b84a29ced24cc078"},
+ {file = "coverage-7.5.4-cp311-cp311-win32.whl", hash = "sha256:6aae5cce399a0f065da65c7bb1e8abd5c7a3043da9dceb429ebe1b289bc07806"},
+ {file = "coverage-7.5.4-cp311-cp311-win_amd64.whl", hash = "sha256:d2e344d6adc8ef81c5a233d3a57b3c7d5181f40e79e05e1c143da143ccb6377d"},
+ {file = "coverage-7.5.4-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:54317c2b806354cbb2dc7ac27e2b93f97096912cc16b18289c5d4e44fc663233"},
+ {file = "coverage-7.5.4-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:042183de01f8b6d531e10c197f7f0315a61e8d805ab29c5f7b51a01d62782747"},
+ {file = "coverage-7.5.4-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a6bb74ed465d5fb204b2ec41d79bcd28afccf817de721e8a807d5141c3426638"},
+ {file = "coverage-7.5.4-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b3d45ff86efb129c599a3b287ae2e44c1e281ae0f9a9bad0edc202179bcc3a2e"},
+ {file = "coverage-7.5.4-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5013ed890dc917cef2c9f765c4c6a8ae9df983cd60dbb635df8ed9f4ebc9f555"},
+ {file = "coverage-7.5.4-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:1014fbf665fef86cdfd6cb5b7371496ce35e4d2a00cda501cf9f5b9e6fced69f"},
+ {file = "coverage-7.5.4-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:3684bc2ff328f935981847082ba4fdc950d58906a40eafa93510d1b54c08a66c"},
+ {file = "coverage-7.5.4-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:581ea96f92bf71a5ec0974001f900db495488434a6928a2ca7f01eee20c23805"},
+ {file = "coverage-7.5.4-cp312-cp312-win32.whl", hash = "sha256:73ca8fbc5bc622e54627314c1a6f1dfdd8db69788f3443e752c215f29fa87a0b"},
+ {file = "coverage-7.5.4-cp312-cp312-win_amd64.whl", hash = "sha256:cef4649ec906ea7ea5e9e796e68b987f83fa9a718514fe147f538cfeda76d7a7"},
+ {file = "coverage-7.5.4-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:cdd31315fc20868c194130de9ee6bfd99755cc9565edff98ecc12585b90be882"},
+ {file = "coverage-7.5.4-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:02ff6e898197cc1e9fa375581382b72498eb2e6d5fc0b53f03e496cfee3fac6d"},
+ {file = "coverage-7.5.4-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d05c16cf4b4c2fc880cb12ba4c9b526e9e5d5bb1d81313d4d732a5b9fe2b9d53"},
+ {file = "coverage-7.5.4-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c5986ee7ea0795a4095ac4d113cbb3448601efca7f158ec7f7087a6c705304e4"},
+ {file = "coverage-7.5.4-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5df54843b88901fdc2f598ac06737f03d71168fd1175728054c8f5a2739ac3e4"},
+ {file = "coverage-7.5.4-cp38-cp38-musllinux_1_2_aarch64.whl", hash = "sha256:ab73b35e8d109bffbda9a3e91c64e29fe26e03e49addf5b43d85fc426dde11f9"},
+ {file = "coverage-7.5.4-cp38-cp38-musllinux_1_2_i686.whl", hash = "sha256:aea072a941b033813f5e4814541fc265a5c12ed9720daef11ca516aeacd3bd7f"},
+ {file = "coverage-7.5.4-cp38-cp38-musllinux_1_2_x86_64.whl", hash = "sha256:16852febd96acd953b0d55fc842ce2dac1710f26729b31c80b940b9afcd9896f"},
+ {file = "coverage-7.5.4-cp38-cp38-win32.whl", hash = "sha256:8f894208794b164e6bd4bba61fc98bf6b06be4d390cf2daacfa6eca0a6d2bb4f"},
+ {file = "coverage-7.5.4-cp38-cp38-win_amd64.whl", hash = "sha256:e2afe743289273209c992075a5a4913e8d007d569a406ffed0bd080ea02b0633"},
+ {file = "coverage-7.5.4-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:b95c3a8cb0463ba9f77383d0fa8c9194cf91f64445a63fc26fb2327e1e1eb088"},
+ {file = "coverage-7.5.4-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:3d7564cc09dd91b5a6001754a5b3c6ecc4aba6323baf33a12bd751036c998be4"},
+ {file = "coverage-7.5.4-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:44da56a2589b684813f86d07597fdf8a9c6ce77f58976727329272f5a01f99f7"},
+ {file = "coverage-7.5.4-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e16f3d6b491c48c5ae726308e6ab1e18ee830b4cdd6913f2d7f77354b33f91c8"},
+ {file = "coverage-7.5.4-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:dbc5958cb471e5a5af41b0ddaea96a37e74ed289535e8deca404811f6cb0bc3d"},
+ {file = "coverage-7.5.4-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:a04e990a2a41740b02d6182b498ee9796cf60eefe40cf859b016650147908029"},
+ {file = "coverage-7.5.4-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:ddbd2f9713a79e8e7242d7c51f1929611e991d855f414ca9996c20e44a895f7c"},
+ {file = "coverage-7.5.4-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:b1ccf5e728ccf83acd313c89f07c22d70d6c375a9c6f339233dcf792094bcbf7"},
+ {file = "coverage-7.5.4-cp39-cp39-win32.whl", hash = "sha256:56b4eafa21c6c175b3ede004ca12c653a88b6f922494b023aeb1e836df953ace"},
+ {file = "coverage-7.5.4-cp39-cp39-win_amd64.whl", hash = "sha256:65e528e2e921ba8fd67d9055e6b9f9e34b21ebd6768ae1c1723f4ea6ace1234d"},
+ {file = "coverage-7.5.4-pp38.pp39.pp310-none-any.whl", hash = "sha256:79b356f3dd5b26f3ad23b35c75dbdaf1f9e2450b6bcefc6d0825ea0aa3f86ca5"},
+ {file = "coverage-7.5.4.tar.gz", hash = "sha256:a44963520b069e12789d0faea4e9fdb1e410cdc4aab89d94f7f55cbb7fef0353"},
]
[package.dependencies]
@@ -146,18 +146,18 @@ test = ["pytest (>=6)"]
[[package]]
name = "filelock"
-version = "3.14.0"
+version = "3.15.4"
description = "A platform independent file lock."
optional = false
python-versions = ">=3.8"
files = [
- {file = "filelock-3.14.0-py3-none-any.whl", hash = "sha256:43339835842f110ca7ae60f1e1c160714c5a6afd15a2873419ab185334975c0f"},
- {file = "filelock-3.14.0.tar.gz", hash = "sha256:6ea72da3be9b8c82afd3edcf99f2fffbb5076335a5ae4d03248bb5b6c3eae78a"},
+ {file = "filelock-3.15.4-py3-none-any.whl", hash = "sha256:6ca1fffae96225dab4c6eaf1c4f4f28cd2568d3ec2a44e15a08520504de468e7"},
+ {file = "filelock-3.15.4.tar.gz", hash = "sha256:2207938cbc1844345cb01a5a95524dae30f0ce089eba5b00378295a17e3e90cb"},
]
[package.extras]
docs = ["furo (>=2023.9.10)", "sphinx (>=7.2.6)", "sphinx-autodoc-typehints (>=1.25.2)"]
-testing = ["covdefaults (>=2.3)", "coverage (>=7.3.2)", "diff-cover (>=8.0.1)", "pytest (>=7.4.3)", "pytest-cov (>=4.1)", "pytest-mock (>=3.12)", "pytest-timeout (>=2.2)"]
+testing = ["covdefaults (>=2.3)", "coverage (>=7.3.2)", "diff-cover (>=8.0.1)", "pytest (>=7.4.3)", "pytest-asyncio (>=0.21)", "pytest-cov (>=4.1)", "pytest-mock (>=3.12)", "pytest-timeout (>=2.2)", "virtualenv (>=20.26.2)"]
typing = ["typing-extensions (>=4.8)"]
[[package]]
@@ -178,35 +178,35 @@ test = ["coverage", "pytest (>=7,<8.1)", "pytest-cov", "pytest-mock (>=3)"]
[[package]]
name = "guppylang"
-version = "0.6.0"
+version = "0.6.2"
description = "Pythonic quantum-classical programming language"
optional = false
python-versions = "<4.0,>=3.10"
files = [
- {file = "guppylang-0.6.0-py3-none-any.whl", hash = "sha256:4b56df0c2a214c29ad4ea6b47fd2700d78c774e55d35e26f37229810606cf59c"},
- {file = "guppylang-0.6.0.tar.gz", hash = "sha256:3ba2bbed76d099c907c035abd791ff95a1ec2026120444d0681068e8dc1a85ac"},
+ {file = "guppylang-0.6.2-py3-none-any.whl", hash = "sha256:202344e8a5ae2f463d04b559b0b8bf977a5ae5ccbf7bfb36dc12b13d3eab81fb"},
+ {file = "guppylang-0.6.2.tar.gz", hash = "sha256:1cac30642bc15f71682559c0f863d01c00c62fe0970cee480e63bf09f0708ca7"},
]
[package.dependencies]
graphviz = ">=0.20.1,<0.21.0"
-hugr = ">=0.2.1,<0.3.0"
+hugr = ">=0.4.0,<0.5.0"
networkx = ">=3.2.1,<4.0.0"
pydantic = ">=2.7.0b1,<3.0.0"
typing-extensions = ">=4.9.0,<5.0.0"
[[package]]
name = "hugr"
-version = "0.2.1"
+version = "0.4.0"
description = "Quantinuum's common representation for quantum programs"
optional = false
python-versions = ">=3.10"
files = [
- {file = "hugr-0.2.1-py3-none-any.whl", hash = "sha256:9bed349f342740d1f7e92859f8c12553d494f39ff26216eadbbdfd92513f64e6"},
- {file = "hugr-0.2.1.tar.gz", hash = "sha256:899203ee02000a0ed3fe36ae1bf3f3ec5e06bddfa4d53bea15ab06aa8b452de5"},
+ {file = "hugr-0.4.0-py3-none-any.whl", hash = "sha256:284f9a8eba8e638b3c2b0ed54b0cddfa84c527cdcb10bdc468cc70f9cd6c3f4d"},
+ {file = "hugr-0.4.0.tar.gz", hash = "sha256:060693b1bc04a19c433eef262ff9574d909091851e73a4fc442887ee818257b1"},
]
[package.dependencies]
-pydantic = ">=2.7.0,<2.8.0"
+pydantic = ">=2.7,<2.9"
[[package]]
name = "hypothesis"
@@ -243,13 +243,13 @@ zoneinfo = ["backports.zoneinfo (>=0.2.1)", "tzdata (>=2024.1)"]
[[package]]
name = "identify"
-version = "2.5.36"
+version = "2.6.0"
description = "File identification library for Python"
optional = false
python-versions = ">=3.8"
files = [
- {file = "identify-2.5.36-py2.py3-none-any.whl", hash = "sha256:37d93f380f4de590500d9dba7db359d0d3da95ffe7f9de1753faa159e71e7dfa"},
- {file = "identify-2.5.36.tar.gz", hash = "sha256:e5e00f54165f9047fbebeb4a560f9acfb8af4c88232be60a488e9b68d122745d"},
+ {file = "identify-2.6.0-py2.py3-none-any.whl", hash = "sha256:e79ae4406387a9d300332b5fd366d8994f1525e8414984e1a59e058b2eda2dd0"},
+ {file = "identify-2.6.0.tar.gz", hash = "sha256:cb171c685bdc31bcc4c1734698736a7d5b6c8bf2e0c15117f4d469c8640ae5cf"},
]
[package.extras]
@@ -609,109 +609,122 @@ virtualenv = ">=20.10.0"
[[package]]
name = "pydantic"
-version = "2.7.3"
+version = "2.8.2"
description = "Data validation using Python type hints"
optional = false
python-versions = ">=3.8"
files = [
- {file = "pydantic-2.7.3-py3-none-any.whl", hash = "sha256:ea91b002777bf643bb20dd717c028ec43216b24a6001a280f83877fd2655d0b4"},
- {file = "pydantic-2.7.3.tar.gz", hash = "sha256:c46c76a40bb1296728d7a8b99aa73dd70a48c3510111ff290034f860c99c419e"},
+ {file = "pydantic-2.8.2-py3-none-any.whl", hash = "sha256:73ee9fddd406dc318b885c7a2eab8a6472b68b8fb5ba8150949fc3db939f23c8"},
+ {file = "pydantic-2.8.2.tar.gz", hash = "sha256:6f62c13d067b0755ad1c21a34bdd06c0c12625a22b0fc09c6b149816604f7c2a"},
]
[package.dependencies]
annotated-types = ">=0.4.0"
-pydantic-core = "2.18.4"
-typing-extensions = ">=4.6.1"
+pydantic-core = "2.20.1"
+typing-extensions = [
+ {version = ">=4.12.2", markers = "python_version >= \"3.13\""},
+ {version = ">=4.6.1", markers = "python_version < \"3.13\""},
+]
[package.extras]
email = ["email-validator (>=2.0.0)"]
[[package]]
name = "pydantic-core"
-version = "2.18.4"
+version = "2.20.1"
description = "Core functionality for Pydantic validation and serialization"
optional = false
python-versions = ">=3.8"
files = [
- {file = "pydantic_core-2.18.4-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:f76d0ad001edd426b92233d45c746fd08f467d56100fd8f30e9ace4b005266e4"},
- {file = "pydantic_core-2.18.4-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:59ff3e89f4eaf14050c8022011862df275b552caef8082e37b542b066ce1ff26"},
- {file = "pydantic_core-2.18.4-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a55b5b16c839df1070bc113c1f7f94a0af4433fcfa1b41799ce7606e5c79ce0a"},
- {file = "pydantic_core-2.18.4-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:4d0dcc59664fcb8974b356fe0a18a672d6d7cf9f54746c05f43275fc48636851"},
- {file = "pydantic_core-2.18.4-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:8951eee36c57cd128f779e641e21eb40bc5073eb28b2d23f33eb0ef14ffb3f5d"},
- {file = "pydantic_core-2.18.4-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:4701b19f7e3a06ea655513f7938de6f108123bf7c86bbebb1196eb9bd35cf724"},
- {file = "pydantic_core-2.18.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e00a3f196329e08e43d99b79b286d60ce46bed10f2280d25a1718399457e06be"},
- {file = "pydantic_core-2.18.4-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:97736815b9cc893b2b7f663628e63f436018b75f44854c8027040e05230eeddb"},
- {file = "pydantic_core-2.18.4-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:6891a2ae0e8692679c07728819b6e2b822fb30ca7445f67bbf6509b25a96332c"},
- {file = "pydantic_core-2.18.4-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:bc4ff9805858bd54d1a20efff925ccd89c9d2e7cf4986144b30802bf78091c3e"},
- {file = "pydantic_core-2.18.4-cp310-none-win32.whl", hash = "sha256:1b4de2e51bbcb61fdebd0ab86ef28062704f62c82bbf4addc4e37fa4b00b7cbc"},
- {file = "pydantic_core-2.18.4-cp310-none-win_amd64.whl", hash = "sha256:6a750aec7bf431517a9fd78cb93c97b9b0c496090fee84a47a0d23668976b4b0"},
- {file = "pydantic_core-2.18.4-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:942ba11e7dfb66dc70f9ae66b33452f51ac7bb90676da39a7345e99ffb55402d"},
- {file = "pydantic_core-2.18.4-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:b2ebef0e0b4454320274f5e83a41844c63438fdc874ea40a8b5b4ecb7693f1c4"},
- {file = "pydantic_core-2.18.4-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a642295cd0c8df1b86fc3dced1d067874c353a188dc8e0f744626d49e9aa51c4"},
- {file = "pydantic_core-2.18.4-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:5f09baa656c904807e832cf9cce799c6460c450c4ad80803517032da0cd062e2"},
- {file = "pydantic_core-2.18.4-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:98906207f29bc2c459ff64fa007afd10a8c8ac080f7e4d5beff4c97086a3dabd"},
- {file = "pydantic_core-2.18.4-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:19894b95aacfa98e7cb093cd7881a0c76f55731efad31073db4521e2b6ff5b7d"},
- {file = "pydantic_core-2.18.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0fbbdc827fe5e42e4d196c746b890b3d72876bdbf160b0eafe9f0334525119c8"},
- {file = "pydantic_core-2.18.4-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:f85d05aa0918283cf29a30b547b4df2fbb56b45b135f9e35b6807cb28bc47951"},
- {file = "pydantic_core-2.18.4-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:e85637bc8fe81ddb73fda9e56bab24560bdddfa98aa64f87aaa4e4b6730c23d2"},
- {file = "pydantic_core-2.18.4-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:2f5966897e5461f818e136b8451d0551a2e77259eb0f73a837027b47dc95dab9"},
- {file = "pydantic_core-2.18.4-cp311-none-win32.whl", hash = "sha256:44c7486a4228413c317952e9d89598bcdfb06399735e49e0f8df643e1ccd0558"},
- {file = "pydantic_core-2.18.4-cp311-none-win_amd64.whl", hash = "sha256:8a7164fe2005d03c64fd3b85649891cd4953a8de53107940bf272500ba8a788b"},
- {file = "pydantic_core-2.18.4-cp311-none-win_arm64.whl", hash = "sha256:4e99bc050fe65c450344421017f98298a97cefc18c53bb2f7b3531eb39bc7805"},
- {file = "pydantic_core-2.18.4-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:6f5c4d41b2771c730ea1c34e458e781b18cc668d194958e0112455fff4e402b2"},
- {file = "pydantic_core-2.18.4-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:2fdf2156aa3d017fddf8aea5adfba9f777db1d6022d392b682d2a8329e087cef"},
- {file = "pydantic_core-2.18.4-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4748321b5078216070b151d5271ef3e7cc905ab170bbfd27d5c83ee3ec436695"},
- {file = "pydantic_core-2.18.4-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:847a35c4d58721c5dc3dba599878ebbdfd96784f3fb8bb2c356e123bdcd73f34"},
- {file = "pydantic_core-2.18.4-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3c40d4eaad41f78e3bbda31b89edc46a3f3dc6e171bf0ecf097ff7a0ffff7cb1"},
- {file = "pydantic_core-2.18.4-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:21a5e440dbe315ab9825fcd459b8814bb92b27c974cbc23c3e8baa2b76890077"},
- {file = "pydantic_core-2.18.4-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:01dd777215e2aa86dfd664daed5957704b769e726626393438f9c87690ce78c3"},
- {file = "pydantic_core-2.18.4-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:4b06beb3b3f1479d32befd1f3079cc47b34fa2da62457cdf6c963393340b56e9"},
- {file = "pydantic_core-2.18.4-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:564d7922e4b13a16b98772441879fcdcbe82ff50daa622d681dd682175ea918c"},
- {file = "pydantic_core-2.18.4-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:0eb2a4f660fcd8e2b1c90ad566db2b98d7f3f4717c64fe0a83e0adb39766d5b8"},
- {file = "pydantic_core-2.18.4-cp312-none-win32.whl", hash = "sha256:8b8bab4c97248095ae0c4455b5a1cd1cdd96e4e4769306ab19dda135ea4cdb07"},
- {file = "pydantic_core-2.18.4-cp312-none-win_amd64.whl", hash = "sha256:14601cdb733d741b8958224030e2bfe21a4a881fb3dd6fbb21f071cabd48fa0a"},
- {file = "pydantic_core-2.18.4-cp312-none-win_arm64.whl", hash = "sha256:c1322d7dd74713dcc157a2b7898a564ab091ca6c58302d5c7b4c07296e3fd00f"},
- {file = "pydantic_core-2.18.4-cp38-cp38-macosx_10_12_x86_64.whl", hash = "sha256:823be1deb01793da05ecb0484d6c9e20baebb39bd42b5d72636ae9cf8350dbd2"},
- {file = "pydantic_core-2.18.4-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:ebef0dd9bf9b812bf75bda96743f2a6c5734a02092ae7f721c048d156d5fabae"},
- {file = "pydantic_core-2.18.4-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ae1d6df168efb88d7d522664693607b80b4080be6750c913eefb77e34c12c71a"},
- {file = "pydantic_core-2.18.4-cp38-cp38-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:f9899c94762343f2cc2fc64c13e7cae4c3cc65cdfc87dd810a31654c9b7358cc"},
- {file = "pydantic_core-2.18.4-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:99457f184ad90235cfe8461c4d70ab7dd2680e28821c29eca00252ba90308c78"},
- {file = "pydantic_core-2.18.4-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:18f469a3d2a2fdafe99296a87e8a4c37748b5080a26b806a707f25a902c040a8"},
- {file = "pydantic_core-2.18.4-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b7cdf28938ac6b8b49ae5e92f2735056a7ba99c9b110a474473fd71185c1af5d"},
- {file = "pydantic_core-2.18.4-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:938cb21650855054dc54dfd9120a851c974f95450f00683399006aa6e8abb057"},
- {file = "pydantic_core-2.18.4-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:44cd83ab6a51da80fb5adbd9560e26018e2ac7826f9626bc06ca3dc074cd198b"},
- {file = "pydantic_core-2.18.4-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:972658f4a72d02b8abfa2581d92d59f59897d2e9f7e708fdabe922f9087773af"},
- {file = "pydantic_core-2.18.4-cp38-none-win32.whl", hash = "sha256:1d886dc848e60cb7666f771e406acae54ab279b9f1e4143babc9c2258213daa2"},
- {file = "pydantic_core-2.18.4-cp38-none-win_amd64.whl", hash = "sha256:bb4462bd43c2460774914b8525f79b00f8f407c945d50881568f294c1d9b4443"},
- {file = "pydantic_core-2.18.4-cp39-cp39-macosx_10_12_x86_64.whl", hash = "sha256:44a688331d4a4e2129140a8118479443bd6f1905231138971372fcde37e43528"},
- {file = "pydantic_core-2.18.4-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:a2fdd81edd64342c85ac7cf2753ccae0b79bf2dfa063785503cb85a7d3593223"},
- {file = "pydantic_core-2.18.4-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:86110d7e1907ab36691f80b33eb2da87d780f4739ae773e5fc83fb272f88825f"},
- {file = "pydantic_core-2.18.4-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:46387e38bd641b3ee5ce247563b60c5ca098da9c56c75c157a05eaa0933ed154"},
- {file = "pydantic_core-2.18.4-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:123c3cec203e3f5ac7b000bd82235f1a3eced8665b63d18be751f115588fea30"},
- {file = "pydantic_core-2.18.4-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:dc1803ac5c32ec324c5261c7209e8f8ce88e83254c4e1aebdc8b0a39f9ddb443"},
- {file = "pydantic_core-2.18.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:53db086f9f6ab2b4061958d9c276d1dbe3690e8dd727d6abf2321d6cce37fa94"},
- {file = "pydantic_core-2.18.4-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:abc267fa9837245cc28ea6929f19fa335f3dc330a35d2e45509b6566dc18be23"},
- {file = "pydantic_core-2.18.4-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:a0d829524aaefdebccb869eed855e2d04c21d2d7479b6cada7ace5448416597b"},
- {file = "pydantic_core-2.18.4-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:509daade3b8649f80d4e5ff21aa5673e4ebe58590b25fe42fac5f0f52c6f034a"},
- {file = "pydantic_core-2.18.4-cp39-none-win32.whl", hash = "sha256:ca26a1e73c48cfc54c4a76ff78df3727b9d9f4ccc8dbee4ae3f73306a591676d"},
- {file = "pydantic_core-2.18.4-cp39-none-win_amd64.whl", hash = "sha256:c67598100338d5d985db1b3d21f3619ef392e185e71b8d52bceacc4a7771ea7e"},
- {file = "pydantic_core-2.18.4-pp310-pypy310_pp73-macosx_10_12_x86_64.whl", hash = "sha256:574d92eac874f7f4db0ca653514d823a0d22e2354359d0759e3f6a406db5d55d"},
- {file = "pydantic_core-2.18.4-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:1f4d26ceb5eb9eed4af91bebeae4b06c3fb28966ca3a8fb765208cf6b51102ab"},
- {file = "pydantic_core-2.18.4-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:77450e6d20016ec41f43ca4a6c63e9fdde03f0ae3fe90e7c27bdbeaece8b1ed4"},
- {file = "pydantic_core-2.18.4-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d323a01da91851a4f17bf592faf46149c9169d68430b3146dcba2bb5e5719abc"},
- {file = "pydantic_core-2.18.4-pp310-pypy310_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:43d447dd2ae072a0065389092a231283f62d960030ecd27565672bd40746c507"},
- {file = "pydantic_core-2.18.4-pp310-pypy310_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:578e24f761f3b425834f297b9935e1ce2e30f51400964ce4801002435a1b41ef"},
- {file = "pydantic_core-2.18.4-pp310-pypy310_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:81b5efb2f126454586d0f40c4d834010979cb80785173d1586df845a632e4e6d"},
- {file = "pydantic_core-2.18.4-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:ab86ce7c8f9bea87b9d12c7f0af71102acbf5ecbc66c17796cff45dae54ef9a5"},
- {file = "pydantic_core-2.18.4-pp39-pypy39_pp73-macosx_10_12_x86_64.whl", hash = "sha256:90afc12421df2b1b4dcc975f814e21bc1754640d502a2fbcc6d41e77af5ec312"},
- {file = "pydantic_core-2.18.4-pp39-pypy39_pp73-macosx_11_0_arm64.whl", hash = "sha256:51991a89639a912c17bef4b45c87bd83593aee0437d8102556af4885811d59f5"},
- {file = "pydantic_core-2.18.4-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:293afe532740370aba8c060882f7d26cfd00c94cae32fd2e212a3a6e3b7bc15e"},
- {file = "pydantic_core-2.18.4-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b48ece5bde2e768197a2d0f6e925f9d7e3e826f0ad2271120f8144a9db18d5c8"},
- {file = "pydantic_core-2.18.4-pp39-pypy39_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:eae237477a873ab46e8dd748e515c72c0c804fb380fbe6c85533c7de51f23a8f"},
- {file = "pydantic_core-2.18.4-pp39-pypy39_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:834b5230b5dfc0c1ec37b2fda433b271cbbc0e507560b5d1588e2cc1148cf1ce"},
- {file = "pydantic_core-2.18.4-pp39-pypy39_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:e858ac0a25074ba4bce653f9b5d0a85b7456eaddadc0ce82d3878c22489fa4ee"},
- {file = "pydantic_core-2.18.4-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:2fd41f6eff4c20778d717af1cc50eca52f5afe7805ee530a4fbd0bae284f16e9"},
- {file = "pydantic_core-2.18.4.tar.gz", hash = "sha256:ec3beeada09ff865c344ff3bc2f427f5e6c26401cc6113d77e372c3fdac73864"},
+ {file = "pydantic_core-2.20.1-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:3acae97ffd19bf091c72df4d726d552c473f3576409b2a7ca36b2f535ffff4a3"},
+ {file = "pydantic_core-2.20.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:41f4c96227a67a013e7de5ff8f20fb496ce573893b7f4f2707d065907bffdbd6"},
+ {file = "pydantic_core-2.20.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5f239eb799a2081495ea659d8d4a43a8f42cd1fe9ff2e7e436295c38a10c286a"},
+ {file = "pydantic_core-2.20.1-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:53e431da3fc53360db73eedf6f7124d1076e1b4ee4276b36fb25514544ceb4a3"},
+ {file = "pydantic_core-2.20.1-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:f1f62b2413c3a0e846c3b838b2ecd6c7a19ec6793b2a522745b0869e37ab5bc1"},
+ {file = "pydantic_core-2.20.1-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:5d41e6daee2813ecceea8eda38062d69e280b39df793f5a942fa515b8ed67953"},
+ {file = "pydantic_core-2.20.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3d482efec8b7dc6bfaedc0f166b2ce349df0011f5d2f1f25537ced4cfc34fd98"},
+ {file = "pydantic_core-2.20.1-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:e93e1a4b4b33daed65d781a57a522ff153dcf748dee70b40c7258c5861e1768a"},
+ {file = "pydantic_core-2.20.1-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:e7c4ea22b6739b162c9ecaaa41d718dfad48a244909fe7ef4b54c0b530effc5a"},
+ {file = "pydantic_core-2.20.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:4f2790949cf385d985a31984907fecb3896999329103df4e4983a4a41e13e840"},
+ {file = "pydantic_core-2.20.1-cp310-none-win32.whl", hash = "sha256:5e999ba8dd90e93d57410c5e67ebb67ffcaadcea0ad973240fdfd3a135506250"},
+ {file = "pydantic_core-2.20.1-cp310-none-win_amd64.whl", hash = "sha256:512ecfbefef6dac7bc5eaaf46177b2de58cdf7acac8793fe033b24ece0b9566c"},
+ {file = "pydantic_core-2.20.1-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:d2a8fa9d6d6f891f3deec72f5cc668e6f66b188ab14bb1ab52422fe8e644f312"},
+ {file = "pydantic_core-2.20.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:175873691124f3d0da55aeea1d90660a6ea7a3cfea137c38afa0a5ffabe37b88"},
+ {file = "pydantic_core-2.20.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:37eee5b638f0e0dcd18d21f59b679686bbd18917b87db0193ae36f9c23c355fc"},
+ {file = "pydantic_core-2.20.1-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:25e9185e2d06c16ee438ed39bf62935ec436474a6ac4f9358524220f1b236e43"},
+ {file = "pydantic_core-2.20.1-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:150906b40ff188a3260cbee25380e7494ee85048584998c1e66df0c7a11c17a6"},
+ {file = "pydantic_core-2.20.1-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:8ad4aeb3e9a97286573c03df758fc7627aecdd02f1da04516a86dc159bf70121"},
+ {file = "pydantic_core-2.20.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d3f3ed29cd9f978c604708511a1f9c2fdcb6c38b9aae36a51905b8811ee5cbf1"},
+ {file = "pydantic_core-2.20.1-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:b0dae11d8f5ded51699c74d9548dcc5938e0804cc8298ec0aa0da95c21fff57b"},
+ {file = "pydantic_core-2.20.1-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:faa6b09ee09433b87992fb5a2859efd1c264ddc37280d2dd5db502126d0e7f27"},
+ {file = "pydantic_core-2.20.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:9dc1b507c12eb0481d071f3c1808f0529ad41dc415d0ca11f7ebfc666e66a18b"},
+ {file = "pydantic_core-2.20.1-cp311-none-win32.whl", hash = "sha256:fa2fddcb7107e0d1808086ca306dcade7df60a13a6c347a7acf1ec139aa6789a"},
+ {file = "pydantic_core-2.20.1-cp311-none-win_amd64.whl", hash = "sha256:40a783fb7ee353c50bd3853e626f15677ea527ae556429453685ae32280c19c2"},
+ {file = "pydantic_core-2.20.1-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:595ba5be69b35777474fa07f80fc260ea71255656191adb22a8c53aba4479231"},
+ {file = "pydantic_core-2.20.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:a4f55095ad087474999ee28d3398bae183a66be4823f753cd7d67dd0153427c9"},
+ {file = "pydantic_core-2.20.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f9aa05d09ecf4c75157197f27cdc9cfaeb7c5f15021c6373932bf3e124af029f"},
+ {file = "pydantic_core-2.20.1-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:e97fdf088d4b31ff4ba35db26d9cc472ac7ef4a2ff2badeabf8d727b3377fc52"},
+ {file = "pydantic_core-2.20.1-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:bc633a9fe1eb87e250b5c57d389cf28998e4292336926b0b6cdaee353f89a237"},
+ {file = "pydantic_core-2.20.1-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:d573faf8eb7e6b1cbbcb4f5b247c60ca8be39fe2c674495df0eb4318303137fe"},
+ {file = "pydantic_core-2.20.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:26dc97754b57d2fd00ac2b24dfa341abffc380b823211994c4efac7f13b9e90e"},
+ {file = "pydantic_core-2.20.1-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:33499e85e739a4b60c9dac710c20a08dc73cb3240c9a0e22325e671b27b70d24"},
+ {file = "pydantic_core-2.20.1-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:bebb4d6715c814597f85297c332297c6ce81e29436125ca59d1159b07f423eb1"},
+ {file = "pydantic_core-2.20.1-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:516d9227919612425c8ef1c9b869bbbee249bc91912c8aaffb66116c0b447ebd"},
+ {file = "pydantic_core-2.20.1-cp312-none-win32.whl", hash = "sha256:469f29f9093c9d834432034d33f5fe45699e664f12a13bf38c04967ce233d688"},
+ {file = "pydantic_core-2.20.1-cp312-none-win_amd64.whl", hash = "sha256:035ede2e16da7281041f0e626459bcae33ed998cca6a0a007a5ebb73414ac72d"},
+ {file = "pydantic_core-2.20.1-cp313-cp313-macosx_10_12_x86_64.whl", hash = "sha256:0827505a5c87e8aa285dc31e9ec7f4a17c81a813d45f70b1d9164e03a813a686"},
+ {file = "pydantic_core-2.20.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:19c0fa39fa154e7e0b7f82f88ef85faa2a4c23cc65aae2f5aea625e3c13c735a"},
+ {file = "pydantic_core-2.20.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4aa223cd1e36b642092c326d694d8bf59b71ddddc94cdb752bbbb1c5c91d833b"},
+ {file = "pydantic_core-2.20.1-cp313-cp313-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:c336a6d235522a62fef872c6295a42ecb0c4e1d0f1a3e500fe949415761b8a19"},
+ {file = "pydantic_core-2.20.1-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:7eb6a0587eded33aeefea9f916899d42b1799b7b14b8f8ff2753c0ac1741edac"},
+ {file = "pydantic_core-2.20.1-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:70c8daf4faca8da5a6d655f9af86faf6ec2e1768f4b8b9d0226c02f3d6209703"},
+ {file = "pydantic_core-2.20.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e9fa4c9bf273ca41f940bceb86922a7667cd5bf90e95dbb157cbb8441008482c"},
+ {file = "pydantic_core-2.20.1-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:11b71d67b4725e7e2a9f6e9c0ac1239bbc0c48cce3dc59f98635efc57d6dac83"},
+ {file = "pydantic_core-2.20.1-cp313-cp313-musllinux_1_1_aarch64.whl", hash = "sha256:270755f15174fb983890c49881e93f8f1b80f0b5e3a3cc1394a255706cabd203"},
+ {file = "pydantic_core-2.20.1-cp313-cp313-musllinux_1_1_x86_64.whl", hash = "sha256:c81131869240e3e568916ef4c307f8b99583efaa60a8112ef27a366eefba8ef0"},
+ {file = "pydantic_core-2.20.1-cp313-none-win32.whl", hash = "sha256:b91ced227c41aa29c672814f50dbb05ec93536abf8f43cd14ec9521ea09afe4e"},
+ {file = "pydantic_core-2.20.1-cp313-none-win_amd64.whl", hash = "sha256:65db0f2eefcaad1a3950f498aabb4875c8890438bc80b19362cf633b87a8ab20"},
+ {file = "pydantic_core-2.20.1-cp38-cp38-macosx_10_12_x86_64.whl", hash = "sha256:4745f4ac52cc6686390c40eaa01d48b18997cb130833154801a442323cc78f91"},
+ {file = "pydantic_core-2.20.1-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:a8ad4c766d3f33ba8fd692f9aa297c9058970530a32c728a2c4bfd2616d3358b"},
+ {file = "pydantic_core-2.20.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:41e81317dd6a0127cabce83c0c9c3fbecceae981c8391e6f1dec88a77c8a569a"},
+ {file = "pydantic_core-2.20.1-cp38-cp38-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:04024d270cf63f586ad41fff13fde4311c4fc13ea74676962c876d9577bcc78f"},
+ {file = "pydantic_core-2.20.1-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:eaad4ff2de1c3823fddf82f41121bdf453d922e9a238642b1dedb33c4e4f98ad"},
+ {file = "pydantic_core-2.20.1-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:26ab812fa0c845df815e506be30337e2df27e88399b985d0bb4e3ecfe72df31c"},
+ {file = "pydantic_core-2.20.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3c5ebac750d9d5f2706654c638c041635c385596caf68f81342011ddfa1e5598"},
+ {file = "pydantic_core-2.20.1-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:2aafc5a503855ea5885559eae883978c9b6d8c8993d67766ee73d82e841300dd"},
+ {file = "pydantic_core-2.20.1-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:4868f6bd7c9d98904b748a2653031fc9c2f85b6237009d475b1008bfaeb0a5aa"},
+ {file = "pydantic_core-2.20.1-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:aa2f457b4af386254372dfa78a2eda2563680d982422641a85f271c859df1987"},
+ {file = "pydantic_core-2.20.1-cp38-none-win32.whl", hash = "sha256:225b67a1f6d602de0ce7f6c1c3ae89a4aa25d3de9be857999e9124f15dab486a"},
+ {file = "pydantic_core-2.20.1-cp38-none-win_amd64.whl", hash = "sha256:6b507132dcfc0dea440cce23ee2182c0ce7aba7054576efc65634f080dbe9434"},
+ {file = "pydantic_core-2.20.1-cp39-cp39-macosx_10_12_x86_64.whl", hash = "sha256:b03f7941783b4c4a26051846dea594628b38f6940a2fdc0df00b221aed39314c"},
+ {file = "pydantic_core-2.20.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:1eedfeb6089ed3fad42e81a67755846ad4dcc14d73698c120a82e4ccf0f1f9f6"},
+ {file = "pydantic_core-2.20.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:635fee4e041ab9c479e31edda27fcf966ea9614fff1317e280d99eb3e5ab6fe2"},
+ {file = "pydantic_core-2.20.1-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:77bf3ac639c1ff567ae3b47f8d4cc3dc20f9966a2a6dd2311dcc055d3d04fb8a"},
+ {file = "pydantic_core-2.20.1-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:7ed1b0132f24beeec5a78b67d9388656d03e6a7c837394f99257e2d55b461611"},
+ {file = "pydantic_core-2.20.1-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:c6514f963b023aeee506678a1cf821fe31159b925c4b76fe2afa94cc70b3222b"},
+ {file = "pydantic_core-2.20.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:10d4204d8ca33146e761c79f83cc861df20e7ae9f6487ca290a97702daf56006"},
+ {file = "pydantic_core-2.20.1-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:2d036c7187b9422ae5b262badb87a20a49eb6c5238b2004e96d4da1231badef1"},
+ {file = "pydantic_core-2.20.1-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:9ebfef07dbe1d93efb94b4700f2d278494e9162565a54f124c404a5656d7ff09"},
+ {file = "pydantic_core-2.20.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:6b9d9bb600328a1ce523ab4f454859e9d439150abb0906c5a1983c146580ebab"},
+ {file = "pydantic_core-2.20.1-cp39-none-win32.whl", hash = "sha256:784c1214cb6dd1e3b15dd8b91b9a53852aed16671cc3fbe4786f4f1db07089e2"},
+ {file = "pydantic_core-2.20.1-cp39-none-win_amd64.whl", hash = "sha256:d2fe69c5434391727efa54b47a1e7986bb0186e72a41b203df8f5b0a19a4f669"},
+ {file = "pydantic_core-2.20.1-pp310-pypy310_pp73-macosx_10_12_x86_64.whl", hash = "sha256:a45f84b09ac9c3d35dfcf6a27fd0634d30d183205230a0ebe8373a0e8cfa0906"},
+ {file = "pydantic_core-2.20.1-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:d02a72df14dfdbaf228424573a07af10637bd490f0901cee872c4f434a735b94"},
+ {file = "pydantic_core-2.20.1-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d2b27e6af28f07e2f195552b37d7d66b150adbaa39a6d327766ffd695799780f"},
+ {file = "pydantic_core-2.20.1-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:084659fac3c83fd674596612aeff6041a18402f1e1bc19ca39e417d554468482"},
+ {file = "pydantic_core-2.20.1-pp310-pypy310_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:242b8feb3c493ab78be289c034a1f659e8826e2233786e36f2893a950a719bb6"},
+ {file = "pydantic_core-2.20.1-pp310-pypy310_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:38cf1c40a921d05c5edc61a785c0ddb4bed67827069f535d794ce6bcded919fc"},
+ {file = "pydantic_core-2.20.1-pp310-pypy310_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:e0bbdd76ce9aa5d4209d65f2b27fc6e5ef1312ae6c5333c26db3f5ade53a1e99"},
+ {file = "pydantic_core-2.20.1-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:254ec27fdb5b1ee60684f91683be95e5133c994cc54e86a0b0963afa25c8f8a6"},
+ {file = "pydantic_core-2.20.1-pp39-pypy39_pp73-macosx_10_12_x86_64.whl", hash = "sha256:407653af5617f0757261ae249d3fba09504d7a71ab36ac057c938572d1bc9331"},
+ {file = "pydantic_core-2.20.1-pp39-pypy39_pp73-macosx_11_0_arm64.whl", hash = "sha256:c693e916709c2465b02ca0ad7b387c4f8423d1db7b4649c551f27a529181c5ad"},
+ {file = "pydantic_core-2.20.1-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5b5ff4911aea936a47d9376fd3ab17e970cc543d1b68921886e7f64bd28308d1"},
+ {file = "pydantic_core-2.20.1-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:177f55a886d74f1808763976ac4efd29b7ed15c69f4d838bbd74d9d09cf6fa86"},
+ {file = "pydantic_core-2.20.1-pp39-pypy39_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:964faa8a861d2664f0c7ab0c181af0bea66098b1919439815ca8803ef136fc4e"},
+ {file = "pydantic_core-2.20.1-pp39-pypy39_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:4dd484681c15e6b9a977c785a345d3e378d72678fd5f1f3c0509608da24f2ac0"},
+ {file = "pydantic_core-2.20.1-pp39-pypy39_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:f6d6cff3538391e8486a431569b77921adfcdef14eb18fbf19b7c0a5294d4e6a"},
+ {file = "pydantic_core-2.20.1-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:a6d511cc297ff0883bc3708b465ff82d7560193169a8b93260f74ecb0a5e08a7"},
+ {file = "pydantic_core-2.20.1.tar.gz", hash = "sha256:26ca695eeee5f9f1aeeb211ffc12f10bcb6f71e2989988fda61dabd65db878d4"},
]
[package.dependencies]
@@ -899,60 +912,60 @@ files = [
[[package]]
name = "scipy"
-version = "1.13.1"
+version = "1.14.0"
description = "Fundamental algorithms for scientific computing in Python"
optional = false
-python-versions = ">=3.9"
+python-versions = ">=3.10"
files = [
- {file = "scipy-1.13.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:20335853b85e9a49ff7572ab453794298bcf0354d8068c5f6775a0eabf350aca"},
- {file = "scipy-1.13.1-cp310-cp310-macosx_12_0_arm64.whl", hash = "sha256:d605e9c23906d1994f55ace80e0125c587f96c020037ea6aa98d01b4bd2e222f"},
- {file = "scipy-1.13.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:cfa31f1def5c819b19ecc3a8b52d28ffdcc7ed52bb20c9a7589669dd3c250989"},
- {file = "scipy-1.13.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f26264b282b9da0952a024ae34710c2aff7d27480ee91a2e82b7b7073c24722f"},
- {file = "scipy-1.13.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:eccfa1906eacc02de42d70ef4aecea45415f5be17e72b61bafcfd329bdc52e94"},
- {file = "scipy-1.13.1-cp310-cp310-win_amd64.whl", hash = "sha256:2831f0dc9c5ea9edd6e51e6e769b655f08ec6db6e2e10f86ef39bd32eb11da54"},
- {file = "scipy-1.13.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:27e52b09c0d3a1d5b63e1105f24177e544a222b43611aaf5bc44d4a0979e32f9"},
- {file = "scipy-1.13.1-cp311-cp311-macosx_12_0_arm64.whl", hash = "sha256:54f430b00f0133e2224c3ba42b805bfd0086fe488835effa33fa291561932326"},
- {file = "scipy-1.13.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e89369d27f9e7b0884ae559a3a956e77c02114cc60a6058b4e5011572eea9299"},
- {file = "scipy-1.13.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a78b4b3345f1b6f68a763c6e25c0c9a23a9fd0f39f5f3d200efe8feda560a5fa"},
- {file = "scipy-1.13.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:45484bee6d65633752c490404513b9ef02475b4284c4cfab0ef946def50b3f59"},
- {file = "scipy-1.13.1-cp311-cp311-win_amd64.whl", hash = "sha256:5713f62f781eebd8d597eb3f88b8bf9274e79eeabf63afb4a737abc6c84ad37b"},
- {file = "scipy-1.13.1-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:5d72782f39716b2b3509cd7c33cdc08c96f2f4d2b06d51e52fb45a19ca0c86a1"},
- {file = "scipy-1.13.1-cp312-cp312-macosx_12_0_arm64.whl", hash = "sha256:017367484ce5498445aade74b1d5ab377acdc65e27095155e448c88497755a5d"},
- {file = "scipy-1.13.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:949ae67db5fa78a86e8fa644b9a6b07252f449dcf74247108c50e1d20d2b4627"},
- {file = "scipy-1.13.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:de3ade0e53bc1f21358aa74ff4830235d716211d7d077e340c7349bc3542e884"},
- {file = "scipy-1.13.1-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:2ac65fb503dad64218c228e2dc2d0a0193f7904747db43014645ae139c8fad16"},
- {file = "scipy-1.13.1-cp312-cp312-win_amd64.whl", hash = "sha256:cdd7dacfb95fea358916410ec61bbc20440f7860333aee6d882bb8046264e949"},
- {file = "scipy-1.13.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:436bbb42a94a8aeef855d755ce5a465479c721e9d684de76bf61a62e7c2b81d5"},
- {file = "scipy-1.13.1-cp39-cp39-macosx_12_0_arm64.whl", hash = "sha256:8335549ebbca860c52bf3d02f80784e91a004b71b059e3eea9678ba994796a24"},
- {file = "scipy-1.13.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d533654b7d221a6a97304ab63c41c96473ff04459e404b83275b60aa8f4b7004"},
- {file = "scipy-1.13.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:637e98dcf185ba7f8e663e122ebf908c4702420477ae52a04f9908707456ba4d"},
- {file = "scipy-1.13.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:a014c2b3697bde71724244f63de2476925596c24285c7a637364761f8710891c"},
- {file = "scipy-1.13.1-cp39-cp39-win_amd64.whl", hash = "sha256:392e4ec766654852c25ebad4f64e4e584cf19820b980bc04960bca0b0cd6eaa2"},
- {file = "scipy-1.13.1.tar.gz", hash = "sha256:095a87a0312b08dfd6a6155cbbd310a8c51800fc931b8c0b84003014b874ed3c"},
+ {file = "scipy-1.14.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:7e911933d54ead4d557c02402710c2396529540b81dd554fc1ba270eb7308484"},
+ {file = "scipy-1.14.0-cp310-cp310-macosx_12_0_arm64.whl", hash = "sha256:687af0a35462402dd851726295c1a5ae5f987bd6e9026f52e9505994e2f84ef6"},
+ {file = "scipy-1.14.0-cp310-cp310-macosx_14_0_arm64.whl", hash = "sha256:07e179dc0205a50721022344fb85074f772eadbda1e1b3eecdc483f8033709b7"},
+ {file = "scipy-1.14.0-cp310-cp310-macosx_14_0_x86_64.whl", hash = "sha256:6a9c9a9b226d9a21e0a208bdb024c3982932e43811b62d202aaf1bb59af264b1"},
+ {file = "scipy-1.14.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:076c27284c768b84a45dcf2e914d4000aac537da74236a0d45d82c6fa4b7b3c0"},
+ {file = "scipy-1.14.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:42470ea0195336df319741e230626b6225a740fd9dce9642ca13e98f667047c0"},
+ {file = "scipy-1.14.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:176c6f0d0470a32f1b2efaf40c3d37a24876cebf447498a4cefb947a79c21e9d"},
+ {file = "scipy-1.14.0-cp310-cp310-win_amd64.whl", hash = "sha256:ad36af9626d27a4326c8e884917b7ec321d8a1841cd6dacc67d2a9e90c2f0359"},
+ {file = "scipy-1.14.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:6d056a8709ccda6cf36cdd2eac597d13bc03dba38360f418560a93050c76a16e"},
+ {file = "scipy-1.14.0-cp311-cp311-macosx_12_0_arm64.whl", hash = "sha256:f0a50da861a7ec4573b7c716b2ebdcdf142b66b756a0d392c236ae568b3a93fb"},
+ {file = "scipy-1.14.0-cp311-cp311-macosx_14_0_arm64.whl", hash = "sha256:94c164a9e2498e68308e6e148646e486d979f7fcdb8b4cf34b5441894bdb9caf"},
+ {file = "scipy-1.14.0-cp311-cp311-macosx_14_0_x86_64.whl", hash = "sha256:a7d46c3e0aea5c064e734c3eac5cf9eb1f8c4ceee756262f2c7327c4c2691c86"},
+ {file = "scipy-1.14.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9eee2989868e274aae26125345584254d97c56194c072ed96cb433f32f692ed8"},
+ {file = "scipy-1.14.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9e3154691b9f7ed73778d746da2df67a19d046a6c8087c8b385bc4cdb2cfca74"},
+ {file = "scipy-1.14.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:c40003d880f39c11c1edbae8144e3813904b10514cd3d3d00c277ae996488cdb"},
+ {file = "scipy-1.14.0-cp311-cp311-win_amd64.whl", hash = "sha256:5b083c8940028bb7e0b4172acafda6df762da1927b9091f9611b0bcd8676f2bc"},
+ {file = "scipy-1.14.0-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:bff2438ea1330e06e53c424893ec0072640dac00f29c6a43a575cbae4c99b2b9"},
+ {file = "scipy-1.14.0-cp312-cp312-macosx_12_0_arm64.whl", hash = "sha256:bbc0471b5f22c11c389075d091d3885693fd3f5e9a54ce051b46308bc787e5d4"},
+ {file = "scipy-1.14.0-cp312-cp312-macosx_14_0_arm64.whl", hash = "sha256:64b2ff514a98cf2bb734a9f90d32dc89dc6ad4a4a36a312cd0d6327170339eb0"},
+ {file = "scipy-1.14.0-cp312-cp312-macosx_14_0_x86_64.whl", hash = "sha256:7d3da42fbbbb860211a811782504f38ae7aaec9de8764a9bef6b262de7a2b50f"},
+ {file = "scipy-1.14.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d91db2c41dd6c20646af280355d41dfa1ec7eead235642178bd57635a3f82209"},
+ {file = "scipy-1.14.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a01cc03bcdc777c9da3cfdcc74b5a75caffb48a6c39c8450a9a05f82c4250a14"},
+ {file = "scipy-1.14.0-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:65df4da3c12a2bb9ad52b86b4dcf46813e869afb006e58be0f516bc370165159"},
+ {file = "scipy-1.14.0-cp312-cp312-win_amd64.whl", hash = "sha256:4c4161597c75043f7154238ef419c29a64ac4a7c889d588ea77690ac4d0d9b20"},
+ {file = "scipy-1.14.0.tar.gz", hash = "sha256:b5923f48cb840380f9854339176ef21763118a7300a88203ccd0bdd26e58527b"},
]
[package.dependencies]
-numpy = ">=1.22.4,<2.3"
+numpy = ">=1.23.5,<2.3"
[package.extras]
-dev = ["cython-lint (>=0.12.2)", "doit (>=0.36.0)", "mypy", "pycodestyle", "pydevtool", "rich-click", "ruff", "types-psutil", "typing_extensions"]
-doc = ["jupyterlite-pyodide-kernel", "jupyterlite-sphinx (>=0.12.0)", "jupytext", "matplotlib (>=3.5)", "myst-nb", "numpydoc", "pooch", "pydata-sphinx-theme (>=0.15.2)", "sphinx (>=5.0.0)", "sphinx-design (>=0.4.0)"]
-test = ["array-api-strict", "asv", "gmpy2", "hypothesis (>=6.30)", "mpmath", "pooch", "pytest", "pytest-cov", "pytest-timeout", "pytest-xdist", "scikit-umfpack", "threadpoolctl"]
+dev = ["cython-lint (>=0.12.2)", "doit (>=0.36.0)", "mypy (==1.10.0)", "pycodestyle", "pydevtool", "rich-click", "ruff (>=0.0.292)", "types-psutil", "typing_extensions"]
+doc = ["jupyterlite-pyodide-kernel", "jupyterlite-sphinx (>=0.13.1)", "jupytext", "matplotlib (>=3.5)", "myst-nb", "numpydoc", "pooch", "pydata-sphinx-theme (>=0.15.2)", "sphinx (>=5.0.0)", "sphinx-design (>=0.4.0)"]
+test = ["Cython", "array-api-strict", "asv", "gmpy2", "hypothesis (>=6.30)", "meson", "mpmath", "ninja", "pooch", "pytest", "pytest-cov", "pytest-timeout", "pytest-xdist", "scikit-umfpack", "threadpoolctl"]
[[package]]
name = "setuptools"
-version = "70.0.0"
+version = "70.3.0"
description = "Easily download, build, install, upgrade, and uninstall Python packages"
optional = false
python-versions = ">=3.8"
files = [
- {file = "setuptools-70.0.0-py3-none-any.whl", hash = "sha256:54faa7f2e8d2d11bcd2c07bed282eef1046b5c080d1c32add737d7b5817b1ad4"},
- {file = "setuptools-70.0.0.tar.gz", hash = "sha256:f211a66637b8fa059bb28183da127d4e86396c991a942b028c6650d4319c3fd0"},
+ {file = "setuptools-70.3.0-py3-none-any.whl", hash = "sha256:fe384da74336c398e0d956d1cae0669bc02eed936cdb1d49b57de1990dc11ffc"},
+ {file = "setuptools-70.3.0.tar.gz", hash = "sha256:f171bab1dfbc86b132997f26a119f6056a57950d058587841a0082e8830f9dc5"},
]
[package.extras]
-docs = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "pygments-github-lexers (==0.0.5)", "pyproject-hooks (!=1.1)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-favicon", "sphinx-inline-tabs", "sphinx-lint", "sphinx-notfound-page (>=1,<2)", "sphinx-reredirects", "sphinxcontrib-towncrier"]
-testing = ["build[virtualenv] (>=1.0.3)", "filelock (>=3.4.0)", "importlib-metadata", "ini2toml[lite] (>=0.14)", "jaraco.develop (>=7.21)", "jaraco.envs (>=2.2)", "jaraco.path (>=3.2.0)", "mypy (==1.9)", "packaging (>=23.2)", "pip (>=19.1)", "pyproject-hooks (!=1.1)", "pytest (>=6,!=8.1.1)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=2.2)", "pytest-home (>=0.5)", "pytest-mypy", "pytest-perf", "pytest-ruff (>=0.2.1)", "pytest-subprocess", "pytest-timeout", "pytest-xdist (>=3)", "tomli", "tomli-w (>=1.0.0)", "virtualenv (>=13.0.0)", "wheel"]
+doc = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "pygments-github-lexers (==0.0.5)", "pyproject-hooks (!=1.1)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-favicon", "sphinx-inline-tabs", "sphinx-lint", "sphinx-notfound-page (>=1,<2)", "sphinx-reredirects", "sphinxcontrib-towncrier"]
+test = ["build[virtualenv] (>=1.0.3)", "filelock (>=3.4.0)", "importlib-metadata", "ini2toml[lite] (>=0.14)", "jaraco.develop (>=7.21)", "jaraco.envs (>=2.2)", "jaraco.path (>=3.2.0)", "jaraco.test", "mypy (==1.10.0)", "packaging (>=23.2)", "pip (>=19.1)", "pyproject-hooks (!=1.1)", "pytest (>=6,!=8.1.*)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=2.2)", "pytest-home (>=0.5)", "pytest-mypy", "pytest-perf", "pytest-ruff (>=0.3.2)", "pytest-subprocess", "pytest-timeout", "pytest-xdist (>=3)", "tomli", "tomli-w (>=1.0.0)", "virtualenv (>=13.0.0)", "wheel"]
[[package]]
name = "sortedcontainers"
@@ -967,17 +980,20 @@ files = [
[[package]]
name = "sympy"
-version = "1.12.1"
+version = "1.13.0"
description = "Computer algebra system (CAS) in Python"
optional = false
python-versions = ">=3.8"
files = [
- {file = "sympy-1.12.1-py3-none-any.whl", hash = "sha256:9b2cbc7f1a640289430e13d2a56f02f867a1da0190f2f99d8968c2f74da0e515"},
- {file = "sympy-1.12.1.tar.gz", hash = "sha256:2877b03f998cd8c08f07cd0de5b767119cd3ef40d09f41c30d722f6686b0fb88"},
+ {file = "sympy-1.13.0-py3-none-any.whl", hash = "sha256:6b0b32a4673fb91bd3cac3b55406c8e01d53ae22780be467301cc452f6680c92"},
+ {file = "sympy-1.13.0.tar.gz", hash = "sha256:3b6af8f4d008b9a1a6a4268b335b984b23835f26d1d60b0526ebc71d48a25f57"},
]
[package.dependencies]
-mpmath = ">=1.1.0,<1.4.0"
+mpmath = ">=1.1.0,<1.4"
+
+[package.extras]
+dev = ["hypothesis (>=6.70.0)", "pytest (>=7.1.0)"]
[[package]]
name = "tomli"
@@ -1014,13 +1030,13 @@ files = [
[[package]]
name = "virtualenv"
-version = "20.26.2"
+version = "20.26.3"
description = "Virtual Python Environment builder"
optional = false
python-versions = ">=3.7"
files = [
- {file = "virtualenv-20.26.2-py3-none-any.whl", hash = "sha256:a624db5e94f01ad993d476b9ee5346fdf7b9de43ccaee0e0197012dc838a0e9b"},
- {file = "virtualenv-20.26.2.tar.gz", hash = "sha256:82bf0f4eebbb78d36ddaee0283d43fe5736b53880b8a8cdcd37390a07ac3741c"},
+ {file = "virtualenv-20.26.3-py3-none-any.whl", hash = "sha256:8cc4a31139e796e9a7de2cd5cf2489de1217193116a8fd42328f1bd65f434589"},
+ {file = "virtualenv-20.26.3.tar.gz", hash = "sha256:4c43a2a236279d9ea36a0d76f98d84bd6ca94ac4e0f4a3b9d46d05e10fea542a"},
]
[package.dependencies]
@@ -1035,4 +1051,4 @@ test = ["covdefaults (>=2.3)", "coverage (>=7.2.7)", "coverage-enable-subprocess
[metadata]
lock-version = "2.0"
python-versions = "^3.10"
-content-hash = "94d67d8e3edd37a0758c43e1ac18ff5099adb91672a1c0099f8b963b4fc61fe7"
+content-hash = "b053589f0c76dcd5acea899a498f7c9d31eebed1b094370e5585b29fb375bdc9"
diff --git a/pyproject.toml b/pyproject.toml
index 612b76b4..b0eb6673 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -26,6 +26,7 @@ packages = [{ include = "tket2-py" }]
[tool.poetry.dependencies]
python = "^3.10"
pytket = "1.29.2"
+hugr = "^0.4.0"
[tool.poetry.group.dev.dependencies]
maturin = "^1.7.0"
@@ -36,7 +37,7 @@ mypy = "^1.10.1"
hypothesis = "^6.105.1"
graphviz = "^0.20"
pre-commit = "^3.7.1"
-guppylang = "^0.6.0"
+guppylang = "^0.6.2"
[build-system]
requires = ["maturin~=1.5.1"]
diff --git a/tket2-py/examples/1-Getting-Started.ipynb b/tket2-py/examples/1-Getting-Started.ipynb
index 16ace287..93ecb8f0 100644
--- a/tket2-py/examples/1-Getting-Started.ipynb
+++ b/tket2-py/examples/1-Getting-Started.ipynb
@@ -91,8 +91,8 @@
"\n",
"### Using the commands-based builder\n",
"\n",
- "The simplest way is to use the commands-based builder interface `CircuitBuild`.\n",
- "It supports constructing pure circuits by listing a series of commands applied to specific qubits."
+ "The simplest way is to use the commands-based builder interface `CircBuild`.\n",
+ "It supports constructing circuits by listing a series of commands applied to specific qubits."
]
},
{
@@ -109,12 +109,12 @@
" subgraph 0 [\"(0) DFG\"]\n",
" direction LR\n",
" 1[\"(1) Input\"]\n",
- " 1--\"0:0
qubit\"-->3\n",
- " 1--\"1:1
qubit\"-->4\n",
" 2[\"(2) Output\"]\n",
" 3[\"(3) quantum.tket2.H\"]\n",
- " 3--\"0:0
qubit\"-->4\n",
" 4[\"(4) quantum.tket2.CX\"]\n",
+ " 1--\"0:0
qubit\"-->3\n",
+ " 1--\"1:1
qubit\"-->4\n",
+ " 3--\"0:0
qubit\"-->4\n",
" 4--\"0:0
qubit\"-->2\n",
" 4--\"1:1
qubit\"-->2\n",
" end\n",
@@ -122,7 +122,7 @@
"```"
],
"text/plain": [
- ""
+ ""
]
},
"execution_count": 4,
@@ -133,9 +133,10 @@
"source": [
"from tket2.circuit.build import CircBuild, H, CX\n",
"\n",
- "builder = CircBuild(n_qb=2)\n",
+ "builder = CircBuild.with_nqb(2)\n",
"\n",
- "builder.extend([ H(0), CX(0, 1)])\n",
+ "builder.extend(H(0), CX(0, 1))\n",
+ "builder.set_tracked_outputs()\n",
"circ = builder.finish()\n",
"circ"
]
@@ -147,7 +148,7 @@
"source": [
"### Using the Dataflow Builder\n",
"\n",
- "The Dataflow Builder is more flexible than `CircBuild`. It lets you connect arbitrary inputs and outputs to each operation.\n",
+ "`CircBuild` can also be used to build arbitrary dataflow graphs. It lets you connect arbitrary inputs and outputs to each operation.\n",
"This way, you can define circuits that read the same boolean multiple times, or allocate qubits dynamically."
]
},
@@ -165,29 +166,29 @@
" subgraph 0 [\"(0) DFG\"]\n",
" direction LR\n",
" 1[\"(1) Input\"]\n",
- " 1--\"0:0
qubit\"-->4\n",
" 2[\"(2) Output\"]\n",
" 3[\"(3) quantum.tket2.QAlloc\"]\n",
- " 3--\"0:1
qubit\"-->5\n",
" 4[\"(4) quantum.tket2.H\"]\n",
- " 4--\"0:0
qubit\"-->5\n",
" 5[\"(5) quantum.tket2.CX\"]\n",
+ " 6[\"(6) quantum.tket2.Measure\"]\n",
+ " 7[\"(7) quantum.tket2.Measure\"]\n",
+ " 8[\"(8) quantum.tket2.QFree\"]\n",
+ " 9[\"(9) quantum.tket2.QFree\"]\n",
+ " 1--\"0:0
qubit\"-->4\n",
+ " 3--\"0:1
qubit\"-->5\n",
+ " 4--\"0:0
qubit\"-->5\n",
" 5--\"0:0
qubit\"-->6\n",
" 5--\"1:0
qubit\"-->7\n",
- " 6[\"(6) quantum.tket2.Measure\"]\n",
" 6--\"0:0
qubit\"-->8\n",
" 6--\"1:0
[]+[]\"-->2\n",
- " 7[\"(7) quantum.tket2.Measure\"]\n",
" 7--\"0:0
qubit\"-->9\n",
" 7--\"1:1
[]+[]\"-->2\n",
- " 8[\"(8) quantum.tket2.QFree\"]\n",
- " 9[\"(9) quantum.tket2.QFree\"]\n",
" end\n",
"\n",
"```"
],
"text/plain": [
- ""
+ ""
]
},
"execution_count": 5,
@@ -196,33 +197,34 @@
}
],
"source": [
- "from tket2.circuit.build import Dfg, QB_T, BOOL_T\n",
- "from tket2.ops import Tk2Op\n",
+ "from tket2.circuit.build import CircBuild, QAlloc, H, CX, Measure, QFree\n",
+ "\n",
"\n",
- "# Start building DFG with one qubit input and two boolean outputs\n",
- "builder = Dfg(input_types=[QB_T], output_types=[BOOL_T, BOOL_T])\n",
+ "# Start building DFG with one qubit input\n",
+ "builder = CircBuild.with_nqb(1)\n",
"\n",
"# Qubits and booleans are identified by their \"Wires\" in the graph.\n",
"# We can get the wire for the single input qubit.\n",
"[q0] = builder.inputs()\n",
"\n",
- "# And allocate a new qubit\n",
- "[q1] = builder.add_op(Tk2Op.QAlloc, []).outs(1)\n",
+ "# And allocate a new qubit, indexing the `Node` output gets the outgoing \"Wire\".\n",
+ "q1 = builder.add(QAlloc())[0]\n",
"\n",
"# Each operation returns the new wires it creates.\n",
- "[q0] = builder.add_op(Tk2Op.H, [q0]).outs(1)\n",
- "q0, q1 = builder.add_op(Tk2Op.CX, [q0, q1]).outs(2)\n",
+ "q0 = builder.add(H(q0))[0]\n",
+ "q0, q1 = builder.add(CX(q0, q1))[0, 1]\n",
"\n",
"# Some operations may have different numbers of inputs and outputs.\n",
- "[q0, b0] = builder.add_op(Tk2Op.Measure, [q0]).outs(2)\n",
- "[q1, b1] = builder.add_op(Tk2Op.Measure, [q1]).outs(2)\n",
+ "[q0, b0] = builder.add(Measure(q0))[0, 1]\n",
+ "[q1, b1] = builder.add(Measure(q1))[0, 1]\n",
"\n",
"# And some may have no outputs at all.\n",
- "builder.add_op(Tk2Op.QFree, [q0])\n",
- "builder.add_op(Tk2Op.QFree, [q1])\n",
+ "builder.add(QFree(q0))\n",
+ "builder.add(QFree(q1))\n",
"\n",
- "# To get the final circuit, we need to call finish() with the desired output wires.\n",
- "circ = builder.finish([b0, b1])\n",
+ "# To get the final circuit, we need to set the outputs then call finish().\n",
+ "builder.set_outputs(b0, b1)\n",
+ "circ = builder.finish()\n",
"\n",
"circ"
]
@@ -247,20 +249,24 @@
"name": "stdout",
"output_type": "stream",
"text": [
- "Requirement already satisfied: pytket in /Users/agustinborgna/src/tket2/.venv/lib/python3.12/site-packages (1.29.0)\n",
- "Requirement already satisfied: sympy~=1.6 in /Users/agustinborgna/src/tket2/.venv/lib/python3.12/site-packages (from pytket) (1.12.1)\n",
- "Requirement already satisfied: numpy<2.0,>=1.21.4 in /Users/agustinborgna/src/tket2/.venv/lib/python3.12/site-packages (from pytket) (1.26.4)\n",
- "Requirement already satisfied: lark~=1.1 in /Users/agustinborgna/src/tket2/.venv/lib/python3.12/site-packages (from pytket) (1.1.9)\n",
- "Requirement already satisfied: scipy~=1.13 in /Users/agustinborgna/src/tket2/.venv/lib/python3.12/site-packages (from pytket) (1.13.1)\n",
- "Requirement already satisfied: networkx>=2.8.8 in /Users/agustinborgna/src/tket2/.venv/lib/python3.12/site-packages (from pytket) (3.3)\n",
- "Requirement already satisfied: graphviz~=0.14 in /Users/agustinborgna/src/tket2/.venv/lib/python3.12/site-packages (from pytket) (0.20.3)\n",
- "Requirement already satisfied: jinja2~=3.0 in /Users/agustinborgna/src/tket2/.venv/lib/python3.12/site-packages (from pytket) (3.1.4)\n",
- "Requirement already satisfied: types-pkg-resources in /Users/agustinborgna/src/tket2/.venv/lib/python3.12/site-packages (from pytket) (0.1.3)\n",
- "Requirement already satisfied: typing-extensions~=4.2 in /Users/agustinborgna/src/tket2/.venv/lib/python3.12/site-packages (from pytket) (4.12.2)\n",
- "Requirement already satisfied: qwasm~=1.0 in /Users/agustinborgna/src/tket2/.venv/lib/python3.12/site-packages (from pytket) (1.0.1)\n",
- "Requirement already satisfied: MarkupSafe>=2.0 in /Users/agustinborgna/src/tket2/.venv/lib/python3.12/site-packages (from jinja2~=3.0->pytket) (2.1.5)\n",
- "Requirement already satisfied: setuptools in /Users/agustinborgna/src/tket2/.venv/lib/python3.12/site-packages (from qwasm~=1.0->pytket) (70.0.0)\n",
- "Requirement already satisfied: mpmath<1.4.0,>=1.1.0 in /Users/agustinborgna/src/tket2/.venv/lib/python3.12/site-packages (from sympy~=1.6->pytket) (1.3.0)\n",
+ "Looking in indexes: https://pypi.org/simple, https://cqcpythonrepository.azurewebsites.net/simple/\n",
+ "Requirement already satisfied: pytket in /Users/seyon/ng/tket2proto/.venv/lib/python3.11/site-packages (1.29.2)\n",
+ "Requirement already satisfied: sympy~=1.6 in /Users/seyon/ng/tket2proto/.venv/lib/python3.11/site-packages (from pytket) (1.13.0)\n",
+ "Requirement already satisfied: numpy<2.0,>=1.21.4 in /Users/seyon/ng/tket2proto/.venv/lib/python3.11/site-packages (from pytket) (1.26.4)\n",
+ "Requirement already satisfied: lark~=1.1 in /Users/seyon/ng/tket2proto/.venv/lib/python3.11/site-packages (from pytket) (1.1.9)\n",
+ "Requirement already satisfied: scipy~=1.13 in /Users/seyon/ng/tket2proto/.venv/lib/python3.11/site-packages (from pytket) (1.14.0)\n",
+ "Requirement already satisfied: networkx>=2.8.8 in /Users/seyon/ng/tket2proto/.venv/lib/python3.11/site-packages (from pytket) (3.3)\n",
+ "Requirement already satisfied: graphviz~=0.14 in /Users/seyon/ng/tket2proto/.venv/lib/python3.11/site-packages (from pytket) (0.20.3)\n",
+ "Requirement already satisfied: jinja2~=3.0 in /Users/seyon/ng/tket2proto/.venv/lib/python3.11/site-packages (from pytket) (3.1.4)\n",
+ "Requirement already satisfied: types-pkg-resources in /Users/seyon/ng/tket2proto/.venv/lib/python3.11/site-packages (from pytket) (0.1.3)\n",
+ "Requirement already satisfied: typing-extensions~=4.2 in /Users/seyon/ng/tket2proto/.venv/lib/python3.11/site-packages (from pytket) (4.12.2)\n",
+ "Requirement already satisfied: qwasm~=1.0 in /Users/seyon/ng/tket2proto/.venv/lib/python3.11/site-packages (from pytket) (1.0.1)\n",
+ "Requirement already satisfied: MarkupSafe>=2.0 in /Users/seyon/ng/tket2proto/.venv/lib/python3.11/site-packages (from jinja2~=3.0->pytket) (2.1.5)\n",
+ "Requirement already satisfied: setuptools in /Users/seyon/ng/tket2proto/.venv/lib/python3.11/site-packages (from qwasm~=1.0->pytket) (70.3.0)\n",
+ "Requirement already satisfied: mpmath<1.4,>=1.1.0 in /Users/seyon/ng/tket2proto/.venv/lib/python3.11/site-packages (from sympy~=1.6->pytket) (1.3.0)\n",
+ "\n",
+ "\u001b[1m[\u001b[0m\u001b[34;49mnotice\u001b[0m\u001b[1;39;49m]\u001b[0m\u001b[39;49m A new release of pip is available: \u001b[0m\u001b[31;49m23.3.1\u001b[0m\u001b[39;49m -> \u001b[0m\u001b[32;49m24.1.2\u001b[0m\n",
+ "\u001b[1m[\u001b[0m\u001b[34;49mnotice\u001b[0m\u001b[1;39;49m]\u001b[0m\u001b[39;49m To update, run: \u001b[0m\u001b[32;49mpip install --upgrade pip\u001b[0m\n",
"Note: you may need to restart the kernel to use updated packages.\n"
]
}
@@ -303,7 +309,7 @@
"\n",
"\n",
"\n",
- " <div id="circuit-display-vue-container-9e8190d4-f20a-4c18-95cc-946747a661a5" class="pytket-circuit-display-container">\n",
+ " <div id="circuit-display-vue-container-82bb2fe8-b3bd-4877-b794-00b36aacf879" class="pytket-circuit-display-container">\n",
" <div style="display: none">\n",
" <div id="circuit-json-to-display">{"bits": [], "commands": [{"args": [["q", [0]]], "op": {"type": "H"}}, {"args": [["q", [0]], ["q", [1]]], "op": {"type": "CX"}}], "created_qubits": [], "discarded_qubits": [], "implicit_permutation": [[["q", [0]], ["q", [0]]], [["q", [1]], ["q", [1]]]], "phase": "0.0", "qubits": [["q", [0]], ["q", [1]]]}</div>\n",
" </div>\n",
@@ -313,7 +319,7 @@
" ></circuit-display-container>\n",
" </div>\n",
" <script type="application/javascript">\n",
- " const circuitRendererUid = "9e8190d4-f20a-4c18-95cc-946747a661a5";\n",
+ " const circuitRendererUid = "82bb2fe8-b3bd-4877-b794-00b36aacf879";\n",
" const displayOptions = JSON.parse('{}');\n",
"\n",
" // Script to initialise the circuit renderer app\n",
@@ -364,12 +370,12 @@
" subgraph 0 [\"(0) FuncDefn\"]\n",
" direction LR\n",
" 1[\"(1) Input\"]\n",
- " 1--\"0:0
qubit\"-->3\n",
- " 1--\"1:1
qubit\"-->4\n",
" 2[\"(2) Output\"]\n",
" 3[\"(3) quantum.tket2.H\"]\n",
- " 3--\"0:0
qubit\"-->4\n",
" 4[\"(4) quantum.tket2.CX\"]\n",
+ " 1--\"0:0
qubit\"-->3\n",
+ " 1--\"1:1
qubit\"-->4\n",
+ " 3--\"0:0
qubit\"-->4\n",
" 4--\"0:0
qubit\"-->2\n",
" 4--\"1:1
qubit\"-->2\n",
" end\n",
@@ -377,7 +383,7 @@
"```"
],
"text/plain": [
- ""
+ ""
]
},
"execution_count": 7,
@@ -405,7 +411,7 @@
},
{
"cell_type": "code",
- "execution_count": 8,
+ "execution_count": 10,
"id": "975dbe01",
"metadata": {},
"outputs": [
@@ -413,14 +419,18 @@
"name": "stdout",
"output_type": "stream",
"text": [
- "Requirement already satisfied: guppylang in /Users/agustinborgna/src/tket2/.venv/lib/python3.12/site-packages (0.5.2)\n",
- "Requirement already satisfied: graphviz<0.21.0,>=0.20.1 in /Users/agustinborgna/src/tket2/.venv/lib/python3.12/site-packages (from guppylang) (0.20.3)\n",
- "Requirement already satisfied: hugr<0.3.0,>=0.2.1 in /Users/agustinborgna/src/tket2/.venv/lib/python3.12/site-packages (from guppylang) (0.2.1)\n",
- "Requirement already satisfied: networkx<4.0.0,>=3.2.1 in /Users/agustinborgna/src/tket2/.venv/lib/python3.12/site-packages (from guppylang) (3.3)\n",
- "Requirement already satisfied: pydantic<3.0.0,>=2.7.0b1 in /Users/agustinborgna/src/tket2/.venv/lib/python3.12/site-packages (from guppylang) (2.7.3)\n",
- "Requirement already satisfied: typing-extensions<5.0.0,>=4.9.0 in /Users/agustinborgna/src/tket2/.venv/lib/python3.12/site-packages (from guppylang) (4.12.2)\n",
- "Requirement already satisfied: annotated-types>=0.4.0 in /Users/agustinborgna/src/tket2/.venv/lib/python3.12/site-packages (from pydantic<3.0.0,>=2.7.0b1->guppylang) (0.7.0)\n",
- "Requirement already satisfied: pydantic-core==2.18.4 in /Users/agustinborgna/src/tket2/.venv/lib/python3.12/site-packages (from pydantic<3.0.0,>=2.7.0b1->guppylang) (2.18.4)\n",
+ "Looking in indexes: https://pypi.org/simple, https://cqcpythonrepository.azurewebsites.net/simple/\n",
+ "Requirement already satisfied: guppylang in /Users/seyon/ng/tket2proto/.venv/lib/python3.11/site-packages (0.6.0)\n",
+ "Requirement already satisfied: graphviz<0.21.0,>=0.20.1 in /Users/seyon/ng/tket2proto/.venv/lib/python3.11/site-packages (from guppylang) (0.20.3)\n",
+ "Requirement already satisfied: hugr<0.4.0,>=0.3.0 in /Users/seyon/ng/tket2proto/.venv/lib/python3.11/site-packages (from guppylang) (0.3.1)\n",
+ "Requirement already satisfied: networkx<4.0.0,>=3.2.1 in /Users/seyon/ng/tket2proto/.venv/lib/python3.11/site-packages (from guppylang) (3.3)\n",
+ "Requirement already satisfied: pydantic<3.0.0,>=2.7.0b1 in /Users/seyon/ng/tket2proto/.venv/lib/python3.11/site-packages (from guppylang) (2.8.2)\n",
+ "Requirement already satisfied: typing-extensions<5.0.0,>=4.9.0 in /Users/seyon/ng/tket2proto/.venv/lib/python3.11/site-packages (from guppylang) (4.12.2)\n",
+ "Requirement already satisfied: annotated-types>=0.4.0 in /Users/seyon/ng/tket2proto/.venv/lib/python3.11/site-packages (from pydantic<3.0.0,>=2.7.0b1->guppylang) (0.7.0)\n",
+ "Requirement already satisfied: pydantic-core==2.20.1 in /Users/seyon/ng/tket2proto/.venv/lib/python3.11/site-packages (from pydantic<3.0.0,>=2.7.0b1->guppylang) (2.20.1)\n",
+ "\n",
+ "\u001b[1m[\u001b[0m\u001b[34;49mnotice\u001b[0m\u001b[1;39;49m]\u001b[0m\u001b[39;49m A new release of pip is available: \u001b[0m\u001b[31;49m23.3.1\u001b[0m\u001b[39;49m -> \u001b[0m\u001b[32;49m24.1.2\u001b[0m\n",
+ "\u001b[1m[\u001b[0m\u001b[34;49mnotice\u001b[0m\u001b[1;39;49m]\u001b[0m\u001b[39;49m To update, run: \u001b[0m\u001b[32;49mpip install --upgrade pip\u001b[0m\n",
"Note: you may need to restart the kernel to use updated packages.\n"
]
}
@@ -441,7 +451,7 @@
},
{
"cell_type": "code",
- "execution_count": 9,
+ "execution_count": 11,
"id": "96065d20",
"metadata": {},
"outputs": [
@@ -453,60 +463,60 @@
" subgraph 1 [\"(1) DFG\"]\n",
" direction LR\n",
" 2[\"(2) Input\"]\n",
- " 2--\"0:0
qubit\"-->8\n",
- " 2--\"1:0
qubit\"-->16\n",
" 27[\"(27) Output\"]\n",
" 4[\"(4) const:custom:f64(1.5707963267948966)\"]\n",
- " 4--\"0:0
float64\"-->5\n",
" 5[\"(5) LoadConstant\"]\n",
- " 5--\"0:1
float64\"-->8\n",
" 6[\"(6) const:custom:f64(-1.5707963267948966)\"]\n",
- " 6--\"0:0
float64\"-->7\n",
" 7[\"(7) LoadConstant\"]\n",
- " 7--\"0:2
float64\"-->8\n",
" 8[\"(8) quantum.tket2.PhasedX\"]\n",
- " 8--\"0:0
qubit\"-->11\n",
" 9[\"(9) const:custom:f64(3.141592653589793)\"]\n",
- " 9--\"0:0
float64\"-->10\n",
" 10[\"(10) LoadConstant\"]\n",
- " 10--\"0:1
float64\"-->11\n",
" 11[\"(11) quantum.tket2.RzF64\"]\n",
- " 11--\"0:0
qubit\"-->20\n",
" 12[\"(12) const:custom:f64(1.5707963267948966)\"]\n",
- " 12--\"0:0
float64\"-->13\n",
" 13[\"(13) LoadConstant\"]\n",
- " 13--\"0:1
float64\"-->16\n",
" 14[\"(14) const:custom:f64(-1.5707963267948966)\"]\n",
- " 14--\"0:0
float64\"-->15\n",
" 15[\"(15) LoadConstant\"]\n",
- " 15--\"0:2
float64\"-->16\n",
" 16[\"(16) quantum.tket2.PhasedX\"]\n",
- " 16--\"0:0
qubit\"-->19\n",
" 17[\"(17) const:custom:f64(3.141592653589793)\"]\n",
- " 17--\"0:0
float64\"-->18\n",
" 18[\"(18) LoadConstant\"]\n",
- " 18--\"0:1
float64\"-->19\n",
" 19[\"(19) quantum.tket2.RzF64\"]\n",
- " 19--\"0:1
qubit\"-->20\n",
" 20[\"(20) quantum.tket2.ZZMax\"]\n",
- " 20--\"0:0
qubit\"-->23\n",
- " 20--\"1:0
qubit\"-->25\n",
" 23[\"(23) quantum.tket2.Measure\"]\n",
- " 23--\"0:0
qubit\"-->24\n",
" 24[\"(24) quantum.tket2.QFree\"]\n",
" 25[\"(25) quantum.tket2.Measure\"]\n",
+ " 26[\"(26) quantum.tket2.QFree\"]\n",
+ " 2--\"0:0
qubit\"-->8\n",
+ " 2--\"1:0
qubit\"-->16\n",
+ " 4--\"0:0
float64\"-->5\n",
+ " 5--\"0:1
float64\"-->8\n",
+ " 6--\"0:0
float64\"-->7\n",
+ " 7--\"0:2
float64\"-->8\n",
+ " 8--\"0:0
qubit\"-->11\n",
+ " 9--\"0:0
float64\"-->10\n",
+ " 10--\"0:1
float64\"-->11\n",
+ " 11--\"0:0
qubit\"-->20\n",
+ " 12--\"0:0
float64\"-->13\n",
+ " 13--\"0:1
float64\"-->16\n",
+ " 14--\"0:0
float64\"-->15\n",
+ " 15--\"0:2
float64\"-->16\n",
+ " 16--\"0:0
qubit\"-->19\n",
+ " 17--\"0:0
float64\"-->18\n",
+ " 18--\"0:1
float64\"-->19\n",
+ " 19--\"0:1
qubit\"-->20\n",
+ " 20--\"0:0
qubit\"-->23\n",
+ " 20--\"1:0
qubit\"-->25\n",
+ " 23--\"0:0
qubit\"-->24\n",
" 25--\"0:0
qubit\"-->26\n",
" 25--\"1:0
[]+[]\"-->27\n",
- " 26[\"(26) quantum.tket2.QFree\"]\n",
" end\n",
"\n",
"```"
],
"text/plain": [
- ""
+ ""
]
},
- "execution_count": 9,
+ "execution_count": 11,
"metadata": {},
"output_type": "execute_result"
}
@@ -661,7 +671,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
- "version": "3.12.3"
+ "version": "3.11.8"
}
},
"nbformat": 4,
diff --git a/tket2-py/examples/2-Rewriting-Circuits.ipynb b/tket2-py/examples/2-Rewriting-Circuits.ipynb
index 57fe279c..89cf7a78 100644
--- a/tket2-py/examples/2-Rewriting-Circuits.ipynb
+++ b/tket2-py/examples/2-Rewriting-Circuits.ipynb
@@ -11,7 +11,7 @@
},
{
"cell_type": "code",
- "execution_count": 1,
+ "execution_count": 4,
"metadata": {},
"outputs": [],
"source": [
@@ -19,9 +19,9 @@
"import copy\n",
"\n",
"from tket2.circuit import Tk2Circuit\n",
- "from tket2.circuit.build import CircBuild, H, from_coms, CX, PauliX, PauliY, PauliZ\n",
+ "from tket2.circuit.build import H, from_coms, CX, PauliX, PauliY, PauliZ, id_circ\n",
"from tket2.pattern import Rule, RuleMatcher\n",
- "\n",
+ " \n",
"from pytket import Circuit as Tk1Circuit\n",
"from pytket.circuit.display import render_circuit_jupyter\n",
"\n",
@@ -126,7 +126,7 @@
"\n",
"\n",
"\n",
- " <div id="circuit-display-vue-container-b24b7593-f1bb-4c22-a2b3-45b29c909079" class="pytket-circuit-display-container">\n",
+ " <div id="circuit-display-vue-container-0197cd96-d6e5-43b1-9bab-ab2e7418f357" class="pytket-circuit-display-container">\n",
" <div style="display: none">\n",
" <div id="circuit-json-to-display">{"bits": [], "commands": [{"args": [["q", [1]], ["q", [2]]], "op": {"type": "CX"}}, {"args": [["q", [2]]], "op": {"params": ["0.25"], "type": "Rz"}}, {"args": [["q", [1]], ["q", [2]]], "op": {"type": "CX"}}, {"args": [["q", [0]], ["q", [1]]], "op": {"type": "CX"}}, {"args": [["q", [1]]], "op": {"params": ["0.5"], "type": "Rz"}}, {"args": [["q", [0]], ["q", [1]]], "op": {"type": "CX"}}], "created_qubits": [], "discarded_qubits": [], "implicit_permutation": [[["q", [0]], ["q", [0]]], [["q", [1]], ["q", [1]]], [["q", [2]], ["q", [2]]]], "phase": "0.0", "qubits": [["q", [0]], ["q", [1]], ["q", [2]]]}</div>\n",
" </div>\n",
@@ -136,7 +136,7 @@
" ></circuit-display-container>\n",
" </div>\n",
" <script type="application/javascript">\n",
- " const circuitRendererUid = "b24b7593-f1bb-4c22-a2b3-45b29c909079";\n",
+ " const circuitRendererUid = "0197cd96-d6e5-43b1-9bab-ab2e7418f357";\n",
" const displayOptions = JSON.parse('{}');\n",
"\n",
" // Script to initialise the circuit renderer app\n",
@@ -211,7 +211,7 @@
"\n",
"\n",
"\n",
- " <div id="circuit-display-vue-container-eefd1c4f-ae74-407c-93b0-58f83f563f56" class="pytket-circuit-display-container">\n",
+ " <div id="circuit-display-vue-container-218e3858-bc07-490d-9e85-504575ba4d33" class="pytket-circuit-display-container">\n",
" <div style="display: none">\n",
" <div id="circuit-json-to-display">{"bits": [], "commands": [{"args": [["q", [1]], ["q", [2]]], "op": {"params": ["0.25"], "type": "ZZPhase"}}, {"args": [["q", [0]], ["q", [1]]], "op": {"params": ["0.5"], "type": "ZZPhase"}}], "created_qubits": [], "discarded_qubits": [], "implicit_permutation": [[["q", [0]], ["q", [0]]], [["q", [1]], ["q", [1]]], [["q", [2]], ["q", [2]]]], "phase": "0.0", "qubits": [["q", [0]], ["q", [1]], ["q", [2]]]}</div>\n",
" </div>\n",
@@ -221,7 +221,7 @@
" ></circuit-display-container>\n",
" </div>\n",
" <script type="application/javascript">\n",
- " const circuitRendererUid = "eefd1c4f-ae74-407c-93b0-58f83f563f56";\n",
+ " const circuitRendererUid = "218e3858-bc07-490d-9e85-504575ba4d33";\n",
" const displayOptions = JSON.parse('{}');\n",
"\n",
" // Script to initialise the circuit renderer app\n",
@@ -289,7 +289,7 @@
},
{
"cell_type": "code",
- "execution_count": 4,
+ "execution_count": 5,
"metadata": {},
"outputs": [
{
@@ -324,7 +324,7 @@
"\n",
"\n",
"\n",
- " <div id="circuit-display-vue-container-2dc5f86f-0a1c-44bd-ba8c-c8df6db9e893" class="pytket-circuit-display-container">\n",
+ " <div id="circuit-display-vue-container-2c68e63a-7b61-4310-ad7c-6c082f581fe8" class="pytket-circuit-display-container">\n",
" <div style="display: none">\n",
" <div id="circuit-json-to-display">{"bits": [], "commands": [{"args": [["q", [0]]], "op": {"params": ["3.5"], "type": "Rx"}}, {"args": [["q", [1]], ["q", [2]]], "op": {"params": ["0.25"], "type": "ZZPhase"}}, {"args": [["q", [0]]], "op": {"params": ["1.5"], "type": "Rz"}}, {"args": [["q", [1]]], "op": {"params": ["0.5"], "type": "Rz"}}, {"args": [["q", [1]], ["q", [0]]], "op": {"type": "CX"}}, {"args": [["q", [0]]], "op": {"params": ["0.5"], "type": "Rz"}}, {"args": [["q", [0]]], "op": {"params": ["0.5"], "type": "Rx"}}, {"args": [["q", [0]]], "op": {"params": ["0.5"], "type": "Rz"}}], "created_qubits": [], "discarded_qubits": [], "implicit_permutation": [[["q", [0]], ["q", [0]]], [["q", [1]], ["q", [1]]], [["q", [2]], ["q", [2]]]], "phase": "0.0", "qubits": [["q", [0]], ["q", [1]], ["q", [2]]]}</div>\n",
" </div>\n",
@@ -334,7 +334,7 @@
" ></circuit-display-container>\n",
" </div>\n",
" <script type="application/javascript">\n",
- " const circuitRendererUid = "2dc5f86f-0a1c-44bd-ba8c-c8df6db9e893";\n",
+ " const circuitRendererUid = "2c68e63a-7b61-4310-ad7c-6c082f581fe8";\n",
" const displayOptions = JSON.parse('{}');\n",
"\n",
" // Script to initialise the circuit renderer app\n",
@@ -416,7 +416,7 @@
},
{
"cell_type": "code",
- "execution_count": 5,
+ "execution_count": 14,
"metadata": {},
"outputs": [],
"source": [
@@ -445,22 +445,19 @@
},
{
"cell_type": "code",
- "execution_count": 6,
+ "execution_count": 15,
"metadata": {},
"outputs": [],
"source": [
"def merge_rules() -> list[Rule]:\n",
" paulis = [PauliX(0), PauliY(0), PauliZ(0)]\n",
" identities = [\n",
- " Rule(CircBuild(1).extend((p, p)).finish(), CircBuild(1).finish())\n",
+ " Rule(from_coms(p, p), id_circ(1))\n",
" for p in paulis\n",
" ]\n",
"\n",
" off_diag = [\n",
- " Rule(\n",
- " CircBuild(1).extend((p0, p1)).finish(),\n",
- " CircBuild(1).extend((p2,)).finish(),\n",
- " )\n",
+ " Rule(from_coms(p0, p1), from_coms(p2))\n",
" for p0, p1, p2 in itertools.permutations(paulis)\n",
" ]\n",
" return [*identities, *off_diag]\n",
@@ -477,7 +474,7 @@
},
{
"cell_type": "code",
- "execution_count": 7,
+ "execution_count": 16,
"metadata": {},
"outputs": [],
"source": [
@@ -503,7 +500,7 @@
},
{
"cell_type": "code",
- "execution_count": 8,
+ "execution_count": 17,
"metadata": {},
"outputs": [
{
@@ -531,7 +528,7 @@
"\n",
"\n",
"\n",
- " <div id="circuit-display-vue-container-a49d2821-6c63-4c9b-b398-e84c6a41806e" class="pytket-circuit-display-container">\n",
+ " <div id="circuit-display-vue-container-3181cc0c-b28f-4f89-ad70-506d092ac8ef" class="pytket-circuit-display-container">\n",
" <div style="display: none">\n",
" <div id="circuit-json-to-display">{"bits": [], "commands": [{"args": [["q", [0]]], "op": {"type": "X"}}, {"args": [["q", [1]]], "op": {"type": "Z"}}, {"args": [["q", [0]]], "op": {"type": "H"}}, {"args": [["q", [0]], ["q", [1]]], "op": {"type": "CX"}}, {"args": [["q", [1]]], "op": {"type": "H"}}], "created_qubits": [], "discarded_qubits": [], "implicit_permutation": [[["q", [0]], ["q", [0]]], [["q", [1]], ["q", [1]]]], "phase": "0.0", "qubits": [["q", [0]], ["q", [1]]]}</div>\n",
" </div>\n",
@@ -541,7 +538,7 @@
" ></circuit-display-container>\n",
" </div>\n",
" <script type="application/javascript">\n",
- " const circuitRendererUid = "a49d2821-6c63-4c9b-b398-e84c6a41806e";\n",
+ " const circuitRendererUid = "3181cc0c-b28f-4f89-ad70-506d092ac8ef";\n",
" const displayOptions = JSON.parse('{}');\n",
"\n",
" // Script to initialise the circuit renderer app\n",
@@ -616,7 +613,7 @@
"\n",
"\n",
"\n",
- " <div id="circuit-display-vue-container-0c6d7f9b-fa32-4320-b0de-50594c4a98f1" class="pytket-circuit-display-container">\n",
+ " <div id="circuit-display-vue-container-4a69d49e-5837-40dc-b958-328c5ea50a86" class="pytket-circuit-display-container">\n",
" <div style="display: none">\n",
" <div id="circuit-json-to-display">{"bits": [], "commands": [{"args": [["q", [0]]], "op": {"type": "H"}}, {"args": [["q", [0]], ["q", [1]]], "op": {"type": "CX"}}, {"args": [["q", [1]]], "op": {"type": "H"}}, {"args": [["q", [1]]], "op": {"type": "X"}}], "created_qubits": [], "discarded_qubits": [], "implicit_permutation": [[["q", [0]], ["q", [0]]], [["q", [1]], ["q", [1]]]], "phase": "0.0", "qubits": [["q", [0]], ["q", [1]]]}</div>\n",
" </div>\n",
@@ -626,7 +623,7 @@
" ></circuit-display-container>\n",
" </div>\n",
" <script type="application/javascript">\n",
- " const circuitRendererUid = "0c6d7f9b-fa32-4320-b0de-50594c4a98f1";\n",
+ " const circuitRendererUid = "4a69d49e-5837-40dc-b958-328c5ea50a86";\n",
" const displayOptions = JSON.parse('{}');\n",
"\n",
" // Script to initialise the circuit renderer app\n",
@@ -671,7 +668,7 @@
}
],
"source": [
- "circ = CircBuild(2).extend([PauliX(0), PauliZ(1), H(0), CX(0, 1), H(1)]).finish()\n",
+ "circ = from_coms(PauliX(0), PauliZ(1), H(0), CX(0, 1), H(1))\n",
"render_circuit_jupyter(circ.to_tket1())\n",
"\n",
"matches = apply_exhaustive(circ, matcher)\n",
@@ -691,7 +688,7 @@
},
{
"cell_type": "code",
- "execution_count": 9,
+ "execution_count": 18,
"metadata": {},
"outputs": [
{
@@ -719,7 +716,7 @@
"\n",
"\n",
"\n",
- " <div id="circuit-display-vue-container-f2d1c055-e8ef-4c62-8626-ee1a3f59ec2c" class="pytket-circuit-display-container">\n",
+ " <div id="circuit-display-vue-container-60a4bd10-1e6f-42c4-91cf-9bc03e3b702b" class="pytket-circuit-display-container">\n",
" <div style="display: none">\n",
" <div id="circuit-json-to-display">{"bits": [], "commands": [{"args": [["q", [1]]], "op": {"type": "H"}}, {"args": [["q", [0]], ["q", [1]]], "op": {"type": "CZ"}}, {"args": [["q", [0]]], "op": {"type": "H"}}, {"args": [["q", [1]]], "op": {"type": "H"}}, {"args": [["q", [0]]], "op": {"type": "H"}}, {"args": [["q", [0]], ["q", [1]]], "op": {"type": "CX"}}], "created_qubits": [], "discarded_qubits": [], "implicit_permutation": [[["q", [0]], ["q", [0]]], [["q", [1]], ["q", [1]]]], "phase": "0.0", "qubits": [["q", [0]], ["q", [1]]]}</div>\n",
" </div>\n",
@@ -729,7 +726,7 @@
" ></circuit-display-container>\n",
" </div>\n",
" <script type="application/javascript">\n",
- " const circuitRendererUid = "f2d1c055-e8ef-4c62-8626-ee1a3f59ec2c";\n",
+ " const circuitRendererUid = "60a4bd10-1e6f-42c4-91cf-9bc03e3b702b";\n",
" const displayOptions = JSON.parse('{}');\n",
"\n",
" // Script to initialise the circuit renderer app\n",
@@ -797,7 +794,7 @@
"\n",
"\n",
"\n",
- " <div id="circuit-display-vue-container-1636bd31-868a-4f76-bed7-a122334f3193" class="pytket-circuit-display-container">\n",
+ " <div id="circuit-display-vue-container-4cd22cd2-94fe-4b5f-bf42-4ff694dd254d" class="pytket-circuit-display-container">\n",
" <div style="display: none">\n",
" <div id="circuit-json-to-display">{"bits": [], "commands": [{"args": [["q", [1]]], "op": {"type": "H"}}, {"args": [["q", [1]]], "op": {"type": "H"}}, {"args": [["q", [0]], ["q", [1]]], "op": {"type": "CX"}}, {"args": [["q", [0]]], "op": {"type": "H"}}, {"args": [["q", [1]]], "op": {"type": "H"}}, {"args": [["q", [0]]], "op": {"type": "H"}}, {"args": [["q", [1]]], "op": {"type": "H"}}, {"args": [["q", [0]], ["q", [1]]], "op": {"type": "CX"}}], "created_qubits": [], "discarded_qubits": [], "implicit_permutation": [[["q", [0]], ["q", [0]]], [["q", [1]], ["q", [1]]]], "phase": "0.0", "qubits": [["q", [0]], ["q", [1]]]}</div>\n",
" </div>\n",
@@ -807,7 +804,7 @@
" ></circuit-display-container>\n",
" </div>\n",
" <script type="application/javascript">\n",
- " const circuitRendererUid = "1636bd31-868a-4f76-bed7-a122334f3193";\n",
+ " const circuitRendererUid = "4cd22cd2-94fe-4b5f-bf42-4ff694dd254d";\n",
" const displayOptions = JSON.parse('{}');\n",
"\n",
" // Script to initialise the circuit renderer app\n",
@@ -864,7 +861,7 @@
],
"metadata": {
"kernelspec": {
- "display_name": ".venv",
+ "display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
@@ -878,9 +875,9 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
- "version": "3.12.3"
+ "version": "3.11.8"
}
},
"nbformat": 4,
- "nbformat_minor": 2
+ "nbformat_minor": 4
}
diff --git a/tket2-py/src/circuit.rs b/tket2-py/src/circuit.rs
index 81b1a39a..65c55047 100644
--- a/tket2-py/src/circuit.rs
+++ b/tket2-py/src/circuit.rs
@@ -25,7 +25,6 @@ use crate::utils::ConvertPyErr;
pub use self::convert::{try_update_circ, try_with_circ, update_circ, with_circ, CircuitType};
pub use self::cost::PyCircuitCost;
-use self::tk2circuit::Dfg;
pub use self::tk2circuit::Tk2Circuit;
pub use tket2::{Pauli, Tk2Op};
@@ -33,10 +32,8 @@ pub use tket2::{Pauli, Tk2Op};
pub fn module(py: Python<'_>) -> PyResult> {
let m = PyModule::new_bound(py, "circuit")?;
m.add_class::()?;
- m.add_class::()?;
m.add_class::()?;
m.add_class::()?;
- m.add_class::()?;
m.add_class::()?;
m.add_function(wrap_pyfunction!(validate_circuit, &m)?)?;
@@ -125,49 +122,18 @@ impl fmt::Debug for PyNode {
}
}
-#[pyclass]
-/// An iterator over the wires of a node.
-pub struct WireIter {
- node: PyNode,
- current: usize,
-}
-
-#[pymethods]
-impl WireIter {
- fn __iter__(slf: PyRef<'_, Self>) -> PyRef<'_, Self> {
- slf
- }
-
- fn __next__(mut slf: PyRefMut<'_, Self>) -> Option {
- slf.current += 1;
- Some(slf.node.__getitem__(slf.current - 1).unwrap())
- }
-}
-
#[pymethods]
impl PyNode {
+ #[new]
+ fn new(index: usize) -> Self {
+ Self {
+ node: serde_json::from_value(serde_json::Value::Number(index.into())).unwrap(),
+ }
+ }
/// A string representation of the pattern.
pub fn __repr__(&self) -> String {
format!("{:?}", self)
}
-
- fn __getitem__(&self, idx: usize) -> PyResult {
- Ok(hugr::Wire::new(self.node, idx).into())
- }
-
- fn __iter__(slf: PyRef<'_, Self>) -> PyResult> {
- let iter = WireIter {
- current: 0,
- node: *slf,
- };
- Py::new(slf.py(), iter)
- }
-
- fn outs(&self, n: usize) -> Vec {
- (0..n)
- .map(|i| hugr::Wire::new(self.node, i).into())
- .collect()
- }
}
/// A [`hugr::Node`] wrapper for Python.
diff --git a/tket2-py/src/circuit/tk2circuit.rs b/tket2-py/src/circuit/tk2circuit.rs
index c267fb92..3d80497a 100644
--- a/tket2-py/src/circuit/tk2circuit.rs
+++ b/tket2-py/src/circuit/tk2circuit.rs
@@ -1,6 +1,6 @@
//! Rust-backed representation of circuits
-use std::borrow::Borrow;
+use std::borrow::{Borrow, Cow};
use hugr::builder::{CircuitBuilder, DFGBuilder, Dataflow, DataflowHugr};
use hugr::extension::prelude::QB_T;
@@ -178,7 +178,7 @@ impl Tk2Circuit {
Ok(self.clone())
}
- fn node_op(&self, node: PyNode) -> PyResult {
+ fn node_op(&self, node: PyNode) -> PyResult> {
let custom: CustomOp = self
.circ
.hugr()
@@ -191,7 +191,7 @@ impl Tk2Circuit {
))
})?;
- Ok(custom.into())
+ Ok(serde_json::to_vec(&custom).unwrap().into())
}
fn node_inputs(&self, node: PyNode) -> Vec {
@@ -226,55 +226,3 @@ impl Tk2Circuit {
circ.extract::()
}
}
-
-#[pyclass]
-#[derive(Clone, Debug, PartialEq, From)]
-pub(super) struct Dfg {
- /// Rust representation of the circuit.
- builder: DFGBuilder,
-}
-#[pymethods]
-impl Dfg {
- #[new]
- fn new(input_types: Vec, output_types: Vec) -> PyResult {
- let builder = DFGBuilder::new(FunctionType::new(
- into_vec(input_types),
- into_vec(output_types),
- ))
- .convert_pyerrs()?;
- Ok(Self { builder })
- }
-
- fn inputs(&self) -> Vec {
- self.builder.input_wires().map_into().collect()
- }
-
- fn add_op(&mut self, op: Bound, inputs: Vec) -> PyResult {
- // TODO: Once we wrap `Dfg` in a pure python class we can make the conversion there,
- // and have a concrete `op: PyCustomOp` argument here.
- let custom: PyCustomOp = op
- .call_method0("to_custom")
- .map_err(|_| {
- PyErr::new::(
- "The operation must implement the `ToCustomOp` protocol.",
- )
- })?
- .extract()?;
- let custom: CustomOp = custom.into();
- self.builder
- .add_dataflow_op(custom, inputs.into_iter().map_into())
- .convert_pyerrs()
- .map(|d| d.node().into())
- }
-
- fn finish(&mut self, outputs: Vec) -> PyResult {
- Ok(Tk2Circuit {
- circ: self
- .builder
- .clone()
- .finish_hugr_with_outputs(outputs.into_iter().map_into(), ®ISTRY)
- .convert_pyerrs()?
- .into(),
- })
- }
-}
diff --git a/tket2-py/test/test_pauli_prop.py b/tket2-py/test/test_pauli_prop.py
index be910a07..33dc4fa8 100644
--- a/tket2-py/test/test_pauli_prop.py
+++ b/tket2-py/test/test_pauli_prop.py
@@ -3,15 +3,14 @@
import pytest
from pytket._tket.circuit import Circuit
-from tket2.ops import CustomOp, Tk2Op, Not
+from hugr.ops import Custom
+from hugr.node_port import Wire
from tket2.circuit import (
- Dfg,
- Wire,
Tk2Circuit,
+ Node as Tk2Node,
+ render_circuit_mermaid,
)
from tket2.circuit.build import (
- BOOL_T,
- QB_T,
CircBuild,
H,
from_coms,
@@ -19,7 +18,13 @@
PauliX,
PauliY,
PauliZ,
+ Measure,
+ QAlloc,
+ QFree,
+ load_custom,
+ id_circ,
)
+from hugr.std.logic import Not
from tket2.pattern import Rule, RuleMatcher # type: ignore
from tket2.rewrite import CircuitRewrite, Subcircuit # type: ignore
@@ -27,16 +32,10 @@
@pytest.fixture
def merge_rules() -> list[Rule]:
paulis = [PauliX(0), PauliY(0), PauliZ(0)]
- identities = [
- Rule(CircBuild(1).extend((p, p)).finish(), CircBuild(1).finish())
- for p in paulis
- ]
+ identities = [Rule(from_coms(p, p), id_circ(1)) for p in paulis]
off_diag = [
- Rule(
- CircBuild(1).extend((p0, p1)).finish(),
- CircBuild(1).extend((p2,)).finish(),
- )
+ Rule(from_coms(p0, p1), from_coms(p2))
for p0, p1, p2 in itertools.permutations(paulis)
]
return [*identities, *off_diag]
@@ -62,31 +61,29 @@ def propagate_rules() -> list[Rule]:
@pytest.fixture
def measure_rules() -> list[Rule]:
# X flips the measured bit
- r_build = Dfg([QB_T], [QB_T, BOOL_T])
- qs = r_build.inputs()
- qs = r_build.add_op(PauliX.op(), qs).outs(1)
- q, b = r_build.add_op(Tk2Op.Measure, qs).outs(2)
- ltk = r_build.finish([q, b])
-
- r_build = Dfg([QB_T], [QB_T, BOOL_T])
- qs = r_build.inputs()
- q, b = r_build.add_op(Tk2Op.Measure, qs).outs(2)
- b = r_build.add_op(Not, [b])[0]
- rtk = r_build.finish([q, b])
+ r_build = CircBuild.with_nqb(1)
+ (_, measure) = r_build.extend(PauliX(0), Measure(0))
+ r_build.set_indexed_outputs(0, measure[1])
+ ltk = r_build.finish()
+
+ r_build = CircBuild.with_nqb(1)
+ b = r_build.add(Measure(0))[1]
+ b = r_build.add(Not(b))[0]
+ r_build.set_indexed_outputs(0, b)
+ rtk = r_build.finish()
rules = [Rule(ltk, rtk)]
# Z does not affect measurement result
- r_build = Dfg([QB_T], [QB_T, BOOL_T])
- qs = r_build.inputs()
- qs = r_build.add_op(PauliZ.op(), qs).outs(1)
- q, b = r_build.add_op(Tk2Op.Measure, qs).outs(2)
- ltk = r_build.finish([q, b])
+ r_build = CircBuild.with_nqb(1)
+ (_, measure) = r_build.extend(PauliZ(0), Measure(0))
+ r_build.set_indexed_outputs(0, measure[1])
+ ltk = r_build.finish()
- r_build = Dfg([QB_T], [QB_T, BOOL_T])
- qs = r_build.inputs()
- q, b = r_build.add_op(Tk2Op.Measure, qs).outs(2)
- rtk = r_build.finish([q, b])
+ r_build = CircBuild.with_nqb(1)
+ b = r_build.add(Measure(0))[1]
+ r_build.set_indexed_outputs(0, b)
+ rtk = r_build.finish()
rules.append(Rule(ltk, rtk))
@@ -111,17 +108,19 @@ def apply_exhaustive(circ: Tk2Circuit, matcher: RuleMatcher) -> int:
return match_count
-def add_error_after(circ: Tk2Circuit, wire: Wire, error: CustomOp):
+def add_error_after(circ: Tk2Circuit, wire: Wire, error: Custom):
"""Use a rewrite to insert an operation on a qubit wire assuming the error is
a one qubit operation, and the source gate of the wire only acts on qubits."""
- node = wire.node()
- port = wire.port()
+ port = wire.out_port()
+ node = Tk2Node(port.node.idx)
+ port_offset = port.offset
n_qb = len(circ.node_outputs(node)) - 1 # ignore Order port
subc = Subcircuit([node], circ)
- replace_build = CircBuild(n_qb)
- current = circ.node_op(node)
- replace_build.add(current, list(range(n_qb)))
- replace_build.add(error, [port])
+ replace_build = CircBuild.with_nqb(n_qb)
+ current = load_custom(circ.node_op(node))
+ replace_build.add(current(*list(range(n_qb))))
+ replace_build.add(error(port_offset))
+ replace_build.set_tracked_outputs()
replacement = replace_build.finish()
rw = CircuitRewrite(subc, circ, replacement)
@@ -133,27 +132,28 @@ def final_pauli_string(circ: Tk2Circuit) -> str:
"""Assuming the circuit only has qubit outputs - check the final operations
on each qubit, and if they are paulis concatenate them into a string."""
- def map_op(op: CustomOp) -> str:
- # strip the extension name
- n = op.name[len("quantum.tket2.") :]
+ def map_op(op: Custom) -> str:
+ n = op.op_name
return n if n in ("X", "Y", "Z") else "I"
# TODO ignore non-qubit outputs
return "".join(
- map_op(circ.node_op(w.node())) for w in circ.node_inputs(circ.output_node())
+ map_op(load_custom(circ.node_op(w.node())))
+ for w in circ.node_inputs(circ.output_node())
)
def test_simple_z_prop(propagate_matcher: RuleMatcher):
- c = Dfg([QB_T] * 2, [QB_T] * 2)
- q0, q1 = c.inputs()
- h_node_e = c.add_op(H.op(), [q0])
- h_node = c.add_op(H.op(), h_node_e.outs(1))
- q0, q1 = c.add_op(CX.op(), [h_node[0], q1]).outs(2)
- t2c = c.finish([q0, q1])
+ c = CircBuild.with_nqb(2)
+
+ (h_node_e, *_) = c.extend(H(0), H(0), CX(0, 1))
+ c.set_tracked_outputs()
+
+ t2c = c.finish()
- add_error_after(t2c, h_node_e[0], PauliX.op())
+ add_error_after(t2c, h_node_e[0], PauliX)
+ print(render_circuit_mermaid(t2c))
assert t2c.to_tket1() == Circuit(2).H(0).X(0).H(0).CX(0, 1)
assert apply_exhaustive(t2c, propagate_matcher) == 2
@@ -164,13 +164,17 @@ def test_simple_z_prop(propagate_matcher: RuleMatcher):
def test_cat(propagate_matcher: RuleMatcher):
- c = CircBuild(4)
- h_node = c.add_command(H(2))
- t2c = c.extend(
- [CX(2, 1), CX(2, 3), CX(1, 0)],
- ).finish()
+ c = CircBuild.with_nqb(4)
+ (h_node, *_) = c.extend(
+ H(2),
+ CX(2, 1),
+ CX(2, 3),
+ CX(1, 0),
+ )
+ c.set_tracked_outputs()
+ t2c = c.finish()
- add_error_after(t2c, h_node[0], PauliX.op())
+ add_error_after(t2c, h_node[0], PauliX)
assert t2c.to_tket1() == Circuit(4).H(2).X(2).CX(2, 1).CX(2, 3).CX(1, 0)
assert apply_exhaustive(t2c, propagate_matcher) == 3
@@ -183,18 +187,19 @@ def test_cat(propagate_matcher: RuleMatcher):
def test_alloc_free():
- c = CircBuild(0)
- alloc = c.dfg.add_op(Tk2Op.QAlloc, [])
- c.dfg.add_op(Tk2Op.QFree, alloc.outs(1))
+ c = CircBuild()
+ alloc = c.add(QAlloc())
+ c.add(QFree(alloc))
+ c.set_outputs()
c.finish() # validates
def test_measure(propagate_matcher: RuleMatcher):
- c = Dfg([QB_T, QB_T], [QB_T, BOOL_T, QB_T, BOOL_T])
- q0, q1 = c.inputs()
- q0 = c.add_op(PauliX.op(), [q0])[0]
- outs = [w for q in (q0, q1) for w in c.add_op(Tk2Op.Measure, [q]).outs(2)]
- before = c.finish(outs)
+ c = CircBuild.with_nqb(2)
+ (_, m0, m1) = c.extend(PauliX(0), Measure(0), Measure(1))
+
+ c.set_indexed_outputs(0, m0[1], 1, m1[1])
+ before = c.finish()
"""
──►X───►Measure─►
│
@@ -204,12 +209,11 @@ def test_measure(propagate_matcher: RuleMatcher):
└────►
"""
assert apply_exhaustive(before, propagate_matcher) == 1
-
- c = Dfg([QB_T, QB_T], [QB_T, BOOL_T, QB_T, BOOL_T])
- q0, q1 = c.inputs()
- q0, b0, q1, b1 = [w for q in (q0, q1) for w in c.add_op(Tk2Op.Measure, [q]).outs(2)]
- b0 = c.add_op(Not, [b0])[0]
- after = c.finish([q0, b0, q1, b1])
+ c = CircBuild.with_nqb(2)
+ (m0, m1) = c.extend(Measure(0), Measure(1))
+ nt = c.add(Not(m0[1]))
+ c.set_indexed_outputs(0, nt, 1, m1[1])
+ after = c.finish()
"""
──►Measure──────►
└─►Not─►
diff --git a/tket2-py/tket2/_tket2/circuit.pyi b/tket2-py/tket2/_tket2/circuit.pyi
index 2ba4a108..af690162 100644
--- a/tket2-py/tket2/_tket2/circuit.pyi
+++ b/tket2-py/tket2/_tket2/circuit.pyi
@@ -1,8 +1,7 @@
from typing import Any, Callable
from pytket._tket.circuit import Circuit as Tk1Circuit
-from tket2._tket2.ops import Tk2Op, CustomOp
-from tket2._tket2.types import HugrType
+from tket2._tket2.ops import Tk2Op
class Tk2Circuit:
"""Rust representation of a TKET2 circuit."""
@@ -33,7 +32,7 @@ class Tk2Circuit:
Nested circuits are traversed to count their operations.
"""
- def node_op(self, node: Node) -> CustomOp:
+ def node_op(self, node: Node) -> bytes:
"""If the node corresponds to a custom op, return it. Otherwise, raise an error."""
def to_tket1(self) -> Tk1Circuit:
@@ -72,46 +71,11 @@ class Tk2Circuit:
def from_tket1_json(json: str) -> Tk2Circuit:
"""Decode a pytket json string to a Tk2Circuit."""
-class Dfg:
- """A builder for a HUGR dataflow graph."""
-
- def __init__(
- self,
- input_types: list[HugrType],
- output_types: list[HugrType],
- ) -> None:
- """Begin building a dataflow graph with specified input and output types."""
-
- def inputs(self) -> list[Wire]:
- """The output wires of the input node in the DFG, one for each input type."""
-
- def add_op(self, op: CustomOp | Any, wires: list[Wire]) -> Node:
- """Add a custom operation to the DFG, wiring in input wires."""
-
- def finish(self, outputs: list[Wire]) -> Tk2Circuit:
- """Finish building the DFG by wiring in output wires to the output node
- (one per output type) and return the resulting circuit."""
-
class Node:
"""Handle to node in HUGR."""
- def outs(self, n: int) -> list[Wire]:
- """Generate n output wires from this node."""
-
- def __getitem__(self, i: int) -> Wire:
- """Get the i-th output wire from this node."""
-
- def __iter__(self) -> Any:
- """Iterate over the output wires from this node."""
-
-class WireIter:
- """Iterator for wires from a node."""
-
- def __iter__(self) -> WireIter:
- """Get the iterator."""
-
- def __next__(self) -> Wire:
- """Get the next wire from the node."""
+ def __init__(self, idx: int) -> None:
+ """Create a new node handle."""
class Wire:
"""An outgoing edge from a node in a HUGR, defined by the node and outgoing port."""
diff --git a/tket2-py/tket2/circuit/__init__.py b/tket2-py/tket2/circuit/__init__.py
index efb4f13f..1835a389 100644
--- a/tket2-py/tket2/circuit/__init__.py
+++ b/tket2-py/tket2/circuit/__init__.py
@@ -2,7 +2,6 @@
from .._tket2.circuit import (
Tk2Circuit,
- Dfg,
Node,
Wire,
CircuitCost,
@@ -24,7 +23,6 @@
# Bindings.
# TODO: Wrap these in Python classes.
"Tk2Circuit",
- "Dfg",
"Node",
"Wire",
"CircuitCost",
diff --git a/tket2-py/tket2/circuit/build.py b/tket2-py/tket2/circuit/build.py
index a495e279..291abb39 100644
--- a/tket2-py/tket2/circuit/build.py
+++ b/tket2-py/tket2/circuit/build.py
@@ -1,137 +1,161 @@
-from typing import Protocol, Iterable
-from tket2.circuit import Dfg, Node, Wire, Tk2Circuit
-from tket2.types import QB_T, BOOL_T
-from tket2.ops import CustomOp, Tk2Op, ToCustomOp
-from dataclasses import dataclass
-
-
-class Command(Protocol):
- """Interface to specify a custom operation over some qubits and linear bits.
- Refers to qubits and bits by index."""
+from __future__ import annotations
+from hugr.hugr import Hugr
+from hugr import tys, ops
+from hugr.ops import ComWire, Command
+from hugr.std.float import FLOAT_T
+from hugr.tracked_dfg import TrackedDfg
+from tket2.circuit import Tk2Circuit
- gate_name: str
- n_qb: int
- n_lb: int = 0
- extension_name: str = "quantum.tket2"
-
- def qubits(self) -> list[int]: ...
- def bits(self) -> list[int]:
- return []
-
- @classmethod
- def op(cls) -> CustomOp:
- types = [QB_T] * cls.n_qb + [BOOL_T] * cls.n_lb
- return CustomOp(cls.extension_name, cls.gate_name, types, types)
+from dataclasses import dataclass
-class CircBuild:
+class CircBuild(TrackedDfg):
"""Helper class to build a circuit from commands by tracking qubits,
allowing commands to be specified by qubit index."""
- dfg: Dfg
- qbs: list[Wire]
-
- def __init__(self, n_qb: int) -> None:
- self.dfg = Dfg([QB_T] * n_qb, [QB_T] * n_qb)
- self.qbs = self.dfg.inputs()
-
- def add(self, op: ToCustomOp, indices: list[int]) -> Node:
- """Add a Custom operation to some qubits and update the qubit list."""
- qbs = [self.qbs[i] for i in indices]
- op = op.to_custom()
- n = self.dfg.add_op(op, qbs)
- outs = n.outs(len(indices))
- for i, o in zip(indices, outs):
- self.qbs[i] = o
-
- return n
-
- def measure_all(self) -> list[Wire]:
- """Append a measurement to all qubits and return the measurement result wires."""
- return [self.add(Tk2Op.Measure, [i]).outs(2)[1] for i in range(len(self.qbs))]
-
- def add_command(self, command: Command) -> Node:
- """Add a Command to the circuit and return the new node."""
- return self.add(command.op(), command.qubits())
-
- def extend(self, coms: Iterable[Command]) -> "CircBuild":
- """Add a sequence of commands to the circuit."""
- for op in coms:
- self.add_command(op)
- return self
+ @classmethod
+ def with_nqb(cls, n_qb: int) -> CircBuild:
+ return cls(*[tys.Qubit] * n_qb, track_inputs=True)
def finish(self) -> Tk2Circuit:
"""Finish building the circuit by setting all the qubits as the output
and validate."""
- return self.dfg.finish(self.qbs)
+ return load_hugr(self.hugr)
def from_coms(*args: Command) -> Tk2Circuit:
- """Build a circuit from a sequence of commands, assuming only qubit outputs."""
- commands = []
+ """Build a circuit from a sequence of commands, assuming
+ only qubits are referred to by index."""
+ commands: list[Command] = []
n_qb = 0
# traverses commands twice which isn't great
for arg in args:
- max_qb = max(arg.qubits()) + 1
+ max_qb = max(i for i in arg.incoming if isinstance(i, int)) + 1
n_qb = max(n_qb, max_qb)
commands.append(arg)
- build = CircBuild(n_qb)
- build.extend(commands)
+ build = CircBuild.with_nqb(n_qb)
+ build.extend(*commands)
+ build.set_tracked_outputs()
return build.finish()
-# Some common operations
+def load_hugr(h: Hugr) -> Tk2Circuit:
+ return Tk2Circuit.from_hugr_json(h.to_serial().model_dump_json())
+
+
+def load_custom(serialized: bytes) -> ops.Custom:
+ import hugr.serialization.ops as sops
+ import json
+
+ dct = json.loads(serialized)
+ dct["parent"] = -1
+ return sops.CustomOp(**dct).deserialize()
+
-# Define some "Commands" for pure quantum gates (n qubits in and n qubits out)
+def id_circ(n_qb: int) -> Tk2Circuit:
+ b = CircBuild.with_nqb(n_qb)
+ b.set_tracked_outputs()
+ return b.finish()
@dataclass(frozen=True)
-class H(Command):
- qubit: int
- gate_name = "H"
- n_qb = 1
+class QuantumOps(ops.Custom):
+ extension: tys.ExtensionId = "quantum.tket2"
- def qubits(self) -> list[int]:
- return [self.qubit]
+
+_OneQbSig = tys.FunctionType.endo([tys.Qubit])
@dataclass(frozen=True)
-class CX(Command):
- control: int
- target: int
- gate_name = "CX"
- n_qb = 2
+class OneQbGate(QuantumOps):
+ op_name: str # type: ignore[misc] # no-default fields follows one with a default
+ num_out: int = 1
+ signature: tys.FunctionType = _OneQbSig
+
+ def __call__(self, q: ComWire) -> Command:
+ return super().__call__(q)
+
- def qubits(self) -> list[int]:
- return [self.control, self.target]
+H = OneQbGate("H")
+PauliX = OneQbGate("X")
+PauliY = OneQbGate("Y")
+PauliZ = OneQbGate("Z")
+
+_TwoQbSig = tys.FunctionType.endo([tys.Qubit] * 2)
@dataclass(frozen=True)
-class PauliX(Command):
- qubit: int
- gate_name = "X"
- n_qb = 1
+class TwoQbGate(QuantumOps):
+ op_name: str # type: ignore[misc] # no-default fields follows one with a default
+ num_out: int = 2
+ signature: tys.FunctionType = _TwoQbSig
+
+ def __call__(self, q0: ComWire, q1: ComWire) -> Command:
+ return super().__call__(q0, q1)
+
- def qubits(self) -> list[int]:
- return [self.qubit]
+CX = TwoQbGate("CX")
+
+_MeasSig = tys.FunctionType([tys.Qubit], [tys.Qubit, tys.Bool])
@dataclass(frozen=True)
-class PauliZ(Command):
- qubit: int
- gate_name = "Z"
- n_qb = 1
+class MeasureDef(QuantumOps):
+ op_name: str = "Measure"
+ num_out: int = 2
+ signature: tys.FunctionType = _MeasSig
+
+ def __call__(self, q: ComWire) -> Command:
+ return super().__call__(q)
+
- def qubits(self) -> list[int]:
- return [self.qubit]
+Measure = MeasureDef()
+
+
+_RzSig = tys.FunctionType([tys.Qubit, FLOAT_T], [tys.Qubit])
@dataclass(frozen=True)
-class PauliY(Command):
- qubit: int
- gate_name = "Y"
- n_qb = 1
+class RzDef(QuantumOps):
+ op_name: str = "Rz"
+ num_out: int = 1
+ signature: tys.FunctionType = _RzSig
+
+ def __call__(self, q: ComWire, fl_wire: ComWire) -> Command:
+ return super().__call__(q, fl_wire)
+
+
+Rz = RzDef()
+
+
+_QallocSig = tys.FunctionType([], [tys.Qubit])
+
+
+@dataclass(frozen=True)
+class QAllocDef(QuantumOps):
+ op_name: str = "QAlloc"
+ num_out: int = 1
+ signature: tys.FunctionType = _QallocSig
+
+ def __call__(self) -> Command:
+ return super().__call__()
+
+
+QAlloc = QAllocDef()
+
+
+_QfreeSig = tys.FunctionType([tys.Qubit], [])
+
+
+@dataclass(frozen=True)
+class QFreeDef(QuantumOps):
+ op_name: str = "QFree"
+ num_out: int = 0
+ signature: tys.FunctionType = _QfreeSig
+
+ def __call__(self, qb: ComWire) -> Command:
+ return super().__call__(qb)
+
- def qubits(self) -> list[int]:
- return [self.qubit]
+QFree = QFreeDef()
diff --git a/tket2-py/tket2/ops.py b/tket2-py/tket2/ops.py
index 1e4736c8..a54b7730 100644
--- a/tket2-py/tket2/ops.py
+++ b/tket2-py/tket2/ops.py
@@ -6,8 +6,7 @@
import tket2
from tket2._tket2.ops import CustomOp
-from tket2.circuit.build import QB_T
-from tket2.types import BOOL_T
+from tket2.types import QB_T
__all__ = ["CustomOp", "ToCustomOp", "Tk2Op", "Pauli"]
@@ -17,10 +16,12 @@ class ToCustomOp(Protocol):
def to_custom(self) -> CustomOp:
"""Convert to a custom operation."""
+ ...
@property
def name(self) -> str:
"""Name of the operation."""
+ ...
class Tk2Op(Enum):
@@ -109,7 +110,3 @@ def __eq__(self, other: object) -> bool:
elif isinstance(other, str):
return self.name == other
return False
-
-
-# Define other common operations
-Not = CustomOp("logic", "Not", [BOOL_T], [BOOL_T])