22# Licensed under the MIT License.
33
44[package ]
5- name = " qdk_sim_experimental "
5+ name = " qdk_sim_rs "
66version = " 0.0.1-alpha"
77authors = [" Microsoft" ]
88edition = " 2018"
99license = " MIT"
10- description = " Experimental simulators for use with the Quantum Development Kit."
10+ description = " Rust-based simulators for use with the Quantum Development Kit."
1111homepage = " https://github.com/microsoft/qsharp-runtime"
1212repository = " https://github.com/microsoft/qsharp-runtime"
1313readme = " README.md"
1414
15+ # Verified with cargo-msrv.
16+ rust-version = " 1.51.0"
17+
1518exclude = [
1619 # Exclude files specific to QDK build pipelines.
1720 " *.template" , " *.csx" , " *.ps1" , " NuGet.Config" , " drop" ,
@@ -21,72 +24,85 @@ exclude = [
2124 " *.egg-info" , " qdk_sim_experimental" , " setup.py" , " *.whl" , " pyproject.toml"
2225]
2326
27+ # Enable LaTeX on docs.rs.
28+ # See https://stackoverflow.com/a/54573800/267841 and
29+ # https://github.com/rust-num/num/pull/226/files for why this works.
30+ [package .metadata .docs .rs ]
31+ rustdoc-args = [ " --html-in-header" , " docs-includes/header.html" , " --html-after-content" , " docs-includes/after.html" ]
32+ features = [" document-features" ]
33+
2434[lib ]
35+ crate-type = [" rlib" , " staticlib" , " cdylib" ]
2536name = " qdk_sim"
2637path = " src/lib.rs"
27- crate-type = [" rlib" , " staticlib" , " cdylib" ]
2838
2939# Optional build-time features: we use this to create Python and WASM bindings.
3040[features ]
3141default = []
32- wasm = [ " web-sys " ]
42+
3343# When Python bindings are enabled, we also need the pyo3 dependency.
44+ # # Enables Python bindings for this crate.
3445python = [" pyo3" , " numpy" ]
3546
36- # Enable LaTeX on docs.rs.
37- # See https://stackoverflow.com/a/54573800/267841 and
38- # https://github.com/rust-num/num/pull/226/files for why this works.
39- [package .metadata .docs .rs ]
40- rustdoc-args = [ " --html-in-header" , " docs-includes/header.html" , " --html-after-content" , " docs-includes/after.html" ]
47+ # # Ensures that the crate is compatible with usage from WebAssembly.
48+ wasm = [" web-sys" ]
4149
4250
4351[profile .release ]
44- opt-level = 3
4552codegen-units = 1 # Reduce number of codegen units to increase optimizations.
53+ opt-level = 3
4654panic = ' unwind'
4755
4856[dependencies ]
49- ndarray = { version = " 0.15.2" , features = [" serde" ] }
50- num-complex = { version = " 0.4" , features = [" serde" ] }
51- num-traits = " 0.2"
52- derive_more = " 0.99.10"
53- itertools = " 0.9.0"
54- rand = { version = " 0.7.3" , features = [" alloc" ] }
55- serde = { version = " 1.0" , features = [" derive" ] }
56- serde_json = " 1.0"
57- lazy_static = " 1.4.0"
57+ anyhow = " 1.0.56"
58+ # We use built to expose compile-time metadata about how this crate
59+ # was built to C and Rust callers.
60+ built = " 0.5.0"
61+ cauchy = " 0.4.0"
5862cfg-if = " 1.0.0"
59- num_enum = " 0.5.1"
63+ derive_more = " 0.99.10"
64+ # We use document-features to automatically generate feature documentation from
65+ # Cargo.toml, following the example at
66+ # https://docs.rs/document-features/latest/document_features#examples.
67+ document-features = { version = " 0.2" , optional = true }
6068# See https://github.com/rust-random/rand/issues/990
6169# and https://docs.rs/getrandom/0.1.15/getrandom/index.html#support-for-webassembly-and-asmjs
6270# for why this is needed.
6371# NB: We depend on 0.1.15, since that's what gets brought in transitively
6472# by rand and rand_core.
6573getrandom = { version = " 0.1.15" , features = [" wasm-bindgen" ] }
66-
67- # We only need web-sys when compiling with the wasm feature.
68- web-sys = { version = " 0.3.4" , features = [' console' ], optional = true }
69-
74+ itertools = " 0.9.0"
75+ lazy_static = " 1.4.0"
76+ miette = " 4.3.0"
77+ ndarray = { version = " 0.15.2" , features = [" serde" ] }
78+ num-complex = { version = " 0.4" , features = [" serde" ] }
79+ num-traits = " 0.2"
80+ num_enum = " 0.5.1"
81+ numpy = { version = " 0.13.1" , optional = true }
7082# We only need PyO3 when generating Python bindings.
7183pyo3 = { version = " 0.13.2" , features = [" extension-module" ], optional = true }
72- numpy = {version = " 0.13.1" , optional = true }
84+ rand = { version = " 0.7.3" , features = [" alloc" ] }
85+ serde = { version = " 1.0" , features = [" derive" ] }
86+ serde_json = " 1.0"
87+ thiserror = " 1.0.30"
7388
74- # We use built to expose compile-time metadata about how this crate
75- # was built to C and Rust callers.
76- built = " 0.5.0"
89+ # We only need web-sys when compiling with the wasm feature.
90+ web-sys = { version = " 0.3.4" , features = [' console' ], optional = true }
7791
7892[build-dependencies ]
7993built = " 0.5.0"
8094
8195
8296[dev-dependencies ]
97+ approx = { version = " 0.5.1" , features = [" num-complex" ] }
8398assert-json-diff = " 2.0.1"
8499criterion = { version = " 0.3" , features = [' html_reports' , ' csv_output' ] }
100+ ndarray = { version = " 0.15.4" , features = [" approx" ] }
85101
86102[[bench ]]
87- name = " c_api_benchmark"
88103harness = false
104+ name = " c_api_benchmark"
89105
90106[[bench ]]
91- name = " microbenchmark"
92107harness = false
108+ name = " microbenchmark"
0 commit comments