qiskit_serverless.core.QiskitFunction¶
- class QiskitFunction(title, provider=None, entrypoint=None, working_dir='./', env_vars=None, dependencies=None, description=None, version=None, tags=None, raw_data=None, image=None, runner='ray', arguments_schema=None, type='GENERIC')[source]¶
Serverless QiskitPattern.
- Parameters:
title (
str) – program nameprovider (
Optional[str]) – Qiskit Function provider referenceentrypoint (
Optional[str]) – is a script that will be executed as a job ex: job.pyenv_vars (
Optional[Dict[str,str]]) – env varsdependencies (
Optional[List[str]]) – list of python dependencies to execute a programworking_dir (
Optional[str]) – directory where entrypoint file is located (max size 50MB)description (
Optional[str]) – description of a programversion (
Optional[str]) – version of a programarguments_schema (
Union[Dict[str,Any],bool,None]) –JSON Schema describing valid arguments for this function. Normally an object;
TrueandFalseare also valid schemas, accepting and rejecting every argument respectively.Nonemeans the function does not declare one, and setting it to{}on an upload removes the schema an earlier upload stored.The gateway applies the schema to the arguments as this SDK encodes them, not as they look in Python, so a
QuantumCircuitargument is matched against{"__type__": "QuantumCircuit", "__value__": "<base64 QPY>"}and a numpy array against an object rather than an array. Describing either with{"type": "array"}therefore rejects every legitimate call. Constrain the plain arguments (counts, names, options, flags) and check only the__type__tag of the Qiskit ones. Seespecs/ARGUMENTS_VALIDATION.md.
- __init__(title, provider=None, entrypoint=None, working_dir='./', env_vars=None, dependencies=None, description=None, version=None, tags=None, raw_data=None, image=None, runner='ray', arguments_schema=None, type='GENERIC')¶
Methods
__init__(title[, provider, entrypoint, ...])from_json(data)Reconstructs QiskitPattern from dictionary.
Attributes
APPLICATIONCIRCUITGENERICarguments_schemadependenciesdescriptionentrypointenv_varsimageproviderraw_datarunnertagstypeversionworking_dirtitle