diff --git a/src/Simulation/qdk_sim_rs/src/c_api.rs b/src/Simulation/qdk_sim_rs/src/c_api.rs index bf88c09065e..caab540f118 100644 --- a/src/Simulation/qdk_sim_rs/src/c_api.rs +++ b/src/Simulation/qdk_sim_rs/src/c_api.rs @@ -101,7 +101,7 @@ pub extern "C" fn lasterr() -> *const c_char { /// - **`pure`**: Creates the simulator with an initial state represented by /// a state vector. /// - **`mixed`**: Creates the simulator with an initial state represented by -/// a density operat. +/// a density operator. /// - **`stabilizer`**: Creates the simulator with an initial state represented by /// a stabilizer tableau. /// diff --git a/src/Simulation/qdk_sim_rs/src/processes/apply.rs b/src/Simulation/qdk_sim_rs/src/processes/apply.rs index 21de1e77060..cd5cca76b5a 100644 --- a/src/Simulation/qdk_sim_rs/src/processes/apply.rs +++ b/src/Simulation/qdk_sim_rs/src/processes/apply.rs @@ -27,9 +27,9 @@ impl Process { } match &self.data { - Unitary(u) => apply_unitary(&u, state), - KrausDecomposition(ks) => apply_kraus_decomposition(&ks, state), - MixedPauli(paulis) => apply_pauli_channel(&paulis, state), + Unitary(u) => apply_unitary(u, state), + KrausDecomposition(ks) => apply_kraus_decomposition(ks, state), + MixedPauli(paulis) => apply_pauli_channel(paulis, state), Sequence(processes) => { // TODO[perf]: eliminate the extraneous clone here. let mut acc_state = state.clone(); diff --git a/src/Simulation/qdk_sim_rs/src/states.rs b/src/Simulation/qdk_sim_rs/src/states.rs index 3bf69611212..71f36e51b6b 100644 --- a/src/Simulation/qdk_sim_rs/src/states.rs +++ b/src/Simulation/qdk_sim_rs/src/states.rs @@ -162,7 +162,7 @@ impl Trace for &State { fn trace(self) -> Self::Output { match &self.data { Pure(_) | StateData::Stabilizer(_) => C64::one(), - Mixed(ref rho) => (&rho).trace(), + Mixed(ref rho) => rho.trace(), } } }