Skip to content

Better API for two qubit pauli channel #467

@johnzl-777

Description

@johnzl-777

@david-pl commented on this in #462 but I remember having a similar train of thought from #211. This isn't a blocker for anything but could make for better UX.

Right now you have to pass in a somewhat cumbersome and fragile list of floats to indicate the probability of each pauli pair being applied. The only way to know which float corresponds with which pair is to look at the documentation.

I like @david-pl 's idea of allowing a dictionary where each pauli pair representation (a string I imagine) goes to a float. So something like

params = {"IX": 0.1, "IY":0.2, ...}
squin.channel.two_qubit_pauli_channel(params, ...)

As an aside I originally was thinking of fixed, named arguments which is alright for single qubit pauli errors but I don't think would be great for 2 or beyond 😅

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestpriority: lowlow priority tasks, backlogs, good-to-havessquinsquin related issues

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions