Closed soranjh closed 3 months ago
👋 Hey, looks like you've updated some demos!
🐘 Don't forget to update the dateOfLastModification
in the associated metadata files so your changes are reflected in Glass Onion (search and recommendations).
Please hide this comment once the field(s) are updated. Thanks!
Thank you for opening this pull request.
You can find the built site at this link.
Deployment Info:
1080
83a93c54770f0d798356c964062c55f84529fa75
(The Deployment SHA
refers to the latest commit hash the docs were built from)Note: It may take several minutes for updates to this pull request to be reflected on the deployed site.
Looks good @soranjh! Do you want to refactor this demo cause there are some lines
e.g.
wire_order = ancilla_wires + wires_i[::-1] + wires_j[::-1]
M = len(A) * qml.matrix(circuit,wire_order=wire_order)().real[0:len(A),0:len(A)]
in the code that don't work quite the same when using the template instead. With the template, we don't need to set the
wire_order
this way, just needM = len(A) * qml.matrix(circuit)().real[0 : len(A), 0 : len(A)]
There's also code like
wire_map = {control_index : wire for control_index, wire in enumerate(wires_j + wires_i)}
that can be replaced with what's in the templatewire_map = dict(enumerate(wires_j + wires_i))
Not a super big deal and the demo works as is though.
Thanks @austingmhuang, the demo codes are a bit verbose for educational purposes, so no need to change them if they run correctly.
- We could optionally show a circuit using
qml.Fable
and then draw the circuit usingmy_circuit.tape.expand().draw()
to show the decomposed operation
Checked and confirmed locally but adding it here breaks the current nice workflow.
- Just make sure that the link to the Fable template works well once the CI builds
Confirmed with @KetpuntoG that it will work when merged.
Update the demo on block encoding with matrix access oracles to:
qml.FABLE
to the demo.2 x 2
matrices.