diff --git a/src/rasqal/src/analysis.rs b/src/rasqal/src/analysis.rs index 1026e9a..3389fa6 100644 --- a/src/rasqal/src/analysis.rs +++ b/src/rasqal/src/analysis.rs @@ -649,8 +649,13 @@ impl StateFragment { return Some(String::from("Can't expand fragment to size of the state.")); } + let before = self.to_string(); + let multiplying_woth = gate.matrix.to_string(); self.matrix.mul_assign(&gate.matrix); - None + let after = self.to_string(); + let whatever = "WHAT"; + let something = None; + something } } diff --git a/src/rasqal/src/config.rs b/src/rasqal/src/config.rs index 601d6bb..3c1fcf4 100644 --- a/src/rasqal/src/config.rs +++ b/src/rasqal/src/config.rs @@ -22,12 +22,23 @@ impl RasqalConfig { pub fn trace_graphs(&mut self) { self.debug_tracers.insert(ActiveTracers::Graphs); } - pub fn trace_solver(mut self) -> RasqalConfig { + pub fn with_trace_runtime(mut self) -> RasqalConfig { self.debug_tracers.insert(ActiveTracers::Runtime); self } + + pub fn with_trace_projections(mut self) -> RasqalConfig { self.debug_tracers.insert(ActiveTracers::Projections); self } + + pub fn with_trace_graphs(mut self) -> RasqalConfig { self.debug_tracers.insert(ActiveTracers::Graphs); self } + + pub fn with_step_count_limit(mut self, count: i64) -> RasqalConfig { + self.step_count_limit = Some(count); + self + } + + pub fn with_trace_solver(mut self) -> RasqalConfig { self.debug_tracers.insert(ActiveTracers::Solver); self } - pub fn activate_solver(mut self) -> RasqalConfig { + pub fn with_activate_solver(mut self) -> RasqalConfig { self.solver_active = true; self } diff --git a/src/rasqal/src/execution.rs b/src/rasqal/src/execution.rs index 2e816b7..2896f4b 100644 --- a/src/rasqal/src/execution.rs +++ b/src/rasqal/src/execution.rs @@ -221,9 +221,7 @@ mod tests { fn fail(path: &str) -> Option { fail_with_config(path, RasqalConfig::default()) } fn fail_with_args(path: &str, args: &Vec) -> Option { - run_with_args_and_config( - path, args, RasqalConfig::default() - ).err() + run_with_args_and_config(path, args, RasqalConfig::default()).err() } fn fail_with_config(path: &str, config: RasqalConfig) -> Option { @@ -245,7 +243,8 @@ mod tests { #[test] fn execute_qaoa() { - run("../tests/qsharp/qaoa/qir/qaoa.ll"); + let config = RasqalConfig::default().with_activate_solver().with_trace_solver(); + run_with_config("../tests/qsharp/qaoa/qir/qaoa.ll", config); } #[test] @@ -255,7 +254,11 @@ mod tests { #[test] fn execute_oracle_generator() { - run("../tests/qsharp/oracle-generator/qir/oracle-generator.ll"); + let config = RasqalConfig::default().with_activate_solver().with_trace_solver(); + run_with_config( + "../tests/qsharp/oracle-generator/qir/oracle-generator.ll", + config + ); } #[test]