surface_sim.setups.Setup#

class Setup(setup={'setup': [{}]})[source]#
__init__(setup={'setup': [{}]})[source]#

Initialises the Setup class.

Parameters:
setup

Dictionary with the configuration. Must have the key "setup" containing the information. The information must not have None as value. It can also include "name", "description" and "gate_durations" keys with the corresponding information.

Methods

convert_to_random(**free_param_samplers)

Converts this setup into a random setup, in which the free parameters are randomly sampled for each qubit and qubit pair.

from_yaml(filename)

Create new surface_sim.setup.Setup instance from YAML configuarion file.

gate_duration(name)

Returns the duration of the specified gate.

new_randomization()

Restores the original setup without the sampled parameters.

param(param[, qubits])

Returns the value of the given parameter for the specified qubit(s).

set_param(param, param_val[, qubits])

Sets the given value to the given parameter of the given qubit(s).

set_var_param(var_param, val)

Sets the given value to the given variable parameter.

to_dict()

Returns a dictionary that can be used to initialize Setup.

to_yaml(filename)

Stores the current Setup configuration in the given file in YAML format.

var_param(var_param)

Returns the value of the given variable parameter name.

Attributes

__init__([setup])

Initialises the Setup class.

convert_to_random(**free_param_samplers)

Converts this setup into a random setup, in which the free parameters are randomly sampled for each qubit and qubit pair.

from_yaml(filename)

Create new surface_sim.setup.Setup instance from YAML configuarion file.

gate_duration(name)

Returns the duration of the specified gate.

new_randomization()

Restores the original setup without the sampled parameters.

param(param[, qubits])

Returns the value of the given parameter for the specified qubit(s).

set_param(param, param_val[, qubits])

Sets the given value to the given parameter of the given qubit(s).

set_var_param(var_param, val)

Sets the given value to the given variable parameter.

to_dict()

Returns a dictionary that can be used to initialize Setup.

to_yaml(filename)

Stores the current Setup configuration in the given file in YAML format.

var_param(var_param)

Returns the value of the given variable parameter name.