qibosoq package#

qibosoq module.

Subpackages#

Submodules#

qibosoq.client module#

Collection of helper functions for qibosoq clients.

exception qibosoq.client.QibosoqError[source]#

Bases: RuntimeError

Exception raised when qibosoq server encounters an error.

Attributes: message – The error message received from the server (qibosoq)

qibosoq.client.connect(server_commands: dict, host: str, port: int) Tuple[list, list][source]#

Open a connection with the server and executes the commands.

qibosoq.client.convert_commands(obj_dictionary: dict) dict[source]#

Convert the contents of a commands dictionary from object to dict.

qibosoq.client.execute(obj_dictionary: dict, host: str, port: int) Tuple[list, list][source]#

Convert a dictionary of objects and run experiment.

qibosoq.configuration module#

Qibosoq configuration file.

qibosoq.configuration.from_env(name, default=None)[source]#

Get the value of a QIBOSOQ environment variable.

qibosoq.configuration.HOST = '192.168.0.81'#

Server address.

qibosoq.configuration.PORT = 6000#

Port of the server.

qibosoq.configuration.MAIN_LOGGER_FILE = '/home/xilinx/logs/qibosoq.log'#

Main logger file.

qibosoq.configuration.MAIN_LOGGER_NAME = 'qibosoq_logger'#

Main logger name.

qibosoq.configuration.PROGRAM_LOGGER_FILE = '/home/xilinx/logs/program.log'#

Program logger file.

qibosoq.configuration.PROGRAM_LOGGER_NAME = 'qick_program'#

Program logger name.

qibosoq.configuration.QICKSOC_LOCATION = '/home/xilinx/jupyter_notebooks/qick_111_rfbv1_mux.bit'#

Path of the qick bitstream to load.

qibosoq.configuration.IS_MULTIPLEXED = True#

Whether the readout is multiplexed or not.

qibosoq.log module#

Loggers configuration.

qibosoq.log.configure_logger(name: str, filename: str, backup_count: int)[source]#

Create and configure logger.

qibosoq.log.define_loggers() Tuple[Logger, Logger][source]#

Define main logger and program logger.

qibosoq.server module#

Qibosoq server for qibolab-qick integration.

qibosoq.server.load_elements(list_sequence: List[Dict]) List[Element][source]#

Convert a list of elements in dict form to a list of Pulse objects.

qibosoq.server.load_sweeps(list_sweepers: List[Dict]) List[Sweeper][source]#

Convert a list of sweepers (in dict form) to a list of Sweeper objects.

qibosoq.server.execute_program(data: dict, qick_soc: qick.QickSoc) dict[source]#

Create and execute qick programs.

Returns:

dictionary with two keys (i, q) to lists of values

Return type:

(dict)

class qibosoq.server.ConnectionHandler(request, client_address, server)[source]#

Bases: BaseRequestHandler

Handle requests to the server.

receive_command() dict[source]#

Receive commands from qibolab client.

The communication protocol is: * first the server receives a 4 bytes integer with the length of the message to actually receive * waits for the message and decode it * returns the unpcikled dictionary

handle()[source]#

Handle a connection to the server.

  • Receives command from client

  • Executes qick program

  • Return results

qibosoq.server.log_initial_info()[source]#

Log info regarding the loaded configuration.

qibosoq.server.serve(host, port)[source]#

Open the TCPServer and wait forever for connections.