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

Commit 5604fc6

Browse files
author
Chris Granade
authored
Fix #818. (#819)
1 parent f322cbf commit 5604fc6

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

src/Simulation/qdk_sim_rs/src/c_api.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ pub extern "C" fn lasterr() -> *const c_char {
101101
/// - **`pure`**: Creates the simulator with an initial state represented by
102102
/// a state vector.
103103
/// - **`mixed`**: Creates the simulator with an initial state represented by
104-
/// a density operat.
104+
/// a density operator.
105105
/// - **`stabilizer`**: Creates the simulator with an initial state represented by
106106
/// a stabilizer tableau.
107107
///

src/Simulation/qdk_sim_rs/src/processes/apply.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ impl Process {
2727
}
2828

2929
match &self.data {
30-
Unitary(u) => apply_unitary(&u, state),
31-
KrausDecomposition(ks) => apply_kraus_decomposition(&ks, state),
32-
MixedPauli(paulis) => apply_pauli_channel(&paulis, state),
30+
Unitary(u) => apply_unitary(u, state),
31+
KrausDecomposition(ks) => apply_kraus_decomposition(ks, state),
32+
MixedPauli(paulis) => apply_pauli_channel(paulis, state),
3333
Sequence(processes) => {
3434
// TODO[perf]: eliminate the extraneous clone here.
3535
let mut acc_state = state.clone();

src/Simulation/qdk_sim_rs/src/states.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ impl Trace for &State {
162162
fn trace(self) -> Self::Output {
163163
match &self.data {
164164
Pure(_) | StateData::Stabilizer(_) => C64::one(),
165-
Mixed(ref rho) => (&rho).trace(),
165+
Mixed(ref rho) => rho.trace(),
166166
}
167167
}
168168
}

0 commit comments

Comments
 (0)