diff --git a/.github/workflows/build_and_deploy.yml b/.github/workflows/build_and_deploy.yml index 7d93b0ad..30348bc8 100644 --- a/.github/workflows/build_and_deploy.yml +++ b/.github/workflows/build_and_deploy.yml @@ -84,7 +84,7 @@ jobs: TWINE_USERNAME: __token__ TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} run: | - RUSTFLAGS="-C link-arg=-undefined -C link-arg=dynamic_lookup" maturin build -i ${{ matrix.python.interpreter }} -m qoqo/Cargo.toml --release --universal2 + RUSTFLAGS="-C link-arg=-undefined -C link-arg=dynamic_lookup" maturin build -i ${{ matrix.python.interpreter }} -m qoqo/Cargo.toml --release python -m twine upload target/wheels/* # deploy_windows: diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 00000000..bbed0486 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,20 @@ +# Changelog + +This changelog track changes to the qoqo project starting at version 0.5.0 + +## 0.5.0 + +### Changed + +* Fixed versioning scheme to use the same version number across the project. +* Updated pyo3 dependency to 0.14.1, numpy to 0.14, num-complex to 0.4 and ndarray to 0.15 +* Removed sprs dependency to allow update of other dependencies + +### Fixed in qoqo + +* Wrong Python Class name of ClassicalRegister measurement (was "Cheated") + +### Added + +* PhaseShiftedControlledZ gate in roqoqo +* QoqoBackendError to use in the python interface of rust based backends diff --git a/Cargo.lock b/Cargo.lock index 7cd40429..1c605ce3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2,31 +2,11 @@ # It is not intended for manual editing. version = 3 -[[package]] -name = "alga" -version = "0.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f823d037a7ec6ea2197046bafd4ae150e6bc36f9ca347404f46a46823fa84f2" -dependencies = [ - "approx 0.3.2", - "num-complex 0.2.4", - "num-traits", -] - [[package]] name = "approx" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0e60b75072ecd4168020818c0107f2857bb6c4e64252d8d3983f6263b40a5c3" -dependencies = [ - "num-traits", -] - -[[package]] -name = "approx" -version = "0.4.0" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f2a05fd1bd10b2527e20a2cd32d8873d115b8b39fe219ee25f42a8aca6ba278" +checksum = "072df7202e63b127ab55acfe16ce97013d5b97bf160489336d3f1840fd78e99e" dependencies = [ "num-traits", ] @@ -64,50 +44,6 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" -[[package]] -name = "crossbeam-channel" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06ed27e177f16d65f0f0c22a213e17c696ace5dd64b14258b52f9417ccb52db4" -dependencies = [ - "cfg-if 1.0.0", - "crossbeam-utils", -] - -[[package]] -name = "crossbeam-deque" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94af6efb46fef72616855b036a624cf27ba656ffc9be1b9a3c931cfc7749a9a9" -dependencies = [ - "cfg-if 1.0.0", - "crossbeam-epoch", - "crossbeam-utils", -] - -[[package]] -name = "crossbeam-epoch" -version = "0.9.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ec02e091aa634e2c3ada4a392989e7c3116673ef0ac5b72232439094d73b7fd" -dependencies = [ - "cfg-if 1.0.0", - "crossbeam-utils", - "lazy_static", - "memoffset", - "scopeguard", -] - -[[package]] -name = "crossbeam-utils" -version = "0.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d82cfc11ce7f2c3faef78d8a684447b40d503d9681acebed6cb728d45940c4db" -dependencies = [ - "cfg-if 1.0.0", - "lazy_static", -] - [[package]] name = "ctor" version = "0.1.20" @@ -124,12 +60,6 @@ version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ee2626afccd7561a06cf1367e2950c4718ea04565e20fb5029b6c7d8ad09abcf" -[[package]] -name = "either" -version = "1.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e78d4f1cc4ae33bbfc157ed5d5a5ef3bc29227303d595861deb238fcec4e9457" - [[package]] name = "erased-serde" version = "0.3.16" @@ -161,15 +91,6 @@ dependencies = [ "syn", ] -[[package]] -name = "hermit-abi" -version = "0.1.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" -dependencies = [ - "libc", -] - [[package]] name = "indoc" version = "0.3.6" @@ -195,9 +116,9 @@ dependencies = [ [[package]] name = "instant" -version = "0.1.9" +version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61124eeebbd69b8190558df225adf7e4caafce0d743919e5d6b19652314ec5ec" +checksum = "bee0328b1209d157ef001c94dd85b4f8f64139adb0eac2659f4b08382b2f474d" dependencies = [ "cfg-if 1.0.0", ] @@ -257,15 +178,6 @@ dependencies = [ "scopeguard", ] -[[package]] -name = "matrixmultiply" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "916806ba0031cd542105d916a97c8572e1fa6dd79c9c51e7eb43a09ec2dd84c1" -dependencies = [ - "rawpointer", -] - [[package]] name = "matrixmultiply" version = "0.3.1" @@ -275,38 +187,41 @@ dependencies = [ "rawpointer", ] -[[package]] -name = "memoffset" -version = "0.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59accc507f1338036a0477ef61afdae33cde60840f4dfe481319ce3ad116ddf9" -dependencies = [ - "autocfg", -] - [[package]] name = "nalgebra" -version = "0.26.2" +version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "476d1d59fe02fe54c86356e91650cd892f392782a1cb9fc524ec84f7aa9e1d06" +checksum = "39fe9195887b501f296ac918ecbff4650b6935da164d4902ef73e140c46a0dce" dependencies = [ - "approx 0.4.0", - "matrixmultiply 0.3.1", - "num-complex 0.3.1", + "approx", + "matrixmultiply", + "nalgebra-macros", + "num-complex 0.4.0", "num-rational", "num-traits", "simba", "typenum", ] +[[package]] +name = "nalgebra-macros" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01fcc0b8149b4632adc89ac3b7b31a12fb6099a0317a4eb2ebff574ef7de7218" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "ndarray" -version = "0.14.0" +version = "0.15.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c0d5c9540a691d153064dc47a4db2504587a75eae07bf1d73f7a596ebc73c04" +checksum = "08e854964160a323e65baa19a0b1a027f76d590faba01f05c0cbc3187221a8c9" dependencies = [ - "matrixmultiply 0.2.4", - "num-complex 0.3.1", + "matrixmultiply", + "num-complex 0.4.0", "num-integer", "num-traits", "rawpointer", @@ -315,19 +230,18 @@ dependencies = [ [[package]] name = "num-complex" -version = "0.2.4" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6b19411a9719e753aff12e5187b74d60d3dc449ec3f4dc21e3989c3f554bc95" +checksum = "747d632c0c558b87dbabbe6a82f3b4ae03720d0646ac5b7b4dae89394be5f2c5" dependencies = [ - "autocfg", "num-traits", ] [[package]] name = "num-complex" -version = "0.3.1" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "747d632c0c558b87dbabbe6a82f3b4ae03720d0646ac5b7b4dae89394be5f2c5" +checksum = "26873667bbbb7c5182d4a37c1add32cdf09f841af72da53318fdb81543c15085" dependencies = [ "num-traits", "serde", @@ -345,9 +259,9 @@ dependencies = [ [[package]] name = "num-rational" -version = "0.3.2" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12ac428b1cb17fce6f731001d307d351ec70a6d202fc2e60f7d4c5e42d8f4f07" +checksum = "d41702bd167c2df5520b384281bc111a4b5efcf7fbc4c9c222c815b07e0a6a6a" dependencies = [ "autocfg", "num-integer", @@ -364,30 +278,26 @@ dependencies = [ "libm", ] -[[package]] -name = "num_cpus" -version = "1.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05499f3756671c15885fee9034446956fff3f243d6077b91e5767df161f766b3" -dependencies = [ - "hermit-abi", - "libc", -] - [[package]] name = "numpy" -version = "0.13.1" +version = "0.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7073fae1e0b82409533a29c6f804b79783d7b2d3c07728fdc4d884eda8cd4f0" +checksum = "09c15af63aa0c74e0f7230d4e95d9a3d71a23449905f30f50b055df9a6a6a3e6" dependencies = [ "cfg-if 0.1.10", "libc", "ndarray", - "num-complex 0.3.1", + "num-complex 0.4.0", "num-traits", "pyo3", ] +[[package]] +name = "once_cell" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "692fcb63b64b1758029e0a96ee63e049ce8c5948587f2f7208df04625e5f6b56" + [[package]] name = "parking_lot" version = "0.11.1" @@ -461,27 +371,35 @@ dependencies = [ [[package]] name = "pyo3" -version = "0.13.2" +version = "0.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4837b8e8e18a102c23f79d1e9a110b597ea3b684c95e874eb1ad88f8683109c3" +checksum = "338f7f3701e11fd7f76508c91fbcaabc982564bcaf4d1ca7e1574ff2b4778aec" dependencies = [ "cfg-if 1.0.0", - "ctor", "indoc", - "inventory", "libc", - "num-complex 0.3.1", + "num-complex 0.4.0", "parking_lot", "paste 0.1.18", + "pyo3-build-config", "pyo3-macros", "unindent", ] +[[package]] +name = "pyo3-build-config" +version = "0.14.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dcb2e98cc9ccc83d4f7115c8f925e0057e88c8d324b1bc4c2db4a7270c06ac9d" +dependencies = [ + "once_cell", +] + [[package]] name = "pyo3-macros" -version = "0.13.2" +version = "0.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a47f2c300ceec3e58064fd5f8f5b61230f2ffd64bde4970c81fdd0563a2db1bb" +checksum = "cfb8671a42d0ecc4bec8cc107ae96d49292ca20cd1968e09b98af4aafd516adf" dependencies = [ "pyo3-macros-backend", "quote", @@ -490,11 +408,12 @@ dependencies = [ [[package]] name = "pyo3-macros-backend" -version = "0.13.2" +version = "0.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87b097e5d84fcbe3e167f400fbedd657820a375b034c78bd852050749a575d66" +checksum = "9addf6dc422f05d4949cc0990195ee74fa43e3c3780cc9a1972fe9e7b68a9f48" dependencies = [ "proc-macro2", + "pyo3-build-config", "quote", "syn", ] @@ -506,16 +425,15 @@ dependencies = [ "bincode", "nalgebra", "ndarray", - "num-complex 0.3.1", + "num-complex 0.4.0", "numpy", "proc-macro2", "pyo3", "qoqo-macros", - "qoqo_calculator", + "qoqo_calculator 0.3.0", "qoqo_calculator_pyo3", "quote", "roqoqo", - "roqoqo-derive", "serde", "serde_json", "syn", @@ -525,7 +443,7 @@ dependencies = [ [[package]] name = "qoqo-macros" -version = "0.1.5" +version = "0.5.0" dependencies = [ "proc-macro2", "quote", @@ -543,15 +461,26 @@ dependencies = [ "thiserror", ] +[[package]] +name = "qoqo_calculator" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4924da2cc11cc4a5385eebda81918e3bf17ba61e26d766e0646b4f334747b4ce" +dependencies = [ + "num-complex 0.4.0", + "serde", + "thiserror", +] + [[package]] name = "qoqo_calculator_pyo3" -version = "0.3.6" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9801b5fdfb4285d42e7ed2f8c7ab0f66f04de27ace2b4d6073d46ecc3a6b462" +checksum = "2ef8106b00d8e1091eaa088eaf0b7d4cac2d127c06b24c54a24e65d48ecdfb5a" dependencies = [ - "num-complex 0.3.1", + "num-complex 0.4.0", "pyo3", - "qoqo_calculator", + "qoqo_calculator 0.3.0", "serde", "thiserror", ] @@ -621,31 +550,6 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "60a357793950651c4ed0f3f52338f53b2f809f32d83a07f72909fa13e4c6c1e3" -[[package]] -name = "rayon" -version = "1.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c06aca804d41dbc8ba42dfd964f0d01334eceb64314b9ecf7c5fad5188a06d90" -dependencies = [ - "autocfg", - "crossbeam-deque", - "either", - "rayon-core", -] - -[[package]] -name = "rayon-core" -version = "1.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d78120e2c850279833f1dd3582f730c4ab53ed95aeaaaa862a2a5c71b1656d8e" -dependencies = [ - "crossbeam-channel", - "crossbeam-deque", - "crossbeam-utils", - "lazy_static", - "num_cpus", -] - [[package]] name = "redox_syscall" version = "0.2.9" @@ -657,21 +561,20 @@ dependencies = [ [[package]] name = "roqoqo" -version = "0.2.0" +version = "0.5.0" dependencies = [ "dyn-clone", "nalgebra", "ndarray", - "num-complex 0.3.1", + "num-complex 0.4.0", "proc-macro2", - "qoqo_calculator", + "qoqo_calculator 0.3.0", "quote", "rand", "rand_distr", "roqoqo-derive", "serde", "serde_test", - "sprs", "syn", "test-case", "thiserror", @@ -680,7 +583,7 @@ dependencies = [ [[package]] name = "roqoqo-derive" -version = "0.1.6" +version = "0.5.0" dependencies = [ "proc-macro2", "quote", @@ -689,16 +592,15 @@ dependencies = [ [[package]] name = "roqoqo-test" -version = "0.1.5" +version = "0.5.0" dependencies = [ "nalgebra", "ndarray", "proc-macro2", - "qoqo_calculator", + "qoqo_calculator 0.2.6", "quote", "rand", "roqoqo", - "roqoqo-derive", "syn", ] @@ -756,12 +658,12 @@ dependencies = [ [[package]] name = "simba" -version = "0.4.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5132a955559188f3d13c9ba831e77c802ddc8782783f050ed0c52f5988b95f4c" +checksum = "8e82063457853d00243beda9952e910b82593e4b07ae9f721b9278a99a0d3d5c" dependencies = [ - "approx 0.4.0", - "num-complex 0.3.1", + "approx", + "num-complex 0.4.0", "num-traits", "paste 1.0.5", ] @@ -772,22 +674,6 @@ version = "1.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fe0f37c9e8f3c5a4a66ad655a93c74daac4ad00c441533bf5c6e7990bb42604e" -[[package]] -name = "sprs" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9fc9999597a9e160f7aae4ab43f395365b396cfd971406ffb4b066679a81ca3" -dependencies = [ - "alga", - "ndarray", - "num-complex 0.2.4", - "num-traits", - "num_cpus", - "rayon", - "serde", - "smallvec", -] - [[package]] name = "syn" version = "1.0.73" diff --git a/qoqo-macros/Cargo.toml b/qoqo-macros/Cargo.toml index d56cd23a..976f584c 100644 --- a/qoqo-macros/Cargo.toml +++ b/qoqo-macros/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "qoqo-macros" -version = "0.1.5" +version = "0.5.0" authors = ["HQS Quantum Simulations "] license = "Apache-2.0" readme = "../README.md" diff --git a/qoqo-macros/src/lib.rs b/qoqo-macros/src/lib.rs index 7ce8113e..6efb101c 100644 --- a/qoqo-macros/src/lib.rs +++ b/qoqo-macros/src/lib.rs @@ -360,7 +360,9 @@ pub fn wrap( #operate_pragma_noise_quote #define_quote #operate_constant_gate_quote - + fn __format__(&self, _format_spec: &str) -> PyResult { + Ok(format!("{:?}", self.internal)) + } } #[pyproto] impl PyObjectProtocol for #wrapper_ident { @@ -368,9 +370,7 @@ pub fn wrap( Ok(format!("{:?}", self.internal)) } - fn __format__(&self, _format_spec: &str) -> PyResult { - Ok(format!("{:?}", self.internal)) - } + /// Returns the __richcmp__ magic method to perform rich comparison /// operations on Operation. diff --git a/qoqo/Cargo.toml b/qoqo/Cargo.toml index e76a3a89..7c0713f3 100644 --- a/qoqo/Cargo.toml +++ b/qoqo/Cargo.toml @@ -3,10 +3,14 @@ name = "qoqo" version = "0.5.0" authors = ["HQS Quantum Simulations "] license = "Apache-2.0" +homepage = "https://github.com/HQSquantumsimulations/qoqo" +repository = "https://github.com/HQSquantumsimulations/qoqo" +documentation = "https://docs.rs/qoqo/" readme = "../README.md" edition = "2018" categories = ["science", "simulation","ffi"] description = "Quantum computing circuit toolkit. Python interface of roqoq" +exclude = ["tests*", "examples*", "docs*", "*.code-workspace"] # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html @@ -17,28 +21,28 @@ doctest = false crate-type = ["cdylib", "rlib"] [dependencies.pyo3] -version = "0.13" +version = "0.14" features = ["num-complex"] [dependencies] serde = { version = "1.0", features = ["derive"] } -ndarray = "0.14" -num-complex = "0.3" +ndarray = "0.15" +num-complex = "0.4" thiserror = "1.0" -qoqo_calculator = {version="0.2"} +qoqo_calculator = {version="0.3"} +qoqo_calculator_pyo3 = {version="0.4", default-features=false} -qoqo_calculator_pyo3 = {version="0.3", default-features=false} -qoqo-macros = {version="0.1", path="../qoqo-macros"} -roqoqo = {version="0.2", path="../roqoqo", features=["serialize", "overrotate"]} -roqoqo-derive = {version="0.1", path="../roqoqo-derive"} -numpy = "=0.13.1" +qoqo-macros = {version="0.5", path="../qoqo-macros"} +roqoqo = {version="0.5", path="../roqoqo", features=["serialize", "overrotate"]} +#roqoqo-derive = {version="0.1", path="../roqoqo-derive"} +numpy = "=0.14" bincode = "1.3" serde_json = "1.0" [dev-dependencies] test-case = "1.1.0" -nalgebra = "0.26" +nalgebra = "0.28" [build-dependencies] quote = "1.0" diff --git a/qoqo/qoqo/DEPENDENCIES b/qoqo/qoqo/DEPENDENCIES index 6d0761c9..c7217b84 100644 --- a/qoqo/qoqo/DEPENDENCIES +++ b/qoqo/qoqo/DEPENDENCIES @@ -1,8 +1,8 @@ ==================================================== -alga 0.9.3 -https://github.com/rustsim/alga -by Brendan Zabarauskas, Darin Morrison, Sébastien Crozet, Wadelma -Abstract algebra for Rust +approx 0.5.0 +https://github.com/brendanzab/approx +by Brendan Zabarauskas +Approximate floating point equality comparisons and assertions. License: Apache-2.0 ---------------------------------------------------- LICENSE: @@ -212,461 +212,309 @@ LICENSE: ==================================================== -approx 0.3.2 -https://github.com/brendanzab/approx -by Brendan Zabarauskas -Approximate floating point equality comparisons and assertions. -License: Apache-2.0 +autocfg 1.0.1 +https://github.com/cuviper/autocfg +by Josh Stone +Automatic cfg for Rust compiler features +License: Apache-2.0 OR MIT ---------------------------------------------------- -LICENSE: - +LICENSE-APACHE: - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - 1. Definitions. +1. Definitions. - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. +2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. +3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: +4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. +5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. +6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. +7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. +8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. - END OF TERMS AND CONDITIONS +9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. - APPENDIX: How to apply the Apache License to your work. +END OF TERMS AND CONDITIONS - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. +APPENDIX: How to apply the Apache License to your work. - Copyright [yyyy] [name of copyright owner] + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at +Copyright [yyyy] [name of copyright owner] - http://www.apache.org/licenses/LICENSE-2.0 +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. + http://www.apache.org/licenses/LICENSE-2.0 +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. -==================================================== -approx 0.4.0 -https://github.com/brendanzab/approx -by Brendan Zabarauskas -Approximate floating point equality comparisons and assertions. -License: Apache-2.0 ---------------------------------------------------- -LICENSE: +LICENSE-MIT: +Copyright (c) 2018 Josh Stone - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ +Permission is hereby granted, free of charge, to any +person obtaining a copy of this software and associated +documentation files (the "Software"), to deal in the +Software without restriction, including without +limitation the rights to use, copy, modify, merge, +publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software +is furnished to do so, subject to the following +conditions: - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION +The above copyright notice and this permission notice +shall be included in all copies or substantial portions +of the Software. - 1. Definitions. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF +ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED +TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A +PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT +SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR +IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +DEALINGS IN THE SOFTWARE. - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. +==================================================== +bincode 1.3.3 +https://github.com/servo/bincode +by Ty Overby , Francesco Mazzoli , David Tolnay , Zoey Riordan +A binary serialization / deserialization strategy that uses Serde for transforming structs into bytes and vice versa! +License: MIT +---------------------------------------------------- +LICENSE.md: - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. +The MIT License (MIT) + +Copyright (c) 2014 Ty Overby + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. +==================================================== +bitflags 1.2.1 +https://github.com/bitflags/bitflags +by The Rust Project Developers +A macro to generate structures which behave like bitflags. - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. +License: MIT/Apache-2.0 +---------------------------------------------------- +LICENSE-APACHE: - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." +1. Definitions. - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - -==================================================== -autocfg 1.0.1 -https://github.com/cuviper/autocfg -by Josh Stone -Automatic cfg for Rust compiler features -License: Apache-2.0 OR MIT ----------------------------------------------------- -LICENSE-APACHE: - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - -TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - -1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. @@ -851,7 +699,7 @@ limitations under the License. ---------------------------------------------------- LICENSE-MIT: -Copyright (c) 2018 Josh Stone +Copyright (c) 2014 The Rust Project Developers Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated @@ -879,42 +727,12 @@ DEALINGS IN THE SOFTWARE. ==================================================== -bincode 1.3.3 -https://github.com/servo/bincode -by Ty Overby , Francesco Mazzoli , David Tolnay , Zoey Riordan -A binary serialization / deserialization strategy that uses Serde for transforming structs into bytes and vice versa! -License: MIT ----------------------------------------------------- -LICENSE.md: - -The MIT License (MIT) - -Copyright (c) 2014 Ty Overby - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - - -==================================================== -bitflags 1.2.1 -https://github.com/bitflags/bitflags -by The Rust Project Developers -A macro to generate structures which behave like bitflags. +cfg-if 0.1.10 +https://github.com/alexcrichton/cfg-if +by Alex Crichton +A macro to ergonomically define an item depending on a large number of #[cfg] +parameters. Structured like an if-else chain, the first matching branch is the +item that gets emitted. License: MIT/Apache-2.0 ---------------------------------------------------- @@ -1125,7 +943,7 @@ limitations under the License. ---------------------------------------------------- LICENSE-MIT: -Copyright (c) 2014 The Rust Project Developers +Copyright (c) 2014 Alex Crichton Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated @@ -1153,7 +971,7 @@ DEALINGS IN THE SOFTWARE. ==================================================== -cfg-if 0.1.10 +cfg-if 1.0.0 https://github.com/alexcrichton/cfg-if by Alex Crichton A macro to ergonomically define an item depending on a large number of #[cfg] @@ -1397,20 +1215,17 @@ DEALINGS IN THE SOFTWARE. ==================================================== -cfg-if 1.0.0 -https://github.com/alexcrichton/cfg-if -by Alex Crichton -A macro to ergonomically define an item depending on a large number of #[cfg] -parameters. Structured like an if-else chain, the first matching branch is the -item that gets emitted. - -License: MIT/Apache-2.0 +getrandom 0.2.3 +https://github.com/rust-random/getrandom +by The Rand Project Developers +A small cross-platform library for retrieving random data from system source +License: MIT OR Apache-2.0 ---------------------------------------------------- LICENSE-APACHE: Apache License Version 2.0, January 2004 - http://www.apache.org/licenses/ + https://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION @@ -1602,7 +1417,7 @@ Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + https://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, @@ -1613,7 +1428,8 @@ limitations under the License. ---------------------------------------------------- LICENSE-MIT: -Copyright (c) 2014 Alex Crichton +Copyright 2018 Developers of the Rand project +Copyright (c) 2014 The Rust Project Developers Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated @@ -1641,405 +1457,13 @@ DEALINGS IN THE SOFTWARE. ==================================================== -crossbeam-channel 0.5.1 -https://github.com/crossbeam-rs/crossbeam/tree/master/crossbeam-channel -by The Crossbeam Project Developers -Multi-producer multi-consumer channels for message passing +indoc 0.3.6 +https://github.com/dtolnay/indoc +by David Tolnay +Indented document literals License: MIT OR Apache-2.0 ---------------------------------------------------- -LICENSE-THIRD-PARTY: - -=============================================================================== - -matching.go -https://creativecommons.org/licenses/by/3.0/legalcode - -Creative Commons Legal Code - -Attribution 3.0 Unported - - CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE - LEGAL SERVICES. DISTRIBUTION OF THIS LICENSE DOES NOT CREATE AN - ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS - INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES - REGARDING THE INFORMATION PROVIDED, AND DISCLAIMS LIABILITY FOR - DAMAGES RESULTING FROM ITS USE. - -License - -THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CREATIVE -COMMONS PUBLIC LICENSE ("CCPL" OR "LICENSE"). THE WORK IS PROTECTED BY -COPYRIGHT AND/OR OTHER APPLICABLE LAW. ANY USE OF THE WORK OTHER THAN AS -AUTHORIZED UNDER THIS LICENSE OR COPYRIGHT LAW IS PROHIBITED. - -BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND AGREE -TO BE BOUND BY THE TERMS OF THIS LICENSE. TO THE EXTENT THIS LICENSE MAY -BE CONSIDERED TO BE A CONTRACT, THE LICENSOR GRANTS YOU THE RIGHTS -CONTAINED HERE IN CONSIDERATION OF YOUR ACCEPTANCE OF SUCH TERMS AND -CONDITIONS. - -1. Definitions - - a. "Adaptation" means a work based upon the Work, or upon the Work and - other pre-existing works, such as a translation, adaptation, - derivative work, arrangement of music or other alterations of a - literary or artistic work, or phonogram or performance and includes - cinematographic adaptations or any other form in which the Work may be - recast, transformed, or adapted including in any form recognizably - derived from the original, except that a work that constitutes a - Collection will not be considered an Adaptation for the purpose of - this License. For the avoidance of doubt, where the Work is a musical - work, performance or phonogram, the synchronization of the Work in - timed-relation with a moving image ("synching") will be considered an - Adaptation for the purpose of this License. - b. "Collection" means a collection of literary or artistic works, such as - encyclopedias and anthologies, or performances, phonograms or - broadcasts, or other works or subject matter other than works listed - in Section 1(f) below, which, by reason of the selection and - arrangement of their contents, constitute intellectual creations, in - which the Work is included in its entirety in unmodified form along - with one or more other contributions, each constituting separate and - independent works in themselves, which together are assembled into a - collective whole. A work that constitutes a Collection will not be - considered an Adaptation (as defined above) for the purposes of this - License. - c. "Distribute" means to make available to the public the original and - copies of the Work or Adaptation, as appropriate, through sale or - other transfer of ownership. - d. "Licensor" means the individual, individuals, entity or entities that - offer(s) the Work under the terms of this License. - e. "Original Author" means, in the case of a literary or artistic work, - the individual, individuals, entity or entities who created the Work - or if no individual or entity can be identified, the publisher; and in - addition (i) in the case of a performance the actors, singers, - musicians, dancers, and other persons who act, sing, deliver, declaim, - play in, interpret or otherwise perform literary or artistic works or - expressions of folklore; (ii) in the case of a phonogram the producer - being the person or legal entity who first fixes the sounds of a - performance or other sounds; and, (iii) in the case of broadcasts, the - organization that transmits the broadcast. - f. "Work" means the literary and/or artistic work offered under the terms - of this License including without limitation any production in the - literary, scientific and artistic domain, whatever may be the mode or - form of its expression including digital form, such as a book, - pamphlet and other writing; a lecture, address, sermon or other work - of the same nature; a dramatic or dramatico-musical work; a - choreographic work or entertainment in dumb show; a musical - composition with or without words; a cinematographic work to which are - assimilated works expressed by a process analogous to cinematography; - a work of drawing, painting, architecture, sculpture, engraving or - lithography; a photographic work to which are assimilated works - expressed by a process analogous to photography; a work of applied - art; an illustration, map, plan, sketch or three-dimensional work - relative to geography, topography, architecture or science; a - performance; a broadcast; a phonogram; a compilation of data to the - extent it is protected as a copyrightable work; or a work performed by - a variety or circus performer to the extent it is not otherwise - considered a literary or artistic work. - g. "You" means an individual or entity exercising rights under this - License who has not previously violated the terms of this License with - respect to the Work, or who has received express permission from the - Licensor to exercise rights under this License despite a previous - violation. - h. "Publicly Perform" means to perform public recitations of the Work and - to communicate to the public those public recitations, by any means or - process, including by wire or wireless means or public digital - performances; to make available to the public Works in such a way that - members of the public may access these Works from a place and at a - place individually chosen by them; to perform the Work to the public - by any means or process and the communication to the public of the - performances of the Work, including by public digital performance; to - broadcast and rebroadcast the Work by any means including signs, - sounds or images. - i. "Reproduce" means to make copies of the Work by any means including - without limitation by sound or visual recordings and the right of - fixation and reproducing fixations of the Work, including storage of a - protected performance or phonogram in digital form or other electronic - medium. - -2. Fair Dealing Rights. Nothing in this License is intended to reduce, -limit, or restrict any uses free from copyright or rights arising from -limitations or exceptions that are provided for in connection with the -copyright protection under copyright law or other applicable laws. - -3. License Grant. Subject to the terms and conditions of this License, -Licensor hereby grants You a worldwide, royalty-free, non-exclusive, -perpetual (for the duration of the applicable copyright) license to -exercise the rights in the Work as stated below: - - a. to Reproduce the Work, to incorporate the Work into one or more - Collections, and to Reproduce the Work as incorporated in the - Collections; - b. to create and Reproduce Adaptations provided that any such Adaptation, - including any translation in any medium, takes reasonable steps to - clearly label, demarcate or otherwise identify that changes were made - to the original Work. For example, a translation could be marked "The - original work was translated from English to Spanish," or a - modification could indicate "The original work has been modified."; - c. to Distribute and Publicly Perform the Work including as incorporated - in Collections; and, - d. to Distribute and Publicly Perform Adaptations. - e. For the avoidance of doubt: - - i. Non-waivable Compulsory License Schemes. In those jurisdictions in - which the right to collect royalties through any statutory or - compulsory licensing scheme cannot be waived, the Licensor - reserves the exclusive right to collect such royalties for any - exercise by You of the rights granted under this License; - ii. Waivable Compulsory License Schemes. In those jurisdictions in - which the right to collect royalties through any statutory or - compulsory licensing scheme can be waived, the Licensor waives the - exclusive right to collect such royalties for any exercise by You - of the rights granted under this License; and, - iii. Voluntary License Schemes. The Licensor waives the right to - collect royalties, whether individually or, in the event that the - Licensor is a member of a collecting society that administers - voluntary licensing schemes, via that society, from any exercise - by You of the rights granted under this License. - -The above rights may be exercised in all media and formats whether now -known or hereafter devised. The above rights include the right to make -such modifications as are technically necessary to exercise the rights in -other media and formats. Subject to Section 8(f), all rights not expressly -granted by Licensor are hereby reserved. - -4. Restrictions. The license granted in Section 3 above is expressly made -subject to and limited by the following restrictions: - - a. You may Distribute or Publicly Perform the Work only under the terms - of this License. You must include a copy of, or the Uniform Resource - Identifier (URI) for, this License with every copy of the Work You - Distribute or Publicly Perform. You may not offer or impose any terms - on the Work that restrict the terms of this License or the ability of - the recipient of the Work to exercise the rights granted to that - recipient under the terms of the License. You may not sublicense the - Work. You must keep intact all notices that refer to this License and - to the disclaimer of warranties with every copy of the Work You - Distribute or Publicly Perform. When You Distribute or Publicly - Perform the Work, You may not impose any effective technological - measures on the Work that restrict the ability of a recipient of the - Work from You to exercise the rights granted to that recipient under - the terms of the License. This Section 4(a) applies to the Work as - incorporated in a Collection, but this does not require the Collection - apart from the Work itself to be made subject to the terms of this - License. If You create a Collection, upon notice from any Licensor You - must, to the extent practicable, remove from the Collection any credit - as required by Section 4(b), as requested. If You create an - Adaptation, upon notice from any Licensor You must, to the extent - practicable, remove from the Adaptation any credit as required by - Section 4(b), as requested. - b. If You Distribute, or Publicly Perform the Work or any Adaptations or - Collections, You must, unless a request has been made pursuant to - Section 4(a), keep intact all copyright notices for the Work and - provide, reasonable to the medium or means You are utilizing: (i) the - name of the Original Author (or pseudonym, if applicable) if supplied, - and/or if the Original Author and/or Licensor designate another party - or parties (e.g., a sponsor institute, publishing entity, journal) for - attribution ("Attribution Parties") in Licensor's copyright notice, - terms of service or by other reasonable means, the name of such party - or parties; (ii) the title of the Work if supplied; (iii) to the - extent reasonably practicable, the URI, if any, that Licensor - specifies to be associated with the Work, unless such URI does not - refer to the copyright notice or licensing information for the Work; - and (iv) , consistent with Section 3(b), in the case of an Adaptation, - a credit identifying the use of the Work in the Adaptation (e.g., - "French translation of the Work by Original Author," or "Screenplay - based on original Work by Original Author"). The credit required by - this Section 4 (b) may be implemented in any reasonable manner; - provided, however, that in the case of a Adaptation or Collection, at - a minimum such credit will appear, if a credit for all contributing - authors of the Adaptation or Collection appears, then as part of these - credits and in a manner at least as prominent as the credits for the - other contributing authors. For the avoidance of doubt, You may only - use the credit required by this Section for the purpose of attribution - in the manner set out above and, by exercising Your rights under this - License, You may not implicitly or explicitly assert or imply any - connection with, sponsorship or endorsement by the Original Author, - Licensor and/or Attribution Parties, as appropriate, of You or Your - use of the Work, without the separate, express prior written - permission of the Original Author, Licensor and/or Attribution - Parties. - c. Except as otherwise agreed in writing by the Licensor or as may be - otherwise permitted by applicable law, if You Reproduce, Distribute or - Publicly Perform the Work either by itself or as part of any - Adaptations or Collections, You must not distort, mutilate, modify or - take other derogatory action in relation to the Work which would be - prejudicial to the Original Author's honor or reputation. Licensor - agrees that in those jurisdictions (e.g. Japan), in which any exercise - of the right granted in Section 3(b) of this License (the right to - make Adaptations) would be deemed to be a distortion, mutilation, - modification or other derogatory action prejudicial to the Original - Author's honor and reputation, the Licensor will waive or not assert, - as appropriate, this Section, to the fullest extent permitted by the - applicable national law, to enable You to reasonably exercise Your - right under Section 3(b) of this License (right to make Adaptations) - but not otherwise. - -5. Representations, Warranties and Disclaimer - -UNLESS OTHERWISE MUTUALLY AGREED TO BY THE PARTIES IN WRITING, LICENSOR -OFFERS THE WORK AS-IS AND MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY -KIND CONCERNING THE WORK, EXPRESS, IMPLIED, STATUTORY OR OTHERWISE, -INCLUDING, WITHOUT LIMITATION, WARRANTIES OF TITLE, MERCHANTIBILITY, -FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR THE ABSENCE OF -LATENT OR OTHER DEFECTS, ACCURACY, OR THE PRESENCE OF ABSENCE OF ERRORS, -WHETHER OR NOT DISCOVERABLE. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION -OF IMPLIED WARRANTIES, SO SUCH EXCLUSION MAY NOT APPLY TO YOU. - -6. Limitation on Liability. EXCEPT TO THE EXTENT REQUIRED BY APPLICABLE -LAW, IN NO EVENT WILL LICENSOR BE LIABLE TO YOU ON ANY LEGAL THEORY FOR -ANY SPECIAL, INCIDENTAL, CONSEQUENTIAL, PUNITIVE OR EXEMPLARY DAMAGES -ARISING OUT OF THIS LICENSE OR THE USE OF THE WORK, EVEN IF LICENSOR HAS -BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - -7. Termination - - a. This License and the rights granted hereunder will terminate - automatically upon any breach by You of the terms of this License. - Individuals or entities who have received Adaptations or Collections - from You under this License, however, will not have their licenses - terminated provided such individuals or entities remain in full - compliance with those licenses. Sections 1, 2, 5, 6, 7, and 8 will - survive any termination of this License. - b. Subject to the above terms and conditions, the license granted here is - perpetual (for the duration of the applicable copyright in the Work). - Notwithstanding the above, Licensor reserves the right to release the - Work under different license terms or to stop distributing the Work at - any time; provided, however that any such election will not serve to - withdraw this License (or any other license that has been, or is - required to be, granted under the terms of this License), and this - License will continue in full force and effect unless terminated as - stated above. - -8. Miscellaneous - - a. Each time You Distribute or Publicly Perform the Work or a Collection, - the Licensor offers to the recipient a license to the Work on the same - terms and conditions as the license granted to You under this License. - b. Each time You Distribute or Publicly Perform an Adaptation, Licensor - offers to the recipient a license to the original Work on the same - terms and conditions as the license granted to You under this License. - c. If any provision of this License is invalid or unenforceable under - applicable law, it shall not affect the validity or enforceability of - the remainder of the terms of this License, and without further action - by the parties to this agreement, such provision shall be reformed to - the minimum extent necessary to make such provision valid and - enforceable. - d. No term or provision of this License shall be deemed waived and no - breach consented to unless such waiver or consent shall be in writing - and signed by the party to be charged with such waiver or consent. - e. This License constitutes the entire agreement between the parties with - respect to the Work licensed here. There are no understandings, - agreements or representations with respect to the Work not specified - here. Licensor shall not be bound by any additional provisions that - may appear in any communication from You. This License may not be - modified without the mutual written agreement of the Licensor and You. - f. The rights granted under, and the subject matter referenced, in this - License were drafted utilizing the terminology of the Berne Convention - for the Protection of Literary and Artistic Works (as amended on - September 28, 1979), the Rome Convention of 1961, the WIPO Copyright - Treaty of 1996, the WIPO Performances and Phonograms Treaty of 1996 - and the Universal Copyright Convention (as revised on July 24, 1971). - These rights and subject matter take effect in the relevant - jurisdiction in which the License terms are sought to be enforced - according to the corresponding provisions of the implementation of - those treaty provisions in the applicable national law. If the - standard suite of rights granted under applicable copyright law - includes additional rights not granted under this License, such - additional rights are deemed to be included in the License; this - License is not intended to restrict the license of any rights under - applicable law. - - -Creative Commons Notice - - Creative Commons is not a party to this License, and makes no warranty - whatsoever in connection with the Work. Creative Commons will not be - liable to You or any party on any legal theory for any damages - whatsoever, including without limitation any general, special, - incidental or consequential damages arising in connection to this - license. Notwithstanding the foregoing two (2) sentences, if Creative - Commons has expressly identified itself as the Licensor hereunder, it - shall have all rights and obligations of Licensor. - - Except for the limited purpose of indicating to the public that the - Work is licensed under the CCPL, Creative Commons does not authorize - the use by either party of the trademark "Creative Commons" or any - related trademark or logo of Creative Commons without the prior - written consent of Creative Commons. Any permitted use will be in - compliance with Creative Commons' then-current trademark usage - guidelines, as may be published on its website or otherwise made - available upon request from time to time. For the avoidance of doubt, - this trademark restriction does not form part of this License. - - Creative Commons may be contacted at https://creativecommons.org/. - -=============================================================================== - -The Go Programming Language -https://golang.org/LICENSE - -Copyright (c) 2009 The Go Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -=============================================================================== - -The Rust Programming Language -https://github.com/rust-lang/rust/blob/master/LICENSE-MIT - -Permission is hereby granted, free of charge, to any -person obtaining a copy of this software and associated -documentation files (the "Software"), to deal in the -Software without restriction, including without -limitation the rights to use, copy, modify, merge, -publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software -is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice -shall be included in all copies or substantial portions -of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF -ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT -SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR -IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -DEALINGS IN THE SOFTWARE. - -=============================================================================== - -The Rust Programming Language -https://github.com/rust-lang/rust/blob/master/LICENSE-APACHE +LICENSE-APACHE: Apache License Version 2.0, January 2004 @@ -2244,15 +1668,49 @@ See the License for the specific language governing permissions and limitations under the License. ---------------------------------------------------- -LICENSE-APACHE: - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - -TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION +LICENSE-MIT: -1. Definitions. +Permission is hereby granted, free of charge, to any +person obtaining a copy of this software and associated +documentation files (the "Software"), to deal in the +Software without restriction, including without +limitation the rights to use, copy, modify, merge, +publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software +is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice +shall be included in all copies or substantial portions +of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF +ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED +TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A +PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT +SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR +IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +DEALINGS IN THE SOFTWARE. + + +==================================================== +indoc-impl 0.3.6 +https://github.com/dtolnay/indoc +by David Tolnay +Indented document literals +License: MIT OR Apache-2.0 +---------------------------------------------------- +LICENSE-APACHE: + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. @@ -2451,10 +1909,6 @@ limitations under the License. ---------------------------------------------------- LICENSE-MIT: -The MIT License (MIT) - -Copyright (c) 2019 The Crossbeam Project Developers - Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the @@ -2481,10 +1935,48 @@ DEALINGS IN THE SOFTWARE. ==================================================== -crossbeam-deque 0.8.0 -https://github.com/crossbeam-rs/crossbeam/tree/master/crossbeam-deque -by The Crossbeam Project Developers -Concurrent work-stealing deque +instant 0.1.10 +https://github.com/sebcrozet/instant +by sebcrozet +A partial replacement for std::time::Instant that works on WASM too. +License: BSD-3-Clause +---------------------------------------------------- +LICENSE: + +Copyright (c) 2019, Sébastien Crozet +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +3. Neither the name of the author nor the names of its contributors may be used + to endorse or promote products derived from this software without specific + prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +==================================================== +itoa 0.4.7 +https://github.com/dtolnay/itoa +by David Tolnay +Fast functions for printing integer primitives to an io::Write License: MIT OR Apache-2.0 ---------------------------------------------------- LICENSE-APACHE: @@ -2694,10 +2186,6 @@ limitations under the License. ---------------------------------------------------- LICENSE-MIT: -The MIT License (MIT) - -Copyright (c) 2019 The Crossbeam Project Developers - Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the @@ -2724,10 +2212,11 @@ DEALINGS IN THE SOFTWARE. ==================================================== -crossbeam-epoch 0.9.5 -https://github.com/crossbeam-rs/crossbeam/tree/master/crossbeam-epoch -by The Crossbeam Project Developers -Epoch-based garbage collection +libc 0.2.98 +https://github.com/rust-lang/libc +by The Rust Project Developers +Raw FFI bindings to platform libraries like libc. + License: MIT OR Apache-2.0 ---------------------------------------------------- LICENSE-APACHE: @@ -2937,9 +2426,7 @@ limitations under the License. ---------------------------------------------------- LICENSE-MIT: -The MIT License (MIT) - -Copyright (c) 2019 The Crossbeam Project Developers +Copyright (c) 2014-2020 The Rust Project Developers Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated @@ -2967,10 +2454,10 @@ DEALINGS IN THE SOFTWARE. ==================================================== -crossbeam-utils 0.8.5 -https://github.com/crossbeam-rs/crossbeam/tree/master/crossbeam-utils -by The Crossbeam Project Developers -Utilities for concurrent programming +libm 0.2.1 +https://github.com/rust-lang/libm +by Jorge Aparicio +libm in pure Rust License: MIT OR Apache-2.0 ---------------------------------------------------- LICENSE-APACHE: @@ -3180,9 +2667,7 @@ limitations under the License. ---------------------------------------------------- LICENSE-MIT: -The MIT License (MIT) - -Copyright (c) 2019 The Crossbeam Project Developers +Copyright (c) 2018 Jorge Aparicio Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated @@ -3210,322 +2695,101 @@ DEALINGS IN THE SOFTWARE. ==================================================== -ctor 0.1.20 -https://github.com/mmastrac/rust-ctor -by Matt Mastracci -__attribute__((constructor)) for Rust -License: Apache-2.0 OR MIT +lock_api 0.4.4 +https://github.com/Amanieu/parking_lot +by Amanieu d'Antras +Wrappers to create fully-featured Mutex and RwLock types. Compatible with no_std. +License: Apache-2.0/MIT ---------------------------------------------------- LICENSE-APACHE: -Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - 1. Definitions. +1. Definitions. - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. +2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "{}" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright {yyyy} {name of copyright owner} - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - ----------------------------------------------------- -LICENSE-MIT: - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -==================================================== -either 1.6.1 -https://github.com/bluss/either -by bluss -The enum `Either` with variants `Left` and `Right` is a general purpose sum type with two cases. - -License: MIT/Apache-2.0 ----------------------------------------------------- -LICENSE-APACHE: - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - -TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - -1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - -2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - -3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. +3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without @@ -3644,7 +2908,7 @@ limitations under the License. ---------------------------------------------------- LICENSE-MIT: -Copyright (c) 2015 +Copyright (c) 2016 The Rust Project Developers Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated @@ -3672,17 +2936,19 @@ DEALINGS IN THE SOFTWARE. ==================================================== -getrandom 0.2.3 -https://github.com/rust-random/getrandom -by The Rand Project Developers -A small cross-platform library for retrieving random data from system source -License: MIT OR Apache-2.0 +matrixmultiply 0.3.1 +https://github.com/bluss/matrixmultiply/ +by bluss, R. Janis Goldschmidt +General matrix multiplication for f32 and f64 matrices. Operates on matrices with general layout (they can use arbitrary row and column stride). Detects and uses AVX or SSE2 on x86 platforms transparently for higher performance. Uses a microkernel strategy, so that the implementation is easy to parallelize and optimize. + +Supports multithreading. +License: MIT/Apache-2.0 ---------------------------------------------------- LICENSE-APACHE: Apache License Version 2.0, January 2004 - https://www.apache.org/licenses/ + http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION @@ -3874,7 +3140,7 @@ Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at - https://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, @@ -3885,8 +3151,7 @@ limitations under the License. ---------------------------------------------------- LICENSE-MIT: -Copyright 2018 Developers of the Rand project -Copyright (c) 2014 The Rust Project Developers +Copyright (c) 2016 - 2018 Ulrik Sverdrup "bluss" Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated @@ -3914,24 +3179,243 @@ DEALINGS IN THE SOFTWARE. ==================================================== -ghost 0.1.2 -https://github.com/dtolnay/ghost -by David Tolnay -Define your own PhantomData -License: MIT OR Apache-2.0 +nalgebra 0.28.0 +https://nalgebra.org +by Sébastien Crozet +General-purpose linear algebra library with transformations and statically-sized or dynamically-sized matrices. +License: BSD-3-Clause ---------------------------------------------------- -LICENSE-APACHE: +LICENSE: - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ -TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION -1. Definitions. + 1. Definitions. - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2020 Sébastien Crozet + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + +==================================================== +nalgebra-macros 0.1.0 +https://nalgebra.org +by Andreas Longva, Sébastien Crozet +Procedural macros for nalgebra +License: Apache-2.0 + +==================================================== +ndarray 0.15.3 +https://github.com/rust-ndarray/ndarray +by Ulrik Sverdrup "bluss", Jim Turner +An n-dimensional array for general elements and for numerics. Lightweight array views and slicing; views support chunking and splitting. +License: MIT OR Apache-2.0 +---------------------------------------------------- +LICENSE-APACHE: + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. @@ -4127,6 +3611,10 @@ limitations under the License. ---------------------------------------------------- LICENSE-MIT: +Copyright (c) 2015 - 2021 Ulrik Sverdrup "bluss", + Jim Turner, + and ndarray developers + Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the @@ -4153,13 +3641,11 @@ DEALINGS IN THE SOFTWARE. ==================================================== -hermit-abi 0.1.19 -https://github.com/hermitcore/libhermit-rs -by Stefan Lankes -hermit-abi is small interface to call functions from the unikernel RustyHermit. -It is used to build the target `x86_64-unknown-hermit`. - -License: MIT/Apache-2.0 +num-complex 0.3.1 +https://github.com/rust-num/num-complex +by The Rust Project Developers +Complex numbers implementation for Rust +License: MIT OR Apache-2.0 ---------------------------------------------------- LICENSE-APACHE: @@ -4368,6 +3854,8 @@ limitations under the License. ---------------------------------------------------- LICENSE-MIT: +Copyright (c) 2014 The Rust Project Developers + Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the @@ -4394,10 +3882,10 @@ DEALINGS IN THE SOFTWARE. ==================================================== -indoc 0.3.6 -https://github.com/dtolnay/indoc -by David Tolnay -Indented document literals +num-complex 0.4.0 +https://github.com/rust-num/num-complex +by The Rust Project Developers +Complex numbers implementation for Rust License: MIT OR Apache-2.0 ---------------------------------------------------- LICENSE-APACHE: @@ -4607,6 +4095,8 @@ limitations under the License. ---------------------------------------------------- LICENSE-MIT: +Copyright (c) 2014 The Rust Project Developers + Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the @@ -4633,10 +4123,10 @@ DEALINGS IN THE SOFTWARE. ==================================================== -indoc-impl 0.3.6 -https://github.com/dtolnay/indoc -by David Tolnay -Indented document literals +num-integer 0.1.44 +https://github.com/rust-num/num-integer +by The Rust Project Developers +Integer traits and functions License: MIT OR Apache-2.0 ---------------------------------------------------- LICENSE-APACHE: @@ -4846,6 +4336,8 @@ limitations under the License. ---------------------------------------------------- LICENSE-MIT: +Copyright (c) 2014 The Rust Project Developers + Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the @@ -4872,51 +4364,13 @@ DEALINGS IN THE SOFTWARE. ==================================================== -instant 0.1.9 -https://github.com/sebcrozet/instant -by sebcrozet -A partial replacement for std::time::Instant that works on WASM too. -License: BSD-3-Clause +num-rational 0.4.0 +https://github.com/rust-num/num-rational +by The Rust Project Developers +Rational numbers implementation for Rust +License: MIT OR Apache-2.0 ---------------------------------------------------- -LICENSE: - -Copyright (c) 2019, Sébastien Crozet -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -1. Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -3. Neither the name of the author nor the names of its contributors may be used - to endorse or promote products derived from this software without specific - prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - -==================================================== -inventory 0.1.10 -https://github.com/dtolnay/inventory -by David Tolnay -Typed distributed plugin registration -License: MIT OR Apache-2.0 ----------------------------------------------------- -LICENSE-APACHE: +LICENSE-APACHE: Apache License Version 2.0, January 2004 @@ -5123,6 +4577,8 @@ limitations under the License. ---------------------------------------------------- LICENSE-MIT: +Copyright (c) 2014 The Rust Project Developers + Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the @@ -5149,10 +4605,10 @@ DEALINGS IN THE SOFTWARE. ==================================================== -inventory-impl 0.1.10 -https://github.com/dtolnay/inventory -by David Tolnay -Implementation of macros for the `inventory` crate +num-traits 0.2.14 +https://github.com/rust-num/num-traits +by The Rust Project Developers +Numeric traits for generic mathematics License: MIT OR Apache-2.0 ---------------------------------------------------- LICENSE-APACHE: @@ -5362,6 +4818,8 @@ limitations under the License. ---------------------------------------------------- LICENSE-MIT: +Copyright (c) 2014 The Rust Project Developers + Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the @@ -5388,10 +4846,46 @@ DEALINGS IN THE SOFTWARE. ==================================================== -itoa 0.4.7 -https://github.com/dtolnay/itoa -by David Tolnay -Fast functions for printing integer primitives to an io::Write +numpy 0.14.1 +https://github.com/rust-numpy/rust-numpy +by Toshiki Teramura , Yuji Kanagawa +Rust binding of NumPy C-API +License: BSD-2-Clause +---------------------------------------------------- +LICENSE: + +BSD 2-Clause License + +Copyright (c) 2017, Toshiki Teramura +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +==================================================== +once_cell 1.8.0 +https://github.com/matklad/once_cell +by Aleksey Kladov +Single assignment cells and lazy values. License: MIT OR Apache-2.0 ---------------------------------------------------- LICENSE-APACHE: @@ -5627,11 +5121,11 @@ DEALINGS IN THE SOFTWARE. ==================================================== -lazy_static 1.4.0 -https://github.com/rust-lang-nursery/lazy-static.rs -by Marvin Löbel -A macro for declaring lazily evaluated statics in Rust. -License: MIT/Apache-2.0 +parking_lot 0.11.1 +https://github.com/Amanieu/parking_lot +by Amanieu d'Antras +More compact and efficient implementations of the standard synchronization primitives. +License: Apache-2.0/MIT ---------------------------------------------------- LICENSE-APACHE: @@ -5840,7 +5334,7 @@ limitations under the License. ---------------------------------------------------- LICENSE-MIT: -Copyright (c) 2010 The Rust Project Developers +Copyright (c) 2016 The Rust Project Developers Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated @@ -5868,12 +5362,11 @@ DEALINGS IN THE SOFTWARE. ==================================================== -libc 0.2.98 -https://github.com/rust-lang/libc -by The Rust Project Developers -Raw FFI bindings to platform libraries like libc. - -License: MIT OR Apache-2.0 +parking_lot_core 0.8.3 +https://github.com/Amanieu/parking_lot +by Amanieu d'Antras +An advanced API for creating custom synchronization primitives. +License: Apache-2.0/MIT ---------------------------------------------------- LICENSE-APACHE: @@ -6082,7 +5575,7 @@ limitations under the License. ---------------------------------------------------- LICENSE-MIT: -Copyright (c) 2014-2020 The Rust Project Developers +Copyright (c) 2016 The Rust Project Developers Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated @@ -6110,10 +5603,10 @@ DEALINGS IN THE SOFTWARE. ==================================================== -libm 0.2.1 -https://github.com/rust-lang/libm -by Jorge Aparicio -libm in pure Rust +paste 0.1.18 +https://github.com/dtolnay/paste +by David Tolnay +Macros for all your token pasting needs License: MIT OR Apache-2.0 ---------------------------------------------------- LICENSE-APACHE: @@ -6323,7 +5816,7 @@ limitations under the License. ---------------------------------------------------- LICENSE-MIT: -Copyright (c) 2018 Jorge Aparicio +Copyright (c) 2018 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated @@ -6351,11 +5844,11 @@ DEALINGS IN THE SOFTWARE. ==================================================== -lock_api 0.4.4 -https://github.com/Amanieu/parking_lot -by Amanieu d'Antras -Wrappers to create fully-featured Mutex and RwLock types. Compatible with no_std. -License: Apache-2.0/MIT +paste 1.0.5 +https://github.com/dtolnay/paste +by David Tolnay +Macros for all your token pasting needs +License: MIT OR Apache-2.0 ---------------------------------------------------- LICENSE-APACHE: @@ -6564,7 +6057,7 @@ limitations under the License. ---------------------------------------------------- LICENSE-MIT: -Copyright (c) 2016 The Rust Project Developers +Copyright (c) 2018 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated @@ -6592,11 +6085,11 @@ DEALINGS IN THE SOFTWARE. ==================================================== -matrixmultiply 0.2.4 -https://github.com/bluss/matrixmultiply/ -by bluss, R. Janis Goldschmidt -General matrix multiplication for f32 and f64 matrices. Operates on matrices with general layout (they can use arbitrary row and column stride). Detects and uses AVX or SSE2 on x86 platforms transparently for higher performance. Uses a microkernel strategy, so that the implementation is easy to parallelize and optimize. -License: MIT/Apache-2.0 +paste-impl 0.1.18 +https://github.com/dtolnay/paste +by David Tolnay +Implementation detail of the `paste` crate +License: MIT OR Apache-2.0 ---------------------------------------------------- LICENSE-APACHE: @@ -6805,7 +6298,7 @@ limitations under the License. ---------------------------------------------------- LICENSE-MIT: -Copyright (c) 2016 - 2018 Ulrik Sverdrup "bluss" +Copyright (c) 2018 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated @@ -6833,12 +6326,10 @@ DEALINGS IN THE SOFTWARE. ==================================================== -matrixmultiply 0.3.1 -https://github.com/bluss/matrixmultiply/ -by bluss, R. Janis Goldschmidt -General matrix multiplication for f32 and f64 matrices. Operates on matrices with general layout (they can use arbitrary row and column stride). Detects and uses AVX or SSE2 on x86 platforms transparently for higher performance. Uses a microkernel strategy, so that the implementation is easy to parallelize and optimize. - -Supports multithreading. +ppv-lite86 0.2.10 +https://github.com/cryptocorrosion/cryptocorrosion +by The CryptoCorrosion Contributors +Implementation of the crypto-simd API for x86 License: MIT/Apache-2.0 ---------------------------------------------------- LICENSE-APACHE: @@ -7031,13 +6522,13 @@ APPENDIX: How to apply the Apache License to your work. same "printed page" as the copyright notice for easier identification within third-party archives. -Copyright [yyyy] [name of copyright owner] +Copyright 2019 The CryptoCorrosion Contributors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, @@ -7048,7 +6539,7 @@ limitations under the License. ---------------------------------------------------- LICENSE-MIT: -Copyright (c) 2016 - 2018 Ulrik Sverdrup "bluss" +Copyright (c) 2019 The CryptoCorrosion Contributors Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated @@ -7076,326 +6567,85 @@ DEALINGS IN THE SOFTWARE. ==================================================== -memoffset 0.6.4 -https://github.com/Gilnaa/memoffset -by Gilad Naaman -offset_of functionality for Rust structs. -License: MIT +proc-macro-hack 0.5.19 +https://github.com/dtolnay/proc-macro-hack +by David Tolnay +Procedural macros in expression position +License: MIT OR Apache-2.0 ---------------------------------------------------- -LICENSE: +LICENSE-APACHE: -Copyright (c) 2017 Gilad Naaman + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. +1. Definitions. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. -==================================================== -nalgebra 0.26.2 -https://nalgebra.org -by Sébastien Crozet -General-purpose linear algebra library with transformations and statically-sized or dynamically-sized matrices. -License: BSD-3-Clause ----------------------------------------------------- -LICENSE: + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. - 1. Definitions. + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright 2020 Sébastien Crozet - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - -==================================================== -ndarray 0.14.0 -https://github.com/rust-ndarray/ndarray -by bluss, Jim Turner -An n-dimensional array for general elements and for numerics. Lightweight array views and slicing; views support chunking and splitting. -License: MIT OR Apache-2.0 ----------------------------------------------------- -LICENSE-APACHE: - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - -TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - -1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - -2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. +2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, @@ -7530,9 +6780,7 @@ limitations under the License. ---------------------------------------------------- LICENSE-MIT: -Copyright (c) 2015 - 2018 Ulrik Sverdrup "bluss", - Jim Turner, - and ndarray developers +Copyright (c) 2018 David Tolnay Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated @@ -7560,15 +6808,17 @@ DEALINGS IN THE SOFTWARE. ==================================================== -num-complex 0.2.4 -https://github.com/rust-num/num-complex -by The Rust Project Developers -Complex numbers implementation for Rust -License: MIT/Apache-2.0 ----------------------------------------------------- -LICENSE-APACHE: - - Apache License +proc-macro2 1.0.27 +https://github.com/alexcrichton/proc-macro2 +by Alex Crichton , David Tolnay +A substitute implementation of the compiler's `proc_macro` API to decouple +token-based libraries from the procedural macro use case. + +License: MIT OR Apache-2.0 +---------------------------------------------------- +LICENSE-APACHE: + + Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ @@ -7773,7 +7023,7 @@ limitations under the License. ---------------------------------------------------- LICENSE-MIT: -Copyright (c) 2014 The Rust Project Developers +Copyright (c) 2014 Alex Crichton Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated @@ -7801,4264 +7051,851 @@ DEALINGS IN THE SOFTWARE. ==================================================== -num-complex 0.3.1 -https://github.com/rust-num/num-complex -by The Rust Project Developers -Complex numbers implementation for Rust -License: MIT OR Apache-2.0 +pyo3 0.14.1 +https://github.com/pyo3/pyo3 +by PyO3 Project and Contributors +Bindings to Python interpreter +License: Apache-2.0 ---------------------------------------------------- -LICENSE-APACHE: +LICENSE: - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ + Copyright (c) 2017-present PyO3 Project and Contributors. https://github.com/PyO3 -TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at -1. Definitions. + http://www.apache.org/licenses/LICENSE-2.0 - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. + 1. Definitions. - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. -2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. -3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). -4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: -5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and -6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and -7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and -8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - -9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. -END OF TERMS AND CONDITIONS + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. -APPENDIX: How to apply the Apache License to your work. + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. -Copyright [yyyy] [name of copyright owner] + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. - http://www.apache.org/licenses/LICENSE-2.0 + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. +==================================================== +pyo3-build-config 0.14.1 +https://github.com/pyo3/pyo3 +by PyO3 Project and Contributors +Build configuration for the PyO3 ecosystem +License: Apache-2.0 ---------------------------------------------------- -LICENSE-MIT: +LICENSE: -Copyright (c) 2014 The Rust Project Developers + Copyright (c) 2017-present PyO3 Project and Contributors. https://github.com/PyO3 -Permission is hereby granted, free of charge, to any -person obtaining a copy of this software and associated -documentation files (the "Software"), to deal in the -Software without restriction, including without -limitation the rights to use, copy, modify, merge, -publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software -is furnished to do so, subject to the following -conditions: + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at -The above copyright notice and this permission notice -shall be included in all copies or substantial portions -of the Software. + http://www.apache.org/licenses/LICENSE-2.0 -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF -ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT -SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR -IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -DEALINGS IN THE SOFTWARE. + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. -==================================================== -num-integer 0.1.44 -https://github.com/rust-num/num-integer -by The Rust Project Developers -Integer traits and functions -License: MIT OR Apache-2.0 ----------------------------------------------------- -LICENSE-APACHE: + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION -TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + 1. Definitions. -1. Definitions. + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. -2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - -3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. -4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. -5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. -6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. -7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. -8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. -9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. -END OF TERMS AND CONDITIONS -APPENDIX: How to apply the Apache License to your work. +==================================================== +pyo3-macros 0.14.1 +https://github.com/pyo3/pyo3 +by PyO3 Project and Contributors +Proc macros for PyO3 package +License: Apache-2.0 +---------------------------------------------------- +LICENSE: - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. + Copyright (c) 2017-present PyO3 Project and Contributors. https://github.com/PyO3 -Copyright [yyyy] [name of copyright owner] + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at + http://www.apache.org/licenses/LICENSE-2.0 - http://www.apache.org/licenses/LICENSE-2.0 + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. ----------------------------------------------------- -LICENSE-MIT: + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ -Copyright (c) 2014 The Rust Project Developers + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION -Permission is hereby granted, free of charge, to any -person obtaining a copy of this software and associated -documentation files (the "Software"), to deal in the -Software without restriction, including without -limitation the rights to use, copy, modify, merge, -publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software -is furnished to do so, subject to the following -conditions: + 1. Definitions. -The above copyright notice and this permission notice -shall be included in all copies or substantial portions -of the Software. + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF -ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT -SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR -IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -DEALINGS IN THE SOFTWARE. + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. -==================================================== -num-rational 0.3.2 -https://github.com/rust-num/num-rational -by The Rust Project Developers -Rational numbers implementation for Rust -License: MIT OR Apache-2.0 ----------------------------------------------------- -LICENSE-APACHE: - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - -TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - -1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - -2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - -3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - -4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - -5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - -6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - -7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - -8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - -9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - -END OF TERMS AND CONDITIONS - -APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - -Copyright [yyyy] [name of copyright owner] - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. - ----------------------------------------------------- -LICENSE-MIT: - -Copyright (c) 2014 The Rust Project Developers - -Permission is hereby granted, free of charge, to any -person obtaining a copy of this software and associated -documentation files (the "Software"), to deal in the -Software without restriction, including without -limitation the rights to use, copy, modify, merge, -publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software -is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice -shall be included in all copies or substantial portions -of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF -ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT -SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR -IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -DEALINGS IN THE SOFTWARE. - - -==================================================== -num-traits 0.2.14 -https://github.com/rust-num/num-traits -by The Rust Project Developers -Numeric traits for generic mathematics -License: MIT OR Apache-2.0 ----------------------------------------------------- -LICENSE-APACHE: - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - -TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - -1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - -2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - -3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - -4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - -5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - -6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - -7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - -8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - -9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - -END OF TERMS AND CONDITIONS - -APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - -Copyright [yyyy] [name of copyright owner] - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. - ----------------------------------------------------- -LICENSE-MIT: - -Copyright (c) 2014 The Rust Project Developers - -Permission is hereby granted, free of charge, to any -person obtaining a copy of this software and associated -documentation files (the "Software"), to deal in the -Software without restriction, including without -limitation the rights to use, copy, modify, merge, -publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software -is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice -shall be included in all copies or substantial portions -of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF -ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT -SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR -IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -DEALINGS IN THE SOFTWARE. - - -==================================================== -num_cpus 1.13.0 -https://github.com/seanmonstar/num_cpus -by Sean McArthur -Get the number of CPUs on a machine. -License: MIT/Apache-2.0 ----------------------------------------------------- -LICENSE-APACHE: - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - -TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - -1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - -2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - -3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - -4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - -5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - -6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - -7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - -8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - -9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - -END OF TERMS AND CONDITIONS - -APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - -Copyright [yyyy] [name of copyright owner] - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. - ----------------------------------------------------- -LICENSE-MIT: - -Copyright (c) 2015 - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - - - -==================================================== -numpy 0.13.1 -https://github.com/rust-numpy/rust-numpy -by Toshiki Teramura , Yuji Kanagawa -Rust binding of NumPy C-API - -==================================================== -parking_lot 0.11.1 -https://github.com/Amanieu/parking_lot -by Amanieu d'Antras -More compact and efficient implementations of the standard synchronization primitives. -License: Apache-2.0/MIT ----------------------------------------------------- -LICENSE-APACHE: - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - -TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - -1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - -2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - -3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - -4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - -5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - -6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - -7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - -8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - -9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - -END OF TERMS AND CONDITIONS - -APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - -Copyright [yyyy] [name of copyright owner] - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. - ----------------------------------------------------- -LICENSE-MIT: - -Copyright (c) 2016 The Rust Project Developers - -Permission is hereby granted, free of charge, to any -person obtaining a copy of this software and associated -documentation files (the "Software"), to deal in the -Software without restriction, including without -limitation the rights to use, copy, modify, merge, -publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software -is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice -shall be included in all copies or substantial portions -of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF -ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT -SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR -IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -DEALINGS IN THE SOFTWARE. - - -==================================================== -parking_lot_core 0.8.3 -https://github.com/Amanieu/parking_lot -by Amanieu d'Antras -An advanced API for creating custom synchronization primitives. -License: Apache-2.0/MIT ----------------------------------------------------- -LICENSE-APACHE: - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - -TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - -1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - -2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - -3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - -4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - -5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - -6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - -7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - -8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - -9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - -END OF TERMS AND CONDITIONS - -APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - -Copyright [yyyy] [name of copyright owner] - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. - ----------------------------------------------------- -LICENSE-MIT: - -Copyright (c) 2016 The Rust Project Developers - -Permission is hereby granted, free of charge, to any -person obtaining a copy of this software and associated -documentation files (the "Software"), to deal in the -Software without restriction, including without -limitation the rights to use, copy, modify, merge, -publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software -is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice -shall be included in all copies or substantial portions -of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF -ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT -SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR -IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -DEALINGS IN THE SOFTWARE. - - -==================================================== -paste 0.1.18 -https://github.com/dtolnay/paste -by David Tolnay -Macros for all your token pasting needs -License: MIT OR Apache-2.0 ----------------------------------------------------- -LICENSE-APACHE: - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - -TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - -1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - -2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - -3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - -4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - -5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - -6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - -7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - -8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - -9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - -END OF TERMS AND CONDITIONS - -APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - -Copyright [yyyy] [name of copyright owner] - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. - ----------------------------------------------------- -LICENSE-MIT: - -Copyright (c) 2018 - -Permission is hereby granted, free of charge, to any -person obtaining a copy of this software and associated -documentation files (the "Software"), to deal in the -Software without restriction, including without -limitation the rights to use, copy, modify, merge, -publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software -is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice -shall be included in all copies or substantial portions -of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF -ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT -SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR -IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -DEALINGS IN THE SOFTWARE. - - -==================================================== -paste 1.0.5 -https://github.com/dtolnay/paste -by David Tolnay -Macros for all your token pasting needs -License: MIT OR Apache-2.0 ----------------------------------------------------- -LICENSE-APACHE: - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - -TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - -1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - -2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - -3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - -4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - -5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - -6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - -7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - -8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - -9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - -END OF TERMS AND CONDITIONS - -APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - -Copyright [yyyy] [name of copyright owner] - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. - ----------------------------------------------------- -LICENSE-MIT: - -Copyright (c) 2018 - -Permission is hereby granted, free of charge, to any -person obtaining a copy of this software and associated -documentation files (the "Software"), to deal in the -Software without restriction, including without -limitation the rights to use, copy, modify, merge, -publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software -is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice -shall be included in all copies or substantial portions -of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF -ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT -SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR -IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -DEALINGS IN THE SOFTWARE. - - -==================================================== -paste-impl 0.1.18 -https://github.com/dtolnay/paste -by David Tolnay -Implementation detail of the `paste` crate -License: MIT OR Apache-2.0 ----------------------------------------------------- -LICENSE-APACHE: - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - -TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - -1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - -2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - -3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - -4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - -5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - -6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - -7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - -8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - -9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - -END OF TERMS AND CONDITIONS - -APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - -Copyright [yyyy] [name of copyright owner] - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. - ----------------------------------------------------- -LICENSE-MIT: - -Copyright (c) 2018 - -Permission is hereby granted, free of charge, to any -person obtaining a copy of this software and associated -documentation files (the "Software"), to deal in the -Software without restriction, including without -limitation the rights to use, copy, modify, merge, -publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software -is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice -shall be included in all copies or substantial portions -of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF -ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT -SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR -IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -DEALINGS IN THE SOFTWARE. - - -==================================================== -ppv-lite86 0.2.10 -https://github.com/cryptocorrosion/cryptocorrosion -by The CryptoCorrosion Contributors -Implementation of the crypto-simd API for x86 -License: MIT/Apache-2.0 ----------------------------------------------------- -LICENSE-APACHE: - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - -TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - -1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - -2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - -3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - -4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - -5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - -6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - -7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - -8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - -9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - -END OF TERMS AND CONDITIONS - -APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - -Copyright 2019 The CryptoCorrosion Contributors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. - ----------------------------------------------------- -LICENSE-MIT: - -Copyright (c) 2019 The CryptoCorrosion Contributors - -Permission is hereby granted, free of charge, to any -person obtaining a copy of this software and associated -documentation files (the "Software"), to deal in the -Software without restriction, including without -limitation the rights to use, copy, modify, merge, -publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software -is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice -shall be included in all copies or substantial portions -of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF -ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT -SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR -IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -DEALINGS IN THE SOFTWARE. - - -==================================================== -proc-macro-hack 0.5.19 -https://github.com/dtolnay/proc-macro-hack -by David Tolnay -Procedural macros in expression position -License: MIT OR Apache-2.0 ----------------------------------------------------- -LICENSE-APACHE: - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - -TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - -1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - -2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - -3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - -4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - -5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - -6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - -7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - -8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - -9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - -END OF TERMS AND CONDITIONS - -APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - -Copyright [yyyy] [name of copyright owner] - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. - ----------------------------------------------------- -LICENSE-MIT: - -Copyright (c) 2018 David Tolnay - -Permission is hereby granted, free of charge, to any -person obtaining a copy of this software and associated -documentation files (the "Software"), to deal in the -Software without restriction, including without -limitation the rights to use, copy, modify, merge, -publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software -is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice -shall be included in all copies or substantial portions -of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF -ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT -SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR -IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -DEALINGS IN THE SOFTWARE. - - -==================================================== -proc-macro2 1.0.27 -https://github.com/alexcrichton/proc-macro2 -by Alex Crichton , David Tolnay -A substitute implementation of the compiler's `proc_macro` API to decouple -token-based libraries from the procedural macro use case. - -License: MIT OR Apache-2.0 ----------------------------------------------------- -LICENSE-APACHE: - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - -TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - -1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - -2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - -3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - -4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - -5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - -6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - -7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - -8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - -9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - -END OF TERMS AND CONDITIONS - -APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - -Copyright [yyyy] [name of copyright owner] - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. - ----------------------------------------------------- -LICENSE-MIT: - -Copyright (c) 2014 Alex Crichton - -Permission is hereby granted, free of charge, to any -person obtaining a copy of this software and associated -documentation files (the "Software"), to deal in the -Software without restriction, including without -limitation the rights to use, copy, modify, merge, -publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software -is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice -shall be included in all copies or substantial portions -of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF -ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT -SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR -IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -DEALINGS IN THE SOFTWARE. - - -==================================================== -pyo3 0.13.2 -https://github.com/pyo3/pyo3 -by PyO3 Project and Contributors -Bindings to Python interpreter -License: Apache-2.0 ----------------------------------------------------- -LICENSE: - - Copyright (c) 2017-present PyO3 Project and Contributors. https://github.com/PyO3 - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - -==================================================== -pyo3-macros 0.13.2 -https://github.com/pyo3/pyo3 -by PyO3 Project and Contributors -Proc macros for PyO3 package -License: Apache-2.0 ----------------------------------------------------- -LICENSE: - - Copyright (c) 2017-present PyO3 Project and Contributors. https://github.com/PyO3 - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - -==================================================== -pyo3-macros-backend 0.13.2 -https://github.com/pyo3/pyo3 -by PyO3 Project and Contributors -Code generation for PyO3 package -License: Apache-2.0 ----------------------------------------------------- -LICENSE: - - Copyright (c) 2017-present PyO3 Project and Contributors. https://github.com/PyO3 - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - -==================================================== -qoqo 0.5.0 -by HQS Quantum Simulations -Quantum computing circuit toolkit. Python interface of roqoq -License: Apache-2.0 - -==================================================== -qoqo-macros 0.1.5 -by HQS Quantum Simulations -Macros for the qoqo crate -License: Apache-2.0 - -==================================================== -qoqo_calculator 0.2.6 -https://github.com/HQSquantumsimulations/qoqo_calculator -by HQS Quantum Simulations -qoqo-calculator is the calculator backend of the qoqo quantum computing toolkit by HQS Quantum Simulations -License: Apache-2.0 - -==================================================== -qoqo_calculator_pyo3 0.3.6 -https://github.com/HQSquantumsimulations/qoqo_calculator_pyo3 -by HQS Quantum Simulations -Python interface to qoqo calculator, the calculator backend of the qoqo quantum computing toolkit by HQS Quantum Simulations -License: Apache-2.0 - -==================================================== -quote 1.0.9 -https://github.com/dtolnay/quote -by David Tolnay -Quasi-quoting macro quote!(...) -License: MIT OR Apache-2.0 ----------------------------------------------------- -LICENSE-APACHE: - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - -TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - -1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - -2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - -3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - -4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. -5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). -6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. -7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." -8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. -9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. -END OF TERMS AND CONDITIONS + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. -APPENDIX: How to apply the Apache License to your work. + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and -Copyright [yyyy] [name of copyright owner] + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and - http://www.apache.org/licenses/LICENSE-2.0 + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. ----------------------------------------------------- -LICENSE-MIT: + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. -Copyright (c) 2016 The Rust Project Developers + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. -Permission is hereby granted, free of charge, to any -person obtaining a copy of this software and associated -documentation files (the "Software"), to deal in the -Software without restriction, including without -limitation the rights to use, copy, modify, merge, -publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software -is furnished to do so, subject to the following -conditions: + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. -The above copyright notice and this permission notice -shall be included in all copies or substantial portions -of the Software. + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF -ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT -SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR -IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -DEALINGS IN THE SOFTWARE. + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. ==================================================== -rand 0.8.4 -https://rust-random.github.io/book -by The Rand Project Developers, The Rust Project Developers -Random number generators and other randomness functionality. - -License: MIT OR Apache-2.0 +pyo3-macros-backend 0.14.1 +https://github.com/pyo3/pyo3 +by PyO3 Project and Contributors +Code generation for PyO3 package +License: Apache-2.0 ---------------------------------------------------- -LICENSE-APACHE: - - Apache License - Version 2.0, January 2004 - https://www.apache.org/licenses/ - -TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - -1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. +LICENSE: - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. + Copyright (c) 2017-present PyO3 Project and Contributors. https://github.com/PyO3 - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. + http://www.apache.org/licenses/LICENSE-2.0 - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." + 1. Definitions. - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. -2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. -3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. -4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." -5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. -6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. -7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. -8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: -9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and -END OF TERMS AND CONDITIONS + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and -APPENDIX: How to apply the Apache License to your work. + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. -Copyright [yyyy] [name of copyright owner] + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. - https://www.apache.org/licenses/LICENSE-2.0 + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. ----------------------------------------------------- -LICENSE-MIT: + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. -Copyright 2018 Developers of the Rand project -Copyright (c) 2014 The Rust Project Developers + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. -Permission is hereby granted, free of charge, to any -person obtaining a copy of this software and associated -documentation files (the "Software"), to deal in the -Software without restriction, including without -limitation the rights to use, copy, modify, merge, -publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software -is furnished to do so, subject to the following -conditions: -The above copyright notice and this permission notice -shall be included in all copies or substantial portions -of the Software. +==================================================== +qoqo 0.5.0 +https://github.com/HQSquantumsimulations/qoqo +by HQS Quantum Simulations +Quantum computing circuit toolkit. Python interface of roqoq +License: Apache-2.0 -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF -ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT -SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR -IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -DEALINGS IN THE SOFTWARE. +==================================================== +qoqo-macros 0.5.0 +by HQS Quantum Simulations +Macros for the qoqo crate +License: Apache-2.0 + +==================================================== +qoqo_calculator 0.2.6 +https://github.com/HQSquantumsimulations/qoqo_calculator +by HQS Quantum Simulations +qoqo-calculator is the calculator backend of the qoqo quantum computing toolkit by HQS Quantum Simulations +License: Apache-2.0 +==================================================== +qoqo_calculator 0.3.0 +https://github.com/HQSquantumsimulations/qoqo_calculator +by HQS Quantum Simulations +qoqo-calculator is the calculator backend of the qoqo quantum computing toolkit by HQS Quantum Simulations +License: Apache-2.0 ==================================================== -rand_chacha 0.3.1 -https://rust-random.github.io/book -by The Rand Project Developers, The Rust Project Developers, The CryptoCorrosion Contributors -ChaCha random number generator +qoqo_calculator_pyo3 0.4.0 +https://github.com/HQSquantumsimulations/qoqo_calculator_pyo3 +by HQS Quantum Simulations +Python interface to qoqo calculator, the calculator backend of the qoqo quantum computing toolkit by HQS Quantum Simulations +License: Apache-2.0 +==================================================== +quote 1.0.9 +https://github.com/dtolnay/quote +by David Tolnay +Quasi-quoting macro quote!(...) License: MIT OR Apache-2.0 ---------------------------------------------------- LICENSE-APACHE: Apache License Version 2.0, January 2004 - https://www.apache.org/licenses/ + http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION @@ -12250,7 +8087,7 @@ Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at - https://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, @@ -12261,8 +8098,7 @@ limitations under the License. ---------------------------------------------------- LICENSE-MIT: -Copyright 2018 Developers of the Rand project -Copyright (c) 2014 The Rust Project Developers +Copyright (c) 2016 The Rust Project Developers Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated @@ -12290,10 +8126,10 @@ DEALINGS IN THE SOFTWARE. ==================================================== -rand_core 0.6.3 +rand 0.8.4 https://rust-random.github.io/book by The Rand Project Developers, The Rust Project Developers -Core random number generator traits and tools for implementation. +Random number generators and other randomness functionality. License: MIT OR Apache-2.0 ---------------------------------------------------- @@ -12533,10 +8369,10 @@ DEALINGS IN THE SOFTWARE. ==================================================== -rand_distr 0.4.1 +rand_chacha 0.3.1 https://rust-random.github.io/book -by The Rand Project Developers -Sampling from random number distributions +by The Rand Project Developers, The Rust Project Developers, The CryptoCorrosion Contributors +ChaCha random number generator License: MIT OR Apache-2.0 ---------------------------------------------------- @@ -12748,6 +8584,7 @@ limitations under the License. LICENSE-MIT: Copyright 2018 Developers of the Rand project +Copyright (c) 2014 The Rust Project Developers Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated @@ -12775,10 +8612,10 @@ DEALINGS IN THE SOFTWARE. ==================================================== -rand_hc 0.3.1 +rand_core 0.6.3 https://rust-random.github.io/book -by The Rand Project Developers -HC128 random number generator +by The Rand Project Developers, The Rust Project Developers +Core random number generator traits and tools for implementation. License: MIT OR Apache-2.0 ---------------------------------------------------- @@ -12990,6 +8827,7 @@ limitations under the License. LICENSE-MIT: Copyright 2018 Developers of the Rand project +Copyright (c) 2014 The Rust Project Developers Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated @@ -13017,21 +8855,18 @@ DEALINGS IN THE SOFTWARE. ==================================================== -rawpointer 0.2.1 -https://github.com/bluss/rawpointer/ -by bluss -Extra methods for raw pointers and `NonNull`. - -For example `.post_inc()` and `.pre_dec()` (c.f. `ptr++` and `--ptr`), -`offset` and `add` for `NonNull`, and the function `ptrdistance`. +rand_distr 0.4.1 +https://rust-random.github.io/book +by The Rand Project Developers +Sampling from random number distributions -License: MIT/Apache-2.0 +License: MIT OR Apache-2.0 ---------------------------------------------------- LICENSE-APACHE: Apache License Version 2.0, January 2004 - http://www.apache.org/licenses/ + https://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION @@ -13223,7 +9058,7 @@ Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + https://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, @@ -13234,7 +9069,7 @@ limitations under the License. ---------------------------------------------------- LICENSE-MIT: -Copyright (c) 2015 +Copyright 2018 Developers of the Rand project Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated @@ -13262,17 +9097,18 @@ DEALINGS IN THE SOFTWARE. ==================================================== -rayon 1.5.1 -https://github.com/rayon-rs/rayon -by Niko Matsakis , Josh Stone -Simple work-stealing parallelism for Rust -License: Apache-2.0/MIT +rand_hc 0.3.1 +https://rust-random.github.io/book +by The Rand Project Developers +HC128 random number generator + +License: MIT OR Apache-2.0 ---------------------------------------------------- LICENSE-APACHE: Apache License Version 2.0, January 2004 - http://www.apache.org/licenses/ + https://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION @@ -13464,7 +9300,7 @@ Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + https://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, @@ -13475,7 +9311,7 @@ limitations under the License. ---------------------------------------------------- LICENSE-MIT: -Copyright (c) 2010 The Rust Project Developers +Copyright 2018 Developers of the Rand project Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated @@ -13503,11 +9339,15 @@ DEALINGS IN THE SOFTWARE. ==================================================== -rayon-core 1.9.1 -https://github.com/rayon-rs/rayon -by Niko Matsakis , Josh Stone -Core APIs for Rayon -License: Apache-2.0/MIT +rawpointer 0.2.1 +https://github.com/bluss/rawpointer/ +by bluss +Extra methods for raw pointers and `NonNull`. + +For example `.post_inc()` and `.pre_dec()` (c.f. `ptr++` and `--ptr`), +`offset` and `add` for `NonNull`, and the function `ptrdistance`. + +License: MIT/Apache-2.0 ---------------------------------------------------- LICENSE-APACHE: @@ -13716,7 +9556,7 @@ limitations under the License. ---------------------------------------------------- LICENSE-MIT: -Copyright (c) 2010 The Rust Project Developers +Copyright (c) 2015 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated @@ -13777,20 +9617,20 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ==================================================== -roqoqo 0.2.0 +roqoqo 0.5.0 https://github.com/HQSquantumsimulations/qoqo by HQS Quantum Simulations Rust Quantum Computing Toolkit by HQS License: Apache-2.0 ==================================================== -roqoqo-derive 0.1.6 +roqoqo-derive 0.5.0 by HQS Quantum Simulations Maros for the roqoqo crate License: Apache-2.0 ==================================================== -roqoqo-test 0.1.5 +roqoqo-test 0.5.0 https://github.com/HQSquantumsimulations/qoqo by HQS Quantum Simulations Testing helper functions for roqoqo toolkit @@ -15238,7 +11078,7 @@ DEALINGS IN THE SOFTWARE. ==================================================== -simba 0.4.0 +simba 0.5.1 https://github.com/dimforge/simba by sebcrozet SIMD algebra for Rust @@ -15690,242 +11530,6 @@ IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -==================================================== -sprs 0.10.0 -https://github.com/vbarrielle/sprs -by Vincent Barrielle -A sparse matrix library -License: MIT OR Apache-2.0 ----------------------------------------------------- -LICENSE-APACHE: - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "{}" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright {yyyy} {name of copyright owner} - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - ----------------------------------------------------- -LICENSE-MIT: - -Copyright (c) 2015 The sprs Developers - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - - ==================================================== syn 1.0.73 https://github.com/dtolnay/syn diff --git a/qoqo/qoqo/__init__.py b/qoqo/qoqo/__init__.py index ae0bc487..7132cf0b 100644 --- a/qoqo/qoqo/__init__.py +++ b/qoqo/qoqo/__init__.py @@ -24,9 +24,6 @@ registers measurements DoUnitary - devices - BackendBaseClass - """ from .qoqo import * diff --git a/qoqo/src/circuit.rs b/qoqo/src/circuit.rs index 8ab51307..f531ee2e 100644 --- a/qoqo/src/circuit.rs +++ b/qoqo/src/circuit.rs @@ -411,6 +411,14 @@ impl CircuitWrapper { self.internal.add_operation(operation); Ok(()) } + + /// Return a string containing a formatted (string) representation of the Circuit. + /// + /// Returns: + /// str: The string representation of the Circuit. + fn __format__(&self, _format_spec: &str) -> PyResult { + Ok(format!("{}", self.internal)) + } } #[pyproto] @@ -423,14 +431,6 @@ impl PyObjectProtocol for CircuitWrapper { Ok(format!("{}", self.internal)) } - /// Return a string containing a formatted (string) representation of the Circuit. - /// - /// Returns: - /// str: The string representation of the Circuit. - fn __format__(&self, _format_spec: &str) -> PyResult { - Ok(format!("{}", self.internal)) - } - /// Return the __richcmp__ magic method to perform rich comparison operations on Circuit. /// /// Args: diff --git a/qoqo/src/measurements/classical_register_measurement.rs b/qoqo/src/measurements/classical_register_measurement.rs index eedaedb9..442df4dd 100644 --- a/qoqo/src/measurements/classical_register_measurement.rs +++ b/qoqo/src/measurements/classical_register_measurement.rs @@ -21,7 +21,7 @@ use roqoqo::prelude::*; use roqoqo::Circuit; use std::collections::HashMap; -#[pyclass(name = "Cheated", module = "qoqo.measurements")] +#[pyclass(name = "ClassicalRegister", module = "qoqo.measurements")] #[derive(Clone, Debug)] /// Collected information for executing a classical register. pub struct ClassicalRegisterWrapper { diff --git a/qoqo/src/operations/pragma_operations.rs b/qoqo/src/operations/pragma_operations.rs index 2affd226..59a8f3dc 100644 --- a/qoqo/src/operations/pragma_operations.rs +++ b/qoqo/src/operations/pragma_operations.rs @@ -215,6 +215,14 @@ impl PragmaSetStateVectorWrapper { fn __deepcopy__(&self, _memodict: Py) -> PragmaSetStateVectorWrapper { self.clone() } + + /// Return a string containing a formatted (string) representation of the PRAGMA operation. + /// + /// Returns: + /// str: The string representation of the operation. + fn __format__(&self, _format_spec: &str) -> PyResult { + Ok(format!("{:?}", self.internal)) + } } #[pyproto] @@ -227,14 +235,6 @@ impl PyObjectProtocol for PragmaSetStateVectorWrapper { Ok(format!("{:?}", self.internal)) } - /// Return a string containing a formatted (string) representation of the PRAGMA operation. - /// - /// Returns: - /// str: The string representation of the operation. - fn __format__(&self, _format_spec: &str) -> PyResult { - Ok(format!("{:?}", self.internal)) - } - /// Return the __richcmp__ magic method to perform rich comparison operations on PragmaSetStateVector. /// /// Args: @@ -450,6 +450,14 @@ impl PragmaSetDensityMatrixWrapper { fn __deepcopy__(&self, _memodict: Py) -> PragmaSetDensityMatrixWrapper { self.clone() } + + /// Return a string containing a formatted (string) representation of the PRAGMA operation. + /// + /// Returns: + /// str: The string representation of the operation. + fn __format__(&self, _format_spec: &str) -> PyResult { + Ok(format!("{:?}", self.internal)) + } } #[pyproto] @@ -462,14 +470,6 @@ impl PyObjectProtocol for PragmaSetDensityMatrixWrapper { Ok(format!("{:?}", self.internal)) } - /// Return a string containing a formatted (string) representation of the PRAGMA operation. - /// - /// Returns: - /// str: The string representation of the operation. - fn __format__(&self, _format_spec: &str) -> PyResult { - Ok(format!("{:?}", self.internal)) - } - /// Return the __richcmp__ magic method to perform rich comparison operations on PragmaSetStateVector. /// /// Args: @@ -613,7 +613,7 @@ pub struct PragmaStopDecompositionBlock { qubits: Vec, } -#[wrap(Operate, OperateSingleQubit, OperatePragma)] +#[wrap(Operate, OperateSingleQubit, OperatePragma, OperatePragmaNoise)] /// The damping PRAGMA noise operation. /// /// This PRAGMA operation applies a pure damping error corresponding to zero temperature environments. @@ -628,45 +628,45 @@ pub struct PragmaDamping { rate: CalculatorFloat, } -#[pymethods] -impl PragmaDampingWrapper { - /// Return the superoperator defining the evolution of the density matrix under the noise gate. - /// - /// Returns: - /// np.ndarray: The superoperator representation of the PRAGMA operation. - pub fn superoperator(&self) -> PyResult>> { - Ok(Python::with_gil(|py| -> Py> { - self.internal - .superoperator() - .unwrap() - .to_pyarray(py) - .to_owned() - })) - } - /// Return the probability of the noise gate affecting the qubit, based on its `gate_time` and `rate`. - /// - /// Returns: - /// CalculatorFloat: The probability of the PRAGMA operation. - pub fn probability(&self) -> CalculatorFloatWrapper { - CalculatorFloatWrapper { - cf_internal: self.internal.probability(), - } - } - /// Takes the power of the PRAGMA noise operation. - /// - /// Args: - /// power (CalculatorFloat): The exponent in the power operation of the noise gate. - /// - /// Returns: - /// self: The PRAGMA operation to the power of `power`. - pub fn powercf(&self, power: CalculatorFloatWrapper) -> Self { - Self { - internal: self.internal.powercf(power.cf_internal), - } - } -} - -#[wrap(Operate, OperateSingleQubit, OperatePragma)] +// #[pymethods] +// impl PragmaDampingWrapper { +// /// Return the superoperator defining the evolution of the density matrix under the noise gate. +// /// +// /// Returns: +// /// np.ndarray: The superoperator representation of the PRAGMA operation. +// pub fn superoperator(&self) -> PyResult>> { +// Ok(Python::with_gil(|py| -> Py> { +// self.internal +// .superoperator() +// .unwrap() +// .to_pyarray(py) +// .to_owned() +// })) +// } +// /// Return the probability of the noise gate affecting the qubit, based on its `gate_time` and `rate`. +// /// +// /// Returns: +// /// CalculatorFloat: The probability of the PRAGMA operation. +// pub fn probability(&self) -> CalculatorFloatWrapper { +// CalculatorFloatWrapper { +// cf_internal: self.internal.probability(), +// } +// } +// /// Takes the power of the PRAGMA noise operation. +// /// +// /// Args: +// /// power (CalculatorFloat): The exponent in the power operation of the noise gate. +// /// +// /// Returns: +// /// self: The PRAGMA operation to the power of `power`. +// pub fn powercf(&self, power: CalculatorFloatWrapper) -> Self { +// Self { +// internal: self.internal.powercf(power.cf_internal), +// } +// } +// } + +#[wrap(Operate, OperateSingleQubit, OperatePragma, OperatePragmaNoise)] /// The depolarising PRAGMA noise operation. /// /// This PRAGMA operation applies a depolarising error corresponding to infinite temperature environments. @@ -681,45 +681,45 @@ pub struct PragmaDepolarising { rate: CalculatorFloat, } -#[pymethods] -impl PragmaDepolarisingWrapper { - /// Return the superoperator defining the evolution of the density matrix under the noise gate. - /// - /// Returns: - /// np.ndarray: The superoperator representation of the PRAGMA operation. - pub fn superoperator(&self) -> PyResult>> { - Ok(Python::with_gil(|py| -> Py> { - self.internal - .superoperator() - .unwrap() - .to_pyarray(py) - .to_owned() - })) - } - /// Return the probability of the noise gate affecting the qubit, based on its `gate_time` and `rate`. - /// - /// Returns: - /// CalculatorFloat: The probability of the PRAGMA operation. - pub fn probability(&self) -> CalculatorFloatWrapper { - CalculatorFloatWrapper { - cf_internal: self.internal.probability(), - } - } - /// Take the power of the noise PRAGMA operation. - /// - /// Args: - /// power (CalculatorFloat): The exponent in the power operation of the noise gate. - /// - /// Returns: - /// self: The PRAGMA operation to the power of `power`. - pub fn powercf(&self, power: CalculatorFloatWrapper) -> Self { - Self { - internal: self.internal.powercf(power.cf_internal), - } - } -} - -#[wrap(Operate, OperateSingleQubit, OperatePragma)] +// #[pymethods] +// impl PragmaDepolarisingWrapper { +// /// Return the superoperator defining the evolution of the density matrix under the noise gate. +// /// +// /// Returns: +// /// np.ndarray: The superoperator representation of the PRAGMA operation. +// pub fn superoperator(&self) -> PyResult>> { +// Ok(Python::with_gil(|py| -> Py> { +// self.internal +// .superoperator() +// .unwrap() +// .to_pyarray(py) +// .to_owned() +// })) +// } +// /// Return the probability of the noise gate affecting the qubit, based on its `gate_time` and `rate`. +// /// +// /// Returns: +// /// CalculatorFloat: The probability of the PRAGMA operation. +// pub fn probability(&self) -> CalculatorFloatWrapper { +// CalculatorFloatWrapper { +// cf_internal: self.internal.probability(), +// } +// } +// /// Take the power of the noise PRAGMA operation. +// /// +// /// Args: +// /// power (CalculatorFloat): The exponent in the power operation of the noise gate. +// /// +// /// Returns: +// /// self: The PRAGMA operation to the power of `power`. +// pub fn powercf(&self, power: CalculatorFloatWrapper) -> Self { +// Self { +// internal: self.internal.powercf(power.cf_internal), +// } +// } +// } + +#[wrap(Operate, OperateSingleQubit, OperatePragma, OperatePragmaNoise)] /// The dephasing PRAGMA noise operation. /// /// This PRAGMA operation applies a pure dephasing error. @@ -734,45 +734,45 @@ pub struct PragmaDephasing { rate: CalculatorFloat, } -#[pymethods] -impl PragmaDephasingWrapper { - /// Return the superoperator defining the evolution of the density matrix under the noise gate. - /// - /// Returns: - /// np.ndarray: The superoperator representation of the PRAGMA operation. - pub fn superoperator(&self) -> PyResult>> { - Ok(Python::with_gil(|py| -> Py> { - self.internal - .superoperator() - .unwrap() - .to_pyarray(py) - .to_owned() - })) - } - /// Return the probability of the noise gate affecting the qubit, based on its `gate_time` and `rate`. - /// - /// Returns: - /// CalculatorFloat: The probability of the PRAGMA operation. - pub fn probability(&self) -> CalculatorFloatWrapper { - CalculatorFloatWrapper { - cf_internal: self.internal.probability(), - } - } - /// Take the power of the noise PRAGMA operation. - /// - /// Args: - /// power (CalculatorFloat): The exponent in the power operation of the noise gate. - /// - /// Returns: - /// self: The PRAGMA operation to the power of `power`. - pub fn powercf(&self, power: CalculatorFloatWrapper) -> Self { - Self { - internal: self.internal.powercf(power.cf_internal), - } - } -} - -#[wrap(Operate, OperateSingleQubit, OperatePragma)] +// #[pymethods] +// impl PragmaDephasingWrapper { +// /// Return the superoperator defining the evolution of the density matrix under the noise gate. +// /// +// /// Returns: +// /// np.ndarray: The superoperator representation of the PRAGMA operation. +// pub fn superoperator(&self) -> PyResult>> { +// Ok(Python::with_gil(|py| -> Py> { +// self.internal +// .superoperator() +// .unwrap() +// .to_pyarray(py) +// .to_owned() +// })) +// } +// /// Return the probability of the noise gate affecting the qubit, based on its `gate_time` and `rate`. +// /// +// /// Returns: +// /// CalculatorFloat: The probability of the PRAGMA operation. +// pub fn probability(&self) -> CalculatorFloatWrapper { +// CalculatorFloatWrapper { +// cf_internal: self.internal.probability(), +// } +// } +// /// Take the power of the noise PRAGMA operation. +// /// +// /// Args: +// /// power (CalculatorFloat): The exponent in the power operation of the noise gate. +// /// +// /// Returns: +// /// self: The PRAGMA operation to the power of `power`. +// pub fn powercf(&self, power: CalculatorFloatWrapper) -> Self { +// Self { +// internal: self.internal.powercf(power.cf_internal), +// } +// } +// } + +#[wrap(Operate, OperateSingleQubit, OperatePragma, OperatePragmaNoise)] /// The random noise PRAGMA operation. /// /// This PRAGMA operation applies a pure damping error corresponding to zero temperature environments. @@ -789,43 +789,43 @@ pub struct PragmaRandomNoise { dephasing_rate: CalculatorFloat, } -#[pymethods] -impl PragmaRandomNoiseWrapper { - /// Return the superoperator defining the evolution of the density matrix under the noise gate. - /// - /// Returns: - /// np.ndarray: The superoperator representation of the PRAGMA operation. - pub fn superoperator(&self) -> PyResult>> { - Ok(Python::with_gil(|py| -> Py> { - self.internal - .superoperator() - .unwrap() - .to_pyarray(py) - .to_owned() - })) - } - /// Return the probability of the noise gate affecting the qubit, based on its `gate_time` and `rate`. - /// - /// Returns: - /// CalculatorFloat: The probability of the PRAGMA operation. - pub fn probability(&self) -> CalculatorFloatWrapper { - CalculatorFloatWrapper { - cf_internal: self.internal.probability(), - } - } - /// Take the power of the noise PRAGMA operation. - /// - /// Args: - /// power (CalculatorFloat): The exponent in the power operation of the noise gate. - /// - /// Returns: - /// self: The PRAGMA operation to the power of `power`. - pub fn powercf(&self, power: CalculatorFloatWrapper) -> Self { - Self { - internal: self.internal.powercf(power.cf_internal), - } - } -} +// #[pymethods] +// impl PragmaRandomNoiseWrapper { +// /// Return the superoperator defining the evolution of the density matrix under the noise gate. +// /// +// /// Returns: +// /// np.ndarray: The superoperator representation of the PRAGMA operation. +// pub fn superoperator(&self) -> PyResult>> { +// Ok(Python::with_gil(|py| -> Py> { +// self.internal +// .superoperator() +// .unwrap() +// .to_pyarray(py) +// .to_owned() +// })) +// } +// /// Return the probability of the noise gate affecting the qubit, based on its `gate_time` and `rate`. +// /// +// /// Returns: +// /// CalculatorFloat: The probability of the PRAGMA operation. +// pub fn probability(&self) -> CalculatorFloatWrapper { +// CalculatorFloatWrapper { +// cf_internal: self.internal.probability(), +// } +// } +// /// Take the power of the noise PRAGMA operation. +// /// +// /// Args: +// /// power (CalculatorFloat): The exponent in the power operation of the noise gate. +// /// +// /// Returns: +// /// self: The PRAGMA operation to the power of `power`. +// pub fn powercf(&self, power: CalculatorFloatWrapper) -> Self { +// Self { +// internal: self.internal.powercf(power.cf_internal), +// } +// } +// } /// Module containing the PragmaGeneralNoise class. #[pymodule] @@ -1083,6 +1083,14 @@ impl PragmaGeneralNoiseWrapper { fn __deepcopy__(&self, _memodict: Py) -> PragmaGeneralNoiseWrapper { self.clone() } + + /// Return a string containing a formatted (string) representation of the PRAGMA operation. + /// + /// Returns: + /// str: The string representation of the operation. + fn __format__(&self, _format_spec: &str) -> PyResult { + Ok(format!("{:?}", self.internal)) + } } #[pyproto] @@ -1095,14 +1103,6 @@ impl PyObjectProtocol for PragmaGeneralNoiseWrapper { Ok(format!("{:?}", self.internal)) } - /// Return a string containing a formatted (string) representation of the PRAGMA operation. - /// - /// Returns: - /// str: The string representation of the operation. - fn __format__(&self, _format_spec: &str) -> PyResult { - Ok(format!("{:?}", self.internal)) - } - /// Return the __richcmp__ magic method to perform rich comparison operations on PragmaSetStateVector. /// /// Args: diff --git a/qoqo/tests/integration/circuit.rs b/qoqo/tests/integration/circuit.rs index 7227bb0c..43f27ef3 100644 --- a/qoqo/tests/integration/circuit.rs +++ b/qoqo/tests/integration/circuit.rs @@ -74,6 +74,7 @@ fn test_default() { #[test] fn test_substitute_parameters() { let added_operation = Operation::from(RotateX::new(0, CalculatorFloat::from("test"))); + pyo3::prepare_freethreaded_python(); let gil = pyo3::Python::acquire_gil(); let py = gil.python(); let operation = convert_operation_to_pyobject(added_operation).unwrap(); @@ -104,6 +105,7 @@ fn test_substitute_parameters() { #[test] fn test_remap_qubits() { let added_operation = Operation::from(RotateX::new(0, CalculatorFloat::from(1.0))); + pyo3::prepare_freethreaded_python(); let gil = pyo3::Python::acquire_gil(); let py = gil.python(); let operation = convert_operation_to_pyobject(added_operation).unwrap(); @@ -140,6 +142,7 @@ fn test_count_occurences() { let added_op1 = Operation::from(DefinitionBit::new("ro".to_string(), 1, false)); let added_op2 = Operation::from(RotateX::new(0, CalculatorFloat::from(1.0))); let added_op3 = Operation::from(PauliX::new(0)); + pyo3::prepare_freethreaded_python(); let gil = pyo3::Python::acquire_gil(); let py = gil.python(); let operation1 = convert_operation_to_pyobject(added_op1).unwrap(); @@ -193,6 +196,7 @@ fn test_get_operation_types() { let added_op1 = Operation::from(DefinitionBit::new("ro".to_string(), 1, false)); let added_op2 = Operation::from(RotateX::new(0, CalculatorFloat::from(1.0))); let added_op3 = Operation::from(PauliX::new(0)); + pyo3::prepare_freethreaded_python(); let gil = pyo3::Python::acquire_gil(); let py = gil.python(); let operation1 = convert_operation_to_pyobject(added_op1).unwrap(); @@ -215,6 +219,7 @@ fn test_get_operation_types() { /// Test copy and deepcopy functions of Circuit #[test] fn test_copy_deepcopy() { + pyo3::prepare_freethreaded_python(); let gil = pyo3::Python::acquire_gil(); let py = gil.python(); let circuit = new_circuit(py); @@ -243,6 +248,7 @@ fn test_copy_deepcopy() { /// Test qoqo_versions function of Circuit #[test] fn test_qoqo_versions() { + pyo3::prepare_freethreaded_python(); let gil = pyo3::Python::acquire_gil(); let py = gil.python(); let circuit = new_circuit(py); @@ -268,6 +274,7 @@ fn test_qoqo_versions() { /// Test to_ and from_bincode functions of Circuit #[test] fn test_to_from_bincode() { + pyo3::prepare_freethreaded_python(); let gil = pyo3::Python::acquire_gil(); let py = gil.python(); let circuit = new_circuit(py); @@ -298,6 +305,7 @@ fn test_to_from_bincode() { #[test] fn test_value_error_bincode() { + pyo3::prepare_freethreaded_python(); let gil = Python::acquire_gil(); let py = gil.python(); @@ -338,6 +346,7 @@ fn test_value_error_bincode() { /// Test to_ and from_json functions of Circuit #[test] fn test_to_from_json() { + pyo3::prepare_freethreaded_python(); let gil = pyo3::Python::acquire_gil(); let py = gil.python(); let circuit = new_circuit(py); @@ -369,6 +378,7 @@ fn test_to_from_json() { /// Test single index set and write access using "get" function #[test] fn test_single_index_access_get() { + pyo3::prepare_freethreaded_python(); let gil = pyo3::Python::acquire_gil(); let py = gil.python(); let circuit = new_circuit(py); @@ -407,6 +417,7 @@ fn test_single_index_access_get() { /// Test get_slice property of Circuit #[test] fn test_get_slice() { + pyo3::prepare_freethreaded_python(); let gil = pyo3::Python::acquire_gil(); let py = gil.python(); let circuit = new_circuit(py); @@ -473,6 +484,7 @@ fn test_get_slice() { fn test_definitions() { let added_op1 = Operation::from(DefinitionBit::new("ro".to_string(), 1, false)); let added_op2 = Operation::from(InputSymbolic::new("test".to_string(), 1.0)); + pyo3::prepare_freethreaded_python(); let gil = pyo3::Python::acquire_gil(); let py = gil.python(); let operation1 = convert_operation_to_pyobject(added_op1).unwrap(); @@ -496,6 +508,7 @@ fn test_definitions() { fn test_operations() { let added_op1 = Operation::from(RotateX::new(0, CalculatorFloat::from("theta"))); let added_op2 = Operation::from(RotateZ::new(0, CalculatorFloat::from(0.0))); + pyo3::prepare_freethreaded_python(); let gil = pyo3::Python::acquire_gil(); let py = gil.python(); let operation1 = convert_operation_to_pyobject(added_op1).unwrap(); @@ -519,6 +532,7 @@ fn test_operations() { fn test_filter_by_tag() { let added_op1 = Operation::from(DefinitionBit::new("ro".to_string(), 1, false)); let added_op2 = Operation::from(InputSymbolic::new("test".to_string(), 1.0)); + pyo3::prepare_freethreaded_python(); let gil = pyo3::Python::acquire_gil(); let py = gil.python(); let operation1 = convert_operation_to_pyobject(added_op1).unwrap(); @@ -566,6 +580,7 @@ fn test_filter_by_tag() { #[test_case(Operation::from(RotateZ::new(1, CalculatorFloat::from(1.3))); "RotateZ float")] #[test_case(Operation::from(SingleQubitGate::new(2, CalculatorFloat::from(0), CalculatorFloat::from("var"), CalculatorFloat::from(0), CalculatorFloat::from(0), CalculatorFloat::from(0), )); "SingleQubitGate float")] fn test_circuit_add_function(added_operation: Operation) { + pyo3::prepare_freethreaded_python(); let gil = pyo3::Python::acquire_gil(); let py = gil.python(); let operation = convert_operation_to_pyobject(added_operation).unwrap(); @@ -583,6 +598,7 @@ fn test_circuit_add_function(added_operation: Operation) { /// Test the __repr__ and __format__ functions #[test] fn test_format_repr() { + pyo3::prepare_freethreaded_python(); let gil = pyo3::Python::acquire_gil(); let py = gil.python(); let circuit = new_circuit(py); @@ -602,6 +618,7 @@ fn test_format_repr() { /// Test fmt::Debug for OperationIteratorWrapper #[test] fn test_fmt_circuititerator() { + pyo3::prepare_freethreaded_python(); let gil = pyo3::Python::acquire_gil(); let py = gil.python(); let new_circuit = new_circuit(py); @@ -620,6 +637,7 @@ fn test_fmt_circuititerator() { /// Test the __richcmp__ function #[test] fn test_richcmp() { + pyo3::prepare_freethreaded_python(); let gil = pyo3::Python::acquire_gil(); let py = gil.python(); let circuit_one = new_circuit(py); @@ -659,6 +677,7 @@ fn test_circuit_iadd_magic_method() { let added_op1 = Operation::from(DefinitionBit::new("ro".to_string(), 1, false)); let added_op2 = Operation::from(RotateX::new(0, CalculatorFloat::from(1.0))); let added_op3 = Operation::from(PauliX::new(0)); + pyo3::prepare_freethreaded_python(); let gil = pyo3::Python::acquire_gil(); let py = gil.python(); let operation1 = convert_operation_to_pyobject(added_op1).unwrap(); @@ -700,6 +719,7 @@ fn test_circuit_add_magic_method() { let added_op1 = Operation::from(DefinitionBit::new("ro".to_string(), 1, false)); let added_op2 = Operation::from(RotateX::new(0, CalculatorFloat::from(1.0))); let added_op3 = Operation::from(PauliX::new(0)); + pyo3::prepare_freethreaded_python(); let gil = pyo3::Python::acquire_gil(); let py = gil.python(); let operation1 = convert_operation_to_pyobject(added_op1).unwrap(); @@ -739,6 +759,7 @@ fn test_circuit_add_magic_method() { /// Test iterator interface of Circuit #[test] fn test_iter() { + pyo3::prepare_freethreaded_python(); let gil = pyo3::Python::acquire_gil(); let py = gil.python(); let new_circuit = new_circuit(py); @@ -787,6 +808,7 @@ fn test_iter() { /// Test the __len__ function #[test] fn test_len() { + pyo3::prepare_freethreaded_python(); let gil = pyo3::Python::acquire_gil(); let py = gil.python(); let circuit = new_circuit(py); @@ -799,6 +821,7 @@ fn test_len() { /// Test single index set and write access using "__getitem__" function #[test] fn test_single_index_access_getitem() { + pyo3::prepare_freethreaded_python(); let gil = pyo3::Python::acquire_gil(); let py = gil.python(); let circuit = new_circuit(py); @@ -843,6 +866,7 @@ fn test_single_index_access_getitem() { #[test] fn test_convert_into_circuit() { let added_op = Operation::from(PauliX::new(0)); + pyo3::prepare_freethreaded_python(); let gil = pyo3::Python::acquire_gil(); let py = gil.python(); let operation = convert_operation_to_pyobject(added_op).unwrap(); @@ -856,6 +880,7 @@ fn test_convert_into_circuit() { #[test] // #[cfg(feature = "overrotate")] fn test_circuit_overrotate() { + pyo3::prepare_freethreaded_python(); let gil = pyo3::Python::acquire_gil(); let py = gil.python(); let circuit = new_circuit(py); diff --git a/qoqo/tests/integration/measurements/basis_rotation_measurement.rs b/qoqo/tests/integration/measurements/basis_rotation_measurement.rs index 1d6a8300..d897a6b9 100644 --- a/qoqo/tests/integration/measurements/basis_rotation_measurement.rs +++ b/qoqo/tests/integration/measurements/basis_rotation_measurement.rs @@ -22,48 +22,48 @@ use test_case::test_case; #[test] fn test_returning_circuits() { - let gil = Python::acquire_gil(); - let py = gil.python(); - - let input_type = py.get_type::(); - let input = input_type - .call1((3, false)) - .unwrap() - .cast_as::>() - .unwrap(); - let tmp_vec: Vec = Vec::new(); - let _ = input - .call_method1("add_pauli_product", ("ro", tmp_vec)) - .unwrap(); - let _ = input - .call_method1("add_pauli_product", ("ro", vec![0])) - .unwrap(); - let _ = input - .call_method1("add_pauli_product", ("ro", vec![0, 1])) - .unwrap(); - - let mut circs: Vec = Vec::new(); - circs.push(CircuitWrapper::new()); - let mut circ1 = CircuitWrapper::new(); - circ1.internal += roqoqo::operations::RotateX::new(0, 0.0.into()); - circs.push(circ1); - let br_type = py.get_type::(); - let br = br_type - .call1((Some(CircuitWrapper::new()), circs.clone(), input)) - .unwrap() - .cast_as::>() - .unwrap(); - - let circuits: Vec = br.call_method0("circuits").unwrap().extract().unwrap(); - for (index, b) in circuits.iter().enumerate() { - assert_eq!(b, circs.get(index).unwrap()); - } - let const_circuit: CircuitWrapper = br - .call_method0("constant_circuit") - .unwrap() - .extract() - .unwrap(); - assert_eq!(CircuitWrapper::new(), const_circuit); + pyo3::prepare_freethreaded_python(); + Python::with_gil(|py| -> () { + let input_type = py.get_type::(); + let input = input_type + .call1((3, false)) + .unwrap() + .cast_as::>() + .unwrap(); + let tmp_vec: Vec = Vec::new(); + let _ = input + .call_method1("add_pauli_product", ("ro", tmp_vec)) + .unwrap(); + let _ = input + .call_method1("add_pauli_product", ("ro", vec![0])) + .unwrap(); + let _ = input + .call_method1("add_pauli_product", ("ro", vec![0, 1])) + .unwrap(); + + let mut circs: Vec = Vec::new(); + circs.push(CircuitWrapper::new()); + let mut circ1 = CircuitWrapper::new(); + circ1.internal += roqoqo::operations::RotateX::new(0, 0.0.into()); + circs.push(circ1); + let br_type = py.get_type::(); + let br = br_type + .call1((Some(CircuitWrapper::new()), circs.clone(), input)) + .unwrap() + .cast_as::>() + .unwrap(); + + let circuits: Vec = br.call_method0("circuits").unwrap().extract().unwrap(); + for (index, b) in circuits.iter().enumerate() { + assert_eq!(b, circs.get(index).unwrap()); + } + let const_circuit: CircuitWrapper = br + .call_method0("constant_circuit") + .unwrap() + .extract() + .unwrap(); + assert_eq!(CircuitWrapper::new(), const_circuit); + }) } /// Test evaluate() function for BasisRotation measurement @@ -96,103 +96,105 @@ fn test_py03_evaluate_bool( two_qubit_exp_val: f64, two_pp_exp_val: f64, ) { - let gil = Python::acquire_gil(); - let py = gil.python(); - - let input_type = py.get_type::(); - let input = input_type - .call1((3, false)) - .unwrap() - .cast_as::>() - .unwrap(); - let tmp_vec: Vec = Vec::new(); - let _ = input - .call_method1("add_pauli_product", ("ro", tmp_vec)) - .unwrap(); - let _ = input - .call_method1("add_pauli_product", ("ro", vec![0])) - .unwrap(); - let _ = input - .call_method1("add_pauli_product", ("ro", vec![1, 2])) - .unwrap(); - let _ = input - .call_method1("add_pauli_product", ("rx", vec![1, 2])) - .unwrap(); - - let mut linear_map: HashMap = HashMap::new(); - linear_map.insert(0, 3.0); - let _ = input - .call_method1("add_linear_exp_val", ("constant".to_string(), linear_map)) - .unwrap(); - - let mut linear_map: HashMap = HashMap::new(); - linear_map.insert(1, 4.0); - let _ = input - .call_method1( - "add_linear_exp_val", - ("single_qubit_exp_val".to_string(), linear_map), - ) - .unwrap(); - - let mut linear_map: HashMap = HashMap::new(); - linear_map.insert(2, 5.0); - let _ = input - .call_method1( - "add_linear_exp_val", - ("two_qubit_exp_val".to_string(), linear_map), - ) - .unwrap(); - - let mut linear_map: HashMap = HashMap::new(); - linear_map.insert(0, 6.0); - linear_map.insert(1, 7.0); - let _ = input - .call_method1( - "add_linear_exp_val", - ("two_pp_exp_val".to_string(), linear_map), - ) - .unwrap(); - - let mut circs: Vec = Vec::new(); - circs.push(CircuitWrapper::new()); - - let br_type = py.get_type::(); - let br = br_type - .call1((Some(CircuitWrapper::new()), circs.clone(), input)) - .unwrap() - .cast_as::>() - .unwrap(); - - let mut measured_registers: HashMap = HashMap::new(); - let new_output_register: BitOutputRegister = register; - let _ = measured_registers.insert("ro".to_string(), new_output_register); - let _ = measured_registers.insert( - "rx".to_string(), - vec![ - vec![false, false, false], - vec![false, false, false], - vec![false, false, false], - ], - ); - - let input1: HashMap = - HashMap::::new(); - let input2: HashMap = - HashMap::::new(); - - let result = br - .call_method1("evaluate", (measured_registers, input1, input2)) - .unwrap(); - let constant_py = f64::extract(result.get_item("constant").unwrap()).unwrap(); - let single_qubit_exp_val_py = - f64::extract(result.get_item("single_qubit_exp_val").unwrap()).unwrap(); - let two_qubit_exp_val_py = f64::extract(result.get_item("two_qubit_exp_val").unwrap()).unwrap(); - let two_pp_exp_val_py = f64::extract(result.get_item("two_pp_exp_val").unwrap()).unwrap(); - - assert_eq!(&constant_py, &constant); - assert_eq!(&single_qubit_exp_val_py, &single_qubit_exp_val); - assert_eq!(&two_qubit_exp_val_py, &two_qubit_exp_val); - assert_eq!(&two_pp_exp_val_py, &two_pp_exp_val); + pyo3::prepare_freethreaded_python(); + + Python::with_gil(|py| -> () { + let input_type = py.get_type::(); + let input = input_type + .call1((3, false)) + .unwrap() + .cast_as::>() + .unwrap(); + let tmp_vec: Vec = Vec::new(); + let _ = input + .call_method1("add_pauli_product", ("ro", tmp_vec)) + .unwrap(); + let _ = input + .call_method1("add_pauli_product", ("ro", vec![0])) + .unwrap(); + let _ = input + .call_method1("add_pauli_product", ("ro", vec![1, 2])) + .unwrap(); + let _ = input + .call_method1("add_pauli_product", ("rx", vec![1, 2])) + .unwrap(); + + let mut linear_map: HashMap = HashMap::new(); + linear_map.insert(0, 3.0); + let _ = input + .call_method1("add_linear_exp_val", ("constant".to_string(), linear_map)) + .unwrap(); + + let mut linear_map: HashMap = HashMap::new(); + linear_map.insert(1, 4.0); + let _ = input + .call_method1( + "add_linear_exp_val", + ("single_qubit_exp_val".to_string(), linear_map), + ) + .unwrap(); + + let mut linear_map: HashMap = HashMap::new(); + linear_map.insert(2, 5.0); + let _ = input + .call_method1( + "add_linear_exp_val", + ("two_qubit_exp_val".to_string(), linear_map), + ) + .unwrap(); + + let mut linear_map: HashMap = HashMap::new(); + linear_map.insert(0, 6.0); + linear_map.insert(1, 7.0); + let _ = input + .call_method1( + "add_linear_exp_val", + ("two_pp_exp_val".to_string(), linear_map), + ) + .unwrap(); + + let mut circs: Vec = Vec::new(); + circs.push(CircuitWrapper::new()); + + let br_type = py.get_type::(); + let br = br_type + .call1((Some(CircuitWrapper::new()), circs.clone(), input)) + .unwrap() + .cast_as::>() + .unwrap(); + + let mut measured_registers: HashMap = HashMap::new(); + let new_output_register: BitOutputRegister = register; + let _ = measured_registers.insert("ro".to_string(), new_output_register); + let _ = measured_registers.insert( + "rx".to_string(), + vec![ + vec![false, false, false], + vec![false, false, false], + vec![false, false, false], + ], + ); + + let input1: HashMap = + HashMap::::new(); + let input2: HashMap = + HashMap::::new(); + + let result = br + .call_method1("evaluate", (measured_registers, input1, input2)) + .unwrap(); + let constant_py = f64::extract(result.get_item("constant").unwrap()).unwrap(); + let single_qubit_exp_val_py = + f64::extract(result.get_item("single_qubit_exp_val").unwrap()).unwrap(); + let two_qubit_exp_val_py = + f64::extract(result.get_item("two_qubit_exp_val").unwrap()).unwrap(); + let two_pp_exp_val_py = f64::extract(result.get_item("two_pp_exp_val").unwrap()).unwrap(); + + assert_eq!(&constant_py, &constant); + assert_eq!(&single_qubit_exp_val_py, &single_qubit_exp_val); + assert_eq!(&two_qubit_exp_val_py, &two_qubit_exp_val); + assert_eq!(&two_pp_exp_val_py, &two_pp_exp_val); + }) } /// Test evaluate() function for BasisRotation measurement with usize in register @@ -209,98 +211,100 @@ fn test_py03_evaluate_usize( two_qubit_exp_val: f64, two_pp_exp_val: f64, ) { - let gil = Python::acquire_gil(); - let py = gil.python(); - - let input_type = py.get_type::(); - let input = input_type - .call1((3, false)) - .unwrap() - .cast_as::>() - .unwrap(); - let tmp_vec: Vec = Vec::new(); - let _ = input - .call_method1("add_pauli_product", ("ro", tmp_vec)) - .unwrap(); - let _ = input - .call_method1("add_pauli_product", ("ro", vec![0])) - .unwrap(); - let _ = input - .call_method1("add_pauli_product", ("ro", vec![1, 2])) - .unwrap(); - let _ = input - .call_method1("add_pauli_product", ("rx", vec![1, 2])) - .unwrap(); - - let mut linear_map: HashMap = HashMap::new(); - linear_map.insert(0, 3.0); - let _ = input - .call_method1("add_linear_exp_val", ("constant".to_string(), linear_map)) - .unwrap(); - - let mut linear_map: HashMap = HashMap::new(); - linear_map.insert(1, 4.0); - let _ = input - .call_method1( - "add_linear_exp_val", - ("single_qubit_exp_val".to_string(), linear_map), - ) - .unwrap(); - - let mut linear_map: HashMap = HashMap::new(); - linear_map.insert(2, 5.0); - let _ = input - .call_method1( - "add_linear_exp_val", - ("two_qubit_exp_val".to_string(), linear_map), - ) - .unwrap(); - - let mut linear_map: HashMap = HashMap::new(); - linear_map.insert(0, 6.0); - linear_map.insert(1, 7.0); - let _ = input - .call_method1( - "add_linear_exp_val", - ("two_pp_exp_val".to_string(), linear_map), - ) - .unwrap(); - - let mut circs: Vec = Vec::new(); - circs.push(CircuitWrapper::new()); - - let br_type = py.get_type::(); - let br = br_type - .call1((Some(CircuitWrapper::new()), circs.clone(), input)) - .unwrap() - .cast_as::>() - .unwrap(); - - let mut measured_registers: HashMap>> = HashMap::new(); - let _ = measured_registers.insert("ro".to_string(), register); - let _ = measured_registers.insert( - "rx".to_string(), - vec![vec![0, 0, 0], vec![0, 0, 0], vec![0, 0, 0]], - ); - - let input1: HashMap = - HashMap::::new(); - let input2: HashMap = - HashMap::::new(); - - let result = br - .call_method1("evaluate", (measured_registers, input1, input2)) - .unwrap(); - let constant_py = f64::extract(result.get_item("constant").unwrap()).unwrap(); - let single_qubit_exp_val_py = - f64::extract(result.get_item("single_qubit_exp_val").unwrap()).unwrap(); - let two_qubit_exp_val_py = f64::extract(result.get_item("two_qubit_exp_val").unwrap()).unwrap(); - let two_pp_exp_val_py = f64::extract(result.get_item("two_pp_exp_val").unwrap()).unwrap(); - - assert_eq!(&constant_py, &constant); - assert_eq!(&single_qubit_exp_val_py, &single_qubit_exp_val); - assert_eq!(&two_qubit_exp_val_py, &two_qubit_exp_val); - assert_eq!(&two_pp_exp_val_py, &two_pp_exp_val); + pyo3::prepare_freethreaded_python(); + + Python::with_gil(|py| -> () { + let input_type = py.get_type::(); + let input = input_type + .call1((3, false)) + .unwrap() + .cast_as::>() + .unwrap(); + let tmp_vec: Vec = Vec::new(); + let _ = input + .call_method1("add_pauli_product", ("ro", tmp_vec)) + .unwrap(); + let _ = input + .call_method1("add_pauli_product", ("ro", vec![0])) + .unwrap(); + let _ = input + .call_method1("add_pauli_product", ("ro", vec![1, 2])) + .unwrap(); + let _ = input + .call_method1("add_pauli_product", ("rx", vec![1, 2])) + .unwrap(); + + let mut linear_map: HashMap = HashMap::new(); + linear_map.insert(0, 3.0); + let _ = input + .call_method1("add_linear_exp_val", ("constant".to_string(), linear_map)) + .unwrap(); + + let mut linear_map: HashMap = HashMap::new(); + linear_map.insert(1, 4.0); + let _ = input + .call_method1( + "add_linear_exp_val", + ("single_qubit_exp_val".to_string(), linear_map), + ) + .unwrap(); + + let mut linear_map: HashMap = HashMap::new(); + linear_map.insert(2, 5.0); + let _ = input + .call_method1( + "add_linear_exp_val", + ("two_qubit_exp_val".to_string(), linear_map), + ) + .unwrap(); + + let mut linear_map: HashMap = HashMap::new(); + linear_map.insert(0, 6.0); + linear_map.insert(1, 7.0); + let _ = input + .call_method1( + "add_linear_exp_val", + ("two_pp_exp_val".to_string(), linear_map), + ) + .unwrap(); + + let mut circs: Vec = Vec::new(); + circs.push(CircuitWrapper::new()); + + let br_type = py.get_type::(); + let br = br_type + .call1((Some(CircuitWrapper::new()), circs.clone(), input)) + .unwrap() + .cast_as::>() + .unwrap(); + + let mut measured_registers: HashMap>> = HashMap::new(); + let _ = measured_registers.insert("ro".to_string(), register); + let _ = measured_registers.insert( + "rx".to_string(), + vec![vec![0, 0, 0], vec![0, 0, 0], vec![0, 0, 0]], + ); + + let input1: HashMap = + HashMap::::new(); + let input2: HashMap = + HashMap::::new(); + + let result = br + .call_method1("evaluate", (measured_registers, input1, input2)) + .unwrap(); + let constant_py = f64::extract(result.get_item("constant").unwrap()).unwrap(); + let single_qubit_exp_val_py = + f64::extract(result.get_item("single_qubit_exp_val").unwrap()).unwrap(); + let two_qubit_exp_val_py = + f64::extract(result.get_item("two_qubit_exp_val").unwrap()).unwrap(); + let two_pp_exp_val_py = f64::extract(result.get_item("two_pp_exp_val").unwrap()).unwrap(); + + assert_eq!(&constant_py, &constant); + assert_eq!(&single_qubit_exp_val_py, &single_qubit_exp_val); + assert_eq!(&two_qubit_exp_val_py, &two_qubit_exp_val); + assert_eq!(&two_pp_exp_val_py, &two_pp_exp_val); + }) } /// Test evaluate() function for BasisRotation measurement with symbolic parameters @@ -315,370 +319,378 @@ fn test_py03_evaluate_usize( vec![true, true, true], ], 3.0_f64.sin() + 1.0_f64.sin() ; "All measurements one")] fn test_evaluate_symbolic(register: Vec>, constant: f64) { - let gil = Python::acquire_gil(); - let py = gil.python(); - - let input_type = py.get_type::(); - let input = input_type - .call1((3, false)) - .unwrap() - .cast_as::>() - .unwrap(); - let tmp_vec: Vec = Vec::new(); - let _ = input - .call_method1("add_pauli_product", ("ro", tmp_vec)) - .unwrap(); - let _ = input - .call_method1("add_pauli_product", ("ro", vec![0])) - .unwrap(); - let _ = input - .call_method1("add_pauli_product", ("ro", vec![1, 2])) - .unwrap(); - let _ = input - .call_method1("add_pauli_product", ("rx", vec![1, 2])) - .unwrap(); - - let symbolic_pystring = "sin(3.0 * pauli_product_0) + sin(-1.0 * pauli_product_1)".to_string(); - let _ = input - .call_method1( - "add_symbolic_exp_val", - ("constant".to_string(), symbolic_pystring), - ) - .unwrap(); - - let mut circs: Vec = Vec::new(); - circs.push(CircuitWrapper::new()); - - let br_type = py.get_type::(); - let br = br_type - .call1((Some(CircuitWrapper::new()), circs.clone(), input)) - .unwrap() - .cast_as::>() - .unwrap(); - - let mut measured_registers: HashMap = HashMap::new(); - let new_output_register: BitOutputRegister = register; - let _ = measured_registers.insert("ro".to_string(), new_output_register); - let _ = measured_registers.insert( - "rx".to_string(), - vec![ - vec![false, false, false], - vec![false, false, false], - vec![false, false, false], - ], - ); - - let input1: HashMap = - HashMap::::new(); - let input2: HashMap = - HashMap::::new(); - - let result = br - .call_method1("evaluate", (measured_registers, input1, input2)) - .unwrap(); - let constant_py = f64::extract(result.get_item("constant").unwrap()).unwrap(); - assert!((constant_py - constant).abs() < f64::EPSILON); + pyo3::prepare_freethreaded_python(); + + Python::with_gil(|py| -> () { + let input_type = py.get_type::(); + let input = input_type + .call1((3, false)) + .unwrap() + .cast_as::>() + .unwrap(); + let tmp_vec: Vec = Vec::new(); + let _ = input + .call_method1("add_pauli_product", ("ro", tmp_vec)) + .unwrap(); + let _ = input + .call_method1("add_pauli_product", ("ro", vec![0])) + .unwrap(); + let _ = input + .call_method1("add_pauli_product", ("ro", vec![1, 2])) + .unwrap(); + let _ = input + .call_method1("add_pauli_product", ("rx", vec![1, 2])) + .unwrap(); + + let symbolic_pystring = + "sin(3.0 * pauli_product_0) + sin(-1.0 * pauli_product_1)".to_string(); + let _ = input + .call_method1( + "add_symbolic_exp_val", + ("constant".to_string(), symbolic_pystring), + ) + .unwrap(); + + let mut circs: Vec = Vec::new(); + circs.push(CircuitWrapper::new()); + + let br_type = py.get_type::(); + let br = br_type + .call1((Some(CircuitWrapper::new()), circs.clone(), input)) + .unwrap() + .cast_as::>() + .unwrap(); + + let mut measured_registers: HashMap = HashMap::new(); + let new_output_register: BitOutputRegister = register; + let _ = measured_registers.insert("ro".to_string(), new_output_register); + let _ = measured_registers.insert( + "rx".to_string(), + vec![ + vec![false, false, false], + vec![false, false, false], + vec![false, false, false], + ], + ); + + let input1: HashMap = + HashMap::::new(); + let input2: HashMap = + HashMap::::new(); + + let result = br + .call_method1("evaluate", (measured_registers, input1, input2)) + .unwrap(); + let constant_py = f64::extract(result.get_item("constant").unwrap()).unwrap(); + assert!((constant_py - constant).abs() < f64::EPSILON); + }) } /// Test evaluate failure #[test] fn test_py03_evaluate_error0() { - let gil = Python::acquire_gil(); - let py = gil.python(); - - let input_type = py.get_type::(); - let input = input_type - .call1((3, false)) - .unwrap() - .cast_as::>() - .unwrap(); - let tmp_vec: Vec = Vec::new(); - let _ = input - .call_method1("add_pauli_product", ("ro", tmp_vec)) - .unwrap(); - let _ = input - .call_method1("add_pauli_product", ("ro", vec![0])) - .unwrap(); - let _ = input - .call_method1("add_pauli_product", ("ro", vec![1, 2])) - .unwrap(); - let _ = input - .call_method1("add_pauli_product", ("rx", vec![1, 2])) - .unwrap(); - - let mut circs: Vec = Vec::new(); - circs.push(CircuitWrapper::new()); - - let br_type = py.get_type::(); - let br = br_type - .call1((Some(CircuitWrapper::new()), circs.clone(), input)) - .unwrap() - .cast_as::>() - .unwrap(); - - let measured_registers: HashMap = HashMap::new(); - let input2: HashMap = - HashMap::::new(); - let input3: HashMap = - HashMap::::new(); - - let result = br.call_method1( - "evaluate", - (measured_registers, input2.clone(), input3.clone()), - ); - assert!(result.is_err()); - - let input1: HashMap>> = HashMap::new(); - let error = br.call_method1("evaluate", (input1, input2, input3)); - assert!(error.is_err()); + pyo3::prepare_freethreaded_python(); + + Python::with_gil(|py| -> () { + let input_type = py.get_type::(); + let input = input_type + .call1((3, false)) + .unwrap() + .cast_as::>() + .unwrap(); + let tmp_vec: Vec = Vec::new(); + let _ = input + .call_method1("add_pauli_product", ("ro", tmp_vec)) + .unwrap(); + let _ = input + .call_method1("add_pauli_product", ("ro", vec![0])) + .unwrap(); + let _ = input + .call_method1("add_pauli_product", ("ro", vec![1, 2])) + .unwrap(); + let _ = input + .call_method1("add_pauli_product", ("rx", vec![1, 2])) + .unwrap(); + + let mut circs: Vec = Vec::new(); + circs.push(CircuitWrapper::new()); + + let br_type = py.get_type::(); + let br = br_type + .call1((Some(CircuitWrapper::new()), circs.clone(), input)) + .unwrap() + .cast_as::>() + .unwrap(); + + let measured_registers: HashMap = HashMap::new(); + let input2: HashMap = + HashMap::::new(); + let input3: HashMap = + HashMap::::new(); + + let result = br.call_method1( + "evaluate", + (measured_registers, input2.clone(), input3.clone()), + ); + assert!(result.is_err()); + + let input1: HashMap>> = HashMap::new(); + let error = br.call_method1("evaluate", (input1, input2, input3)); + assert!(error.is_err()); + }) } /// Test copy #[test] fn test_pyo3_copy() { - let gil = Python::acquire_gil(); - let py = gil.python(); - - let input_type = py.get_type::(); - let input = input_type - .call1((3, false)) - .unwrap() - .cast_as::>() - .unwrap(); - let tmp_vec: Vec = Vec::new(); - let _ = input - .call_method1("add_pauli_product", ("ro", tmp_vec)) - .unwrap(); - let _ = input - .call_method1("add_pauli_product", ("ro", vec![0])) - .unwrap(); - let _ = input - .call_method1("add_pauli_product", ("ro", vec![0, 1])) - .unwrap(); - - let mut circs: Vec = Vec::new(); - circs.push(CircuitWrapper::new()); - let mut circ1 = CircuitWrapper::new(); - circ1.internal += roqoqo::operations::RotateX::new(0, 0.0.into()); - circs.push(circ1); - let br_type = py.get_type::(); - let br = br_type - .call1((Some(CircuitWrapper::new()), circs.clone(), input)) - .unwrap() - .cast_as::>() - .unwrap(); - let br_clone = br.clone(); - - let circuits: Vec = br.call_method0("circuits").unwrap().extract().unwrap(); - let circuits_clone: Vec = br_clone - .call_method0("circuits") - .unwrap() - .extract() - .unwrap(); - assert_eq!(circuits, circuits_clone); - - let const_circuit: CircuitWrapper = br - .call_method0("constant_circuit") - .unwrap() - .extract() - .unwrap(); - let const_circuit_clone: CircuitWrapper = br_clone - .call_method0("constant_circuit") - .unwrap() - .extract() - .unwrap(); - assert_eq!(const_circuit, const_circuit_clone); + pyo3::prepare_freethreaded_python(); + + Python::with_gil(|py| -> () { + let input_type = py.get_type::(); + let input = input_type + .call1((3, false)) + .unwrap() + .cast_as::>() + .unwrap(); + let tmp_vec: Vec = Vec::new(); + let _ = input + .call_method1("add_pauli_product", ("ro", tmp_vec)) + .unwrap(); + let _ = input + .call_method1("add_pauli_product", ("ro", vec![0])) + .unwrap(); + let _ = input + .call_method1("add_pauli_product", ("ro", vec![0, 1])) + .unwrap(); + + let mut circs: Vec = Vec::new(); + circs.push(CircuitWrapper::new()); + let mut circ1 = CircuitWrapper::new(); + circ1.internal += roqoqo::operations::RotateX::new(0, 0.0.into()); + circs.push(circ1); + let br_type = py.get_type::(); + let br = br_type + .call1((Some(CircuitWrapper::new()), circs.clone(), input)) + .unwrap() + .cast_as::>() + .unwrap(); + let br_clone = br.clone(); + + let circuits: Vec = br.call_method0("circuits").unwrap().extract().unwrap(); + let circuits_clone: Vec = br_clone + .call_method0("circuits") + .unwrap() + .extract() + .unwrap(); + assert_eq!(circuits, circuits_clone); + + let const_circuit: CircuitWrapper = br + .call_method0("constant_circuit") + .unwrap() + .extract() + .unwrap(); + let const_circuit_clone: CircuitWrapper = br_clone + .call_method0("constant_circuit") + .unwrap() + .extract() + .unwrap(); + assert_eq!(const_circuit, const_circuit_clone); + }) } /// Test debug and clone #[test] fn test_pyo3_debug() { - let gil = Python::acquire_gil(); - let py = gil.python(); - - let input_type = py.get_type::(); - let input = input_type - .call1((3, false)) - .unwrap() - .cast_as::>() - .unwrap(); - let tmp_vec: Vec = Vec::new(); - let _ = input - .call_method1("add_pauli_product", ("ro", tmp_vec)) - .unwrap(); - - let mut circs: Vec = Vec::new(); - circs.push(CircuitWrapper::new()); - - let br_type = py.get_type::(); - let br = br_type - .call1((Some(CircuitWrapper::new()), circs.clone(), input)) - .unwrap() - .cast_as::>() - .unwrap(); - let br_wrapper = br.extract::().unwrap(); - - let br_clone = br_wrapper.clone(); - assert_eq!(format!("{:?}", br_wrapper), format!("{:?}", br_clone)); - - let debug_string = "RefCell { value: BasisRotationWrapper { internal: BasisRotation { constant_circuit: Some(Circuit { definitions: [], operations: [] }), circuits: [Circuit { definitions: [], operations: [] }], input: BasisRotationInput { pauli_product_qubit_masks: {\"ro\": {0: []}}, number_qubits: 3, number_pauli_products: 1, measured_exp_vals: {}, use_flipped_measurement: false } } } }"; - assert_eq!(format!("{:?}", br), debug_string); - - let debug_input_string = "RefCell { value: BasisRotationInputWrapper { internal: BasisRotationInput { pauli_product_qubit_masks: {\"ro\": {0: []}}, number_qubits: 3, number_pauli_products: 1, measured_exp_vals: {}, use_flipped_measurement: false } } }"; - assert_eq!(format!("{:?}", input), debug_input_string); - - let debug_input = input.clone(); - let mut linear_map: HashMap = HashMap::new(); - linear_map.insert(0, 3.0); - let _ = debug_input - .call_method1("add_linear_exp_val", ("single_pp_val", linear_map.clone())) - .unwrap(); - linear_map.insert(0, 5.0); - let error = - debug_input.call_method1("add_linear_exp_val", ("single_pp_val", linear_map.clone())); - assert!(error.is_err()); - - let symbolic_pystring = "sin(3.0 * pauli_product_1)".to_string(); - let error = - debug_input.call_method1("add_symbolic_exp_val", ("single_pp_val", symbolic_pystring)); - assert!(error.is_err()); - - let error = debug_input.call_method1("add_pauli_product", ("ro", vec![4])); - assert!(error.is_err()); + pyo3::prepare_freethreaded_python(); + + Python::with_gil(|py| -> () { + let input_type = py.get_type::(); + let input = input_type + .call1((3, false)) + .unwrap() + .cast_as::>() + .unwrap(); + let tmp_vec: Vec = Vec::new(); + let _ = input + .call_method1("add_pauli_product", ("ro", tmp_vec)) + .unwrap(); + + let mut circs: Vec = Vec::new(); + circs.push(CircuitWrapper::new()); + + let br_type = py.get_type::(); + let br = br_type + .call1((Some(CircuitWrapper::new()), circs.clone(), input)) + .unwrap() + .cast_as::>() + .unwrap(); + let br_wrapper = br.extract::().unwrap(); + + let br_clone = br_wrapper.clone(); + assert_eq!(format!("{:?}", br_wrapper), format!("{:?}", br_clone)); + + let debug_string = "RefCell { value: BasisRotationWrapper { internal: BasisRotation { constant_circuit: Some(Circuit { definitions: [], operations: [] }), circuits: [Circuit { definitions: [], operations: [] }], input: BasisRotationInput { pauli_product_qubit_masks: {\"ro\": {0: []}}, number_qubits: 3, number_pauli_products: 1, measured_exp_vals: {}, use_flipped_measurement: false } } } }"; + assert_eq!(format!("{:?}", br), debug_string); + + let debug_input_string = "RefCell { value: BasisRotationInputWrapper { internal: BasisRotationInput { pauli_product_qubit_masks: {\"ro\": {0: []}}, number_qubits: 3, number_pauli_products: 1, measured_exp_vals: {}, use_flipped_measurement: false } } }"; + assert_eq!(format!("{:?}", input), debug_input_string); + + let debug_input = input.clone(); + let mut linear_map: HashMap = HashMap::new(); + linear_map.insert(0, 3.0); + let _ = debug_input + .call_method1("add_linear_exp_val", ("single_pp_val", linear_map.clone())) + .unwrap(); + linear_map.insert(0, 5.0); + let error = + debug_input.call_method1("add_linear_exp_val", ("single_pp_val", linear_map.clone())); + assert!(error.is_err()); + + let symbolic_pystring = "sin(3.0 * pauli_product_1)".to_string(); + let error = + debug_input.call_method1("add_symbolic_exp_val", ("single_pp_val", symbolic_pystring)); + assert!(error.is_err()); + + let error = debug_input.call_method1("add_pauli_product", ("ro", vec![4])); + assert!(error.is_err()); + }) } /// Test to_json and from_json functions #[test] fn test_to_from_json() { - let gil = Python::acquire_gil(); - let py = gil.python(); - - let input_type = py.get_type::(); - let input = input_type - .call1((3, false)) - .unwrap() - .cast_as::>() - .unwrap(); - let tmp_vec: Vec = Vec::new(); - let _ = input - .call_method1("add_pauli_product", ("ro", tmp_vec)) - .unwrap(); - - let mut circs: Vec = Vec::new(); - circs.push(CircuitWrapper::new()); - - let br_type = py.get_type::(); - let br = br_type - .call1((Some(CircuitWrapper::new()), circs.clone(), input)) - .unwrap() - .cast_as::>() - .unwrap(); - - let new_br = br.clone(); - let serialised = br.call_method0("to_json").unwrap(); - let deserialised = new_br - .call_method1("from_json", (serialised,)) - .unwrap() - .cast_as::>() - .unwrap(); - assert_eq!(format!("{:?}", br), format!("{:?}", deserialised)); - - let deserialised_error = - new_br.call_method1("from_json", (serde_json::to_string("fails").unwrap(),)); - assert!(deserialised_error.is_err()); - - let deserialised_error = - new_br.call_method1("from_json", (serde_json::to_string(&vec![0]).unwrap(),)); - assert!(deserialised_error.is_err()); - - let serialised_error = serialised.call_method0("to_json"); - assert!(serialised_error.is_err()); + pyo3::prepare_freethreaded_python(); + + Python::with_gil(|py| -> () { + let input_type = py.get_type::(); + let input = input_type + .call1((3, false)) + .unwrap() + .cast_as::>() + .unwrap(); + let tmp_vec: Vec = Vec::new(); + let _ = input + .call_method1("add_pauli_product", ("ro", tmp_vec)) + .unwrap(); + + let mut circs: Vec = Vec::new(); + circs.push(CircuitWrapper::new()); + + let br_type = py.get_type::(); + let br = br_type + .call1((Some(CircuitWrapper::new()), circs.clone(), input)) + .unwrap() + .cast_as::>() + .unwrap(); + + let new_br = br.clone(); + let serialised = br.call_method0("to_json").unwrap(); + let deserialised = new_br + .call_method1("from_json", (serialised,)) + .unwrap() + .cast_as::>() + .unwrap(); + assert_eq!(format!("{:?}", br), format!("{:?}", deserialised)); + + let deserialised_error = + new_br.call_method1("from_json", (serde_json::to_string("fails").unwrap(),)); + assert!(deserialised_error.is_err()); + + let deserialised_error = + new_br.call_method1("from_json", (serde_json::to_string(&vec![0]).unwrap(),)); + assert!(deserialised_error.is_err()); + + let serialised_error = serialised.call_method0("to_json"); + assert!(serialised_error.is_err()); + }) } /// Test substitute_parameters #[test] fn test_substitute_parameters() { - let gil = Python::acquire_gil(); - let py = gil.python(); - - let input_type = py.get_type::(); - let input = input_type - .call1((3, false)) - .unwrap() - .cast_as::>() - .unwrap(); - let tmp_vec: Vec = Vec::new(); - let _ = input - .call_method1("add_pauli_product", ("ro", tmp_vec)) - .unwrap(); - let _ = input - .call_method1("add_pauli_product", ("ro", vec![0])) - .unwrap(); - let _ = input - .call_method1("add_pauli_product", ("ro", vec![0, 1])) - .unwrap(); - - let mut circs: Vec = Vec::new(); - circs.push(CircuitWrapper::new()); - let mut circ1 = CircuitWrapper::new(); - circ1.internal += roqoqo::operations::RotateX::new(0, "theta".into()); - circs.push(circ1); - let br_type = py.get_type::(); - let br = br_type - .call1((Some(CircuitWrapper::new()), circs.clone(), input)) - .unwrap() - .cast_as::>() - .unwrap(); - - let mut map: HashMap = HashMap::::new(); - map.insert("theta".to_string(), 0.0); - let br_sub = br - .call_method1("substitute_parameters", (map,)) - .unwrap() - .cast_as::>() - .unwrap(); - - let br_wrapper = br.extract::().unwrap(); - let br_sub_wrapper = br_sub.extract::().unwrap(); - assert_ne!(format!("{:?}", br_wrapper), format!("{:?}", br_sub_wrapper)); + pyo3::prepare_freethreaded_python(); + + Python::with_gil(|py| -> () { + let input_type = py.get_type::(); + let input = input_type + .call1((3, false)) + .unwrap() + .cast_as::>() + .unwrap(); + let tmp_vec: Vec = Vec::new(); + let _ = input + .call_method1("add_pauli_product", ("ro", tmp_vec)) + .unwrap(); + let _ = input + .call_method1("add_pauli_product", ("ro", vec![0])) + .unwrap(); + let _ = input + .call_method1("add_pauli_product", ("ro", vec![0, 1])) + .unwrap(); + + let mut circs: Vec = Vec::new(); + circs.push(CircuitWrapper::new()); + let mut circ1 = CircuitWrapper::new(); + circ1.internal += roqoqo::operations::RotateX::new(0, "theta".into()); + circs.push(circ1); + let br_type = py.get_type::(); + let br = br_type + .call1((Some(CircuitWrapper::new()), circs.clone(), input)) + .unwrap() + .cast_as::>() + .unwrap(); + + let mut map: HashMap = HashMap::::new(); + map.insert("theta".to_string(), 0.0); + let br_sub = br + .call_method1("substitute_parameters", (map,)) + .unwrap() + .cast_as::>() + .unwrap(); + + let br_wrapper = br.extract::().unwrap(); + let br_sub_wrapper = br_sub.extract::().unwrap(); + assert_ne!(format!("{:?}", br_wrapper), format!("{:?}", br_sub_wrapper)); + }) } /// Test substitute_parameters returning an error #[test] fn test_substitute_parameters_error() { - let gil = Python::acquire_gil(); - let py = gil.python(); - - let input_type = py.get_type::(); - let input = input_type - .call1((3, false)) - .unwrap() - .cast_as::>() - .unwrap(); - let tmp_vec: Vec = Vec::new(); - let _ = input - .call_method1("add_pauli_product", ("ro", tmp_vec)) - .unwrap(); - let _ = input - .call_method1("add_pauli_product", ("ro", vec![0])) - .unwrap(); - let _ = input - .call_method1("add_pauli_product", ("ro", vec![0, 1])) - .unwrap(); - - let mut circs: Vec = Vec::new(); - circs.push(CircuitWrapper::new()); - let mut circ1 = CircuitWrapper::new(); - circ1.internal += roqoqo::operations::RotateX::new(0, "theta".into()); - circs.push(circ1); - let br_type = py.get_type::(); - let br = br_type - .call1((Some(CircuitWrapper::new()), circs.clone(), input)) - .unwrap() - .cast_as::>() - .unwrap(); - - let map: HashMap = HashMap::::new(); - let br_sub = br.call_method1("substitute_parameters", (map,)); - assert!(br_sub.is_err()); + pyo3::prepare_freethreaded_python(); + + Python::with_gil(|py| -> () { + let input_type = py.get_type::(); + let input = input_type + .call1((3, false)) + .unwrap() + .cast_as::>() + .unwrap(); + let tmp_vec: Vec = Vec::new(); + let _ = input + .call_method1("add_pauli_product", ("ro", tmp_vec)) + .unwrap(); + let _ = input + .call_method1("add_pauli_product", ("ro", vec![0])) + .unwrap(); + let _ = input + .call_method1("add_pauli_product", ("ro", vec![0, 1])) + .unwrap(); + + let mut circs: Vec = Vec::new(); + circs.push(CircuitWrapper::new()); + let mut circ1 = CircuitWrapper::new(); + circ1.internal += roqoqo::operations::RotateX::new(0, "theta".into()); + circs.push(circ1); + let br_type = py.get_type::(); + let br = br_type + .call1((Some(CircuitWrapper::new()), circs.clone(), input)) + .unwrap() + .cast_as::>() + .unwrap(); + + let map: HashMap = HashMap::::new(); + let br_sub = br.call_method1("substitute_parameters", (map,)); + assert!(br_sub.is_err()); + }) } diff --git a/qoqo/tests/integration/measurements/cheated_basis_rotation_measurement.rs b/qoqo/tests/integration/measurements/cheated_basis_rotation_measurement.rs index d63f61e4..0123754f 100644 --- a/qoqo/tests/integration/measurements/cheated_basis_rotation_measurement.rs +++ b/qoqo/tests/integration/measurements/cheated_basis_rotation_measurement.rs @@ -22,6 +22,8 @@ use std::collections::HashMap; #[test] fn test_returning_circuits() { Python::with_gil(|py| -> () { + pyo3::prepare_freethreaded_python(); + let input_type = py.get_type::(); let input = input_type .call0() @@ -58,6 +60,8 @@ fn test_returning_circuits() { /// Test evaluate() function for CheatedBasisRotation measurement #[test] fn test_py03_evaluate_bool() { + pyo3::prepare_freethreaded_python(); + let gil = Python::acquire_gil(); let py = gil.python(); @@ -122,6 +126,8 @@ fn test_py03_evaluate_bool() { /// Test evaluate() function for CheatedBasisRotation measurement with symbolic parameters #[test] fn test_evaluate_symbolic() { + pyo3::prepare_freethreaded_python(); + let gil = Python::acquire_gil(); let py = gil.python(); @@ -176,6 +182,8 @@ fn test_evaluate_symbolic() { /// Test evaluate failure #[test] fn test_py03_evaluate_error0() { + pyo3::prepare_freethreaded_python(); + let gil = Python::acquire_gil(); let py = gil.python(); @@ -227,6 +235,8 @@ fn test_py03_evaluate_error0() { /// Test copy #[test] fn test_pyo3_copy() { + pyo3::prepare_freethreaded_python(); + let gil = Python::acquire_gil(); let py = gil.python(); @@ -275,6 +285,8 @@ fn test_pyo3_copy() { /// Test debug and clone #[test] fn test_pyo3_debug() { + pyo3::prepare_freethreaded_python(); + let gil = Python::acquire_gil(); let py = gil.python(); @@ -329,6 +341,8 @@ fn test_pyo3_debug() { /// Test to_json and from_json functions #[test] fn test_to_from_json() { + pyo3::prepare_freethreaded_python(); + let gil = Python::acquire_gil(); let py = gil.python(); @@ -374,6 +388,8 @@ fn test_to_from_json() { /// Test substitute_parameters #[test] fn test_substitute_parameters() { + pyo3::prepare_freethreaded_python(); + let gil = Python::acquire_gil(); let py = gil.python(); @@ -413,6 +429,8 @@ fn test_substitute_parameters() { /// Test substitute_parameters returning an error #[test] fn test_substitute_parameters_error() { + pyo3::prepare_freethreaded_python(); + let gil = Python::acquire_gil(); let py = gil.python(); diff --git a/qoqo/tests/integration/measurements/cheated_measurement.rs b/qoqo/tests/integration/measurements/cheated_measurement.rs index 69dcd08f..ac9e3583 100644 --- a/qoqo/tests/integration/measurements/cheated_measurement.rs +++ b/qoqo/tests/integration/measurements/cheated_measurement.rs @@ -23,6 +23,8 @@ use test_case::test_case; #[test] fn test_returning_circuits() { + pyo3::prepare_freethreaded_python(); + let gil = Python::acquire_gil(); let py = gil.python(); @@ -69,6 +71,8 @@ fn test_py03_evaluate_bool( value_diagonal: f64, value_off_diagonal: f64, ) { + pyo3::prepare_freethreaded_python(); + let gil = Python::acquire_gil(); let py = gil.python(); @@ -131,6 +135,8 @@ fn test_py03_evaluate_bool( /// Test evaluate failure #[test] fn test_py03_evaluate_error0() { + pyo3::prepare_freethreaded_python(); + let gil = Python::acquire_gil(); let py = gil.python(); @@ -200,6 +206,8 @@ fn test_py03_evaluate_error0() { /// Test copy #[test] fn test_pyo3_copy() { + pyo3::prepare_freethreaded_python(); + let gil = Python::acquire_gil(); let py = gil.python(); @@ -256,6 +264,8 @@ fn test_pyo3_copy() { /// Test debug and clone #[test] fn test_pyo3_debug() { + pyo3::prepare_freethreaded_python(); + let gil = Python::acquire_gil(); let py = gil.python(); @@ -310,6 +320,8 @@ fn test_pyo3_debug() { /// Test to_json and from_json functions #[test] fn test_to_from_json() { + pyo3::prepare_freethreaded_python(); + let gil = Python::acquire_gil(); let py = gil.python(); @@ -363,6 +375,8 @@ fn test_to_from_json() { /// Test substitute_parameters #[test] fn test_substitute_parameters() { + pyo3::prepare_freethreaded_python(); + let gil = Python::acquire_gil(); let py = gil.python(); @@ -410,6 +424,8 @@ fn test_substitute_parameters() { /// Test substitute_parameters returning an error #[test] fn test_substitute_parameters_error() { + pyo3::prepare_freethreaded_python(); + let gil = Python::acquire_gil(); let py = gil.python(); diff --git a/qoqo/tests/integration/measurements/classical_register_measurement.rs b/qoqo/tests/integration/measurements/classical_register_measurement.rs index 34f8f3ba..29a74fb0 100644 --- a/qoqo/tests/integration/measurements/classical_register_measurement.rs +++ b/qoqo/tests/integration/measurements/classical_register_measurement.rs @@ -20,6 +20,8 @@ use std::collections::HashMap; #[test] fn test_returning_circuits() { + pyo3::prepare_freethreaded_python(); + let gil = Python::acquire_gil(); let py = gil.python(); @@ -50,6 +52,8 @@ fn test_returning_circuits() { /// Test copy #[test] fn test_pyo3_copy() { + pyo3::prepare_freethreaded_python(); + let gil = Python::acquire_gil(); let py = gil.python(); @@ -90,6 +94,8 @@ fn test_pyo3_copy() { /// Test debug and clone #[test] fn test_pyo3_debug() { + pyo3::prepare_freethreaded_python(); + let gil = Python::acquire_gil(); let py = gil.python(); @@ -114,6 +120,8 @@ fn test_pyo3_debug() { /// Test to_json and from_json functions #[test] fn test_to_from_json() { + pyo3::prepare_freethreaded_python(); + let gil = Python::acquire_gil(); let py = gil.python(); @@ -182,6 +190,8 @@ fn test_substitute_parameters() { /// Test substitute_parameters returning an error #[test] fn test_substitute_parameters_error() { + pyo3::prepare_freethreaded_python(); + let gil = Python::acquire_gil(); let py = gil.python(); diff --git a/qoqo/tests/integration/operations/define_operations.rs b/qoqo/tests/integration/operations/define_operations.rs index 938dc034..c62c4949 100644 --- a/qoqo/tests/integration/operations/define_operations.rs +++ b/qoqo/tests/integration/operations/define_operations.rs @@ -19,6 +19,8 @@ use test_case::test_case; /// Test DefinitionFloat new() function #[test] fn test_pyo3_new_definition_float() { + pyo3::prepare_freethreaded_python(); + let gil = pyo3::Python::acquire_gil(); let py = gil.python(); let operation = py.get_type::(); @@ -61,6 +63,8 @@ fn test_pyo3_new_definition_float() { /// Test DefinitionComplex new() function #[test] fn test_pyo3_new_definition_complex() { + pyo3::prepare_freethreaded_python(); + let gil = pyo3::Python::acquire_gil(); let py = gil.python(); let operation = py.get_type::(); @@ -103,6 +107,8 @@ fn test_pyo3_new_definition_complex() { /// Test DefinitionUsize new() function #[test] fn test_pyo3_new_definition_usize() { + pyo3::prepare_freethreaded_python(); + let gil = pyo3::Python::acquire_gil(); let py = gil.python(); let operation = py.get_type::(); @@ -145,6 +151,8 @@ fn test_pyo3_new_definition_usize() { /// Test DefinitionBit new() function #[test] fn test_pyo3_new_definition_bit() { + pyo3::prepare_freethreaded_python(); + let gil = pyo3::Python::acquire_gil(); let py = gil.python(); let operation = py.get_type::(); @@ -187,6 +195,8 @@ fn test_pyo3_new_definition_bit() { /// Test InputSymbolic new() function #[test] fn test_pyo3_new_input_symbolic() { + pyo3::prepare_freethreaded_python(); + let gil = pyo3::Python::acquire_gil(); let py = gil.python(); let operation = py.get_type::(); @@ -233,6 +243,8 @@ fn test_pyo3_new_input_symbolic() { #[test_case(Operation::from(DefinitionBit::new(String::from("ro"), 1, false)); "DefinitionBit")] #[test_case(Operation::from(InputSymbolic::new(String::from("ro"), 1.0)); "InputSymbolic")] fn test_pyo3_name(input_definition: Operation) { + pyo3::prepare_freethreaded_python(); + let gil = pyo3::Python::acquire_gil(); let py = gil.python(); let operation = convert_operation_to_pyobject(input_definition).unwrap(); @@ -272,6 +284,8 @@ fn test_pyo3_is_output(input_definition: Operation) { /// Test InputSymbolic input() input #[test] fn test_pyo3_input_symbolic_input() { + pyo3::prepare_freethreaded_python(); + let gil = pyo3::Python::acquire_gil(); let py = gil.python(); let operation = @@ -309,6 +323,8 @@ fn test_pyo3_involved_qubits(input_definition: Operation) { #[test_case(Operation::from(DefinitionUsize::new(String::from("ro"), 1, false)), "DefinitionUsize"; "DefinitionUsize")] #[test_case(Operation::from(DefinitionBit::new(String::from("ro"), 1, false)), "DefinitionBit"; "DefinitionBit")] fn test_pyo3_format_repr(input_definition: Operation, format_repr: &str) { + pyo3::prepare_freethreaded_python(); + let gil = pyo3::Python::acquire_gil(); let py = gil.python(); let operation = convert_operation_to_pyobject(input_definition).unwrap(); @@ -380,6 +396,8 @@ fn test_pyo3_copy_deepcopy(input_definition: Operation) { #[test_case(Operation::from(DefinitionBit::new(String::from("ro"), 1, false)), "DefinitionBit"; "DefinitionBit")] #[test_case(Operation::from(InputSymbolic::new(String::from("ro"), 1.0)), "InputSymbolic"; "InputSymbolic")] fn test_pyo3_tags(input_definition: Operation, tag_name: &str) { + pyo3::prepare_freethreaded_python(); + let gil = pyo3::Python::acquire_gil(); let py = gil.python(); let operation = convert_operation_to_pyobject(input_definition).unwrap(); @@ -396,6 +414,8 @@ fn test_pyo3_tags(input_definition: Operation, tag_name: &str) { #[test_case(Operation::from(DefinitionBit::new(String::from("ro"), 1, false)), String::from("DefinitionBit"); "DefinitionBit")] #[test_case(Operation::from(InputSymbolic::new(String::from("ro"), 1.0)), String::from("InputSymbolic"); "InputSymbolic")] fn test_pyo3_hqslang(input_definition: Operation, hqslang_param: String) { + pyo3::prepare_freethreaded_python(); + let gil = pyo3::Python::acquire_gil(); let py = gil.python(); let operation = convert_operation_to_pyobject(input_definition).unwrap(); @@ -457,6 +477,8 @@ fn test_pyo3_substitute_parameters(input_definition: Operation) { #[test_case(Operation::from(DefinitionBit::new(String::from("ro"), 1, false)); "DefinitionBit")] #[test_case(Operation::from(InputSymbolic::new(String::from("ro"), 1.0)); "InputSymbolic")] fn test_pyo3_substitute_parameters_error(input_operation: Operation) { + pyo3::prepare_freethreaded_python(); + let gil = pyo3::Python::acquire_gil(); let py = gil.python(); let operation = convert_operation_to_pyobject(input_operation).unwrap(); @@ -473,6 +495,8 @@ fn test_pyo3_substitute_parameters_error(input_operation: Operation) { #[test_case(Operation::from(DefinitionBit::new(String::from("ro"), 1, false)); "DefinitionBit")] #[test_case(Operation::from(InputSymbolic::new(String::from("ro"), 1.0)); "InputSymbolic")] fn test_pyo3_remap_qubits(input_definition: Operation) { + pyo3::prepare_freethreaded_python(); + let gil = pyo3::Python::acquire_gil(); let py = gil.python(); let operation = convert_operation_to_pyobject(input_definition).unwrap(); @@ -510,6 +534,8 @@ fn test_pyo3_remap_qubits(input_definition: Operation) { Operation::from(InputSymbolic::new(String::from("ro"), 2.0)); "InputSymbolic")] fn test_pyo3_richcmp(definition_1: Operation, definition_2: Operation) { + pyo3::prepare_freethreaded_python(); + let gil = pyo3::Python::acquire_gil(); let py = gil.python(); let operation_one = convert_operation_to_pyobject(definition_1).unwrap(); diff --git a/qoqo/tests/integration/operations/measurement_operations.rs b/qoqo/tests/integration/operations/measurement_operations.rs index ec7afaf6..b0374e3e 100644 --- a/qoqo/tests/integration/operations/measurement_operations.rs +++ b/qoqo/tests/integration/operations/measurement_operations.rs @@ -65,6 +65,9 @@ fn new_circuit(py: Python) -> &PyCell { #[test_case(Operation::from(PragmaGetPauliProduct::new(create_qubit_mapping(), String::from("ro"), create_circuit())); "PragmaGetPauliProduct")] #[test_case(Operation::from(PragmaRepeatedMeasurement::new(String::from("ro"), Some(create_qubit_mapping()), 2)); "PragmaRepeatedMeasurement")] fn test_pyo3_readout(input_measurement: Operation) { + pyo3::prepare_freethreaded_python(); + + pyo3::prepare_freethreaded_python(); let gil = pyo3::Python::acquire_gil(); let py = gil.python(); let operation = convert_operation_to_pyobject(input_measurement).unwrap(); @@ -78,6 +81,9 @@ fn test_pyo3_readout(input_measurement: Operation) { #[test_case(Operation::from(PragmaGetPauliProduct::new(create_qubit_mapping(), String::from("ro"), create_circuit())), "qubit_paulis"; "PragmaGetPauliProduct")] #[test_case(Operation::from(PragmaRepeatedMeasurement::new(String::from("ro"), Some(create_qubit_mapping()), 2)), "qubit_mapping"; "PragmaRepeatedMeasurement")] fn test_pyo3_qubit_mapping(input_measurement: Operation, operation_name: &str) { + pyo3::prepare_freethreaded_python(); + + pyo3::prepare_freethreaded_python(); let gil = pyo3::Python::acquire_gil(); let py = gil.python(); let operation = convert_operation_to_pyobject(input_measurement).unwrap(); @@ -97,6 +103,9 @@ fn test_pyo3_qubit_mapping(input_measurement: Operation, operation_name: &str) { #[test_case(Operation::from(PragmaGetOccupationProbability::new(String::from("ro"), Some(create_circuit()))); "PragmaGetOccupationProbability")] #[test_case(Operation::from(PragmaGetPauliProduct::new(create_qubit_mapping(), String::from("ro"), create_circuit())); "PragmaGetPauliProduct")] fn test_pyo3_circuit(input_measurement: Operation) { + pyo3::prepare_freethreaded_python(); + + pyo3::prepare_freethreaded_python(); let gil = pyo3::Python::acquire_gil(); let py = gil.python(); let operation = convert_operation_to_pyobject(input_measurement).unwrap(); @@ -115,6 +124,9 @@ fn test_pyo3_circuit(input_measurement: Operation) { /// Test MeasureQubit remaining inputs (qubit, readout_index) #[test] fn test_pyo3_input_measurequbit_input() { + pyo3::prepare_freethreaded_python(); + + pyo3::prepare_freethreaded_python(); let gil = pyo3::Python::acquire_gil(); let py = gil.python(); let operation = @@ -140,6 +152,7 @@ fn test_pyo3_input_measurequbit_input() { /// Test PragmaRepeatedMeasurement remaining input (number_mreasurements) #[test] fn test_pyo3_input_pragmarepeatedmeasurements_input() { + pyo3::prepare_freethreaded_python(); let gil = pyo3::Python::acquire_gil(); let py = gil.python(); let operation = convert_operation_to_pyobject(Operation::from(PragmaRepeatedMeasurement::new( @@ -166,6 +179,7 @@ fn test_pyo3_input_pragmarepeatedmeasurements_input() { #[test_case(Operation::from(PragmaGetOccupationProbability::new(String::from("ro"), Some(create_circuit()))); "PragmaGetOccupationProbability")] #[test_case(Operation::from(PragmaRepeatedMeasurement::new(String::from("ro"), Some(create_qubit_mapping()), 2)); "PragmaRepeatedMeasurement")] fn test_pyo3_involved_qubits_all(input_definition: Operation) { + pyo3::prepare_freethreaded_python(); let gil = pyo3::Python::acquire_gil(); let py = gil.python(); let operation = convert_operation_to_pyobject(input_definition).unwrap(); @@ -180,6 +194,7 @@ fn test_pyo3_involved_qubits_all(input_definition: Operation) { #[test_case(Operation::from(MeasureQubit::new(0, String::from("ro"), 1)); "MeasureQubit")] #[test_case(Operation::from(PragmaGetPauliProduct::new(create_qubit_mapping(), String::from("ro"), create_circuit())); "PragmaGetPauliProduct")] fn test_pyo3_involved_qubits_0(input_definition: Operation) { + pyo3::prepare_freethreaded_python(); let gil = pyo3::Python::acquire_gil(); let py = gil.python(); let operation = convert_operation_to_pyobject(input_definition).unwrap(); @@ -198,6 +213,7 @@ fn test_pyo3_involved_qubits_0(input_definition: Operation) { #[test_case(Operation::from(PragmaGetPauliProduct::new(create_qubit_mapping(), String::from("ro"), Circuit::default())), "PragmaGetPauliProduct { qubit_paulis: {0: 1}, readout: \"ro\", circuit: Circuit { definitions: [], operations: [] } }"; "PragmaGetPauliProduct")] #[test_case(Operation::from(PragmaRepeatedMeasurement::new(String::from("ro"), Some(create_qubit_mapping()), 2)), "PragmaRepeatedMeasurement { readout: \"ro\", qubit_mapping: Some({0: 1}), number_measurements: 2 }"; "PragmaRepeatedMeasurement")] fn test_pyo3_format_repr(input_measurement: Operation, format_repr: &str) { + pyo3::prepare_freethreaded_python(); let gil = pyo3::Python::acquire_gil(); let py = gil.python(); let operation = convert_operation_to_pyobject(input_measurement).unwrap(); @@ -217,6 +233,7 @@ fn test_pyo3_format_repr(input_measurement: Operation, format_repr: &str) { #[test_case(Operation::from(PragmaGetPauliProduct::new(create_qubit_mapping(), String::from("ro"), create_circuit())); "PragmaGetPauliProduct")] #[test_case(Operation::from(PragmaRepeatedMeasurement::new(String::from("ro"), Some(create_qubit_mapping()), 2)); "PragmaRepeatedMeasurement")] fn test_pyo3_copy_deepcopy(input_measurement: Operation) { + pyo3::prepare_freethreaded_python(); let gil = pyo3::Python::acquire_gil(); let py = gil.python(); let operation = convert_operation_to_pyobject(input_measurement).unwrap(); @@ -249,6 +266,7 @@ fn test_pyo3_copy_deepcopy(input_measurement: Operation) { #[test_case(Operation::from(PragmaGetPauliProduct::new(create_qubit_mapping(), String::from("ro"), create_circuit())), "PragmaGetPauliProduct"; "PragmaGetPauliProduct")] #[test_case(Operation::from(PragmaRepeatedMeasurement::new(String::from("ro"), Some(create_qubit_mapping()), 2)), "PragmaRepeatedMeasurement"; "PragmaRepeatedMeasurement")] fn test_pyo3_tags(input_measurement: Operation, tag_name: &str) { + pyo3::prepare_freethreaded_python(); let gil = pyo3::Python::acquire_gil(); let py = gil.python(); let operation = convert_operation_to_pyobject(input_measurement).unwrap(); @@ -261,6 +279,7 @@ fn test_pyo3_tags(input_measurement: Operation, tag_name: &str) { /// Test tags function for MeasureQubit #[test] fn test_pyo3_tags() { + pyo3::prepare_freethreaded_python(); let gil = pyo3::Python::acquire_gil(); let py = gil.python(); let operation = @@ -280,6 +299,7 @@ fn test_pyo3_tags() { #[test_case(Operation::from(PragmaGetPauliProduct::new(create_qubit_mapping(), String::from("ro"), create_circuit())), String::from("PragmaGetPauliProduct"); "PragmaGetPauliProduct")] #[test_case(Operation::from(PragmaRepeatedMeasurement::new(String::from("ro"), Some(create_qubit_mapping()), 2)), String::from("PragmaRepeatedMeasurement"); "PragmaRepeatedMeasurement")] fn test_pyo3_hqslang(input_measurement: Operation, hqslang_param: String) { + pyo3::prepare_freethreaded_python(); let gil = pyo3::Python::acquire_gil(); let py = gil.python(); let operation = convert_operation_to_pyobject(input_measurement).unwrap(); @@ -296,6 +316,7 @@ fn test_pyo3_hqslang(input_measurement: Operation, hqslang_param: String) { #[test_case(Operation::from(PragmaGetPauliProduct::new(create_qubit_mapping(), String::from("ro"), create_circuit())); "PragmaGetPauliProduct")] #[test_case(Operation::from(PragmaRepeatedMeasurement::new(String::from("ro"), Some(create_qubit_mapping()), 2)); "PragmaRepeatedMeasurement")] fn test_pyo3_is_parametrized(input_measurement: Operation) { + pyo3::prepare_freethreaded_python(); let gil = pyo3::Python::acquire_gil(); let py = gil.python(); let operation = convert_operation_to_pyobject(input_measurement).unwrap(); @@ -316,6 +337,7 @@ fn test_pyo3_is_parametrized(input_measurement: Operation) { #[test_case(Operation::from(PragmaGetPauliProduct::new(create_qubit_mapping(), String::from("ro"), create_circuit())); "PragmaGetPauliProduct")] #[test_case(Operation::from(PragmaRepeatedMeasurement::new(String::from("ro"), Some(create_qubit_mapping()), 2)); "PragmaRepeatedMeasurement")] fn test_pyo3_substitute_parameters(input_measurement: Operation) { + pyo3::prepare_freethreaded_python(); let gil = pyo3::Python::acquire_gil(); let py = gil.python(); let operation = convert_operation_to_pyobject(input_measurement).unwrap(); @@ -350,6 +372,7 @@ fn test_pyo3_substitute_parameters(input_measurement: Operation) { #[test_case(Operation::from(PragmaGetPauliProduct::new(create_qubit_mapping(), String::from("ro"), create_circuit())); "PragmaGetPauliProduct")] #[test_case(Operation::from(PragmaRepeatedMeasurement::new(String::from("ro"), Some(create_qubit_mapping()), 2)); "PragmaRepeatedMeasurement")] fn test_pyo3_substitute_params_error(input_operation: Operation) { + pyo3::prepare_freethreaded_python(); let gil = pyo3::Python::acquire_gil(); let py = gil.python(); let operation = convert_operation_to_pyobject(input_operation).unwrap(); @@ -380,6 +403,7 @@ fn test_pyo3_substitute_params_error(input_operation: Operation) { Operation::from(PragmaRepeatedMeasurement::new(String::from("ro"), Some(qubits_remapped()), 2)); "PragmaRepeatedMeasurement")] fn test_pyo3_remap_qubits(first_op: Operation, second_op: Operation) { + pyo3::prepare_freethreaded_python(); let gil = pyo3::Python::acquire_gil(); let py = gil.python(); let operation = convert_operation_to_pyobject(first_op).unwrap(); @@ -408,6 +432,7 @@ fn test_pyo3_remap_qubits(first_op: Operation, second_op: Operation) { #[test_case(Operation::from(MeasureQubit::new(0, String::from("ro"), 1)); "MeasureQubit")] fn test_pyo3_remapqubits_error(input_operation: Operation) { // preparation + pyo3::prepare_freethreaded_python(); let gil = pyo3::Python::acquire_gil(); let py = gil.python(); let operation = convert_operation_to_pyobject(input_operation).unwrap(); @@ -438,6 +463,7 @@ fn test_pyo3_remapqubits_error(input_operation: Operation) { Operation::from(PragmaRepeatedMeasurement::new(String::from("ro"), Some(qubits_remapped()), 2)); "PragmaRepeatedMeasurement")] fn test_pyo3_richcmp(definition_1: Operation, definition_2: Operation) { + pyo3::prepare_freethreaded_python(); let gil = pyo3::Python::acquire_gil(); let py = gil.python(); let operation_one = convert_operation_to_pyobject(definition_1).unwrap(); @@ -471,6 +497,7 @@ fn test_pyo3_richcmp(definition_1: Operation, definition_2: Operation) { /// Test MeasureQubit new() function #[test] fn test_pyo3_new_set_number_of_measurements() { + pyo3::prepare_freethreaded_python(); let gil = pyo3::Python::acquire_gil(); let py = gil.python(); let operation = py.get_type::(); @@ -513,6 +540,7 @@ fn test_pyo3_new_set_number_of_measurements() { /// Test PragmaGetStateVector new() function #[test] fn test_pyo3_new_get_statevector() { + pyo3::prepare_freethreaded_python(); let gil = pyo3::Python::acquire_gil(); let py = gil.python(); let operation = py.get_type::(); @@ -557,6 +585,7 @@ fn test_pyo3_new_get_statevector() { /// Test PragmaGetDensityMatrix new() function #[test] fn test_pyo3_new_get_density_matrix() { + pyo3::prepare_freethreaded_python(); let gil = pyo3::Python::acquire_gil(); let py = gil.python(); let operation = py.get_type::(); @@ -601,6 +630,7 @@ fn test_pyo3_new_get_density_matrix() { /// Test PragmaGetOccupationProbability new() function #[test] fn test_pyo3_new_get_occupation_proba() { + pyo3::prepare_freethreaded_python(); let gil = pyo3::Python::acquire_gil(); let py = gil.python(); let operation = py.get_type::(); @@ -650,6 +680,7 @@ fn test_pyo3_new_get_occupation_proba() { /// Test PragmaGetPauliProduct new() function #[test] fn test_pyo3_new_get_pauli_product() { + pyo3::prepare_freethreaded_python(); let gil = pyo3::Python::acquire_gil(); let py = gil.python(); let operation = py.get_type::(); @@ -698,6 +729,7 @@ fn test_pyo3_new_get_pauli_product() { /// Test PragmaRepeatedMeasurement new() function #[test] fn test_pyo3_new_repeated_measurement() { + pyo3::prepare_freethreaded_python(); let gil = pyo3::Python::acquire_gil(); let py = gil.python(); let operation = py.get_type::(); diff --git a/qoqo/tests/integration/operations/operation_conversions.rs b/qoqo/tests/integration/operations/operation_conversions.rs index 5bed78eb..5ca990d3 100644 --- a/qoqo/tests/integration/operations/operation_conversions.rs +++ b/qoqo/tests/integration/operations/operation_conversions.rs @@ -102,6 +102,7 @@ use test_case::test_case; #[test_case(Operation::from(PragmaGeneralNoise::new(0, CalculatorFloat::from(0.005), CalculatorFloat::from(0.02), operators())); "PragmaGeneralNoise")] #[test_case(Operation::from(PragmaConditional::new(String::from("ro"), 1, create_circuit())); "PragmaConditional")] fn test_conversion(input: Operation) { + pyo3::prepare_freethreaded_python(); let gil = pyo3::Python::acquire_gil(); let py = gil.python(); let operation = convert_operation_to_pyobject(input.clone()).unwrap(); diff --git a/qoqo/tests/integration/operations/pragma_operations.rs b/qoqo/tests/integration/operations/pragma_operations.rs index 08ab0a31..0f35a75a 100644 --- a/qoqo/tests/integration/operations/pragma_operations.rs +++ b/qoqo/tests/integration/operations/pragma_operations.rs @@ -131,6 +131,7 @@ fn new_circuit(py: Python) -> &PyCell { #[test] fn test_pyo3_inputs_setnumbermeasurements() { let input_pragma = Operation::from(PragmaSetNumberOfMeasurements::new(1, String::from("ro"))); + pyo3::prepare_freethreaded_python(); let gil = pyo3::Python::acquire_gil(); let py = gil.python(); let operation = convert_operation_to_pyobject(input_pragma).unwrap(); @@ -155,6 +156,7 @@ fn test_pyo3_inputs_setnumbermeasurements() { #[test] fn test_pyo3_inputs_setstatevector() { let input_pragma = Operation::from(PragmaSetStateVector::new(statevector())); + pyo3::prepare_freethreaded_python(); let gil = pyo3::Python::acquire_gil(); let py = gil.python(); let operation = convert_operation_to_pyobject(input_pragma).unwrap(); @@ -174,6 +176,7 @@ fn test_pyo3_inputs_setstatevector() { #[test] fn test_pyo3_inputs_setdensitymatrix() { let input_pragma = Operation::from(PragmaSetDensityMatrix::new(densitymatrix())); + pyo3::prepare_freethreaded_python(); let gil = pyo3::Python::acquire_gil(); let py = gil.python(); let operation = convert_operation_to_pyobject(input_pragma).unwrap(); @@ -193,6 +196,7 @@ fn test_pyo3_inputs_setdensitymatrix() { #[test] fn test_pyo3_inputs_repeatgate() { let input_pragma = Operation::from(PragmaRepeatGate::new(3)); + pyo3::prepare_freethreaded_python(); let gil = pyo3::Python::acquire_gil(); let py = gil.python(); let operation = convert_operation_to_pyobject(input_pragma).unwrap(); @@ -216,6 +220,7 @@ fn test_pyo3_inputs_overrotation() { 0.03, 0.001, )); + pyo3::prepare_freethreaded_python(); let gil = pyo3::Python::acquire_gil(); let py = gil.python(); let operation = convert_operation_to_pyobject(input_pragma).unwrap(); @@ -243,6 +248,7 @@ fn test_pyo3_inputs_overrotation() { #[test] fn test_pyo3_inputs_boostnoise() { let input_pragma = Operation::from(PragmaBoostNoise::new(CalculatorFloat::from(0.003))); + pyo3::prepare_freethreaded_python(); let gil = pyo3::Python::acquire_gil(); let py = gil.python(); let operation = convert_operation_to_pyobject(input_pragma).unwrap(); @@ -267,6 +273,7 @@ fn test_pyo3_inputs_stop() { vec![0, 1], CalculatorFloat::from(0.0000001), )); + pyo3::prepare_freethreaded_python(); let gil = pyo3::Python::acquire_gil(); let py = gil.python(); let operation = convert_operation_to_pyobject(input_pragma).unwrap(); @@ -293,6 +300,7 @@ fn test_pyo3_inputs_stop() { #[test] fn test_pyo3_inputs_globalphase() { let input_pragma = Operation::from(PragmaGlobalPhase::new(CalculatorFloat::from(0.05))); + pyo3::prepare_freethreaded_python(); let gil = pyo3::Python::acquire_gil(); let py = gil.python(); let operation = convert_operation_to_pyobject(input_pragma).unwrap(); @@ -309,6 +317,7 @@ fn test_pyo3_inputs_sleep() { vec![0, 1], CalculatorFloat::from(0.0000001), )); + pyo3::prepare_freethreaded_python(); let gil = pyo3::Python::acquire_gil(); let py = gil.python(); let operation = convert_operation_to_pyobject(input_pragma).unwrap(); @@ -330,6 +339,7 @@ fn test_pyo3_inputs_sleep() { #[test] fn test_pyo3_inputs_activereset() { let input_pragma = Operation::from(PragmaActiveReset::new(0)); + pyo3::prepare_freethreaded_python(); let gil = pyo3::Python::acquire_gil(); let py = gil.python(); let operation = convert_operation_to_pyobject(input_pragma).unwrap(); @@ -345,6 +355,7 @@ fn test_pyo3_inputs_activereset() { fn test_pyo3_inputs_startdecompblock() { let input_pragma = Operation::from(PragmaStartDecompositionBlock::new(vec![0, 1], reordering())); + pyo3::prepare_freethreaded_python(); let gil = pyo3::Python::acquire_gil(); let py = gil.python(); let operation = convert_operation_to_pyobject(input_pragma).unwrap(); @@ -368,6 +379,7 @@ fn test_pyo3_inputs_startdecompblock() { #[test] fn test_pyo3_inputs_stopdecompblock() { let input_pragma = Operation::from(PragmaStopDecompositionBlock::new(vec![0, 1])); + pyo3::prepare_freethreaded_python(); let gil = pyo3::Python::acquire_gil(); let py = gil.python(); let operation = convert_operation_to_pyobject(input_pragma).unwrap(); @@ -383,6 +395,7 @@ fn test_pyo3_inputs_stopdecompblock() { #[test_case(Operation::from(PragmaDepolarising::new(0, CalculatorFloat::from(0.005), CalculatorFloat::from(0.02))); "PragmaDepolarising")] #[test_case(Operation::from(PragmaDephasing::new(0, CalculatorFloat::from(0.005), CalculatorFloat::from(0.02))); "PragmaDephasing")] fn test_pyo3_inputs_noise(input_pragma: Operation) { + pyo3::prepare_freethreaded_python(); let gil = pyo3::Python::acquire_gil(); let py = gil.python(); let operation = convert_operation_to_pyobject(input_pragma).unwrap(); @@ -413,6 +426,7 @@ fn test_pyo3_inputs_randomnoise() { CalculatorFloat::from(0.02), CalculatorFloat::from(0.01), )); + pyo3::prepare_freethreaded_python(); let gil = pyo3::Python::acquire_gil(); let py = gil.python(); let operation = convert_operation_to_pyobject(input_pragma).unwrap(); @@ -463,6 +477,7 @@ fn test_pyo3_inputs_generalnoise() { CalculatorFloat::from(0.02), operators(), )); + pyo3::prepare_freethreaded_python(); let gil = pyo3::Python::acquire_gil(); let py = gil.python(); let operation = convert_operation_to_pyobject(input_pragma).unwrap(); @@ -497,6 +512,7 @@ fn test_pyo3_inputs_conditional() { 1, create_circuit(), )); + pyo3::prepare_freethreaded_python(); let gil = pyo3::Python::acquire_gil(); let py = gil.python(); let operation = convert_operation_to_pyobject(input_pragma).unwrap(); @@ -535,6 +551,7 @@ fn test_pyo3_inputs_conditional() { #[test_case(Operation::from(PragmaBoostNoise::new(CalculatorFloat::from(0.003))); "PragmaBoostNoise")] #[test_case(Operation::from(PragmaGlobalPhase::new(CalculatorFloat::from(0.05))); "PragmaGlobalPhase")] fn test_pyo3_involved_qubits_none(input_definition: Operation) { + pyo3::prepare_freethreaded_python(); let gil = pyo3::Python::acquire_gil(); let py = gil.python(); let operation = convert_operation_to_pyobject(input_definition).unwrap(); @@ -549,6 +566,7 @@ fn test_pyo3_involved_qubits_none(input_definition: Operation) { #[test_case(Operation::from(PragmaSetDensityMatrix::new(densitymatrix())); "PragmaSetDensityMatrix")] #[test_case(Operation::from(PragmaRepeatGate::new(3)); "PragmaRepeatGate")] fn test_pyo3_involved_qubits_all(input_definition: Operation) { + pyo3::prepare_freethreaded_python(); let gil = pyo3::Python::acquire_gil(); let py = gil.python(); let operation = convert_operation_to_pyobject(input_definition).unwrap(); @@ -572,6 +590,7 @@ fn test_pyo3_involved_qubits_all(input_definition: Operation) { #[test_case(Operation::from(PragmaGeneralNoise::new(0, CalculatorFloat::from(0.005), CalculatorFloat::from(0.02), operators())); "PragmaGeneralNoise")] #[test_case(Operation::from(PragmaConditional::new(String::from("ro"), 1, create_circuit())); "PragmaConditional")] fn test_pyo3_involved_qubits_qubit(input_definition: Operation) { + pyo3::prepare_freethreaded_python(); let gil = pyo3::Python::acquire_gil(); let py = gil.python(); let operation = convert_operation_to_pyobject(input_definition).unwrap(); @@ -584,6 +603,7 @@ fn test_pyo3_involved_qubits_qubit(input_definition: Operation) { #[test_case(Operation::from(PragmaOverrotation::new("RotateX".to_string(), vec![0], 0.03, 0.001)); "PragmaOverrotation")] fn test_pyo3_involved_qubits_qubit_overrotation(input_definition: Operation) { + pyo3::prepare_freethreaded_python(); let gil = pyo3::Python::acquire_gil(); let py = gil.python(); let operation = convert_operation_to_pyobject(input_definition).unwrap(); @@ -630,6 +650,7 @@ fn test_pyo3_involved_qubits_qubit_overrotation(input_definition: Operation) { #[test_case(Operation::from(PragmaConditional::new(String::from("ro"), 1, Circuit::default())), "PragmaConditional { condition_register: \"ro\", condition_index: 1, circuit: Circuit { definitions: [], operations: [] } }"; "PragmaConditional")] fn test_pyo3_format_repr(input_measurement: Operation, format_repr: &str) { + pyo3::prepare_freethreaded_python(); let gil = pyo3::Python::acquire_gil(); let py = gil.python(); let operation = convert_operation_to_pyobject(input_measurement).unwrap(); @@ -644,6 +665,7 @@ fn test_pyo3_format_repr(input_measurement: Operation, format_repr: &str) { #[test_case(Operation::from(PragmaOverrotation::new("RotateX".to_string(), vec![0], 0.03, 0.001)), "PragmaOverrotation { gate_hqslang: \"RotateX\", qubits: [0], amplitude: 0.03, variance: 0.001 }"; "PragmaOverrotation")] fn test_pyo3_format_repr_overrotation(input_measurement: Operation, format_repr: &str) { + pyo3::prepare_freethreaded_python(); let gil = pyo3::Python::acquire_gil(); let py = gil.python(); let operation = convert_operation_to_pyobject(input_measurement).unwrap(); @@ -674,6 +696,7 @@ fn test_pyo3_format_repr_overrotation(input_measurement: Operation, format_repr: #[test_case(Operation::from(PragmaGeneralNoise::new(0, CalculatorFloat::from(0.005), CalculatorFloat::from(0.02), operators())); "PragmaGeneralNoise")] #[test_case(Operation::from(PragmaConditional::new(String::from("ro"), 1, create_circuit())); "PragmaConditional")] fn test_pyo3_copy_deepcopy(input_measurement: Operation) { + pyo3::prepare_freethreaded_python(); let gil = pyo3::Python::acquire_gil(); let py = gil.python(); let operation = convert_operation_to_pyobject(input_measurement).unwrap(); @@ -701,6 +724,7 @@ fn test_pyo3_copy_deepcopy(input_measurement: Operation) { #[test] fn test_pyo3_copy_deepcopy_overrotation() { + pyo3::prepare_freethreaded_python(); let gil = pyo3::Python::acquire_gil(); let py = gil.python(); let operation = convert_operation_to_pyobject(Operation::from(PragmaOverrotation::new( @@ -752,6 +776,7 @@ fn test_pyo3_copy_deepcopy_overrotation() { #[test_case(Operation::from(PragmaBoostNoise::new(CalculatorFloat::from(0.003))), "PragmaBoostNoise"; "PragmaBoostNoise")] #[test_case(Operation::from(PragmaGlobalPhase::new(CalculatorFloat::from(0.05))), "PragmaGlobalPhase"; "PragmaGlobalPhase")] fn test_pyo3_tags_simple(input_measurement: Operation, tag_name: &str) { + pyo3::prepare_freethreaded_python(); let gil = pyo3::Python::acquire_gil(); let py = gil.python(); let operation = convert_operation_to_pyobject(input_measurement).unwrap(); @@ -767,6 +792,7 @@ fn test_pyo3_tags_simple(input_measurement: Operation, tag_name: &str) { #[test_case(Operation::from(PragmaStartDecompositionBlock::new(vec![0, 1], reordering())), "PragmaStartDecompositionBlock"; "PragmaStartDecompositionBlock")] #[test_case(Operation::from(PragmaStopDecompositionBlock::new(vec![0, 1])), "PragmaStopDecompositionBlock"; "PragmaStopDecompositionBlock")] fn test_pyo3_tags_multi(input_measurement: Operation, tag_name: &str) { + pyo3::prepare_freethreaded_python(); let gil = pyo3::Python::acquire_gil(); let py = gil.python(); let operation = convert_operation_to_pyobject(input_measurement).unwrap(); @@ -783,6 +809,7 @@ fn test_pyo3_tags_multi(input_measurement: Operation, tag_name: &str) { #[test_case(Operation::from(PragmaOverrotation::new("RotateX".to_string(), vec![0], 0.03, 0.001)), "PragmaOverrotation"; "PragmaOverrotation")] fn test_pyo3_tags_multi_overrotation(input_measurement: Operation, tag_name: &str) { + pyo3::prepare_freethreaded_python(); let gil = pyo3::Python::acquire_gil(); let py = gil.python(); let operation = convert_operation_to_pyobject(input_measurement).unwrap(); @@ -802,6 +829,7 @@ fn test_pyo3_tags_multi_overrotation(input_measurement: Operation, tag_name: &st #[test_case(Operation::from(PragmaGeneralNoise::new(0, CalculatorFloat::from(0.005), CalculatorFloat::from(0.02), operators())), "PragmaGeneralNoise"; "PragmaGeneralNoise")] #[test_case(Operation::from(PragmaConditional::new(String::from("ro"), 1, create_circuit())), "PragmaConditional"; "PragmaConditional")] fn test_pyo3_tags_single(input_measurement: Operation, tag_name: &str) { + pyo3::prepare_freethreaded_python(); let gil = pyo3::Python::acquire_gil(); let py = gil.python(); let operation = convert_operation_to_pyobject(input_measurement).unwrap(); @@ -822,6 +850,7 @@ fn test_pyo3_tags_single(input_measurement: Operation, tag_name: &str) { #[test_case(Operation::from(PragmaDephasing::new(0, CalculatorFloat::from(0.005), CalculatorFloat::from(0.02))), "PragmaDephasing"; "PragmaDephasing")] #[test_case(Operation::from(PragmaRandomNoise::new(0, CalculatorFloat::from(0.005), CalculatorFloat::from(0.02), CalculatorFloat::from(0.01))), "PragmaRandomNoise"; "PragmaRandomNoise")] fn test_pyo3_tags_noise(input_measurement: Operation, tag_name: &str) { + pyo3::prepare_freethreaded_python(); let gil = pyo3::Python::acquire_gil(); let py = gil.python(); let operation = convert_operation_to_pyobject(input_measurement).unwrap(); @@ -856,6 +885,7 @@ fn test_pyo3_tags_noise(input_measurement: Operation, tag_name: &str) { #[test_case(Operation::from(PragmaGeneralNoise::new(0, CalculatorFloat::from(0.005), CalculatorFloat::from(0.02), operators())), "PragmaGeneralNoise"; "PragmaGeneralNoise")] #[test_case(Operation::from(PragmaConditional::new(String::from("ro"), 1, create_circuit())), "PragmaConditional"; "PragmaConditional")] fn test_pyo3_hqslang(input_measurement: Operation, hqslang_param: &str) { + pyo3::prepare_freethreaded_python(); let gil = pyo3::Python::acquire_gil(); let py = gil.python(); let operation = convert_operation_to_pyobject(input_measurement).unwrap(); @@ -866,6 +896,7 @@ fn test_pyo3_hqslang(input_measurement: Operation, hqslang_param: &str) { #[test_case(Operation::from(PragmaOverrotation::new("RotateX".to_string(), vec![0], 0.03, 0.001)), "PragmaOverrotation"; "PragmaOverrotation")] fn test_pyo3_hqslang_overrotation(input_measurement: Operation, hqslang_param: &str) { + pyo3::prepare_freethreaded_python(); let gil = pyo3::Python::acquire_gil(); let py = gil.python(); let operation = convert_operation_to_pyobject(input_measurement).unwrap(); @@ -893,6 +924,7 @@ fn test_pyo3_hqslang_overrotation(input_measurement: Operation, hqslang_param: & #[test_case(Operation::from(PragmaGeneralNoise::new(0, CalculatorFloat::from(0.005), CalculatorFloat::from(0.02), operators())); "PragmaGeneralNoise")] #[test_case(Operation::from(PragmaConditional::new(String::from("ro"), 1, create_circuit())); "PragmaConditional")] fn test_pyo3_is_parametrized(input_measurement: Operation) { + pyo3::prepare_freethreaded_python(); let gil = pyo3::Python::acquire_gil(); let py = gil.python(); let operation = convert_operation_to_pyobject(input_measurement).unwrap(); @@ -907,6 +939,7 @@ fn test_pyo3_is_parametrized(input_measurement: Operation) { #[test_case(Operation::from(PragmaOverrotation::new("RotateX".to_string(), vec![0], 0.03, 0.001)); "PragmaOverrotation")] fn test_pyo3_is_parametrized_overrotation(input_measurement: Operation) { + pyo3::prepare_freethreaded_python(); let gil = pyo3::Python::acquire_gil(); let py = gil.python(); let operation = convert_operation_to_pyobject(input_measurement).unwrap(); @@ -972,6 +1005,7 @@ fn test_pyo3_is_parametrized_overrotation(input_measurement: Operation) { Operation::from(PragmaConditional::new(String::from("ro"), 1, create_circuit())); "PragmaConditional")] fn test_pyo3_substitute_parameters(first_op: Operation, second_op: Operation) { + pyo3::prepare_freethreaded_python(); let gil = pyo3::Python::acquire_gil(); let py = gil.python(); let operation = convert_operation_to_pyobject(first_op).unwrap(); @@ -994,6 +1028,7 @@ fn test_pyo3_substitute_parameters(first_op: Operation, second_op: Operation) { #[test] fn test_pyo3_substitute_parameters_overrotation() { + pyo3::prepare_freethreaded_python(); let gil = pyo3::Python::acquire_gil(); let py = gil.python(); let operation = convert_operation_to_pyobject(Operation::from(PragmaOverrotation::new( @@ -1047,6 +1082,7 @@ fn test_pyo3_substitute_parameters_overrotation() { #[test_case(Operation::from(PragmaGeneralNoise::new(0, CalculatorFloat::from("test"), CalculatorFloat::from(0.02), operators())); "PragmaGeneralNoise")] fn test_pyo3_substitute_params_error(input_operation: Operation) { + pyo3::prepare_freethreaded_python(); let gil = pyo3::Python::acquire_gil(); let py = gil.python(); let operation = convert_operation_to_pyobject(input_operation).unwrap(); @@ -1060,6 +1096,7 @@ fn test_pyo3_substitute_params_error(input_operation: Operation) { #[test_case(Operation::from(PragmaSetNumberOfMeasurements::new(1, String::from("ro"))); "PragmaSetNumberOfMeasurements")] #[test_case(Operation::from(PragmaConditional::new(String::from("ro"), 1, create_circuit())); "PragmaConditional")] fn test_pyo3_substituteparameters_error(input_operation: Operation) { + pyo3::prepare_freethreaded_python(); let gil = pyo3::Python::acquire_gil(); let py = gil.python(); let operation = convert_operation_to_pyobject(input_operation).unwrap(); @@ -1123,6 +1160,7 @@ fn test_pyo3_substituteparameters_error(input_operation: Operation) { Operation::from(PragmaConditional::new(String::from("ro"), 1, circuit_remapped())); "PragmaConditional")] fn test_pyo3_remap_qubits(first_op: Operation, second_op: Operation) { + pyo3::prepare_freethreaded_python(); let gil = pyo3::Python::acquire_gil(); let py = gil.python(); let operation = convert_operation_to_pyobject(first_op).unwrap(); @@ -1144,6 +1182,7 @@ fn test_pyo3_remap_qubits(first_op: Operation, second_op: Operation) { #[test] fn test_pyo3_remap_qubits_overrotation() { + pyo3::prepare_freethreaded_python(); let gil = pyo3::Python::acquire_gil(); let py = gil.python(); let operation = convert_operation_to_pyobject(Operation::from(PragmaOverrotation::new( @@ -1194,6 +1233,7 @@ fn test_pyo3_noise_superoperator_damping() { CalculatorFloat::from(0.005), CalculatorFloat::from(0.02), )); + pyo3::prepare_freethreaded_python(); let gil = pyo3::Python::acquire_gil(); let py = gil.python(); let operation = convert_operation_to_pyobject(noise_pragma).unwrap(); @@ -1225,6 +1265,7 @@ fn test_pyo3_noise_superoperator_depolarising() { CalculatorFloat::from(0.005), CalculatorFloat::from(0.02), )); + pyo3::prepare_freethreaded_python(); let gil = pyo3::Python::acquire_gil(); let py = gil.python(); let operation = convert_operation_to_pyobject(noise_pragma).unwrap(); @@ -1258,6 +1299,7 @@ fn test_pyo3_noise_superoperator_dephasing() { CalculatorFloat::from(0.005), CalculatorFloat::from(0.02), )); + pyo3::prepare_freethreaded_python(); let gil = pyo3::Python::acquire_gil(); let py = gil.python(); let operation = convert_operation_to_pyobject(noise_pragma).unwrap(); @@ -1290,6 +1332,7 @@ fn test_pyo3_noise_superoperator_randomnoise() { CalculatorFloat::from(0.02), CalculatorFloat::from(0.01), )); + pyo3::prepare_freethreaded_python(); let gil = pyo3::Python::acquire_gil(); let py = gil.python(); let operation = convert_operation_to_pyobject(noise_pragma).unwrap(); @@ -1319,6 +1362,7 @@ fn test_pyo3_noise_superoperator_randomnoise() { #[test_case(Operation::from(PragmaDephasing::new(0, CalculatorFloat::from(0.005), CalculatorFloat::from(0.02))), 0.00009999000066662767; "PragmaDephasing")] #[test_case(Operation::from(PragmaRandomNoise::new(0, CalculatorFloat::from(0.005), CalculatorFloat::from(0.02), CalculatorFloat::from(0.01))), 0.000125; "PragmaRandomNoise")] fn test_pyo3_noise_proba(noise_pragma: Operation, proba: f64) { + pyo3::prepare_freethreaded_python(); let gil = pyo3::Python::acquire_gil(); let py = gil.python(); let operation = convert_operation_to_pyobject(noise_pragma).unwrap(); @@ -1350,6 +1394,7 @@ fn test_pyo3_noise_proba(noise_pragma: Operation, proba: f64) { Operation::from(PragmaRandomNoise::new(0, CalculatorFloat::from(0.005 * 1.5), CalculatorFloat::from(0.02), CalculatorFloat::from(0.01))); "PragmaRandomNoise")] fn test_pyo3_noise_powercf(first_op: Operation, second_op: Operation) { + pyo3::prepare_freethreaded_python(); let gil = pyo3::Python::acquire_gil(); let py = gil.python(); let operation = convert_operation_to_pyobject(first_op).unwrap(); @@ -1421,6 +1466,7 @@ fn test_pyo3_noise_powercf(first_op: Operation, second_op: Operation) { Operation::from(PragmaConditional::new(String::from("ro"), 1, circuit_remapped())); "PragmaConditional")] fn test_pyo3_richcmp(definition_1: Operation, definition_2: Operation) { + pyo3::prepare_freethreaded_python(); let gil = pyo3::Python::acquire_gil(); let py = gil.python(); let operation_one = convert_operation_to_pyobject(definition_1).unwrap(); @@ -1453,6 +1499,7 @@ fn test_pyo3_richcmp(definition_1: Operation, definition_2: Operation) { #[test] fn test_pyo3_richcmp_overrotation() { + pyo3::prepare_freethreaded_python(); let gil = pyo3::Python::acquire_gil(); let py = gil.python(); let operation_one = convert_operation_to_pyobject(Operation::from(PragmaOverrotation::new( @@ -1496,6 +1543,7 @@ fn test_pyo3_richcmp_overrotation() { /// Test PragmaSetNumberOfMeasurements new() function #[test] fn test_pyo3_new_set_number_of_measurements() { + pyo3::prepare_freethreaded_python(); let gil = pyo3::Python::acquire_gil(); let py = gil.python(); let operation = py.get_type::(); @@ -1543,6 +1591,7 @@ fn test_pyo3_new_set_number_of_measurements() { /// Test PragmaSetStateVector new() function #[test] fn test_pyo3_new_set_statevector() { + pyo3::prepare_freethreaded_python(); let gil = pyo3::Python::acquire_gil(); let py = gil.python(); let operation = py.get_type::(); @@ -1598,6 +1647,7 @@ fn test_pyo3_new_set_statevector() { /// Test PragmaSetDensityMatrix new() function #[test] fn test_pyo3_new_set_densitymatrix() { + pyo3::prepare_freethreaded_python(); let gil = pyo3::Python::acquire_gil(); let py = gil.python(); let operation = py.get_type::(); @@ -1653,6 +1703,7 @@ fn test_pyo3_new_set_densitymatrix() { /// Test PragmaRepeatGate new() function #[test] fn test_pyo3_new_repeated_gate() { + pyo3::prepare_freethreaded_python(); let gil = pyo3::Python::acquire_gil(); let py = gil.python(); let operation = py.get_type::(); @@ -1695,6 +1746,7 @@ fn test_pyo3_new_repeated_gate() { /// Test PragmaOverrotation new() function #[test] fn test_pyo3_new_overrotation() { + pyo3::prepare_freethreaded_python(); let gil = pyo3::Python::acquire_gil(); let py = gil.python(); @@ -1751,6 +1803,7 @@ fn test_pyo3_new_overrotation() { /// Test PragmaBoostNoise new() function #[test] fn test_pyo3_new_boost_noise() { + pyo3::prepare_freethreaded_python(); let gil = pyo3::Python::acquire_gil(); let py = gil.python(); @@ -1800,6 +1853,7 @@ fn test_pyo3_new_boost_noise() { /// Test PragmaStopParallelBlock new() function #[test] fn test_pyo3_new_stop() { + pyo3::prepare_freethreaded_python(); let gil = pyo3::Python::acquire_gil(); let py = gil.python(); @@ -1854,6 +1908,7 @@ fn test_pyo3_new_stop() { /// Test PragmaGlobalPhase new() function #[test] fn test_pyo3_new_global_phase() { + pyo3::prepare_freethreaded_python(); let gil = pyo3::Python::acquire_gil(); let py = gil.python(); @@ -1903,6 +1958,7 @@ fn test_pyo3_new_global_phase() { /// Test PragmaSleep new() function #[test] fn test_pyo3_new_sleep() { + pyo3::prepare_freethreaded_python(); let gil = pyo3::Python::acquire_gil(); let py = gil.python(); @@ -1954,6 +2010,7 @@ fn test_pyo3_new_sleep() { /// Test PragmaActiveReset new() function #[test] fn test_pyo3_new_active_reset() { + pyo3::prepare_freethreaded_python(); let gil = pyo3::Python::acquire_gil(); let py = gil.python(); let operation = py.get_type::(); @@ -1996,6 +2053,7 @@ fn test_pyo3_new_active_reset() { /// Test PragmaStartDecompositionBlock new() function #[test] fn test_pyo3_new_start_decomposition_block() { + pyo3::prepare_freethreaded_python(); let gil = pyo3::Python::acquire_gil(); let py = gil.python(); let operation = py.get_type::(); @@ -2043,6 +2101,7 @@ fn test_pyo3_new_start_decomposition_block() { /// Test PragmaStopDecompositionBlock new() function #[test] fn test_pyo3_new_stop_decomposition_block() { + pyo3::prepare_freethreaded_python(); let gil = pyo3::Python::acquire_gil(); let py = gil.python(); let operation = py.get_type::(); @@ -2089,6 +2148,7 @@ fn test_pyo3_new_stop_decomposition_block() { /// Test PragmaDamping new() function #[test] fn test_pyo3_new_damping() { + pyo3::prepare_freethreaded_python(); let gil = pyo3::Python::acquire_gil(); let py = gil.python(); @@ -2145,6 +2205,7 @@ fn test_pyo3_new_damping() { /// Test PragmaDepolarising new() function #[test] fn test_pyo3_new_depolarising() { + pyo3::prepare_freethreaded_python(); let gil = pyo3::Python::acquire_gil(); let py = gil.python(); @@ -2201,6 +2262,7 @@ fn test_pyo3_new_depolarising() { /// Test PragmaDephasing new() function #[test] fn test_pyo3_new_dephasing() { + pyo3::prepare_freethreaded_python(); let gil = pyo3::Python::acquire_gil(); let py = gil.python(); @@ -2257,6 +2319,7 @@ fn test_pyo3_new_dephasing() { /// Test PragmaRandomNoise new() function #[test] fn test_pyo3_new_randomnoise() { + pyo3::prepare_freethreaded_python(); let gil = pyo3::Python::acquire_gil(); let py = gil.python(); @@ -2317,6 +2380,7 @@ fn test_pyo3_new_randomnoise() { /// Test PragmaGeneralNoise new() function #[test] fn test_pyo3_new_general_noise() { + pyo3::prepare_freethreaded_python(); let gil = pyo3::Python::acquire_gil(); let py = gil.python(); @@ -2380,6 +2444,7 @@ fn test_pyo3_new_general_noise() { /// Test PragmaConditional new() function #[test] fn test_pyo3_new_conditional() { + pyo3::prepare_freethreaded_python(); let gil = pyo3::Python::acquire_gil(); let py = gil.python(); let operation = py.get_type::(); @@ -2433,6 +2498,7 @@ fn test_pyo3_new_conditional() { #[test_case(Operation::from(PragmaGeneralNoise::new(0, CalculatorFloat::from(0.005), CalculatorFloat::from(0.02), operators())); "PragmaGeneralNoise")] fn test_pyo3_remapqubits_error(input_operation: Operation) { // preparation + pyo3::prepare_freethreaded_python(); let gil = pyo3::Python::acquire_gil(); let py = gil.python(); let operation = convert_operation_to_pyobject(input_operation).unwrap(); diff --git a/qoqo/tests/integration/operations/single_qubit_gate_operations.rs b/qoqo/tests/integration/operations/single_qubit_gate_operations.rs index 7d88b9e6..24b6f81f 100644 --- a/qoqo/tests/integration/operations/single_qubit_gate_operations.rs +++ b/qoqo/tests/integration/operations/single_qubit_gate_operations.rs @@ -58,6 +58,7 @@ fn convert_cf_to_pyobject( #[test_case(Operation::from(PauliX::new(1)), (0,), "__ne__"; "PauliX_ne")] fn test_new_paulix(input_operation: Operation, arguments: (u32,), method: &str) { let operation = convert_operation_to_pyobject(input_operation).unwrap(); + pyo3::prepare_freethreaded_python(); let gil = pyo3::Python::acquire_gil(); let py = gil.python(); let operation_type = py.get_type::(); @@ -99,6 +100,7 @@ fn test_new_paulix(input_operation: Operation, arguments: (u32,), method: &str) #[test_case(Operation::from(PauliY::new(1)), (0,), "__ne__"; "PauliY_ne")] fn test_new_pauliy(input_operation: Operation, arguments: (u32,), method: &str) { let operation = convert_operation_to_pyobject(input_operation).unwrap(); + pyo3::prepare_freethreaded_python(); let gil = pyo3::Python::acquire_gil(); let py = gil.python(); let operation_type = py.get_type::(); @@ -140,6 +142,7 @@ fn test_new_pauliy(input_operation: Operation, arguments: (u32,), method: &str) #[test_case(Operation::from(PauliZ::new(1)), (0,), "__ne__"; "PauliZ_ne")] fn test_new_pauliz(input_operation: Operation, arguments: (u32,), method: &str) { let operation = convert_operation_to_pyobject(input_operation).unwrap(); + pyo3::prepare_freethreaded_python(); let gil = pyo3::Python::acquire_gil(); let py = gil.python(); let operation_type = py.get_type::(); @@ -181,6 +184,7 @@ fn test_new_pauliz(input_operation: Operation, arguments: (u32,), method: &str) #[test_case(Operation::from(SqrtPauliX::new(1)), (0,), "__ne__"; "SqrtPauliX_ne")] fn test_new_sqrtpaulix(input_operation: Operation, arguments: (u32,), method: &str) { let operation = convert_operation_to_pyobject(input_operation).unwrap(); + pyo3::prepare_freethreaded_python(); let gil = pyo3::Python::acquire_gil(); let py = gil.python(); let operation_type = py.get_type::(); @@ -222,6 +226,7 @@ fn test_new_sqrtpaulix(input_operation: Operation, arguments: (u32,), method: &s #[test_case(Operation::from(InvSqrtPauliX::new(1)), (0,), "__ne__"; "InvSqrtPauliX_ne")] fn test_new_invsqrtpaulix(input_operation: Operation, arguments: (u32,), method: &str) { let operation = convert_operation_to_pyobject(input_operation).unwrap(); + pyo3::prepare_freethreaded_python(); let gil = pyo3::Python::acquire_gil(); let py = gil.python(); let operation_type = py.get_type::(); @@ -262,6 +267,7 @@ fn test_new_invsqrtpaulix(input_operation: Operation, arguments: (u32,), method: #[test_case(Operation::from(SGate::new(1)), (0,), "__ne__"; "SGate_ne")] fn test_new_sgate(input_operation: Operation, arguments: (u32,), method: &str) { let operation = convert_operation_to_pyobject(input_operation).unwrap(); + pyo3::prepare_freethreaded_python(); let gil = pyo3::Python::acquire_gil(); let py = gil.python(); let operation_type = py.get_type::(); @@ -302,6 +308,7 @@ fn test_new_sgate(input_operation: Operation, arguments: (u32,), method: &str) { #[test_case(Operation::from(TGate::new(1)), (0,), "__ne__"; "TGate_ne")] fn test_new_tgate(input_operation: Operation, arguments: (u32,), method: &str) { let operation = convert_operation_to_pyobject(input_operation).unwrap(); + pyo3::prepare_freethreaded_python(); let gil = pyo3::Python::acquire_gil(); let py = gil.python(); let operation_type = py.get_type::(); @@ -343,6 +350,7 @@ fn test_new_tgate(input_operation: Operation, arguments: (u32,), method: &str) { fn test_new_hadamard(input_operation: Operation, arguments: (u32,), method: &str) { let operation = convert_operation_to_pyobject(input_operation).unwrap(); + pyo3::prepare_freethreaded_python(); let gil = pyo3::Python::acquire_gil(); let py = gil.python(); let operation_type = py.get_type::(); @@ -383,6 +391,7 @@ fn test_new_hadamard(input_operation: Operation, arguments: (u32,), method: &str #[test_case(Operation::from(RotateX::new(1, CalculatorFloat::ZERO)), (0, 0.0,), "__ne__"; "RotateX_ne")] fn test_new_rotatex(input_operation: Operation, arguments: (u32, f64), method: &str) { let operation = convert_operation_to_pyobject(input_operation).unwrap(); + pyo3::prepare_freethreaded_python(); let gil = pyo3::Python::acquire_gil(); let py = gil.python(); @@ -430,6 +439,7 @@ fn test_new_rotatex(input_operation: Operation, arguments: (u32, f64), method: & #[test_case(Operation::from(RotateY::new(1, CalculatorFloat::ZERO)), (0, 0.0,), "__ne__"; "RotateY_ne")] fn test_new_rotatey(input_operation: Operation, arguments: (u32, f64), method: &str) { let operation = convert_operation_to_pyobject(input_operation).unwrap(); + pyo3::prepare_freethreaded_python(); let gil = pyo3::Python::acquire_gil(); let py = gil.python(); @@ -477,6 +487,7 @@ fn test_new_rotatey(input_operation: Operation, arguments: (u32, f64), method: & #[test_case(Operation::from(RotateZ::new(1, CalculatorFloat::ZERO)), (0, 0.0,), "__ne__"; "RotateZ_ne")] fn test_new_rotatez(input_operation: Operation, arguments: (u32, f64), method: &str) { let operation = convert_operation_to_pyobject(input_operation).unwrap(); + pyo3::prepare_freethreaded_python(); let gil = pyo3::Python::acquire_gil(); let py = gil.python(); @@ -539,6 +550,7 @@ fn test_new_rotatez(input_operation: Operation, arguments: (u32, f64), method: & ), (0, 0.0, 0.0, 0.0,), "__ne__"; "rotation_ne")] fn test_new_rotate(input_operation: Operation, arguments: (u32, f64, f64, f64), method: &str) { let operation = convert_operation_to_pyobject(input_operation).unwrap(); + pyo3::prepare_freethreaded_python(); let gil = pyo3::Python::acquire_gil(); let py = gil.python(); @@ -618,6 +630,7 @@ fn test_new_singlequbitgate( method: &str, ) { let operation = convert_operation_to_pyobject(input_operation).unwrap(); + pyo3::prepare_freethreaded_python(); let gil = pyo3::Python::acquire_gil(); let py = gil.python(); @@ -702,6 +715,7 @@ fn test_new_singlequbitgate( ); "RotateAroundSphericalAxis") ] fn test_pyo3_is_parametrized(input_operation: Operation) { + pyo3::prepare_freethreaded_python(); let gil = pyo3::Python::acquire_gil(); let py = gil.python(); let operation = convert_operation_to_pyobject(input_operation).unwrap(); @@ -747,6 +761,7 @@ fn test_pyo3_is_parametrized(input_operation: Operation) { #[test_case(Operation::from(TGate::new(1)); "TGate")] #[test_case(Operation::from(Hadamard::new(3)); "Hadamard")] fn test_pyo3_is_not_parametrized(input_operation: Operation) { + pyo3::prepare_freethreaded_python(); let gil = pyo3::Python::acquire_gil(); let py = gil.python(); let operation = convert_operation_to_pyobject(input_operation).unwrap(); @@ -774,6 +789,7 @@ fn test_pyo3_is_not_parametrized(input_operation: Operation) { ); "RotateAroundSphericalAxis") ] fn test_pyo3_theta(theta: CalculatorFloat, input_operation: Operation) { + pyo3::prepare_freethreaded_python(); let gil = pyo3::Python::acquire_gil(); let py = gil.python(); let operation = convert_operation_to_pyobject(input_operation).unwrap(); @@ -807,6 +823,7 @@ fn test_pyo3_theta(theta: CalculatorFloat, input_operation: Operation) { #[test_case(0, Operation::from(SGate::new(0)); "SGate")] #[test_case(0, Operation::from(Hadamard::new(0)); "Hadamard")] fn test_pyo3_qubit(qubit: usize, input_operation: Operation) { + pyo3::prepare_freethreaded_python(); let gil = pyo3::Python::acquire_gil(); let py = gil.python(); let operation = convert_operation_to_pyobject(input_operation).unwrap(); @@ -847,6 +864,7 @@ fn test_pyo3_qubit(qubit: usize, input_operation: Operation) { CalculatorFloat::from(PI), )); "SingleQubitGate")] fn test_pyo3_hqslang(name: &'static str, input_operation: Operation) { + pyo3::prepare_freethreaded_python(); let gil = pyo3::Python::acquire_gil(); let py = gil.python(); let operation = convert_operation_to_pyobject(input_operation).unwrap(); @@ -992,6 +1010,7 @@ fn test_pyo3_hqslang(name: &'static str, input_operation: Operation) { ]; "SingleQubitGate")] fn test_pyo3_tags(input_operation: Operation, tags: Vec<&str>) { + pyo3::prepare_freethreaded_python(); let gil = pyo3::Python::acquire_gil(); let py = gil.python(); let operation = convert_operation_to_pyobject(input_operation).unwrap(); @@ -1036,6 +1055,7 @@ fn test_pyo3_tags(input_operation: Operation, tags: Vec<&str>) { #[test_case(Operation::from(TGate::new(0)); "TGate")] #[test_case(Operation::from(Hadamard::new(0)); "Hadamard")] fn test_pyo3_remapqubits(input_operation: Operation) { + pyo3::prepare_freethreaded_python(); let gil = pyo3::Python::acquire_gil(); let py = gil.python(); let operation = convert_operation_to_pyobject(input_operation).unwrap(); @@ -1091,6 +1111,7 @@ fn test_pyo3_remapqubits(input_operation: Operation) { #[test_case(Operation::from(Hadamard::new(0)); "Hadamard")] fn test_pyo3_remapqubits_error(input_operation: Operation) { // preparation + pyo3::prepare_freethreaded_python(); let gil = pyo3::Python::acquire_gil(); let py = gil.python(); let operation = convert_operation_to_pyobject(input_operation).unwrap(); @@ -1134,6 +1155,7 @@ fn test_pyo3_remapqubits_error(input_operation: Operation) { ); "SingleQubitGate") ] fn test_pyo3_unitarymatrix(input_operation: Operation) { + pyo3::prepare_freethreaded_python(); let gil = pyo3::Python::acquire_gil(); let py = gil.python(); let operation = convert_operation_to_pyobject(input_operation.clone()).unwrap(); @@ -1165,6 +1187,7 @@ fn test_pyo3_unitarymatrix(input_operation: Operation) { ); "RotateAroundSphericalAxis") ] fn test_pyo3_unitarymatrix_error(input_operation: Operation) { + pyo3::prepare_freethreaded_python(); let gil = pyo3::Python::acquire_gil(); let py = gil.python(); let operation = convert_operation_to_pyobject(input_operation.clone()).unwrap(); @@ -1197,6 +1220,7 @@ fn test_pyo3_unitarymatrix_error(input_operation: Operation) { ); "normalization") ] fn test_pyo3_unitarymatrix_singlequbitgate(input_operation: Operation) { + pyo3::prepare_freethreaded_python(); let gil = pyo3::Python::acquire_gil(); let py = gil.python(); let operation = convert_operation_to_pyobject(input_operation.clone()).unwrap(); @@ -1238,6 +1262,7 @@ fn test_pyo3_unitarymatrix_singlequbitgate(input_operation: Operation) { #[test_case(Operation::from(TGate::new(1)); "TGate")] #[test_case(Operation::from(Hadamard::new(3)); "Hadamard")] fn test_pyo3_copy_deepcopy(input_operation: Operation) { + pyo3::prepare_freethreaded_python(); let gil = pyo3::Python::acquire_gil(); let py = gil.python(); let operation = convert_operation_to_pyobject(input_operation).unwrap(); @@ -1296,6 +1321,7 @@ fn test_pyo3_copy_deepcopy(input_operation: Operation) { #[test_case(Operation::from(TGate::new(1)); "TGate")] #[test_case(Operation::from(Hadamard::new(3)); "Hadamard")] fn test_pyo3_alpha_r(input_operation: Operation) { + pyo3::prepare_freethreaded_python(); let gil = pyo3::Python::acquire_gil(); let py = gil.python(); let operation = convert_operation_to_pyobject(input_operation.clone()).unwrap(); @@ -1348,6 +1374,7 @@ fn test_pyo3_alpha_r(input_operation: Operation) { #[test_case(Operation::from(TGate::new(1)); "TGate")] #[test_case(Operation::from(Hadamard::new(3)); "Hadamard")] fn test_pyo3_alpha_i(input_operation: Operation) { + pyo3::prepare_freethreaded_python(); let gil = pyo3::Python::acquire_gil(); let py = gil.python(); let operation = convert_operation_to_pyobject(input_operation.clone()).unwrap(); @@ -1400,6 +1427,7 @@ fn test_pyo3_alpha_i(input_operation: Operation) { #[test_case(Operation::from(TGate::new(1)); "TGate")] #[test_case(Operation::from(Hadamard::new(3)); "Hadamard")] fn test_pyo3_beta_r(input_operation: Operation) { + pyo3::prepare_freethreaded_python(); let gil = pyo3::Python::acquire_gil(); let py = gil.python(); let operation = convert_operation_to_pyobject(input_operation.clone()).unwrap(); @@ -1452,6 +1480,7 @@ fn test_pyo3_beta_r(input_operation: Operation) { #[test_case(Operation::from(TGate::new(1)); "TGate")] #[test_case(Operation::from(Hadamard::new(3)); "Hadamard")] fn test_pyo3_beta_i(input_operation: Operation) { + pyo3::prepare_freethreaded_python(); let gil = pyo3::Python::acquire_gil(); let py = gil.python(); let operation = convert_operation_to_pyobject(input_operation.clone()).unwrap(); @@ -1504,6 +1533,7 @@ fn test_pyo3_beta_i(input_operation: Operation) { #[test_case(Operation::from(TGate::new(1)); "TGate")] #[test_case(Operation::from(Hadamard::new(3)); "Hadamard")] fn test_pyo3_global_phase(input_operation: Operation) { + pyo3::prepare_freethreaded_python(); let gil = pyo3::Python::acquire_gil(); let py = gil.python(); let operation = convert_operation_to_pyobject(input_operation.clone()).unwrap(); @@ -1592,6 +1622,7 @@ fn test_pyo3_global_phase(input_operation: Operation) { ); "SingleQubitGate") ] fn test_pyo3_format_repr(format_repr: &str, input_operation: Operation) { + pyo3::prepare_freethreaded_python(); let gil = pyo3::Python::acquire_gil(); let py = gil.python(); let operation = convert_operation_to_pyobject(input_operation).unwrap(); @@ -1625,6 +1656,7 @@ fn test_pyo3_format_repr(format_repr: &str, input_operation: Operation) { ); "SingleQubitGate") ] fn test_pyo3_substitute_parameters(input_operation: Operation) { + pyo3::prepare_freethreaded_python(); let gil = pyo3::Python::acquire_gil(); let py = gil.python(); let operation = convert_operation_to_pyobject(input_operation.clone()).unwrap(); @@ -1658,6 +1690,7 @@ fn test_pyo3_substitute_parameters(input_operation: Operation) { #[test_case(Operation::from(RotateX::new(0, CalculatorFloat::from("theta"))); "RotateX")] #[test_case(Operation::from(RotateY::new(0, CalculatorFloat::from("theta"))); "RotateY")] fn test_pyo3_substitute_params_rotate(input_operation: Operation) { + pyo3::prepare_freethreaded_python(); let gil = pyo3::Python::acquire_gil(); let py = gil.python(); let operation = convert_operation_to_pyobject(input_operation.clone()).unwrap(); @@ -1709,6 +1742,7 @@ fn test_pyo3_substitute_params_rotate(input_operation: Operation) { ); "SingleQubitGate") ] fn test_pyo3_substitute_params_error(input_operation: Operation) { + pyo3::prepare_freethreaded_python(); let gil = pyo3::Python::acquire_gil(); let py = gil.python(); let operation = convert_operation_to_pyobject(input_operation).unwrap(); @@ -1728,6 +1762,7 @@ fn test_pyo3_substitute_params_error(input_operation: Operation) { #[test_case(Operation::from(TGate::new(1)); "TGate")] #[test_case(Operation::from(Hadamard::new(3)); "Hadamard")] fn test_ineffective_substitute_parameters(input_operation: Operation) { + pyo3::prepare_freethreaded_python(); let gil = pyo3::Python::acquire_gil(); let py = gil.python(); let operation = convert_operation_to_pyobject(input_operation.clone()).unwrap(); @@ -1774,6 +1809,7 @@ fn test_ineffective_substitute_parameters(input_operation: Operation) { ) ); "Rotation")] fn test_pyo3_rotate_powercf(first_op: Operation, second_op: Operation) { + pyo3::prepare_freethreaded_python(); let gil = pyo3::Python::acquire_gil(); let py = gil.python(); let operation = convert_operation_to_pyobject(first_op).unwrap(); @@ -1866,6 +1902,7 @@ fn test_pyo3_rotate_powercf(first_op: Operation, second_op: Operation) { ); "SingleQubitGate") ] fn test_pyo3_richcmp(definition_1: Operation, definition_2: Operation) { + pyo3::prepare_freethreaded_python(); let gil = pyo3::Python::acquire_gil(); let py = gil.python(); let operation_one = convert_operation_to_pyobject(definition_1).unwrap(); diff --git a/qoqo/tests/integration/operations/two_qubit_gate_operations.rs b/qoqo/tests/integration/operations/two_qubit_gate_operations.rs index 54ae1731..19c50332 100644 --- a/qoqo/tests/integration/operations/two_qubit_gate_operations.rs +++ b/qoqo/tests/integration/operations/two_qubit_gate_operations.rs @@ -75,6 +75,7 @@ fn convert_cf_to_pyobject( #[test_case(Operation::from(ComplexPMInteraction::new(0, 1, CalculatorFloat::from(1.0), CalculatorFloat::from(-1.0))); "ComplexPMInteraction")] #[test_case(Operation::from(PhaseShiftedControlledZ::new(0, 1, CalculatorFloat::PI)); "PhaseShiftedControlledZ")] fn test_pyo3_is_not_parametrized(input_operation: Operation) { + pyo3::prepare_freethreaded_python(); let gil = pyo3::Python::acquire_gil(); let py = gil.python(); let operation = convert_operation_to_pyobject(input_operation).unwrap(); @@ -262,6 +263,7 @@ fn test_pyo3_is_not_parametrized(input_operation: Operation) { ], Operation::from(PhaseShiftedControlledZ::new(0, 1, CalculatorFloat::FRAC_PI_4)); "PhaseShiftedControlledZ")] fn test_pyo3_tags(tags: Vec<&str>, input_operation: Operation) { + pyo3::prepare_freethreaded_python(); let gil = pyo3::Python::acquire_gil(); let py = gil.python(); let operation = convert_operation_to_pyobject(input_operation).unwrap(); @@ -299,6 +301,7 @@ fn test_pyo3_tags(tags: Vec<&str>, input_operation: Operation) { #[test_case("ComplexPMInteraction", Operation::from(ComplexPMInteraction::new(0, 1, CalculatorFloat::from(1.0), CalculatorFloat::from(-1.0))); "ComplexPMInteraction")] #[test_case("PhaseShiftedControlledZ", Operation::from(PhaseShiftedControlledZ::new(0, 1, CalculatorFloat::PI)); "PhaseShiftedControlledZ")] fn test_pyo3_hqslang(name: &'static str, input_operation: Operation) { + pyo3::prepare_freethreaded_python(); let gil = pyo3::Python::acquire_gil(); let py = gil.python(); let operation = convert_operation_to_pyobject(input_operation).unwrap(); @@ -330,6 +333,7 @@ fn test_pyo3_hqslang(name: &'static str, input_operation: Operation) { #[test_case(Operation::from(ComplexPMInteraction::new(0, 1, CalculatorFloat::from(1.0), CalculatorFloat::from(-1.0))); "ComplexPMInteraction")] #[test_case(Operation::from(PhaseShiftedControlledZ::new(0, 1, CalculatorFloat::PI)); "PhaseShiftedControlledZ")] fn test_pyo3_remapqubits(input_operation: Operation) { + pyo3::prepare_freethreaded_python(); let gil = pyo3::Python::acquire_gil(); let py = gil.python(); let operation = convert_operation_to_pyobject(input_operation).unwrap(); @@ -387,6 +391,7 @@ fn test_pyo3_remapqubits(input_operation: Operation) { #[test_case(Operation::from(PhaseShiftedControlledZ::new(0, 1, CalculatorFloat::PI)); "PhaseShiftedControlledZ")] fn test_pyo3_remapqubits_error(input_operation: Operation) { // preparation + pyo3::prepare_freethreaded_python(); let gil = pyo3::Python::acquire_gil(); let py = gil.python(); let operation = convert_operation_to_pyobject(input_operation).unwrap(); @@ -411,6 +416,7 @@ fn test_pyo3_remapqubits_error(input_operation: Operation) { #[test_case(Operation::from(ComplexPMInteraction::new(0, 1, CalculatorFloat::from("test"), CalculatorFloat::from(-1.0))); "ComplexPMInteraction")] #[test_case(Operation::from(PhaseShiftedControlledZ::new(0, 1, CalculatorFloat::from("test"))); "PhaseShiftedControlledZ")] fn test_pyo3_unitarymatrix_error(input_operation: Operation) { + pyo3::prepare_freethreaded_python(); let gil = pyo3::Python::acquire_gil(); let py = gil.python(); let operation = convert_operation_to_pyobject(input_operation.clone()).unwrap(); @@ -442,6 +448,7 @@ fn test_pyo3_unitarymatrix_error(input_operation: Operation) { #[test_case(Operation::from(ComplexPMInteraction::new(0, 1, CalculatorFloat::from(1.0), CalculatorFloat::from(-1.0))); "ComplexPMInteraction")] #[test_case(Operation::from(PhaseShiftedControlledZ::new(0, 1, CalculatorFloat::PI)); "PhaseShiftedControlledZ")] fn test_pyo3_unitarymatrix(input_operation: Operation) { + pyo3::prepare_freethreaded_python(); let gil = pyo3::Python::acquire_gil(); let py = gil.python(); let operation = convert_operation_to_pyobject(input_operation.clone()).unwrap(); @@ -525,6 +532,7 @@ fn test_pyo3_unitarymatrix(input_operation: Operation) { "PhaseShiftedControlledZ { control: 0, target: 1, phi: Float(3.141592653589793) }", Operation::from(PhaseShiftedControlledZ::new(0, 1, CalculatorFloat::PI)); "PhaseShiftedControlledZ")] fn test_pyo3_format_repr(format_repr: &str, input_operation: Operation) { + pyo3::prepare_freethreaded_python(); let gil = pyo3::Python::acquire_gil(); let py = gil.python(); let operation = convert_operation_to_pyobject(input_operation).unwrap(); @@ -559,6 +567,7 @@ fn test_pyo3_format_repr(format_repr: &str, input_operation: Operation) { #[test_case(Operation::from(ComplexPMInteraction::new(0, 1, CalculatorFloat::from(1.0), CalculatorFloat::from(-1.0))); "ComplexPMInteraction")] #[test_case(Operation::from(PhaseShiftedControlledZ::new(0, 1, CalculatorFloat::PI)); "PhaseShiftedControlledZ")] fn test_pyo3_copy_deepcopy(input_operation: Operation) { + pyo3::prepare_freethreaded_python(); let gil = pyo3::Python::acquire_gil(); let py = gil.python(); let operation = convert_operation_to_pyobject(input_operation).unwrap(); @@ -649,6 +658,7 @@ fn test_pyo3_copy_deepcopy(input_operation: Operation) { Operation::from(PhaseShiftedControlledZ::new(0, 1, CalculatorFloat::from(1.0))); "PhaseShiftedControlledZ")] fn test_pyo3_substitute_parameters(first_op: Operation, second_op: Operation) { + pyo3::prepare_freethreaded_python(); let gil = pyo3::Python::acquire_gil(); let py = gil.python(); let operation = convert_operation_to_pyobject(first_op).unwrap(); @@ -694,6 +704,7 @@ fn test_pyo3_substitute_parameters(first_op: Operation, second_op: Operation) { #[test_case(Operation::from(PhaseShiftedControlledZ::new(0, 1, CalculatorFloat::from("test"))); "PhaseShiftedControlledZ")] fn test_pyo3_substitute_params_error(input_operation: Operation) { + pyo3::prepare_freethreaded_python(); let gil = pyo3::Python::acquire_gil(); let py = gil.python(); let operation = convert_operation_to_pyobject(input_operation).unwrap(); @@ -720,6 +731,7 @@ fn test_pyo3_substitute_params_error(input_operation: Operation) { Operation::from(GivensRotationLittleEndian::new(0, 1, CalculatorFloat::from(0.005 * 1.5), CalculatorFloat::from(0.02))); "GivensRotationLittleEndian")] fn test_pyo3_powercf(first_op: Operation, second_op: Operation) { + pyo3::prepare_freethreaded_python(); let gil = pyo3::Python::acquire_gil(); let py = gil.python(); let operation = convert_operation_to_pyobject(first_op).unwrap(); @@ -743,6 +755,7 @@ fn test_pyo3_powercf(first_op: Operation, second_op: Operation) { #[test_case(Operation::from(CNOT::new(2, 1)), (0, 1,), "__ne__"; "CNOT_ne")] fn test_new_cnot(input_operation: Operation, arguments: (u32, u32), method: &str) { let operation = convert_operation_to_pyobject(input_operation).unwrap(); + pyo3::prepare_freethreaded_python(); let gil = pyo3::Python::acquire_gil(); let py = gil.python(); let operation_type = py.get_type::(); @@ -784,6 +797,7 @@ fn test_new_cnot(input_operation: Operation, arguments: (u32, u32), method: &str #[test_case(Operation::from(SWAP::new(2, 1)), (0, 1,), "__ne__"; "SWAP_ne")] fn test_new_swap(input_operation: Operation, arguments: (u32, u32), method: &str) { let operation = convert_operation_to_pyobject(input_operation).unwrap(); + pyo3::prepare_freethreaded_python(); let gil = pyo3::Python::acquire_gil(); let py = gil.python(); let operation_type = py.get_type::(); @@ -825,6 +839,7 @@ fn test_new_swap(input_operation: Operation, arguments: (u32, u32), method: &str #[test_case(Operation::from(ISwap::new(2, 1)), (0, 1,), "__ne__"; "ISwap_ne")] fn test_new_iswap(input_operation: Operation, arguments: (u32, u32), method: &str) { let operation = convert_operation_to_pyobject(input_operation).unwrap(); + pyo3::prepare_freethreaded_python(); let gil = pyo3::Python::acquire_gil(); let py = gil.python(); let operation_type = py.get_type::(); @@ -866,6 +881,7 @@ fn test_new_iswap(input_operation: Operation, arguments: (u32, u32), method: &st #[test_case(Operation::from(FSwap::new(2, 1)), (0, 1,), "__ne__"; "FSwap_ne")] fn test_new_fswap(input_operation: Operation, arguments: (u32, u32), method: &str) { let operation = convert_operation_to_pyobject(input_operation).unwrap(); + pyo3::prepare_freethreaded_python(); let gil = pyo3::Python::acquire_gil(); let py = gil.python(); let operation_type = py.get_type::(); @@ -907,6 +923,7 @@ fn test_new_fswap(input_operation: Operation, arguments: (u32, u32), method: &st #[test_case(Operation::from(SqrtISwap::new(2, 1)), (0, 1,), "__ne__"; "SqrtISwap_ne")] fn test_new_sqrtiswap(input_operation: Operation, arguments: (u32, u32), method: &str) { let operation = convert_operation_to_pyobject(input_operation).unwrap(); + pyo3::prepare_freethreaded_python(); let gil = pyo3::Python::acquire_gil(); let py = gil.python(); let operation_type = py.get_type::(); @@ -948,6 +965,7 @@ fn test_new_sqrtiswap(input_operation: Operation, arguments: (u32, u32), method: #[test_case(Operation::from(InvSqrtISwap::new(2, 1)), (0, 1,), "__ne__"; "InvSqrtISwap_ne")] fn test_new_invsqrtiswap(input_operation: Operation, arguments: (u32, u32), method: &str) { let operation = convert_operation_to_pyobject(input_operation).unwrap(); + pyo3::prepare_freethreaded_python(); let gil = pyo3::Python::acquire_gil(); let py = gil.python(); let operation_type = py.get_type::(); @@ -989,6 +1007,7 @@ fn test_new_invsqrtiswap(input_operation: Operation, arguments: (u32, u32), meth #[test_case(Operation::from(ControlledPauliY::new(2, 1)), (0, 1,), "__ne__"; "ControlledPauliY_ne")] fn test_new_controlledpauliy(input_operation: Operation, arguments: (u32, u32), method: &str) { let operation = convert_operation_to_pyobject(input_operation).unwrap(); + pyo3::prepare_freethreaded_python(); let gil = pyo3::Python::acquire_gil(); let py = gil.python(); let operation_type = py.get_type::(); @@ -1030,6 +1049,7 @@ fn test_new_controlledpauliy(input_operation: Operation, arguments: (u32, u32), #[test_case(Operation::from(ControlledPauliZ::new(2, 1)), (0, 1,), "__ne__"; "ControlledPauliZ_ne")] fn test_new_controlledpauliz(input_operation: Operation, arguments: (u32, u32), method: &str) { let operation = convert_operation_to_pyobject(input_operation).unwrap(); + pyo3::prepare_freethreaded_python(); let gil = pyo3::Python::acquire_gil(); let py = gil.python(); let operation_type = py.get_type::(); @@ -1071,6 +1091,7 @@ fn test_new_controlledpauliz(input_operation: Operation, arguments: (u32, u32), #[test_case(Operation::from(MolmerSorensenXX::new(2, 1)), (0, 1,), "__ne__"; "MolmerSorensenXX_ne")] fn test_new_molmersorensenxx(input_operation: Operation, arguments: (u32, u32), method: &str) { let operation = convert_operation_to_pyobject(input_operation).unwrap(); + pyo3::prepare_freethreaded_python(); let gil = pyo3::Python::acquire_gil(); let py = gil.python(); let operation_type = py.get_type::(); @@ -1112,6 +1133,7 @@ fn test_new_molmersorensenxx(input_operation: Operation, arguments: (u32, u32), #[test_case(Operation::from(XY::new(2, 1, CalculatorFloat::from(0.0))), (0, 1, 0.0), "__ne__"; "XY_ne")] fn test_new_xy(input_operation: Operation, arguments: (u32, u32, f64), method: &str) { let operation = convert_operation_to_pyobject(input_operation).unwrap(); + pyo3::prepare_freethreaded_python(); let gil = pyo3::Python::acquire_gil(); let py = gil.python(); @@ -1164,6 +1186,7 @@ fn test_new_controlledphaseshift( method: &str, ) { let operation = convert_operation_to_pyobject(input_operation).unwrap(); + pyo3::prepare_freethreaded_python(); let gil = pyo3::Python::acquire_gil(); let py = gil.python(); @@ -1216,6 +1239,7 @@ fn test_new_controlledphaseshift( #[test_case(Operation::from(VariableMSXX::new(2, 1, CalculatorFloat::from(0.0))), (0, 1, 0.0), "__ne__"; "VariableMSXX_ne")] fn test_new_variablemsxx(input_operation: Operation, arguments: (u32, u32, f64), method: &str) { let operation = convert_operation_to_pyobject(input_operation).unwrap(); + pyo3::prepare_freethreaded_python(); let gil = pyo3::Python::acquire_gil(); let py = gil.python(); @@ -1264,6 +1288,7 @@ fn test_new_variablemsxx(input_operation: Operation, arguments: (u32, u32, f64), #[test_case(Operation::from(PMInteraction::new(2, 1, CalculatorFloat::from(0.0))), (0, 1, 0.0), "__ne__"; "PMInteraction_ne")] fn test_new_pminteraction(input_operation: Operation, arguments: (u32, u32, f64), method: &str) { let operation = convert_operation_to_pyobject(input_operation).unwrap(); + pyo3::prepare_freethreaded_python(); let gil = pyo3::Python::acquire_gil(); let py = gil.python(); @@ -1316,6 +1341,7 @@ fn test_new_givensrotation( method: &str, ) { let operation = convert_operation_to_pyobject(input_operation).unwrap(); + pyo3::prepare_freethreaded_python(); let gil = pyo3::Python::acquire_gil(); let py = gil.python(); @@ -1372,6 +1398,7 @@ fn test_new_givensrotationlittleendian( method: &str, ) { let operation = convert_operation_to_pyobject(input_operation).unwrap(); + pyo3::prepare_freethreaded_python(); let gil = pyo3::Python::acquire_gil(); let py = gil.python(); @@ -1428,6 +1455,7 @@ fn test_new_givensrotationlittleendian( #[test_case(Operation::from(Bogoliubov::new(2, 1, CalculatorFloat::from(0.0), CalculatorFloat::from(0.0))), (0, 1, 0.0, 0.0), "__ne__"; "Bogoliubov_ne")] fn test_new_bogoliubov(input_operation: Operation, arguments: (u32, u32, f64, f64), method: &str) { let operation = convert_operation_to_pyobject(input_operation).unwrap(); + pyo3::prepare_freethreaded_python(); let gil = pyo3::Python::acquire_gil(); let py = gil.python(); @@ -1484,6 +1512,7 @@ fn test_new_complexpminteraction( method: &str, ) { let operation = convert_operation_to_pyobject(input_operation).unwrap(); + pyo3::prepare_freethreaded_python(); let gil = pyo3::Python::acquire_gil(); let py = gil.python(); @@ -1540,6 +1569,7 @@ fn test_new_complexpminteraction( #[test_case(Operation::from(Qsim::new(2, 1, CalculatorFloat::from(0.0), CalculatorFloat::from(0.0), CalculatorFloat::from(0.0))), (0, 1, 0.0, 0.0, 0.0), "__ne__"; "Qsim_ne")] fn test_new_qsim(input_operation: Operation, arguments: (u32, u32, f64, f64, f64), method: &str) { let operation = convert_operation_to_pyobject(input_operation).unwrap(); + pyo3::prepare_freethreaded_python(); let gil = pyo3::Python::acquire_gil(); let py = gil.python(); @@ -1596,6 +1626,7 @@ fn test_new_qsim(input_operation: Operation, arguments: (u32, u32, f64, f64, f64 #[test_case(Operation::from(Fsim::new(2, 1, CalculatorFloat::from(0.0), CalculatorFloat::from(0.0), CalculatorFloat::from(0.0))), (0, 1, 0.0, 0.0, 0.0), "__ne__"; "Fsim_ne")] fn test_new_fsim(input_operation: Operation, arguments: (u32, u32, f64, f64, f64), method: &str) { let operation = convert_operation_to_pyobject(input_operation).unwrap(); + pyo3::prepare_freethreaded_python(); let gil = pyo3::Python::acquire_gil(); let py = gil.python(); @@ -1656,6 +1687,7 @@ fn test_new_spininteraction( method: &str, ) { let operation = convert_operation_to_pyobject(input_operation).unwrap(); + pyo3::prepare_freethreaded_python(); let gil = pyo3::Python::acquire_gil(); let py = gil.python(); @@ -1717,6 +1749,7 @@ fn test_new_phaseshiftedcontrolledz( method: &str, ) { let operation = convert_operation_to_pyobject(input_operation).unwrap(); + pyo3::prepare_freethreaded_python(); let gil = pyo3::Python::acquire_gil(); let py = gil.python(); @@ -1829,6 +1862,7 @@ fn test_new_phaseshiftedcontrolledz( Operation::from(PhaseShiftedControlledZ::new(0, 1, CalculatorFloat::PI)), Operation::from(PhaseShiftedControlledZ::new(1, 0, CalculatorFloat::PI)); "PhaseShiftedControlledZ")] fn test_pyo3_richcmp(definition_1: Operation, definition_2: Operation) { + pyo3::prepare_freethreaded_python(); let gil = pyo3::Python::acquire_gil(); let py = gil.python(); let operation_one = convert_operation_to_pyobject(definition_1).unwrap(); diff --git a/roqoqo-derive/Cargo.toml b/roqoqo-derive/Cargo.toml index 68a192a2..ed5a9c89 100644 --- a/roqoqo-derive/Cargo.toml +++ b/roqoqo-derive/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "roqoqo-derive" -version = "0.1.6" +version = "0.5.0" authors = ["HQS Quantum Simulations "] license = "Apache-2.0" edition = "2018" diff --git a/roqoqo-test/Cargo.toml b/roqoqo-test/Cargo.toml index 608feb58..1ef62ca3 100644 --- a/roqoqo-test/Cargo.toml +++ b/roqoqo-test/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "roqoqo-test" -version = "0.1.5" +version = "0.5.0" authors = ["HQS Quantum Simulations "] license = "Apache-2.0" edition = "2018" @@ -8,7 +8,7 @@ categories = ["science", "simulation"] readme = "../README.md" repository = "https://github.com/HQSquantumsimulations/qoqo" description = "Testing helper functions for roqoqo toolkit" -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html +exclude = ["tests*", "examples*", "docs*", "*.code-workspace"] [lib] name = "roqoqo_test" @@ -18,11 +18,11 @@ crate-type = ["rlib"] [dependencies] qoqo_calculator = {version="0.2"} -roqoqo = {version="0.2", path="../roqoqo", features=["serialize"]} +roqoqo = {version="0.5", path="../roqoqo", features=["serialize"]} rand = "0.8" -nalgebra = "0.26" -ndarray = { version = "0.14" } -roqoqo-derive = {version="0.1", path="../roqoqo-derive"} +nalgebra = "0.28" +ndarray = { version = "0.15" } +#roqoqo-derive = {version="0.1", path="../roqoqo-derive"} [build-dependencies] quote = "1.0" diff --git a/roqoqo/Cargo.toml b/roqoqo/Cargo.toml index 03b4dfb6..2af26eec 100644 --- a/roqoqo/Cargo.toml +++ b/roqoqo/Cargo.toml @@ -1,13 +1,16 @@ [package] name = "roqoqo" -version = "0.2.0" +version = "0.5.0" authors = ["HQS Quantum Simulations "] license = "Apache-2.0" edition = "2018" categories = ["science", "simulation"] -readme = "../README.md" +homepage = "https://github.com/HQSquantumsimulations/qoqo" repository = "https://github.com/HQSquantumsimulations/qoqo" +documentation = "https://docs.rs/roqoqo/" +readme = "../README.md" description = "Rust Quantum Computing Toolkit by HQS" +exclude = ["tests*", "examples*", "docs*", "*.code-workspace"] # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html @@ -19,14 +22,14 @@ doctest = false [dependencies] serde = { version = "1.0", features = ["derive"], optional=true} -ndarray = { version = "0.14" } -num-complex = { version = "0.3"} +ndarray = { version = "0.15" } +num-complex = { version = "0.4"} thiserror = "1.0" dyn-clone = {version="1.0", optional=true} -qoqo_calculator = { version="0.2"} -roqoqo-derive = {version="0.1", path="../roqoqo-derive"} +qoqo_calculator = { version="0.3"} +roqoqo-derive = {version="0.5", path="../roqoqo-derive"} typetag = {version="0.1", optional=true} -sprs = {version="0.10"} +#sprs = {version="0.10"} rand_distr = {version="0.4", optional=true} rand = {version="0.8", optional=true} @@ -34,7 +37,7 @@ rand = {version="0.8", optional=true} [dev-dependencies] serde_test = {version="1.0"} test-case = "1.1.0" -nalgebra = "0.26" +nalgebra = "0.28" [build-dependencies] quote = "1.0" @@ -47,6 +50,6 @@ rustdoc-args = [ "--html-in-header", "katex.html", "--document-private-items" ] [features] default = ["serialize"] dynamic = ["typetag", "dyn-clone"] -serialize = ["serde", "ndarray/serde", "num-complex/serde", "sprs/serde"] +serialize = ["serde", "ndarray/serde", "num-complex/serde"] overrotate = ["rand", "rand_distr", "roqoqo-derive/overrotate"] diff --git a/roqoqo/src/backends.rs b/roqoqo/src/backends.rs index 43eb854a..09235249 100644 --- a/roqoqo/src/backends.rs +++ b/roqoqo/src/backends.rs @@ -98,7 +98,7 @@ pub trait EvaluatingBackend: Sized { /// Runs all circuits corresponding to one measurement with the backend. /// /// An expectation value measurement in general involves several circuits. - /// Each circuit is passes to the backend and executed separately + /// Each circuit is passes to the backend and executed separately. /// During execution values are written to and read from classical registers /// ([crate::registers::BitRegister], [crate::registers::FloatRegister] and [crate::registers::ComplexRegister]). /// To produce sufficient statistics for evaluating expectationg values, diff --git a/roqoqo/src/measurements/cheated_measurement.rs b/roqoqo/src/measurements/cheated_measurement.rs index 4a88508b..98664ef9 100644 --- a/roqoqo/src/measurements/cheated_measurement.rs +++ b/roqoqo/src/measurements/cheated_measurement.rs @@ -14,9 +14,10 @@ use crate::measurements::{CheatedInput, Measure, MeasureExpectationValues}; use crate::registers::{BitOutputRegister, ComplexOutputRegister, FloatOutputRegister}; use crate::Circuit; use crate::RoqoqoError; -use ndarray::{Array1, Array2, ArrayView1, ArrayView2}; +use ndarray::{Array1, ArrayView1, ArrayView2}; +//use ndarray::{Array2}; use num_complex::Complex64; -use sprs::{CsMat, TriMat}; +//use sprs::{CsMat, TriMat}; use std::collections::HashMap; /// Cheated measurement using state obtained from simulator backend. @@ -117,11 +118,11 @@ impl MeasureExpectationValues for Cheated { // Evaluating expectation values let mut results: HashMap = HashMap::new(); for (name, (operator, readout)) in self.input.measured_operators.iter() { - let row_inds: Vec = operator.iter().map(|(row, _, _)| row).cloned().collect(); - let col_inds: Vec = operator.iter().map(|(_, col, _)| col).cloned().collect(); - let data: Vec = operator.iter().map(|(_, _, val)| val).cloned().collect(); - let tmp_tri = TriMat::from_triplets((dimension, dimension), row_inds, col_inds, data); - let matrix: CsMat = tmp_tri.to_csc(); + // let row_inds: Vec = operator.iter().map(|(row, _, _)| row).cloned().collect(); + // let col_inds: Vec = operator.iter().map(|(_, col, _)| col).cloned().collect(); + // let data: Vec = operator.iter().map(|(_, _, val)| val).cloned().collect(); + // let tmp_tri = TriMat::from_triplets((dimension, dimension), row_inds, col_inds, data); + // let matrix: CsMat = tmp_tri.to_csc(); let register_vec = complex_registers .get(readout) @@ -132,25 +133,29 @@ impl MeasureExpectationValues for Cheated { for (index, register) in register_vec.iter().enumerate() { if register.len() == dimension { let vector: ArrayView1 = ArrayView1::::from(register); - let complex_conj_vec: Vec = - register.iter().map(|x| x.conj()).collect(); - let complex_conj: ArrayView1 = - ArrayView1::::from(&complex_conj_vec); - let tmp_val: Complex64 = complex_conj.dot(&(&matrix * &vector)); + // let complex_conj_vec: Vec = + // register.iter().map(|x| x.conj()).collect(); + // let complex_conj: ArrayView1 = + // ArrayView1::::from(&complex_conj_vec); + // let tmp_val: Complex64 = complex_conj.dot(&(&matrix * &vector)); + let tmp_val: Complex64 = + sparse_matrix_vector_expectation_value(operator, &vector); local_results[index] = tmp_val.re; } else if register.len() == dimension * dimension { let vector: ArrayView2 = ArrayView2::::from_shape((dimension, dimension), register) .expect("Unexpected error reshaping array"); - let complex_conj_vec: Vec = - register.iter().map(|x| x.conj()).collect(); - let complex_conj: Array2 = Array2::::from_shape_vec( - (dimension, dimension), - complex_conj_vec, - ) - .expect("Unexpected error reshaping array"); - let tmp_val: Complex64 = - ((complex_conj.t()).dot(&(&matrix * &vector))).diag().sum(); + // let complex_conj_vec: Vec = + // register.iter().map(|x| x.conj()).collect(); + // let complex_conj: Array2 = Array2::::from_shape_vec( + // (dimension, dimension), + // complex_conj_vec, + // ) + // .expect("Unexpected error reshaping array"); + // let tmp_val: Complex64 = + // ((complex_conj.t()).dot(&(&matrix * &vector))).diag().sum(); + let tmp_val = + sparse_matrix_matrix_expectation_value(operator, &vector, dimension); local_results[index] = tmp_val.re; } else { return Err(RoqoqoError::MismatchedRegisterDimension { @@ -170,3 +175,31 @@ impl MeasureExpectationValues for Cheated { Ok(Some(results)) } } + +#[inline] +fn sparse_matrix_vector_expectation_value( + matrix: &[(usize, usize, Complex64)], + vector: &ArrayView1, +) -> Complex64 { + let mut val: Complex64 = Complex64::new(0.0, 0.0); + for (index_i, index_j, value) in matrix { + val += vector[*index_i].conj() * value * vector[*index_j] + } + val +} + +#[inline] +fn sparse_matrix_matrix_expectation_value( + matrix: &[(usize, usize, Complex64)], + dense_matrix: &ArrayView2, + dimension: usize, +) -> Complex64 { + let mut val: Complex64 = Complex64::new(0.0, 0.0); + for (index_j, index_k, value) in matrix { + for index_i in 0..dimension { + val += + dense_matrix[(*index_j, index_i)].conj() * value * dense_matrix[(*index_k, index_i)] + } + } + val +}