Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix batch execute single tape #22

Merged
merged 15 commits into from
Mar 10, 2022
Merged

Conversation

antalszava
Copy link
Contributor

@antalszava antalszava commented Dec 6, 2021

Changes

  • Changes the batch_execute method to support executing single tapes as per
    PennyLane v0.20.0 where batch execution is the default for a QNode.

Also, fixes issues that came from updates in PennyLane and in the Z-Quantum libraries:

  • Fixed an import to use from zquantum.core import circuits;
  • Pulls the import_from_qiskit function from qeqiskit.conversions;
  • Updates the logic to pass the n_samples to the methods being used from z-quantum-core rather than using it while creating a backend (create_object);
  • Updates to using the new qml.matrix top-level function.

Also added Python 3.9 and Python 3.10 runners.

CHANGELOG.md Outdated Show resolved Hide resolved
@codecov
Copy link

codecov bot commented Dec 6, 2021

Codecov Report

Merging #22 (be6db48) into main (93d93c5) will decrease coverage by 1.55%.
The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff             @@
##              main      #22      +/-   ##
===========================================
- Coverage   100.00%   98.44%   -1.56%     
===========================================
  Files           10       12       +2     
  Lines          427      580     +153     
===========================================
+ Hits           427      571     +144     
- Misses           0        9       +9     
Impacted Files Coverage Δ
pennylane_orquestra/orquestra_device.py 100.00% <100.00%> (ø)
steps/expval.py 100.00% <100.00%> (ø)
steps/test_expval.py 91.42% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 93d93c5...be6db48. Read the comment docs.

@antalszava
Copy link
Contributor Author

Not sure about the covearge drop: running make coverage-steps locally yields:

----------- coverage: platform linux, python 3.8.5-final-0 -----------
Name                   Stmts   Miss  Cover   Missing
----------------------------------------------------
steps/expval.py           46      0   100%
steps/test_expval.py     105      9    91%   211-212, 221-233
----------------------------------------------------
TOTAL                    151      9    94%
Coverage HTML written to dir coverage_html_report

(Note the test file is included for some reason.)

@antalszava antalszava merged commit 4f289aa into main Mar 10, 2022
@antalszava antalszava deleted the fix_batch_execute_single_tape branch March 10, 2022 21:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants