Skip to content
This repository has been archived by the owner on Jan 12, 2024. It is now read-only.

Commit

Permalink
Fix #818.
Browse files Browse the repository at this point in the history
  • Loading branch information
cgranade committed Sep 14, 2021
1 parent f322cbf commit 09249dd
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/Simulation/qdk_sim_rs/src/c_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
///
Expand Down
6 changes: 3 additions & 3 deletions src/Simulation/qdk_sim_rs/src/processes/apply.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion src/Simulation/qdk_sim_rs/src/states.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
}
}
}
Expand Down

0 comments on commit 09249dd

Please sign in to comment.