-
Notifications
You must be signed in to change notification settings - Fork 0
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
Channels #27
Comments
In principle, the noise parameters have a different role than other variational parameters, since it is not something the user controls. So, after all, they might not be that different from regular variational parameters on the platforms where they are available. Otherwise, they will simply not be available, and that is up to the backend. |
Extending this question beyond |
That feature I was treating as high-level interface: every parameter is a trainable parameter, if you can change it. What we can do for the interface is applying a mask for parameters that can not be mutated. But we'll also have to do more than that, since we're changing layout in |
Then maybe we can follow the same approach for channels. That should be fine, as long as all the parameters in question are floats.
I think |
Yeah regarding the noise parameters I totally support treating them as Variational parameters of the circuit, as this can indeed be very useful in qml related scenarios I believe as @alecandido mentioned. About the shape and type, instead, I think it might be helpful in some cases to have them as arrays of the used backend directly, either the global one or user specified. For the shape, I support having them flattened and with the batched execution in mind as a two dimensional tensor ideally, but this is probably a little bit premature to think about... |
I’m kinda out of the loop, but can I ask what you guys mean by flattened
channels?
…On Sat, 15 Jun 2024 at 16:27, BrunoLiegiBastonLiegi < ***@***.***> wrote:
Yeah regarding the noise parameters I totally support treating them as
Variational parameters of the circuit, as this can indeed be very useful in
qml related scenarios I believe as @alecandido
<https://github.com/alecandido> mentioned. About the shape and type,
instead, I think it might be helpful in some cases to have them as arrays
of the used backend directly, either the global one or user specified. For
the shape, I support having them flattened and with the batched execution
in mind as a two dimensional tensor ideally, but this is probably a little
bit premature to think about...
—
Reply to this email directly, view it on GitHub
<#27 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABH5QVR2MDHDNMIKX6T4S4TZHQXKFAVCNFSM6AAAAABJH5RUK6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNRZGQ3DQNJSGI>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Hi @renatomello, I guess flattened channels are just the result of a misunderstanding. Then, we are deciding which is the most convenient way to represent the parameters of the channels, and the proposal was to treat them as any other parameter of the other gates. |
@BrunoLiegiBastonLiegi the shape is always represented by all frameworks as metadata, so it should not affect the memory layout (that will always be flattened, since the memory model is 1D in any case). In practice, I'd even propose to more or less bypass |
In the Kraus representation, we can represent channels as a list of
(coefficient, gate)
pairs.This means that we can mostly represent a channel as a series of gates in the queue, and the corresponding coefficients in the parameters list (+ composing gates' own parameters), as per #22 (comment).
However, we will need some extra to mark the span of a channel (which gates are composing a certain channel). This could be the
BeginChannel
andEndChannel
gates, that would just delimit the channels' gates when added to the queue.The text was updated successfully, but these errors were encountered: