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

Add StatePrep support #146

Merged
merged 14 commits into from
Aug 22, 2023
Merged

Add StatePrep support #146

merged 14 commits into from
Aug 22, 2023

Conversation

albi3ro
Copy link
Contributor

@albi3ro albi3ro commented Aug 21, 2023

The CI was experiencing some failures: https://github.com/PennyLaneAI/plugin-test-matrix/actions/runs/5930704451/job/16080993219?pr=46

but updating to natively support StatePrep as well as QubitStateVector seems to fix the problem.

@albi3ro albi3ro requested a review from Jaybsoni August 21, 2023 20:36
@albi3ro albi3ro requested a review from a team August 22, 2023 13:32
CHANGELOG.md Outdated Show resolved Hide resolved
CHANGELOG.md Show resolved Hide resolved
@codecov
Copy link

codecov bot commented Aug 22, 2023

Codecov Report

Merging #146 (9c40425) into master (328e4a8) will increase coverage by 99.14%.
The diff coverage is 100.00%.

@@             Coverage Diff             @@
##           master     #146       +/-   ##
===========================================
+ Coverage    0.00%   99.14%   +99.14%     
===========================================
  Files           8        8               
  Lines         352      352               
===========================================
+ Hits            0      349      +349     
+ Misses        352        3      -349     
Files Changed Coverage Δ
pennylane_cirq/qsim_device.py 96.87% <ø> (+96.87%) ⬆️
pennylane_cirq/simulator_device.py 100.00% <ø> (+100.00%) ⬆️
pennylane_cirq/cirq_device.py 98.96% <100.00%> (+98.96%) ⬆️

... and 5 files with indirect coverage changes

@Jaybsoni
Copy link
Contributor

[sc-43547]

@@ -112,7 +112,7 @@ def test_qubit_state_vector(self, init_state, shots, tol):
state = init_state(1)

with mimic_execution_for_apply(dev):
dev.apply([qml.QubitStateVector(state, wires=[0])])
dev.apply([qml.StatePrep(state, wires=[0])])
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can also rename the test

Copy link
Contributor

@Jaybsoni Jaybsoni left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just left some suggestions feel free to ignore.

tests/test_apply.py Show resolved Hide resolved
tests/test_mixed_simulator_device.py Show resolved Hide resolved
tests/test_mixed_simulator_device.py Show resolved Hide resolved
tests/test_qsimh_device.py Show resolved Hide resolved
tests/test_simulator_device.py Show resolved Hide resolved
tests/test_simulator_device.py Show resolved Hide resolved
@albi3ro albi3ro merged commit f495951 into master Aug 22, 2023
8 checks passed
@albi3ro albi3ro deleted the add-state-prep-support branch August 22, 2023 17:45
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.

4 participants