Skip to content

Commit

Permalink
It appears that there is no need to multiply with the 'left lambda'. …
Browse files Browse the repository at this point in the history
…Lambdas are multiplied into mat as the algorithm goes over the qubits in the 'multiply mat by right lambda' portion of the code.
  • Loading branch information
aromanro committed Feb 6, 2025
1 parent 7827e03 commit 93c79ad
Showing 1 changed file with 0 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1728,10 +1728,6 @@ uint_t MPS::sample_measure_single_qubit(uint_t qubit, double &prob, double rnd,
mat = q_reg_[qubit].get_data(measurement);
} else {
mat = mat * q_reg_[qubit].get_data(measurement);
// multiply mat by left lambda
for (uint_t col = 0; col < mat.GetColumns(); col++)
for (uint_t row = 0; row < mat.GetRows(); row++)
mat(row, col) *= lambda_reg_[qubit - 1][row];
}
if (qubit != num_qubits_ - 1) { // multiply mat by right lambda
for (uint_t row = 0; row < mat.GetRows(); row++)
Expand Down

1 comment on commit 93c79ad

@aromanro
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Related with Qiskit#2305

Please sign in to comment.