deltakit.explorer.Client#

class deltakit.explorer.Client(base_url: str, timeout: int = 60000, api_version: int = 2)#

Bases: object

The Client class provides convenient methods to access circuit generation, noise addition, decoding, simulation, and analysis calls. To create a connection to a particular server, use the following syntax:

client = Client(base_url="https://deltakit.riverlane.com/proxy")
Parameters:
  • base_url – str Url of the Dektakit service endpoint.

  • timeout – int Request timeout, seconds.

  • api_version – int 1 - Long living GraphQL requests. 2 - Task-based requests.

Methods#

Client.add_noise

Given a stim circuit, changes all noise in the circuit to noise defined by user-given parameters.

Client.decode

Accepts detectors, observables and a stim circuit with integrated noise and returns decoding results for a requested decoder.

Client.decode_measurements

Accept raw measurement file and a clean stim circuit and return decoding results with a requested decoder.

Client.defect_rates

Obtain defect rates for the detectors defined in the stim circuit.

Client.generate_circuit

Generate a STIM circuit for a quantum error correction experiment.

Client.get_correlation_matrix

Obtain a correlation matrix for a given set of detection events and corresponding circuit.

Client.get_correlation_matrix_for_trimmed_data

Obtain a correlation matrix for a given set of detection events and corresponding noisy circuit.

Client.get_experiment_detectors_and_defect_rates

Extract detector to coordinate mapping, and defect rates for these detectors.

Client.get_instance

Return a pre-configured instance of a cloud-based Deltakit client.

Client.kill

Kill a decoding task submitted to a client.

Client.set_token

Set and validate a token.

Client.simulate_stim_circuit

Simulate STIM circuit with Deltakit client.

Client.trim_circuit_and_detectors

Trims a circuit to remove redundant detectors (detectors that do not affect the observable).