Skip to content
This repository has been archived by the owner on Sep 13, 2019. It is now read-only.

Commit

Permalink
Merge pull request #60 from danbev/addGate-spread-operator
Browse files Browse the repository at this point in the history
Use spread operator in addGate
  • Loading branch information
jesusprubio authored May 3, 2019
2 parents f9657c5 + 95e221a commit 884fc44
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 1 addition & 3 deletions packages/qiskit-sim/lib/Circuit.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 884fc44

Please sign in to comment.