Quantum circuit dataset

Dataset for quantum circuits.


source

Qc_Config_Dataset_config

 Qc_Config_Dataset_config (store_dict:dict, optimized:bool,
                           dataset_to_gpu:bool, random_samples:int,
                           num_of_qubits:int, min_gates:int,
                           max_gates:int, gate_pool:list[str])

source

Qc_Config_Dataset

 Qc_Config_Dataset (device:torch.device=device(type='cpu'), **parameters)

Dataset for quantum circuits, access gate_pool directly and all other paras with .params_config

init = {k:None for k in Qc_Config_Dataset.req_params}
init["gate_pool"]  = ["h", "cx", "x"]
init["store_dict"] = {"x":"tensor", "y":"tensor_list"}

a = Qc_Config_Dataset(**init)
a.get_config()
{'target': '__main__.Qc_Config_Dataset',
 'device': 'cpu',
 'comment': '',
 'save_path': None,
 'save_datetime': '08/26/2024 21:37:39',
 'params': Qc_Config_Dataset_config(store_dict={'x': 'tensor', 'y': 'tensor_list'}, optimized=None, dataset_to_gpu=None, random_samples=None, num_of_qubits=None, min_gates=None, max_gates=None, gate_pool=['h', 'cx', 'x'])}
Back to top