qstone.apps package¶
Submodules¶
qstone.apps.PyMatching module¶
Defines the two steps of PyMatching jobs
- class qstone.apps.PyMatching.PyMatching(cfg: dict)[source]¶
Bases:
Computation
PyMatching computation class.
- CFG_STRING: str | None = '\n {\n "cfg":\n {\n "num_required_qubits" : 10,\n "repetitions": 2\n }\n }\n '¶
- COMPUTATION_NAME: str = 'PyMatching'¶
- SCHEMA: DataFrameSchema = <Schema DataFrameSchema(columns={'repetitions': <Schema Column(name=repetitions, type=DataType(int64))>}, checks=[], parsers=[], index=None, dtype=None, coerce=False, strict=False, name=None, ordered=False, unique=None, report_duplicates=all, unique_column_names=False, add_missing_columns=False, title=None, description=None, metadata=None, drop_invalid_rows=False)>¶
- generate_synthetic_data(data_path: str)[source]¶
Generates synthetic data and stores them in data_path
- post(datapath: str)[source]¶
Runs the postprocessing analysis using PyMatching decoder over a given input file
- Parameters:
datapath – path location to write circuit
Returns: number of errors detected
qstone.apps.RB module¶
RB computations steps.
- class qstone.apps.RB.RB(cfg: dict)[source]¶
Bases:
Computation
Type 1 computation class.
- CFG_STRING: str | None = '\n {\n "cfg":\n {\n "num_required_qubits" : 2,\n "repetitions": 2\n }\n } \n '¶
- COMPUTATION_NAME: str = 'RB'¶
- SCHEMA: DataFrameSchema = <Schema DataFrameSchema(columns={'repetitions': <Schema Column(name=repetitions, type=DataType(int64))>}, checks=[], parsers=[], index=None, dtype=None, coerce=False, strict=False, name=None, ordered=False, unique=None, report_duplicates=all, unique_column_names=False, add_missing_columns=False, title=None, description=None, metadata=None, drop_invalid_rows=False)>¶
- post(datapath: str)[source]¶
Runs the processing of the randomised benchmarking using the data provided by datapath
qstone.apps.VQE module¶
VQE computations steps.
- class qstone.apps.VQE.VQE(cfg: dict)[source]¶
Bases:
Computation
VQE computation class.
- CFG_STRING: str | None = '\n {\n "cfg":\n {\n "num_required_qubits" : 4,\n "repetitions" : 10,\n "iterations" : 10,\n "compute_duration" : 1\n }\n }\n '¶
- COMPUTATION_NAME: str = 'VQE'¶
- SCHEMA: DataFrameSchema = <Schema DataFrameSchema(columns={'repetitions': <Schema Column(name=repetitions, type=DataType(int64))>, 'iterations': <Schema Column(name=iterations, type=DataType(int64))>, 'compute_duration': <Schema Column(name=compute_duration, type=DataType(int64))>}, checks=[], parsers=[], index=None, dtype=None, coerce=False, strict=False, name=None, ordered=False, unique=None, report_duplicates=all, unique_column_names=False, add_missing_columns=False, title=None, description=None, metadata=None, drop_invalid_rows=False)>¶
qstone.apps.computation module¶
QPU computation class and configuration dataclass
- class qstone.apps.computation.Computation(cfg: Dict)[source]¶
Bases:
ABC
Abstract class for a QPU computation. To be ovverriden by implemented jobs.
- Parameters:
cfg – Computation configuration dictionary. Key value pairs describing
data. (the script)
- BASEPATH: str = '/home/runner/work/QStone/QStone/qstone/apps/..'¶
- CFG_PATH: str | None = None¶
- CFG_STRING: str | None = None¶
- COMPUTATION_NAME: str¶
- SCHEMA: DataFrameSchema¶
- dump_cfg() str [source]¶
Serializes computation script information into JSON string.
Returns json string representation of computation configuration.
- classmethod from_json(path: str | None = None)[source]¶
Factory method for creating computation via JSON configuration.
- Parameters:
path – Path to computation configuration file
- property qpu_cfg¶
qpu_cfg getter
Module contents¶
QPU Computation registry