How to use the qsharp.client._execute_callable_magic function in qsharp

To help you get started, we’ve selected a few qsharp examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github microsoft / iqsharp / src / Python / qsharp-core / qsharp / azure.py View on Github external
def submit(op : qsharp.QSharpCallable, **params) -> AzureJob:
    """
    Submits a job to an Azure Quantum workspace.
    See https://docs.microsoft.com/qsharp/api/iqsharp-magic/azure.submit for more details.
    """
    result = qsharp.client._execute_callable_magic("azure.submit", op, raise_on_stderr=False, **params)
    if "error_code" in result: raise AzureError(result)
    return AzureJob(result)
github microsoft / iqsharp / src / Python / qsharp-core / qsharp / azure.py View on Github external
def execute(op : qsharp.QSharpCallable, **params) -> Dict:
    """
    Executes a job in an Azure Quantum workspace.
    See https://docs.microsoft.com/qsharp/api/iqsharp-magic/azure.execute for more details.
    """
    result = qsharp.client._execute_callable_magic("azure.execute", op, raise_on_stderr=False, **params)
    if "error_code" in result: raise AzureError(result)
    return result