Support for complex gates? · Issue #7 · cduck/feynman_path · GitHub
Skip to content

Support for complex gates? #7

Open

Description

@gsilviHQS

Hi,
this code is really a great idea, but I was just wondering why there are not R_y gate for example? Is it to avoid having to deal with complex phases?
If there is no intrinsic limit to add those gates I might give it a try and them as well.

Activity

  1. cduck commented on Jul 4, 2022

    @cduck
    Owner

    There is no Ry gate yet because I didn't need it. Please do give a try implementing it though.

    I would make the gate format ry<qubit>,<half_turns> e.g. ry2,0.25 is a pi/4 rotation on q2.

    You'll need to implement perform_ry, similar to perform_h:

    def perform_ry(self, q_i, half_turns, *, pre_latex=f'', name='Ry'):

    Also, this line will need to be changed to detect decimal numbers, not just integers:

  2. gsilviHQS commented on Jul 5, 2022

    @gsilviHQS
    Author

    Alright, I ll give it a try.
    I notice that actually also the simple perform_y is missing. I ll start from that one. If you have suggestions let me know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions