Skip to content

Commit 89fe662

Browse files
author
Vic Putz
committed
automated push from aa6baa4f2efcba1fa250ce1d2b3f987d5251bdda
1 parent 958a4e3 commit 89fe662

File tree

25 files changed

+243
-117
lines changed

25 files changed

+243
-117
lines changed

docs/source/index.rst

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,19 @@ Table of contents
3636

3737
qml/classification
3838

39+
.. toctree::
40+
:maxdepth: 2
41+
:caption: Quantum I/O
42+
43+
qio/qio
44+
45+
.. toctree::
46+
:maxdepth: 2
47+
:caption: Utilities (qdot, distance_estimation)
48+
49+
qutils/qutils
50+
51+
3952
.. toctree::
4053
:maxdepth: 2
4154
:caption: Copyright

docs/source/qutils/qutils.rst

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
Quantum Utilities
2+
=================
3+
4+
As more and more low-level functions migrate to the quantum
5+
space, such as dot products and distance estimation between
6+
vectors, they comprise a category we (so far) simply refer to as
7+
"utility" functions
8+
9+
.. autofunction:: qcware.qutils.qdot
10+
11+
.. autofunction:: qcware.qutils.distance_estimation

qcware/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,12 @@
66
a SaaS product for solving problems with quantum computing.
77
Please see the documentation at http://qcware.readthedocs.io
88
"""
9-
__version__ = '3.0.0'
9+
__version__ = '4.0.0'
1010
import logging
1111
logger = logging.getLogger('qcware')
1212

1313
from . import qio
14+
from . import qutils
1415
from . import circuits
1516
from . import qml
1617
from . import test

qcware/circuits/api/run_backend_method.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
import asyncio
66
from ... import logger
7-
from ...api_calls import post_call, wait_for_call, handle_result, async_retrieve_result
7+
from ...api_calls import post_call, wait_for_call, handle_result, async_post_call, async_retrieve_result
88
from ...util.transforms import client_args_to_wire
99
from ...exceptions import ApiTimeoutError
1010
from ...config import (ApiCallContext, client_timeout,
@@ -87,7 +87,7 @@ async def async_run_backend_method(backend: str, method: str, kwargs: dict):
8787
:rtype: object
8888
"""
8989
data = client_args_to_wire('circuits.run_backend_method', **locals())
90-
api_call = post_call('circuits/run_backend_method', data)
90+
api_call = await async_post_call('circuits/run_backend_method', data)
9191
logger.info(
9292
f'API call to circuits.run_backend_method successful. Your API token is {api_call["uid"]}'
9393
)

qcware/config/api_semver.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
# Project: qcware
33
# Copyright (c) 2019 QC Ware Corp - All Rights Reserved
44

5-
api_semver = '5.0.0'
5+
api_semver = '6.0.0'

qcware/optimization/api/brute_force_minimize.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
import asyncio
1010
from ... import logger
11-
from ...api_calls import post_call, wait_for_call, handle_result, async_retrieve_result
11+
from ...api_calls import post_call, wait_for_call, handle_result, async_post_call, async_retrieve_result
1212
from ...util.transforms import client_args_to_wire
1313
from ...exceptions import ApiTimeoutError
1414
from ...config import (ApiCallContext, client_timeout,
@@ -99,7 +99,7 @@ async def async_brute_force_minimize(
9999
:rtype: types.BruteOptimizeResult
100100
"""
101101
data = client_args_to_wire('optimization.brute_force_minimize', **locals())
102-
api_call = post_call('optimization/brute_force_minimize', data)
102+
api_call = await async_post_call('optimization/brute_force_minimize', data)
103103
logger.info(
104104
f'API call to optimization.brute_force_minimize successful. Your API token is {api_call["uid"]}'
105105
)

qcware/optimization/api/find_optimal_qaoa_angles.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
import asyncio
66
from ... import logger
7-
from ...api_calls import post_call, wait_for_call, handle_result, async_retrieve_result
7+
from ...api_calls import post_call, wait_for_call, handle_result, async_post_call, async_retrieve_result
88
from ...util.transforms import client_args_to_wire
99
from ...exceptions import ApiTimeoutError
1010
from ...config import (ApiCallContext, client_timeout,
@@ -142,7 +142,8 @@ async def async_find_optimal_qaoa_angles(Q: dict = {},
142142
"""
143143
data = client_args_to_wire('optimization.find_optimal_qaoa_angles',
144144
**locals())
145-
api_call = post_call('optimization/find_optimal_qaoa_angles', data)
145+
api_call = await async_post_call('optimization/find_optimal_qaoa_angles',
146+
data)
146147
logger.info(
147148
f'API call to optimization.find_optimal_qaoa_angles successful. Your API token is {api_call["uid"]}'
148149
)

qcware/optimization/api/solve_binary.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
import asyncio
66
from ... import logger
7-
from ...api_calls import post_call, async_post_call, wait_for_call, handle_result, async_retrieve_result
7+
from ...api_calls import post_call, wait_for_call, handle_result, async_post_call, async_retrieve_result
88
from ...util.transforms import client_args_to_wire
99
from ...exceptions import ApiTimeoutError
1010
from ...config import (ApiCallContext, client_timeout,

qcware/qio/api/__init__.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,3 @@
33
# Copyright (c) 2019 QC Ware Corp - All Rights Reserved
44

55
from .loader import loader, submit_loader, async_loader
6-
7-
from .qdot import qdot, submit_qdot, async_qdot
8-
9-
from .distance_estimation import distance_estimation, submit_distance_estimation, async_distance_estimation

qcware/qio/api/loader.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
import asyncio
88
from ... import logger
9-
from ...api_calls import post_call, wait_for_call, handle_result, async_retrieve_result
9+
from ...api_calls import post_call, wait_for_call, handle_result, async_post_call, async_retrieve_result
1010
from ...util.transforms import client_args_to_wire
1111
from ...exceptions import ApiTimeoutError
1212
from ...config import (ApiCallContext, client_timeout,
@@ -94,7 +94,7 @@ async def async_loader(data: numpy.ndarray,
9494
:rtype: quasar.Circuit
9595
"""
9696
data = client_args_to_wire('qio.loader', **locals())
97-
api_call = post_call('qio/loader', data)
97+
api_call = await async_post_call('qio/loader', data)
9898
logger.info(
9999
f'API call to qio.loader successful. Your API token is {api_call["uid"]}'
100100
)

0 commit comments

Comments
 (0)