PennyLaneAI / pennylane

PennyLane is a cross-platform Python library for quantum computing, quantum machine learning, and quantum chemistry. Train a quantum computer the same way as a neural network.
https://pennylane.ai
Apache License 2.0
2.17k stars 568 forks source link

Specifying `wire_order` for initial MPS in `default.tensor` #5892

Closed PietropaoloFrisoni closed 10 hours ago

PietropaoloFrisoni commented 1 week ago

Context: When creating an initial MPS from a dense state vector, the order of wires was not preserved since we were not providing the wire_order parameter to state_vector.

Description of the Change: As above.

Benefits: If the MPS is created from a dense state vector, now the order of wires is preserved.

Possible Drawbacks: None that I can think of.

Related GitHub Issues: None.

Related ShortCut Stories: [sc-66787]

codecov[bot] commented 1 week ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Please upload report for BASE (v0.37.0-rc0@689f063). Learn more about missing BASE report.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## v0.37.0-rc0 #5892 +/- ## ============================================== Coverage ? 99.66% ============================================== Files ? 425 Lines ? 40458 Branches ? 0 ============================================== Hits ? 40324 Misses ? 134 Partials ? 0 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.