wy_qcos.transpiler.common package

Submodules

wy_qcos.transpiler.common.errors module

exception wy_qcos.transpiler.common.errors.DecomposeException

基类:Exception

Decompose Exception.

exception wy_qcos.transpiler.common.errors.OptException

基类:Exception

Optimization Exception.

exception wy_qcos.transpiler.common.errors.MappingException

基类:Exception

Mapping Exception.

exception wy_qcos.transpiler.common.errors.TranspilerException

基类:Exception

Transpiler Exception.

exception wy_qcos.transpiler.common.errors.CircuitException

基类:Exception

Circuit Exception.

wy_qcos.transpiler.common.transpiler_cfg module

class wy_qcos.transpiler.common.transpiler_cfg.TranspilerCfg(decomp_rule=None, qpu_cfg=None, max_qubits=0, tech_type=None, driver_name=None)

基类:object

Transpiler Config Class.

get_decompose_rule()

Get decompose rule.

set_decompose_rule(decomp_rule)

Set decompose rule.

参数:

decomp_rule -- decomposition rule

get_qpu_cfg()

Get qpu cfg.

set_qpu_cfg(qpu_cfg)

Set qpu cfg.

参数:

qpu_cfg -- qpu config

get_max_qubits()

Get max qubits.

返回:

max qubits

set_max_qubits(max_qubits)

Set qpu cfg.

参数:

max_qubits -- max qubits

get_tech_type()

Get tech type.

返回:

tech type

set_tech_type(tech_type)

Set tech type.

参数:

tech_type -- tech type

get_driver_name()

Get driver name.

返回:

driver name

set_driver_name(driver_name)

Set driver name.

参数:

driver_name -- driver name

wy_qcos.transpiler.common.utils module

class wy_qcos.transpiler.common.utils.TransLogger(logfile=None, allowed_tags=None)

基类:object

log_perf(msg)

Performance log (INFO level).

log_error(msg)

Error log (ERROR level).

log_warning(msg)

Warning log (WARNING level).

log_debug(msg)

DEBUG log (DEBUG level).

set_allowed_tags(tags)
set_log_file(log_file)

Set log file path for output.

Description: Output content will be written to the output file.

If None, logs will only be output to console.

参数:

log_file -- Path to the log file.

class wy_qcos.transpiler.common.utils.Timer

基类:object

class wy_qcos.transpiler.common.utils.TranspileRuntime

基类:object

add_runtime(runtime)
参数:

runtime (TranspileRuntime)

avg_runtime(run_count)

Module contents