-
Notifications
You must be signed in to change notification settings - Fork 628
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
Integration into the current PL device ecosys #6684
base: master
Are you sure you want to change the base?
Conversation
Co-authored-by: Andrija Paurevic <[email protected]>
Co-authored-by: Andrija Paurevic <[email protected]>
Co-authored-by: Andrija Paurevic <[email protected]>
Co-authored-by: Andrija Paurevic <[email protected]>
Co-authored-by: Andrija Paurevic <[email protected]>
Co-authored-by: Andrija Paurevic <[email protected]>
…AI/pennylane into add-qubit_mixed/shadow
This reverts commit a776e59c5bb6435bdac71f644db22afc8603bab9.
@mudit2812 fixed with a super nasty hack at 6caf6e1 hope you don't mind 😂 it's a very rare time that I miss those days of writing in Julia |
fixed 3baccc4 |
Now the |
Context:
We finished all the necessary components of the new API interface of
default_mixed
. However, since this is an internal change, which involves many different files and paths, we would like to have one more round of check, success and merge of which should concludes the whole epic.Description of the Change:
keep DefaultMixed, but rename it to DefaultMixedLegacy (note: still the legacy one will be purged before this PR merged into master; it's kept right now due to great help in debug)operations_mixed
back tooperations
, and copy it to DefaultMixedLegacyreadout_error
just aswith arbitrary input error channelsBitFlip
modify all the device tests inDeleted legacy specified device tests. These should be covered in the integration test suite mentioned abovetests/devices
accordingly. Basically thetests/devices/test_default_mixed*.py
if no errors come up, then separate the legacy code into another fileLots of errors, see drawback section for a record along with updates.test_return_types_qnode
default.mixed
dev._state
needs to be removed and may be replaced by equivalent or not. Sol: had a PR to improve this linepip install git+https://github.com/PennyLaneAI/pennylane-qiskit.git@master
)why user warning here? Didn't read like sensible. Should double check.when running on notebook everything is finesome by-the-way improvement:
get_canonical_interface_name
and removed the hardcoded dictionary mimic of enum.qubit_mixed
much more withqubit
moduleBenefits:
Legacy code was preserved for reference purpose as well as catering for potential usersBetter separation between new interface and legacydefault.mixed
is ported directly with our new API.Possible Drawbacks:
default_mixed
might find it annoying for a while. However, we would include a direct indication in changelog as well as the new class.unexpected bug 1:finite-diff
support forPurityMP
on torch, tf, and jax downunexpected bug 2: gradient calculation atPhaseFlip(0)
breaks withnan
returned at initial state |0> (all good for other other channels or other state with PhaseFlip`expected bug 3: classical shadow is down for most of tests. This is due to the fact that the implementation is hidden insideQubitDevice
which was missed out before. Need to be fixed asapThe drop of legacy device might introduce some missing in related code coverage. For visibility, we track them as todos here as well.
ClassicalShadow
related missing: the entireClassicalShadowMP.process()
method;shadow_expval
branch in_qubit_device.py
single_dispatch
andmutliple_dispatch
)scatter
related missing:this is suspicious since it might imply that some functinoalities were lost.nothing has been lost. The legacy code that usescatter
was for initializing states in a bruteforce way, which is not needed anymore.Related GitHub Issues:
[sc-73324]