Skip to content

Commit 2ffba2c

Browse files
Louis/bug-fixes (#125)
* Fix missing circuitId for quantum-register output * Update dependencies * Fix in-progress jobs cancelling on test fail * changed the flow of this test so that expected output is intuitive because m1 should preceed m2 measurement * fixed this failing Pass qubit through gate failing test and added correct output test * Add missing node tests - Add histrogram simulator test suite. - Add portfolio optimisation test suite. * Fix #126 * Set Python version to 3.9.6 * Update dependencies Co-authored-by: Timur Toktassynov <[email protected]>
1 parent 578963d commit 2ffba2c

File tree

10 files changed

+201
-154
lines changed

10 files changed

+201
-154
lines changed

.github/workflows/node.js.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,11 @@ jobs:
1111
runs-on: ${{ matrix.os }}
1212

1313
strategy:
14+
fail-fast: false
1415
matrix:
1516
os: [ubuntu-latest, windows-latest]
1617
node-version: [12.x, 14.x, 16.x]
17-
python-version: [3.9]
18+
python-version: [3.9.6]
1819

1920
defaults:
2021
run:

nodes/quantum/classical-register/classical-register.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ module.exports = function(RED) {
5656
if (shouldInitCircuit) {
5757
logger.trace(node.id, 'Classical register emitted circuit ready event');
5858
circuitReadyEvent.emit('circuitReady', null);
59-
state.del('registers');
59+
state.setPersistent('registers', []);
6060
}
6161
done();
6262
})

nodes/quantum/quantum-register/quantum-register.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ module.exports = function(RED) {
5656
for (let i = 0; i < node.outputs; i++) {
5757
output[i] = {
5858
topic: 'Quantum Circuit',
59+
circuitId: msg.circuitId,
5960
payload: {
6061
structure: msg.payload.structure,
6162
register: node.name,
@@ -95,7 +96,7 @@ module.exports = function(RED) {
9596
if (shouldInitCircuit) {
9697
logger.trace(node.id, 'Quantum register emitted circuit ready event');
9798
circuitReadyEvent.emit('circuitReady', null);
98-
state.del('registers');
99+
state.setPersistent('registers', []);
99100
} else {
100101
// wait for quantum circuit to be initialised
101102
logger.trace(node.id, 'Quantum register waiting for circuit to be ready');

0 commit comments

Comments
 (0)