Skip to content

Commit

Permalink
Docs fix + tutorials removal from sphinx docs (#162)
Browse files Browse the repository at this point in the history
* Docs: requirements.txt no longer needed. Tutorials removed from generated docs (redundant with Github, issues with latex, looks better on github and will display images once repo is public

Co-authored-by: AlexandreF-1qbit <76115575+AlexandreF-1qbit@users.noreply.github.com>
  • Loading branch information
ValentinS4t1qbit and alexfleury-sb authored Jun 13, 2022
1 parent 3cf058a commit 30b31ff
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 201 deletions.
4 changes: 0 additions & 4 deletions dev_tools/build_sphinx_docs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@
# or mock the desired packages in docs/source/conf.py
pip install sphinx sphinx_rtd_theme nbsphinx

# This environment seems to work for building the docs.
# Something fishy otherwise.
pip install -r requirements.txt

# Support for LaTeX
sudo apt-get install -y latexmk texlive-latex-recommended texlive-latex-extra texlive-fonts-recommended pandoc dvipng

Expand Down
188 changes: 0 additions & 188 deletions dev_tools/requirements.txt

This file was deleted.

1 change: 0 additions & 1 deletion docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ Welcome to tangelo's documentation!
:caption: Contents:

README
tutorials
tangelo

Indices and tables
Expand Down
16 changes: 8 additions & 8 deletions tangelo/linq/qpu_connection/qemist_cloud_connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"""

try:
from qemist_client import util
import qemist_client as qclient
except ModuleNotFoundError:
print("qemist_client python package not found (optional dependency for hardware experiment submission)")

Expand All @@ -45,8 +45,8 @@ def job_submit(circuit, n_shots, backend):
job_options = {'shots': n_shots, 'backend': backend}

# Submit the problem
qemist_cloud_job_id = util.solve_quantum_circuits_async(serialized_fragment=circuit_data,
serialized_solver=job_options)[0]
qemist_cloud_job_id = qclient.util.solve_quantum_circuits_async(serialized_fragment=circuit_data,
serialized_solver=job_options)[0]
return qemist_cloud_job_id


Expand All @@ -60,7 +60,7 @@ def job_status(qemist_cloud_job_id):
Returns:
str: current status of the problem, as a string.
"""
res = util.get_problem_status(qemist_cloud_job_id)
res = qclient.util.get_problem_status(qemist_cloud_job_id)

return res

Expand All @@ -75,7 +75,7 @@ def job_cancel(qemist_cloud_job_id):
Returns:
dict: cancelled problems / subproblems.
"""
res = util.cancel_problems(qemist_cloud_job_id)
res = qclient.util.cancel_problems(qemist_cloud_job_id)
# TODO: If res is coming out as an error code, we should raise an error

return res
Expand All @@ -95,7 +95,7 @@ def job_result(qemist_cloud_job_id):
"""

try:
util.monitor_problem_status(problem_handle=qemist_cloud_job_id, verbose=False)
qclient.util.monitor_problem_status(problem_handle=qemist_cloud_job_id, verbose=False)

except KeyboardInterrupt:
print(f"\nYour problem is still running with id {qemist_cloud_job_id}.\n")
Expand All @@ -117,7 +117,7 @@ def job_result(qemist_cloud_job_id):

# Once a result is available, retrieve it.
# If the util module is not found earlier, an error has been raised.
output = util.get_quantum_results(problem_handle=qemist_cloud_job_id)[qemist_cloud_job_id]
output = qclient.util.get_quantum_results(problem_handle=qemist_cloud_job_id)[qemist_cloud_job_id]

# Amazon Braket: parsing of output
freqs = output['result']['results']['measurement_probabilities']
Expand Down Expand Up @@ -155,6 +155,6 @@ def job_estimate(circuit, n_shots, backend=None):
if backend:
job_options['backend'] = backend

price_estimate = util.check_qpu_cost(circuit_data, job_options)
price_estimate = qclient.util.check_qpu_cost(circuit_data, job_options)

return price_estimate

0 comments on commit 30b31ff

Please sign in to comment.