qcs_sdk

1# type: ignore
2# See the following documentation for why this file is necessary:
3# https://pyo3.rs/v0.18.0/python_typing_hints#__init__py-content
4
5from .qcs_sdk import *
6
7__doc__ = qcs_sdk.__doc__
8__all__ = getattr(qcs_sdk, "__all__", []) + ["diagnostics"]
class ExecutionData:
result_data

Get the result_data field from Python. Annotated with @property.

duration

Get the duration field from Python. Annotated with @property.

class ResultData:
def from_qpu(inner):

The Python wrapper for [ResultData::Qpu], creating a [PyResultData] and taking a Python argument.

def from_qvm(inner):

The Python wrapper for [ResultData::Qvm], creating a [PyResultData] and taking a Python argument.

def inner(self, /):

Directly return the Python version of the variant discriminant wrapped by this value; i.e., performs the match ResultData::Variant(x) => x for every variant constructor in [ResultData]

def is_qpu(self, /):

Tests if this [PyResultData] wraps a [ResultData::qpu] value

def as_qpu(self, /):

Returns x if this [PyResultData] wraps a ResultData::qpu(x); otherwise returns (Python) None. On the Rust side, this corresponds to either Some(x) or [None].

def to_qpu(self, /):

Returns x if this [PyResultData] wraps a ResultData::qpu(x); otherwise raises a ValueError. On the Rust side, this corresponds to either Ok(x) or Err(...).

def is_qvm(self, /):

Tests if this [PyResultData] wraps a [ResultData::qvm] value

def as_qvm(self, /):

Returns x if this [PyResultData] wraps a ResultData::qvm(x); otherwise returns (Python) None. On the Rust side, this corresponds to either Some(x) or [None].

def to_qvm(self, /):

Returns x if this [PyResultData] wraps a ResultData::qvm(x); otherwise raises a ValueError. On the Rust side, this corresponds to either Ok(x) or Err(...).

def to_register_map(self, /):
def to_raw_readout_data(self, /):
class RegisterMap:
def get_register_matrix(self, /, register_name):
def keys(self, /):
def values(self, /):
def items(self, /):
def get(self, /, key, default=None):
class RegisterMatrix:
def to_ndarray(self, /):
def from_integer(inner):
def to_integer(self, /):
def as_integer(self, /):
def is_integer(self, /):
def from_real(inner):
def to_real(self, /):
def as_real(self, /):
def is_real(self, /):
def from_complex(inner):
def to_complex(self, /):
def as_complex(self, /):
def is_complex(self, /):
class Executable:
def execute_on_qvm(self, /, client):
def execute_on_qvm_async(self, /, client):
def execute_on_qpu( self, /, quantum_processor_id, endpoint_id=None, translation_options=None, execution_options=None):
def execute_on_qpu_async( self, /, quantum_processor_id, endpoint_id=None, translation_options=None, execution_options=None):
def submit_to_qpu( self, /, quantum_processor_id, endpoint_id=None, translation_options=None, execution_options=None):
def submit_to_qpu_async( self, /, quantum_processor_id, endpoint_id=None, translation_options=None, execution_options=None):
def retrieve_results(self, /, job_handle):
def retrieve_results_async(self, /, job_handle):
class ExeParameter:
index
name
value
class JobHandle:
readout_map
job_id
class Service:
Quilc = Service.Quilc
QVM = Service.QVM
QCS = Service.QCS
QPU = Service.QPU
class RegisterData:
def from_i8(inner):

The Python wrapper for [RegisterData::I8], creating a [PyRegisterData] and taking a Python argument.

def from_f64(inner):

The Python wrapper for [RegisterData::F64], creating a [PyRegisterData] and taking a Python argument.

def from_i16(inner):

The Python wrapper for [RegisterData::I16], creating a [PyRegisterData] and taking a Python argument.

def from_complex32(inner):

The Python wrapper for [RegisterData::Complex32], creating a [PyRegisterData] and taking a Python argument.

def inner(self, /):

Directly return the Python version of the variant discriminant wrapped by this value; i.e., performs the match RegisterData::Variant(x) => x for every variant constructor in [RegisterData]

def is_i8(self, /):

Tests if this [PyRegisterData] wraps a [RegisterData::i8] value

def as_i8(self, /):

Returns x if this [PyRegisterData] wraps a RegisterData::i8(x); otherwise returns (Python) None. On the Rust side, this corresponds to either Some(x) or [None].

def to_i8(self, /):

Returns x if this [PyRegisterData] wraps a RegisterData::i8(x); otherwise raises a ValueError. On the Rust side, this corresponds to either Ok(x) or Err(...).

def is_f64(self, /):

Tests if this [PyRegisterData] wraps a [RegisterData::f64] value

def as_f64(self, /):

Returns x if this [PyRegisterData] wraps a RegisterData::f64(x); otherwise returns (Python) None. On the Rust side, this corresponds to either Some(x) or [None].

def to_f64(self, /):

Returns x if this [PyRegisterData] wraps a RegisterData::f64(x); otherwise raises a ValueError. On the Rust side, this corresponds to either Ok(x) or Err(...).

def is_i16(self, /):

Tests if this [PyRegisterData] wraps a [RegisterData::i16] value

def as_i16(self, /):

Returns x if this [PyRegisterData] wraps a RegisterData::i16(x); otherwise returns (Python) None. On the Rust side, this corresponds to either Some(x) or [None].

def to_i16(self, /):

Returns x if this [PyRegisterData] wraps a RegisterData::i16(x); otherwise raises a ValueError. On the Rust side, this corresponds to either Ok(x) or Err(...).

def is_complex32(self, /):

Tests if this [PyRegisterData] wraps a [RegisterData::complex32] value

def as_complex32(self, /):

Returns x if this [PyRegisterData] wraps a RegisterData::complex32(x); otherwise returns (Python) None. On the Rust side, this corresponds to either Some(x) or [None].

def to_complex32(self, /):

Returns x if this [PyRegisterData] wraps a RegisterData::complex32(x); otherwise raises a ValueError. On the Rust side, this corresponds to either Ok(x) or Err(...).

def as_ndarray(self, /):
class QCSClient:
def load(profile_name=None):
qvm_url
api_url
quilc_url
grpc_api_url
oauth_session
class ExecutionError(builtins.RuntimeError):

Unspecified run-time error.

class RegisterMatrixConversionError(builtins.ValueError):

Inappropriate argument value (of correct type).

def reset_logging():
def _gather_diagnostics():
__version__ = '0.21.1'