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

Use spread operator in addGate #60

Merged
merged 2 commits into from
May 3, 2019
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
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