azure-quantum 3.1.1.dev0__tar.gz → 3.1.1.dev2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {azure_quantum-3.1.1.dev0 → azure_quantum-3.1.1.dev2}/PKG-INFO +4 -4
- {azure_quantum-3.1.1.dev0 → azure_quantum-3.1.1.dev2}/azure/quantum/_client/_version.py +1 -1
- {azure_quantum-3.1.1.dev0 → azure_quantum-3.1.1.dev2}/azure/quantum/cirq/targets/quantinuum.py +2 -1
- {azure_quantum-3.1.1.dev0 → azure_quantum-3.1.1.dev2}/azure/quantum/job/base_job.py +16 -3
- {azure_quantum-3.1.1.dev0 → azure_quantum-3.1.1.dev2}/azure/quantum/qiskit/backends/ionq.py +3 -1
- {azure_quantum-3.1.1.dev0 → azure_quantum-3.1.1.dev2}/azure/quantum/target/microsoft/elements/dft/target.py +1 -5
- {azure_quantum-3.1.1.dev0 → azure_quantum-3.1.1.dev2}/azure/quantum/target/params.py +1 -1
- {azure_quantum-3.1.1.dev0 → azure_quantum-3.1.1.dev2}/azure/quantum/target/target.py +1 -1
- {azure_quantum-3.1.1.dev0 → azure_quantum-3.1.1.dev2}/azure/quantum/version.py +1 -1
- {azure_quantum-3.1.1.dev0 → azure_quantum-3.1.1.dev2}/azure_quantum.egg-info/PKG-INFO +4 -4
- {azure_quantum-3.1.1.dev0 → azure_quantum-3.1.1.dev2}/azure_quantum.egg-info/SOURCES.txt +0 -2
- {azure_quantum-3.1.1.dev0 → azure_quantum-3.1.1.dev2}/azure_quantum.egg-info/requires.txt +3 -3
- {azure_quantum-3.1.1.dev0 → azure_quantum-3.1.1.dev2}/requirements-quil.txt +2 -1
- {azure_quantum-3.1.1.dev0 → azure_quantum-3.1.1.dev2}/requirements.txt +1 -1
- azure_quantum-3.1.1.dev0/azure/quantum/chemistry/__init__.py +0 -13
- azure_quantum-3.1.1.dev0/azure/quantum/target/microsoft/target.py +0 -142
- {azure_quantum-3.1.1.dev0 → azure_quantum-3.1.1.dev2}/README.md +0 -0
- {azure_quantum-3.1.1.dev0 → azure_quantum-3.1.1.dev2}/azure/quantum/__init__.py +0 -0
- {azure_quantum-3.1.1.dev0 → azure_quantum-3.1.1.dev2}/azure/quantum/_authentication/__init__.py +0 -0
- {azure_quantum-3.1.1.dev0 → azure_quantum-3.1.1.dev2}/azure/quantum/_authentication/_chained.py +0 -0
- {azure_quantum-3.1.1.dev0 → azure_quantum-3.1.1.dev2}/azure/quantum/_authentication/_default.py +0 -0
- {azure_quantum-3.1.1.dev0 → azure_quantum-3.1.1.dev2}/azure/quantum/_authentication/_token.py +0 -0
- {azure_quantum-3.1.1.dev0 → azure_quantum-3.1.1.dev2}/azure/quantum/_client/__init__.py +0 -0
- {azure_quantum-3.1.1.dev0 → azure_quantum-3.1.1.dev2}/azure/quantum/_client/_client.py +0 -0
- {azure_quantum-3.1.1.dev0 → azure_quantum-3.1.1.dev2}/azure/quantum/_client/_configuration.py +0 -0
- {azure_quantum-3.1.1.dev0 → azure_quantum-3.1.1.dev2}/azure/quantum/_client/_model_base.py +0 -0
- {azure_quantum-3.1.1.dev0 → azure_quantum-3.1.1.dev2}/azure/quantum/_client/_patch.py +0 -0
- {azure_quantum-3.1.1.dev0 → azure_quantum-3.1.1.dev2}/azure/quantum/_client/_serialization.py +0 -0
- {azure_quantum-3.1.1.dev0 → azure_quantum-3.1.1.dev2}/azure/quantum/_client/models/__init__.py +0 -0
- {azure_quantum-3.1.1.dev0 → azure_quantum-3.1.1.dev2}/azure/quantum/_client/models/_enums.py +0 -0
- {azure_quantum-3.1.1.dev0 → azure_quantum-3.1.1.dev2}/azure/quantum/_client/models/_models.py +0 -0
- {azure_quantum-3.1.1.dev0 → azure_quantum-3.1.1.dev2}/azure/quantum/_client/models/_patch.py +0 -0
- {azure_quantum-3.1.1.dev0 → azure_quantum-3.1.1.dev2}/azure/quantum/_client/operations/__init__.py +0 -0
- {azure_quantum-3.1.1.dev0 → azure_quantum-3.1.1.dev2}/azure/quantum/_client/operations/_operations.py +0 -0
- {azure_quantum-3.1.1.dev0 → azure_quantum-3.1.1.dev2}/azure/quantum/_client/operations/_patch.py +0 -0
- {azure_quantum-3.1.1.dev0 → azure_quantum-3.1.1.dev2}/azure/quantum/_constants.py +0 -0
- {azure_quantum-3.1.1.dev0 → azure_quantum-3.1.1.dev2}/azure/quantum/_workspace_connection_params.py +0 -0
- {azure_quantum-3.1.1.dev0 → azure_quantum-3.1.1.dev2}/azure/quantum/argument_types/__init__.py +0 -0
- {azure_quantum-3.1.1.dev0 → azure_quantum-3.1.1.dev2}/azure/quantum/argument_types/types.py +0 -0
- {azure_quantum-3.1.1.dev0 → azure_quantum-3.1.1.dev2}/azure/quantum/cirq/__init__.py +0 -0
- {azure_quantum-3.1.1.dev0 → azure_quantum-3.1.1.dev2}/azure/quantum/cirq/job.py +0 -0
- {azure_quantum-3.1.1.dev0 → azure_quantum-3.1.1.dev2}/azure/quantum/cirq/service.py +0 -0
- {azure_quantum-3.1.1.dev0 → azure_quantum-3.1.1.dev2}/azure/quantum/cirq/targets/__init__.py +0 -0
- {azure_quantum-3.1.1.dev0 → azure_quantum-3.1.1.dev2}/azure/quantum/cirq/targets/ionq.py +0 -0
- {azure_quantum-3.1.1.dev0 → azure_quantum-3.1.1.dev2}/azure/quantum/cirq/targets/target.py +0 -0
- {azure_quantum-3.1.1.dev0 → azure_quantum-3.1.1.dev2}/azure/quantum/job/__init__.py +0 -0
- {azure_quantum-3.1.1.dev0 → azure_quantum-3.1.1.dev2}/azure/quantum/job/filtered_job.py +0 -0
- {azure_quantum-3.1.1.dev0 → azure_quantum-3.1.1.dev2}/azure/quantum/job/job.py +0 -0
- {azure_quantum-3.1.1.dev0 → azure_quantum-3.1.1.dev2}/azure/quantum/job/job_failed_with_results_error.py +0 -0
- {azure_quantum-3.1.1.dev0 → azure_quantum-3.1.1.dev2}/azure/quantum/job/session.py +0 -0
- {azure_quantum-3.1.1.dev0 → azure_quantum-3.1.1.dev2}/azure/quantum/job/workspace_item.py +0 -0
- {azure_quantum-3.1.1.dev0 → azure_quantum-3.1.1.dev2}/azure/quantum/job/workspace_item_factory.py +0 -0
- {azure_quantum-3.1.1.dev0 → azure_quantum-3.1.1.dev2}/azure/quantum/qiskit/__init__.py +0 -0
- {azure_quantum-3.1.1.dev0 → azure_quantum-3.1.1.dev2}/azure/quantum/qiskit/backends/__init__.py +0 -0
- {azure_quantum-3.1.1.dev0 → azure_quantum-3.1.1.dev2}/azure/quantum/qiskit/backends/backend.py +0 -0
- {azure_quantum-3.1.1.dev0 → azure_quantum-3.1.1.dev2}/azure/quantum/qiskit/backends/qci.py +0 -0
- {azure_quantum-3.1.1.dev0 → azure_quantum-3.1.1.dev2}/azure/quantum/qiskit/backends/quantinuum.py +0 -0
- {azure_quantum-3.1.1.dev0 → azure_quantum-3.1.1.dev2}/azure/quantum/qiskit/backends/rigetti.py +0 -0
- {azure_quantum-3.1.1.dev0 → azure_quantum-3.1.1.dev2}/azure/quantum/qiskit/job.py +0 -0
- {azure_quantum-3.1.1.dev0 → azure_quantum-3.1.1.dev2}/azure/quantum/qiskit/provider.py +0 -0
- {azure_quantum-3.1.1.dev0 → azure_quantum-3.1.1.dev2}/azure/quantum/storage.py +0 -0
- {azure_quantum-3.1.1.dev0 → azure_quantum-3.1.1.dev2}/azure/quantum/target/__init__.py +0 -0
- {azure_quantum-3.1.1.dev0 → azure_quantum-3.1.1.dev2}/azure/quantum/target/ionq.py +0 -0
- {azure_quantum-3.1.1.dev0 → azure_quantum-3.1.1.dev2}/azure/quantum/target/microsoft/elements/__init__.py +0 -0
- {azure_quantum-3.1.1.dev0 → azure_quantum-3.1.1.dev2}/azure/quantum/target/microsoft/elements/dft/__init__.py +0 -0
- {azure_quantum-3.1.1.dev0 → azure_quantum-3.1.1.dev2}/azure/quantum/target/microsoft/elements/dft/job.py +0 -0
- {azure_quantum-3.1.1.dev0 → azure_quantum-3.1.1.dev2}/azure/quantum/target/pasqal/__init__.py +0 -0
- {azure_quantum-3.1.1.dev0 → azure_quantum-3.1.1.dev2}/azure/quantum/target/pasqal/result.py +0 -0
- {azure_quantum-3.1.1.dev0 → azure_quantum-3.1.1.dev2}/azure/quantum/target/pasqal/target.py +0 -0
- {azure_quantum-3.1.1.dev0 → azure_quantum-3.1.1.dev2}/azure/quantum/target/quantinuum.py +0 -0
- {azure_quantum-3.1.1.dev0 → azure_quantum-3.1.1.dev2}/azure/quantum/target/rigetti/__init__.py +0 -0
- {azure_quantum-3.1.1.dev0 → azure_quantum-3.1.1.dev2}/azure/quantum/target/rigetti/result.py +0 -0
- {azure_quantum-3.1.1.dev0 → azure_quantum-3.1.1.dev2}/azure/quantum/target/rigetti/target.py +0 -0
- {azure_quantum-3.1.1.dev0 → azure_quantum-3.1.1.dev2}/azure/quantum/target/target_factory.py +0 -0
- {azure_quantum-3.1.1.dev0 → azure_quantum-3.1.1.dev2}/azure/quantum/workspace.py +0 -0
- {azure_quantum-3.1.1.dev0 → azure_quantum-3.1.1.dev2}/azure_quantum.egg-info/dependency_links.txt +0 -0
- {azure_quantum-3.1.1.dev0 → azure_quantum-3.1.1.dev2}/azure_quantum.egg-info/top_level.txt +0 -0
- {azure_quantum-3.1.1.dev0 → azure_quantum-3.1.1.dev2}/requirements-cirq.txt +0 -0
- {azure_quantum-3.1.1.dev0 → azure_quantum-3.1.1.dev2}/requirements-dev.txt +0 -0
- {azure_quantum-3.1.1.dev0 → azure_quantum-3.1.1.dev2}/requirements-pulser.txt +0 -0
- {azure_quantum-3.1.1.dev0 → azure_quantum-3.1.1.dev2}/requirements-qiskit.txt +0 -0
- {azure_quantum-3.1.1.dev0 → azure_quantum-3.1.1.dev2}/requirements-qsharp.txt +0 -0
- {azure_quantum-3.1.1.dev0 → azure_quantum-3.1.1.dev2}/setup.cfg +0 -0
- {azure_quantum-3.1.1.dev0 → azure_quantum-3.1.1.dev2}/setup.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: azure-quantum
|
|
3
|
-
Version: 3.1.1.
|
|
3
|
+
Version: 3.1.1.dev2
|
|
4
4
|
Summary: Python client for Azure Quantum
|
|
5
5
|
Home-page: https://github.com/microsoft/azure-quantum-python
|
|
6
6
|
Author: Microsoft
|
|
@@ -14,7 +14,7 @@ Requires-Dist: azure-core<2.0,>=1.30
|
|
|
14
14
|
Requires-Dist: azure-identity<2.0,>=1.17
|
|
15
15
|
Requires-Dist: azure-storage-blob==12.20
|
|
16
16
|
Requires-Dist: msrest<1.0,>=0.7.1
|
|
17
|
-
Requires-Dist: numpy
|
|
17
|
+
Requires-Dist: numpy>=1.21.0
|
|
18
18
|
Requires-Dist: deprecated<2.0,>=1.2.12
|
|
19
19
|
Requires-Dist: Markdown>=3.4.1
|
|
20
20
|
Requires-Dist: python-markdown-math>=0.8
|
|
@@ -36,7 +36,7 @@ Requires-Dist: python-markdown-math<1.0,>=0.8.0; extra == "qiskit"
|
|
|
36
36
|
Provides-Extra: qsharp
|
|
37
37
|
Requires-Dist: qsharp<2.0,>=1.0.33; extra == "qsharp"
|
|
38
38
|
Provides-Extra: quil
|
|
39
|
-
Requires-Dist: pyquil
|
|
39
|
+
Requires-Dist: pyquil==4.13.1; extra == "quil"
|
|
40
40
|
Provides-Extra: all
|
|
41
41
|
Requires-Dist: cirq-core<=1.4.1,>=1.3.0; extra == "all"
|
|
42
42
|
Requires-Dist: cirq-ionq<=1.4.1,>=1.3.0; extra == "all"
|
|
@@ -50,7 +50,7 @@ Requires-Dist: pyqir<0.11,>=0.10.6; extra == "all"
|
|
|
50
50
|
Requires-Dist: Markdown<4.0,>=3.4.1; extra == "all"
|
|
51
51
|
Requires-Dist: python-markdown-math<1.0,>=0.8.0; extra == "all"
|
|
52
52
|
Requires-Dist: qsharp<2.0,>=1.0.33; extra == "all"
|
|
53
|
-
Requires-Dist: pyquil
|
|
53
|
+
Requires-Dist: pyquil==4.13.1; extra == "all"
|
|
54
54
|
|
|
55
55
|

|
|
56
56
|
|
{azure_quantum-3.1.1.dev0 → azure_quantum-3.1.1.dev2}/azure/quantum/cirq/targets/quantinuum.py
RENAMED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
# Copyright (c) Microsoft Corporation.
|
|
3
3
|
# Licensed under the MIT License.
|
|
4
4
|
##
|
|
5
|
+
import json
|
|
5
6
|
import numpy as np
|
|
6
7
|
|
|
7
8
|
from typing import TYPE_CHECKING, Any, Dict, Sequence
|
|
@@ -97,7 +98,7 @@ class QuantinuumTarget(Quantinuum, CirqTarget):
|
|
|
97
98
|
metadata = {
|
|
98
99
|
"qubits": len(program.all_qubits()),
|
|
99
100
|
"repetitions": repetitions,
|
|
100
|
-
"measurement_dict": self._measurement_dict(program)
|
|
101
|
+
"measurement_dict": json.dumps(self._measurement_dict(program))
|
|
101
102
|
}
|
|
102
103
|
# Override metadata with value from kwargs
|
|
103
104
|
metadata.update(kwargs.get("metadata", {}))
|
|
@@ -59,7 +59,14 @@ class BaseJob(WorkspaceItem):
|
|
|
59
59
|
@property
|
|
60
60
|
def container_name(self):
|
|
61
61
|
"""Job input/output data container name"""
|
|
62
|
-
|
|
62
|
+
|
|
63
|
+
if self._details.container_uri is None:
|
|
64
|
+
return f"job-{self.id}"
|
|
65
|
+
else:
|
|
66
|
+
container_uri = self._details.container_uri
|
|
67
|
+
path = urlparse(container_uri).path
|
|
68
|
+
container_name = path.split("/")[1]
|
|
69
|
+
return container_name
|
|
63
70
|
|
|
64
71
|
@classmethod
|
|
65
72
|
def from_input_data(
|
|
@@ -323,7 +330,10 @@ class BaseJob(WorkspaceItem):
|
|
|
323
330
|
|
|
324
331
|
# Use Job's default container if not specified
|
|
325
332
|
if container_uri is None:
|
|
326
|
-
|
|
333
|
+
if self._details.container_uri is None:
|
|
334
|
+
container_uri = self.workspace.get_container_uri(job_id=self.id)
|
|
335
|
+
else:
|
|
336
|
+
container_uri = self._details.container_uri
|
|
327
337
|
|
|
328
338
|
uploaded_blob_uri = self.upload_input_data(
|
|
329
339
|
container_uri = container_uri,
|
|
@@ -353,7 +363,10 @@ class BaseJob(WorkspaceItem):
|
|
|
353
363
|
|
|
354
364
|
# Use Job's default container if not specified
|
|
355
365
|
if container_uri is None:
|
|
356
|
-
|
|
366
|
+
if self._details.container_uri is None:
|
|
367
|
+
container_uri = self.workspace.get_container_uri(job_id=self.id)
|
|
368
|
+
else:
|
|
369
|
+
container_uri = self._details.container_uri
|
|
357
370
|
|
|
358
371
|
container_client = ContainerClient.from_container_url(container_uri)
|
|
359
372
|
blob_client = container_client.get_blob_client(name)
|
|
@@ -27,6 +27,8 @@ from qiskit_ionq.helpers import (
|
|
|
27
27
|
if TYPE_CHECKING:
|
|
28
28
|
from azure.quantum.qiskit import AzureQuantumProvider
|
|
29
29
|
|
|
30
|
+
import json
|
|
31
|
+
|
|
30
32
|
import logging
|
|
31
33
|
|
|
32
34
|
logger = logging.getLogger(__name__)
|
|
@@ -244,7 +246,7 @@ class IonQBackend(AzureBackend):
|
|
|
244
246
|
_, _, meas_map = qiskit_circ_to_ionq_circ(circuit, gateset=self.gateset())
|
|
245
247
|
|
|
246
248
|
metadata = super()._prepare_job_metadata(circuit, **kwargs)
|
|
247
|
-
metadata["meas_map"] = meas_map
|
|
249
|
+
metadata["meas_map"] = json.dumps(meas_map)
|
|
248
250
|
|
|
249
251
|
return metadata
|
|
250
252
|
|
|
@@ -240,10 +240,6 @@ class MicrosoftElementsDft(Target):
|
|
|
240
240
|
# Check Model params
|
|
241
241
|
self._check_dict_for_required_keys(input_params['model'], 'input_params["model"]', ['method', 'basis'])
|
|
242
242
|
|
|
243
|
-
supported_drivers = ['energy', 'gradient', 'hessian', 'go', 'bomd']
|
|
244
|
-
if input_params['driver'] not in supported_drivers:
|
|
245
|
-
raise ValueError(f"Driver ({input_params['driver']}) is not supported. Please use one of {supported_drivers}.")
|
|
246
|
-
|
|
247
243
|
|
|
248
244
|
@classmethod
|
|
249
245
|
def _check_dict_for_required_keys(self, input_params: dict, dict_name: str, required_keys: list[str]):
|
|
@@ -317,4 +313,4 @@ class MicrosoftElementsDft(Target):
|
|
|
317
313
|
return {
|
|
318
314
|
"description": "This files contains the mapping between the xyz file name that were submitted and the qcschema blobs that are used for the calculation.",
|
|
319
315
|
"tableOfContents": toc,
|
|
320
|
-
}
|
|
316
|
+
}
|
|
@@ -84,7 +84,7 @@ class Target(abc.ABC, SessionHost):
|
|
|
84
84
|
:type output_data_format: str
|
|
85
85
|
:param capability: QIR capability. Deprecated, use `target_profile`
|
|
86
86
|
:type capability: str
|
|
87
|
-
:param provider_id: Id of provider
|
|
87
|
+
:param provider_id: Id of provider
|
|
88
88
|
:type provider_id: str
|
|
89
89
|
:param content_type: "Content-Type" attribute value to set on input blob (ex. "application/json")
|
|
90
90
|
:type content_type: azure.quantum.job.ContentType
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: azure-quantum
|
|
3
|
-
Version: 3.1.1.
|
|
3
|
+
Version: 3.1.1.dev2
|
|
4
4
|
Summary: Python client for Azure Quantum
|
|
5
5
|
Home-page: https://github.com/microsoft/azure-quantum-python
|
|
6
6
|
Author: Microsoft
|
|
@@ -14,7 +14,7 @@ Requires-Dist: azure-core<2.0,>=1.30
|
|
|
14
14
|
Requires-Dist: azure-identity<2.0,>=1.17
|
|
15
15
|
Requires-Dist: azure-storage-blob==12.20
|
|
16
16
|
Requires-Dist: msrest<1.0,>=0.7.1
|
|
17
|
-
Requires-Dist: numpy
|
|
17
|
+
Requires-Dist: numpy>=1.21.0
|
|
18
18
|
Requires-Dist: deprecated<2.0,>=1.2.12
|
|
19
19
|
Requires-Dist: Markdown>=3.4.1
|
|
20
20
|
Requires-Dist: python-markdown-math>=0.8
|
|
@@ -36,7 +36,7 @@ Requires-Dist: python-markdown-math<1.0,>=0.8.0; extra == "qiskit"
|
|
|
36
36
|
Provides-Extra: qsharp
|
|
37
37
|
Requires-Dist: qsharp<2.0,>=1.0.33; extra == "qsharp"
|
|
38
38
|
Provides-Extra: quil
|
|
39
|
-
Requires-Dist: pyquil
|
|
39
|
+
Requires-Dist: pyquil==4.13.1; extra == "quil"
|
|
40
40
|
Provides-Extra: all
|
|
41
41
|
Requires-Dist: cirq-core<=1.4.1,>=1.3.0; extra == "all"
|
|
42
42
|
Requires-Dist: cirq-ionq<=1.4.1,>=1.3.0; extra == "all"
|
|
@@ -50,7 +50,7 @@ Requires-Dist: pyqir<0.11,>=0.10.6; extra == "all"
|
|
|
50
50
|
Requires-Dist: Markdown<4.0,>=3.4.1; extra == "all"
|
|
51
51
|
Requires-Dist: python-markdown-math<1.0,>=0.8.0; extra == "all"
|
|
52
52
|
Requires-Dist: qsharp<2.0,>=1.0.33; extra == "all"
|
|
53
|
-
Requires-Dist: pyquil
|
|
53
|
+
Requires-Dist: pyquil==4.13.1; extra == "all"
|
|
54
54
|
|
|
55
55
|

|
|
56
56
|
|
|
@@ -33,7 +33,6 @@ azure/quantum/_client/operations/_operations.py
|
|
|
33
33
|
azure/quantum/_client/operations/_patch.py
|
|
34
34
|
azure/quantum/argument_types/__init__.py
|
|
35
35
|
azure/quantum/argument_types/types.py
|
|
36
|
-
azure/quantum/chemistry/__init__.py
|
|
37
36
|
azure/quantum/cirq/__init__.py
|
|
38
37
|
azure/quantum/cirq/job.py
|
|
39
38
|
azure/quantum/cirq/service.py
|
|
@@ -64,7 +63,6 @@ azure/quantum/target/params.py
|
|
|
64
63
|
azure/quantum/target/quantinuum.py
|
|
65
64
|
azure/quantum/target/target.py
|
|
66
65
|
azure/quantum/target/target_factory.py
|
|
67
|
-
azure/quantum/target/microsoft/target.py
|
|
68
66
|
azure/quantum/target/microsoft/elements/__init__.py
|
|
69
67
|
azure/quantum/target/microsoft/elements/dft/__init__.py
|
|
70
68
|
azure/quantum/target/microsoft/elements/dft/job.py
|
|
@@ -2,7 +2,7 @@ azure-core<2.0,>=1.30
|
|
|
2
2
|
azure-identity<2.0,>=1.17
|
|
3
3
|
azure-storage-blob==12.20
|
|
4
4
|
msrest<1.0,>=0.7.1
|
|
5
|
-
numpy
|
|
5
|
+
numpy>=1.21.0
|
|
6
6
|
deprecated<2.0,>=1.2.12
|
|
7
7
|
Markdown>=3.4.1
|
|
8
8
|
python-markdown-math>=0.8
|
|
@@ -20,7 +20,7 @@ pyqir<0.11,>=0.10.6
|
|
|
20
20
|
Markdown<4.0,>=3.4.1
|
|
21
21
|
python-markdown-math<1.0,>=0.8.0
|
|
22
22
|
qsharp<2.0,>=1.0.33
|
|
23
|
-
pyquil
|
|
23
|
+
pyquil==4.13.1
|
|
24
24
|
|
|
25
25
|
[cirq]
|
|
26
26
|
cirq-core<=1.4.1,>=1.3.0
|
|
@@ -45,4 +45,4 @@ python-markdown-math<1.0,>=0.8.0
|
|
|
45
45
|
qsharp<2.0,>=1.0.33
|
|
46
46
|
|
|
47
47
|
[quil]
|
|
48
|
-
pyquil
|
|
48
|
+
pyquil==4.13.1
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
# TODO: Locking PyQuil version to 4.13.1 to unblock CI as later versions require Rust toolchain to be installed
|
|
2
|
+
pyquil==4.13.1
|
|
2
3
|
# pyquil-for-azure-quantum 0.0.2 is requiring that azure-quantum <0.26.0
|
|
3
4
|
# See issue https://github.com/microsoft/qdk-python/issues/422
|
|
4
5
|
# After pyquil-for-azure-quantum 0.0.3 is published we can
|
|
@@ -4,7 +4,7 @@ azure-identity>=1.17,<2.0
|
|
|
4
4
|
# More than one match for "https://mystorage.blob.core.windows.net/.../rawOutputData"
|
|
5
5
|
azure-storage-blob==12.20
|
|
6
6
|
msrest>=0.7.1,<1.0
|
|
7
|
-
numpy>=1.21.0
|
|
7
|
+
numpy>=1.21.0
|
|
8
8
|
deprecated>=1.2.12,<2.0
|
|
9
9
|
Markdown>=3.4.1
|
|
10
10
|
python-markdown-math>=0.8
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
##
|
|
2
|
-
# Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
-
# Licensed under the MIT License.
|
|
4
|
-
##
|
|
5
|
-
|
|
6
|
-
from urllib.request import urlopen
|
|
7
|
-
|
|
8
|
-
def df_chemistry() -> bytes:
|
|
9
|
-
"""
|
|
10
|
-
Returns bitcode of a QIR program for the double-factorized chemistry
|
|
11
|
-
quantum algorithm.
|
|
12
|
-
"""
|
|
13
|
-
return urlopen("https://aka.ms/RE/df_chemistry").read()
|
|
@@ -1,142 +0,0 @@
|
|
|
1
|
-
##
|
|
2
|
-
# Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
-
# Licensed under the MIT License.
|
|
4
|
-
##
|
|
5
|
-
import re
|
|
6
|
-
import warnings
|
|
7
|
-
from dataclasses import dataclass, field
|
|
8
|
-
from typing import Any, Dict, Optional, Type, Union, List
|
|
9
|
-
|
|
10
|
-
from ...job import Job
|
|
11
|
-
from ...job.base_job import ContentType
|
|
12
|
-
from ...workspace import Workspace
|
|
13
|
-
from ..params import InputParams, InputParamsItem, AutoValidatingParams, \
|
|
14
|
-
validating_field
|
|
15
|
-
from ..target import Target
|
|
16
|
-
|
|
17
|
-
def _check_error_rate(name, value):
|
|
18
|
-
if value <= 0.0 or value >= 1.0:
|
|
19
|
-
raise ValueError(f"{name} must be between 0 and 1")
|
|
20
|
-
|
|
21
|
-
def _check_error_rate_or_process_and_readout(name, value):
|
|
22
|
-
if value is None:
|
|
23
|
-
return
|
|
24
|
-
|
|
25
|
-
if isinstance(value, float):
|
|
26
|
-
_check_error_rate(name, value)
|
|
27
|
-
return
|
|
28
|
-
|
|
29
|
-
if not isinstance(value, MeasurementErrorRate):
|
|
30
|
-
raise ValueError(f"{name} must be either a float or "
|
|
31
|
-
"MeasurementErrorRate with two fields: 'process' and 'readout'")
|
|
32
|
-
|
|
33
|
-
def check_time(name, value):
|
|
34
|
-
pat = r"^(\+?[0-9]*\.?[0-9]+([eE][-+]?[0-9]+)?)\s*(s|ms|μs|µs|us|ns)$"
|
|
35
|
-
if re.match(pat, value) is None:
|
|
36
|
-
raise ValueError(f"{name} is not a valid time string; use a "
|
|
37
|
-
"suffix s, ms, us, or ns")
|
|
38
|
-
|
|
39
|
-
@dataclass
|
|
40
|
-
class MeasurementErrorRate(AutoValidatingParams):
|
|
41
|
-
process: float = field(metadata={"validate": _check_error_rate})
|
|
42
|
-
readout: float = field(metadata={"validate": _check_error_rate})
|
|
43
|
-
|
|
44
|
-
@dataclass
|
|
45
|
-
class ProtocolSpecificDistillationUnitSpecification(AutoValidatingParams):
|
|
46
|
-
num_unit_qubits: Optional[int] = None
|
|
47
|
-
duration_in_qubit_cycle_time: Optional[int] = None
|
|
48
|
-
|
|
49
|
-
def post_validation(self, result):
|
|
50
|
-
if self.num_unit_qubits is None:
|
|
51
|
-
raise LookupError("num_unit_qubits must be set")
|
|
52
|
-
|
|
53
|
-
if self.duration_in_qubit_cycle_time is None:
|
|
54
|
-
raise LookupError("duration_in_qubit_cycle_time must be set")
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
@dataclass
|
|
58
|
-
class DistillationUnitSpecification(AutoValidatingParams):
|
|
59
|
-
name: Optional[str] = None
|
|
60
|
-
display_name: Optional[str] = None
|
|
61
|
-
num_input_ts: Optional[int] = None
|
|
62
|
-
num_output_ts: Optional[int] = None
|
|
63
|
-
failure_probability_formula: Optional[str] = None
|
|
64
|
-
output_error_rate_formula: Optional[str] = None
|
|
65
|
-
physical_qubit_specification: Optional[ProtocolSpecificDistillationUnitSpecification] = None
|
|
66
|
-
logical_qubit_specification: Optional[ProtocolSpecificDistillationUnitSpecification] = None
|
|
67
|
-
logical_qubit_specification_first_round_override: \
|
|
68
|
-
Optional[ProtocolSpecificDistillationUnitSpecification] = None
|
|
69
|
-
|
|
70
|
-
def has_custom_specification(self):
|
|
71
|
-
return \
|
|
72
|
-
self.display_name is not None \
|
|
73
|
-
or self.num_input_ts is not None \
|
|
74
|
-
or self.num_output_ts is not None \
|
|
75
|
-
or self.failure_probability_formula is not None \
|
|
76
|
-
or self.output_error_rate_formula is not None \
|
|
77
|
-
or self.physical_qubit_specification is not None \
|
|
78
|
-
or self.logical_qubit_specification is not None \
|
|
79
|
-
or self.logical_qubit_specification_first_round_override is not None
|
|
80
|
-
|
|
81
|
-
def has_predefined_name(self):
|
|
82
|
-
return self.name is not None
|
|
83
|
-
|
|
84
|
-
def post_validation(self, result):
|
|
85
|
-
if not self.has_custom_specification() and not self.has_predefined_name():
|
|
86
|
-
raise LookupError("name must be set or custom specification must be provided")
|
|
87
|
-
|
|
88
|
-
if self.has_custom_specification() and self.has_predefined_name():
|
|
89
|
-
raise LookupError("If predefined name is provided, "
|
|
90
|
-
"custom specification is not allowed. "
|
|
91
|
-
"Either remove name or remove all other "
|
|
92
|
-
"specification of the distillation unit")
|
|
93
|
-
|
|
94
|
-
if self.has_predefined_name():
|
|
95
|
-
return # all other validation is on the server side
|
|
96
|
-
|
|
97
|
-
if self.num_input_ts is None:
|
|
98
|
-
raise LookupError("num_input_ts must be set")
|
|
99
|
-
|
|
100
|
-
if self.num_output_ts is None:
|
|
101
|
-
raise LookupError("num_output_ts must be set")
|
|
102
|
-
|
|
103
|
-
if self.failure_probability_formula is None:
|
|
104
|
-
raise LookupError("failure_probability_formula must be set")
|
|
105
|
-
|
|
106
|
-
if self.output_error_rate_formula is None:
|
|
107
|
-
raise LookupError("output_error_rate_formula must be set")
|
|
108
|
-
|
|
109
|
-
if self.physical_qubit_specification is not None:
|
|
110
|
-
self.physical_qubit_specification.post_validation(result)
|
|
111
|
-
|
|
112
|
-
if self.logical_qubit_specification is not None:
|
|
113
|
-
self.logical_qubit_specification.post_validation(result)
|
|
114
|
-
|
|
115
|
-
if self.logical_qubit_specification_first_round_override is not None:
|
|
116
|
-
self.logical_qubit_specification_first_round_override.post_validation(result)
|
|
117
|
-
|
|
118
|
-
def as_dict(self, validate=True) -> Dict[str, Any]:
|
|
119
|
-
specification_dict = super().as_dict(validate)
|
|
120
|
-
if len(specification_dict) != 0:
|
|
121
|
-
if self.physical_qubit_specification is not None:
|
|
122
|
-
physical_qubit_specification_dict = \
|
|
123
|
-
self.physical_qubit_specification.as_dict(validate)
|
|
124
|
-
if len(physical_qubit_specification_dict) != 0:
|
|
125
|
-
specification_dict["physicalQubitSpecification"] = \
|
|
126
|
-
physical_qubit_specification_dict
|
|
127
|
-
|
|
128
|
-
if self.logical_qubit_specification is not None:
|
|
129
|
-
logical_qubit_specification_dict = \
|
|
130
|
-
self.logical_qubit_specification.as_dict(validate)
|
|
131
|
-
if len(logical_qubit_specification_dict) != 0:
|
|
132
|
-
specification_dict["logicalQubitSpecification"] = \
|
|
133
|
-
logical_qubit_specification_dict
|
|
134
|
-
|
|
135
|
-
if self.logical_qubit_specification_first_round_override is not None:
|
|
136
|
-
logical_qubit_specification_first_round_override_dict = \
|
|
137
|
-
self.logical_qubit_specification_first_round_override.as_dict(validate)
|
|
138
|
-
if len(logical_qubit_specification_first_round_override_dict) != 0:
|
|
139
|
-
specification_dict["logicalQubitSpecificationFirstRoundOverride"] = \
|
|
140
|
-
logical_qubit_specification_first_round_override_dict
|
|
141
|
-
|
|
142
|
-
return specification_dict
|
|
File without changes
|
|
File without changes
|
{azure_quantum-3.1.1.dev0 → azure_quantum-3.1.1.dev2}/azure/quantum/_authentication/__init__.py
RENAMED
|
File without changes
|
{azure_quantum-3.1.1.dev0 → azure_quantum-3.1.1.dev2}/azure/quantum/_authentication/_chained.py
RENAMED
|
File without changes
|
{azure_quantum-3.1.1.dev0 → azure_quantum-3.1.1.dev2}/azure/quantum/_authentication/_default.py
RENAMED
|
File without changes
|
{azure_quantum-3.1.1.dev0 → azure_quantum-3.1.1.dev2}/azure/quantum/_authentication/_token.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{azure_quantum-3.1.1.dev0 → azure_quantum-3.1.1.dev2}/azure/quantum/_client/_configuration.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{azure_quantum-3.1.1.dev0 → azure_quantum-3.1.1.dev2}/azure/quantum/_client/_serialization.py
RENAMED
|
File without changes
|
{azure_quantum-3.1.1.dev0 → azure_quantum-3.1.1.dev2}/azure/quantum/_client/models/__init__.py
RENAMED
|
File without changes
|
{azure_quantum-3.1.1.dev0 → azure_quantum-3.1.1.dev2}/azure/quantum/_client/models/_enums.py
RENAMED
|
File without changes
|
{azure_quantum-3.1.1.dev0 → azure_quantum-3.1.1.dev2}/azure/quantum/_client/models/_models.py
RENAMED
|
File without changes
|
{azure_quantum-3.1.1.dev0 → azure_quantum-3.1.1.dev2}/azure/quantum/_client/models/_patch.py
RENAMED
|
File without changes
|
{azure_quantum-3.1.1.dev0 → azure_quantum-3.1.1.dev2}/azure/quantum/_client/operations/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{azure_quantum-3.1.1.dev0 → azure_quantum-3.1.1.dev2}/azure/quantum/_client/operations/_patch.py
RENAMED
|
File without changes
|
|
File without changes
|
{azure_quantum-3.1.1.dev0 → azure_quantum-3.1.1.dev2}/azure/quantum/_workspace_connection_params.py
RENAMED
|
File without changes
|
{azure_quantum-3.1.1.dev0 → azure_quantum-3.1.1.dev2}/azure/quantum/argument_types/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{azure_quantum-3.1.1.dev0 → azure_quantum-3.1.1.dev2}/azure/quantum/cirq/targets/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{azure_quantum-3.1.1.dev0 → azure_quantum-3.1.1.dev2}/azure/quantum/job/workspace_item_factory.py
RENAMED
|
File without changes
|
|
File without changes
|
{azure_quantum-3.1.1.dev0 → azure_quantum-3.1.1.dev2}/azure/quantum/qiskit/backends/__init__.py
RENAMED
|
File without changes
|
{azure_quantum-3.1.1.dev0 → azure_quantum-3.1.1.dev2}/azure/quantum/qiskit/backends/backend.py
RENAMED
|
File without changes
|
|
File without changes
|
{azure_quantum-3.1.1.dev0 → azure_quantum-3.1.1.dev2}/azure/quantum/qiskit/backends/quantinuum.py
RENAMED
|
File without changes
|
{azure_quantum-3.1.1.dev0 → azure_quantum-3.1.1.dev2}/azure/quantum/qiskit/backends/rigetti.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{azure_quantum-3.1.1.dev0 → azure_quantum-3.1.1.dev2}/azure/quantum/target/pasqal/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{azure_quantum-3.1.1.dev0 → azure_quantum-3.1.1.dev2}/azure/quantum/target/rigetti/__init__.py
RENAMED
|
File without changes
|
{azure_quantum-3.1.1.dev0 → azure_quantum-3.1.1.dev2}/azure/quantum/target/rigetti/result.py
RENAMED
|
File without changes
|
{azure_quantum-3.1.1.dev0 → azure_quantum-3.1.1.dev2}/azure/quantum/target/rigetti/target.py
RENAMED
|
File without changes
|
{azure_quantum-3.1.1.dev0 → azure_quantum-3.1.1.dev2}/azure/quantum/target/target_factory.py
RENAMED
|
File without changes
|
|
File without changes
|
{azure_quantum-3.1.1.dev0 → azure_quantum-3.1.1.dev2}/azure_quantum.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|