Skip to content

Commit 1296234

Browse files
committed
Add cacache pygates feature to accelerate
1 parent 7528db9 commit 1296234

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

crates/accelerate/Cargo.toml

+3
Original file line numberDiff line numberDiff line change
@@ -58,3 +58,6 @@ features = ["ndarray"]
5858
[dependencies.pulp]
5959
version = "0.18.22"
6060
features = ["macro"]
61+
62+
[features]
63+
cache_pygates = ["qiskit-circuit/cache_pygates"]

crates/accelerate/src/unitary_synthesis.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
// copyright notice, and modified files need to carry a notice indicating
1111
// that they have been altered from the originals.
1212

13-
// #[cfg(feature = "cache_pygates")]
13+
#[cfg(feature = "cache_pygates")]
1414
use std::cell::OnceCell;
1515

1616
use std::f64::consts::PI;
@@ -186,7 +186,7 @@ fn dag_from_2q_gate_sequence(
186186
clbits: target_dag.cargs_interner.get_default(),
187187
params: new_params,
188188
extra_attrs: None,
189-
// #[cfg(feature = "cache_pygates")]
189+
#[cfg(feature = "cache_pygates")]
190190
py_op: OnceCell::new(),
191191
};
192192
instructions.push(pi);

crates/pyext/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ crate-type = ["cdylib"]
1717
# crates as standalone binaries, executables, we need `libpython` to be linked in, so we make the
1818
# feature a default, and run `cargo test --no-default-features` to turn it off.
1919
default = ["pyo3/extension-module"]
20-
cache_pygates = ["pyo3/extension-module", "qiskit-circuit/cache_pygates"]
20+
cache_pygates = ["pyo3/extension-module", "qiskit-circuit/cache_pygates", "qiskit-accelerate/cache_pygates"]
2121

2222
[dependencies]
2323
pyo3.workspace = true

0 commit comments

Comments
 (0)