azure-quantum-python icon indicating copy to clipboard operation
azure-quantum-python copied to clipboard

The target `microsoft.simulator.fullstate` is missing

Open jond01 opened this issue 4 years ago • 4 comments

I have preview access to MS full-state cloud simulator but it's not listed in the Python API (azure.quantum). When I use az quantum CLI it is listed.


  1. Azure CLI (after logging in and setting the workspace):

    az quantum target list
    
    [
      {
        "currentAvailability": "Available",
        "id": "Microsoft.Simulator",
        "targets": [
          {
            "averageQueueTime": 0,
            "currentAvailability": "Available",
            "id": "microsoft.simulator.fullstate",
            "statusPage": null
          }
        ]
      },
      {
        "currentAvailability": "Available",
        "id": "ionq",
        "targets": [
          {
            "averageQueueTime": 102,
            "currentAvailability": "Available",
            "id": "ionq.qpu",
            "statusPage": "https://status.ionq.co"
          },
          {
            "averageQueueTime": 2,
            "currentAvailability": "Available",
            "id": "ionq.simulator",
            "statusPage": "https://status.ionq.co"
          }
        ]
      }
    ]
    
  2. When using the Python API (qdk-python), the target microsoft.simulator.fullstate is missing:

    from pprint import pprint
    
    from azure.quantum.workspace import Workspace
    
    ws = Workspace(resource_id="<my_resource_id>", location="<my_ws_location>")
    pprint(ws.get_targets())
    
    [<Target name="ionq.qpu", avg. queue time=172 s, Available>,
     <Target name="ionq.simulator", avg. queue time=2 s, Available>]
    
  3. This is the providers list of the quantum workspace from Azure portal: image The target microsoft.simulator.fullstate is listed.

I verified that both methods (az quantum CLI and azure.quantum python package) access the same workspace by comparing the "id" from az quantum workspace show with ws.subscription_id, ws.resource_group, and ws.name.


Proposed solutions:

  1. This issue is a consequence of the following filtering in TargetFactory: https://github.com/microsoft/qdk-python/blob/f78537b52f7c478eedc77ea8277dd94212d85950/azure-quantum/azure/quantum/target/target_factory.py#L59-L67 And the current absence of the microsoft.simulator.fullstate target from: https://github.com/microsoft/qdk-python/tree/main/azure-quantum/azure/quantum/target/microsoft So we can add it there.

  2. Expose TargetFactory's all_targets parameter https://github.com/microsoft/qdk-python/blob/f78537b52f7c478eedc77ea8277dd94212d85950/azure-quantum/azure/quantum/target/target_factory.py#L35 to Workspace's get_targets method: https://github.com/microsoft/qdk-python/blob/f78537b52f7c478eedc77ea8277dd94212d85950/azure-quantum/azure/quantum/workspace.py#L314

jond01 avatar Jan 03 '22 15:01 jond01

#147 is probably related.

jond01 avatar Jan 03 '22 15:01 jond01

Hi @jond01, I stumbled over this as well - it's a little hidden but the "Known Limitations" in the README on the fullstate simulator mention that it currently only supports Q# standalone applications.

Waiting for this feature to drop as well!

ltalirz avatar Jan 04 '22 16:01 ltalirz

@jond01, Indeed, the Microsoft full state simulator currently only supports Q#. We are currently working on supporting Python as well, will share an eta here soon..

guenp avatar Jan 28 '22 08:01 guenp

@guenp any update on when the Microsoft full state simulator will support submission from Python?

I know you moved to different responsibilities - who is the person working on this now?

ltalirz avatar Jun 22 '22 11:06 ltalirz

The hosted version of Microsoft full state simulator has been deprecated. Please see supported simulators still bundled in the Classic QDK, or try the new very fast sparse-simulator in the Modern QDK at microsoft.quantum.com

xinyi-joffre avatar Nov 02 '23 01:11 xinyi-joffre