Travis-S-IBM / q-kernel-ops

A repository for the QAMP Spring 2022 project
Apache License 2.0
3 stars 2 forks source link

Operationalizing Quantum Kernels

ecosystem

The goal of this project is to create the code allowing to redo the experiments of the paper below and analyze the practical behaviour of the classical completion and to improve the Runtime.

Study

Every study are available in the study folder.

Documentation

Authentication

In order to authenticate to IBM Cloud or IBM Quantum and to use run time, you can all this method.

authentication(channel=None, token=None, instance="ibm-q/open/main", overwrite=False)

Parameters

Return

Examples

python workflow.py authentication --channel="cloud" --token="your_very_long_token" --instance="ibm-q/open/main"

Full workflow

To run the full workflow, you can call this method.

end2end(circuit_tpl_id=None, width=3, layer=1, matrix_size=None, payload_limit=2e9, backend="ibmq_qasm_simulator", shots=1024)

Parameters

Return

Examples

python workflow.py end2end_flow --circuit_tpl_id=[5] --matrix_size=[100,100]

Kernel

The following endpoints allow you to generate the quantum kernel of the size given and to see and analyze it.

kernel_flow

To only run the kernel generation, you can use this method.

kernel_flow(circuit_tpl_id=None, width=3, layer=1, seed1=42, seed2=4242, matrix_size=None, payload_limit=2e9, backend="ibmq_qasm_simulator", shots=1024)

Parameters

Return

Examples

view_kernel

To see your kernel generated, you can use this method.

view_kernel(file_name=None, backend="ibmq_qasm_simulator", resources_path="resources/kernel_metadata")

Parameters

Return

Examples

python workflow.py view_kernel --file_name="kernels-2-ideal.csv"

Completion

The following endpoints allow you to run the completion matrix algorithm of the kernel given and to see and analyze it.

completion_flow

Generate the completion of the kernel given. To only run the matrix completion over a quantum kernel, you can use this method.

completion_flow(file_name=None, backend="ibmq_qasm_simulator", nb_qubits=None, size_matrix=None, overlaps=1)

Parameters

Return

Examples

python workflow.py completion_flow --file_name="kernels-2-ideal.csv" --nb_qubits=3

view_matrix

To see your matrix generated, you can used this method.

view_matrix(file_name=None, backend="ibmq_qasm_simulator", resources_path="resources/cmpl_matrix")

Parameters

Return

Examples

python workflow.py view_matrix --file_name="kernels-2-ideal.csv.npy"

Telemetry

Each flow are generating a telemetry in order to analyze the behaviour of their flow and having some metadata to study.

view_telemetry

To see your telemetry files, you can used this method.

view_telemetry(file_name="telemetry_info.csv", resources_path="resources/kernel_metadata")

Parameters

Return

Examples

Annexes

Usefull acronyms

Resources