Skip to content

Commit 19344ed

Browse files
committed
Version 0.9.174
2 parents 8c89f74 + 1ba672e commit 19344ed

File tree

5 files changed

+67
-56
lines changed

5 files changed

+67
-56
lines changed

dist/quantum-circuit.js

Lines changed: 54 additions & 49 deletions
Large diffs are not rendered by default.

dist/quantum-circuit.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/quantum-circuit.min.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/quantum-circuit.js

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2647,7 +2647,9 @@ QuantumCircuit.prototype.defaultHybridOptions = function() {
26472647
};
26482648
};
26492649

2650-
QuantumCircuit.prototype.init = function(numQubits) {
2650+
QuantumCircuit.prototype.init = function(numQubits, options) {
2651+
options = options || {};
2652+
26512653
this.numQubits = numQubits || 1;
26522654
this.gates = [];
26532655
this.partitionMap = [];
@@ -2662,7 +2664,10 @@ QuantumCircuit.prototype.init = function(numQubits) {
26622664
hybridOptions: this.defaultHybridOptions()
26632665
};
26642666

2665-
this.customGates = {};
2667+
if(!options.keepCustomGates) {
2668+
this.customGates = {};
2669+
}
2670+
26662671
this.cregs = {};
26672672
this.collapsed = [];
26682673
this.prob = [];
@@ -2684,6 +2689,7 @@ QuantumCircuit.prototype.clear = function() {
26842689
this.initState();
26852690
};
26862691

2692+
26872693
QuantumCircuit.prototype.resetState = function() {
26882694
// reset state
26892695
this.state = {};

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "quantum-circuit",
3-
"version": "0.9.173",
3+
"version": "0.9.174",
44
"description": "Quantum Circuit Simulator",
55
"main": "lib/quantum-circuit.js",
66
"unpkg": "dist/quantum-circuit.min.js",
@@ -37,8 +37,8 @@
3737
},
3838
"homepage": "https://quantum-circuit.com",
3939
"dependencies": {
40-
"antlr4": "^4.8.0",
41-
"mathjs": "^6.6.5"
40+
"antlr4": "4.7.2",
41+
"mathjs": "^6.0.3"
4242
},
4343
"devDependencies": {
4444
"browserify": "^16.5.1",

0 commit comments

Comments
 (0)