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

Fix #818. #819

Merged
merged 1 commit into from
Sep 14, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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