2
2
# Licensed under the MIT License.
3
3
4
4
[package ]
5
- name = " qdk_sim_experimental "
5
+ name = " qdk_sim_rs "
6
6
version = " 0.0.1-alpha"
7
7
authors = [" Microsoft" ]
8
8
edition = " 2018"
9
9
license = " MIT"
10
- description = " Experimental simulators for use with the Quantum Development Kit."
10
+ description = " Rust-based simulators for use with the Quantum Development Kit."
11
11
homepage = " https://github.com/microsoft/qsharp-runtime"
12
12
repository = " https://github.com/microsoft/qsharp-runtime"
13
13
readme = " README.md"
14
14
15
+ # Verified with cargo-msrv.
16
+ rust-version = " 1.51.0"
17
+
15
18
exclude = [
16
19
# Exclude files specific to QDK build pipelines.
17
20
" *.template" , " *.csx" , " *.ps1" , " NuGet.Config" , " drop" ,
@@ -21,72 +24,85 @@ exclude = [
21
24
" *.egg-info" , " qdk_sim_experimental" , " setup.py" , " *.whl" , " pyproject.toml"
22
25
]
23
26
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
+
24
34
[lib ]
35
+ crate-type = [" rlib" , " staticlib" , " cdylib" ]
25
36
name = " qdk_sim"
26
37
path = " src/lib.rs"
27
- crate-type = [" rlib" , " staticlib" , " cdylib" ]
28
38
29
39
# Optional build-time features: we use this to create Python and WASM bindings.
30
40
[features ]
31
41
default = []
32
- wasm = [ " web-sys " ]
42
+
33
43
# When Python bindings are enabled, we also need the pyo3 dependency.
44
+ # # Enables Python bindings for this crate.
34
45
python = [" pyo3" , " numpy" ]
35
46
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" ]
41
49
42
50
43
51
[profile .release ]
44
- opt-level = 3
45
52
codegen-units = 1 # Reduce number of codegen units to increase optimizations.
53
+ opt-level = 3
46
54
panic = ' unwind'
47
55
48
56
[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"
58
62
cfg-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 }
60
68
# See https://github.com/rust-random/rand/issues/990
61
69
# and https://docs.rs/getrandom/0.1.15/getrandom/index.html#support-for-webassembly-and-asmjs
62
70
# for why this is needed.
63
71
# NB: We depend on 0.1.15, since that's what gets brought in transitively
64
72
# by rand and rand_core.
65
73
getrandom = { 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 }
70
82
# We only need PyO3 when generating Python bindings.
71
83
pyo3 = { 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"
73
88
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 }
77
91
78
92
[build-dependencies ]
79
93
built = " 0.5.0"
80
94
81
95
82
96
[dev-dependencies ]
97
+ approx = { version = " 0.5.1" , features = [" num-complex" ] }
83
98
assert-json-diff = " 2.0.1"
84
99
criterion = { version = " 0.3" , features = [' html_reports' , ' csv_output' ] }
100
+ ndarray = { version = " 0.15.4" , features = [" approx" ] }
85
101
86
102
[[bench ]]
87
- name = " c_api_benchmark"
88
103
harness = false
104
+ name = " c_api_benchmark"
89
105
90
106
[[bench ]]
91
- name = " microbenchmark"
92
107
harness = false
108
+ name = " microbenchmark"
0 commit comments