diff --git a/CHANGELOG.md b/CHANGELOG.md index 93cf6c2..cfe27e1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ## [Unreleased] +### ✏️ Changed + +- `@qiskit/qiskit-sim`: Use spread operator in addGate + ### 🎉 Added - `@qiskit/qiskit-sim`: Add print circuit method diff --git a/packages/qiskit-sim/lib/Circuit.js b/packages/qiskit-sim/lib/Circuit.js index 879904e..9fea0e5 100644 --- a/packages/qiskit-sim/lib/Circuit.js +++ b/packages/qiskit-sim/lib/Circuit.js @@ -143,9 +143,7 @@ class Circuit { const wireList = []; if (Array.isArray(wires)) { - for (let i = 0; i < wires.length; i += 1) { - wireList.push(wires[i]); - } + wireList.push(...wires); } else { wireList.push(wires); }