Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert temp actions and finalize exception output #34

Merged
merged 1 commit into from
Apr 20, 2022
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
46 changes: 38 additions & 8 deletions .github/workflows/gen-metadata.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,32 @@
name: Gen metadata files

on: [push]
on:
workflow_dispatch:
inputs:
circuit_id:
description: 'Circuit id -> 2, 5, 10 or 18'
required: true
default: '2'
width:
description: 'Nb of qubits -> 4, 5, 10'
required: true
default: '4'
layer:
description: 'Nb of tpl reps -> 1, 2, 3'
required: true
default: '1'
matrix_size:
description: 'Matrix size -> 2, 10, 50'
required: true
default: '25'
shots:
description: 'Nb of shots -> 512, 1024, 8000'
required: true
default: '1024'
backend:
description: 'backend -> ibmq_qasm_simulator or '
required: true
default: 'ibmq_qasm_simulator'

jobs:
gen-metadata:
Expand Down Expand Up @@ -29,14 +55,18 @@ jobs:
python workflow.py authentication --channel="ibm_quantum" --token="${QS_TOKEN}" --instance="ibm-q/open/main"
- name: Generate metadata
env:
CIRCUIT_ID: '18'
SHOTS: '1024'
MATRIX_SIZE: '200'
NB_QUBITS: '4'
LAYER: '2'
BACKEND: 'ibmq_qasm_simulator'
CIRCUIT_ID: ${{ github.event.inputs.circuit_id }}
SHOTS: ${{ github.event.inputs.shots }}
MATRIX_SIZE: ${{ github.event.inputs.matrix_size }}
NB_QUBITS: ${{ github.event.inputs.width }}
LAYER: ${{ github.event.inputs.layer }}
BACKEND: ${{ github.event.inputs.backend }}
run: |
echo "::notice file=resources/kernel_metadata/telemetry_info.csv::Circuit ${CIRCUIT_ID} ; Matrix size ${MATRIX_SIZE}"
cat > $INPUTS_ACTIONS <<- EOF
Circuit ${CIRCUIT_ID} ; Matrix size ${MATRIX_SIZE} ; Nb qubits ${NB_QUBITS} ; Layer ${LAYER} ; Backend ${BACKEND} ; Shots ${SHOTS}
EOF

echo "::notice file=resources/kernel_metadata/telemetry_info.csv::${INPUTS_ACTIONS}"
python workflow.py kernel_flow --circuit_tpl_id=[${CIRCUIT_ID}] --width=${NB_QUBITS} --layer=${LAYER} --matrix_size=[${MATRIX_SIZE},${MATRIX_SIZE}] --backend="${BACKEND}" --shots=${SHOTS}

- name: Pull modif
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/qiskit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ name: Qiskit tests
on:
push:
branches:
- master
- master
workflow_dispatch:
pull_request:

jobs:
stable:
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
name: Tests

on: [push, workflow_dispatch]
on:
push:
branches:
- master
pull_request:


jobs:
lint:
Expand Down
15 changes: 9 additions & 6 deletions src/controllers/kernel.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,11 +137,14 @@ def kernel_endpoint(
)

else:
return_str = (
"Telemetry complete but Runtime failed ! "
+ telemetry_info[3]
+ " \nException::"
+ catch_exception
)
if telemetry_info[3] == "Unknown Error":
return_str = (
"Telemetry complete but Runtime failed ! "
+ telemetry_info[3]
+ " \nException::"
+ catch_exception
)
else:
return_str = "Telemetry complete but Runtime failed ! " + telemetry_info[3]

return return_str