Skip to content

Extension of PauliStrings to handle hilbert, matmul, and multiplication with constant scalar

Vicentini Filippo requested to merge github/fork/jwnys/betterpauli into master

Created by: jwnys

This commit does the following:

  • allow PauliStrings to get a hilbert kwarg --> default=None gets you the standard Qubit
  • it works with local_state instead of hard-coded "1" state in get_conn
  • matmul is possible (e.g. PS("X")@PS("Y"))
  • multiplication with scalar is possible (e.g. PS("X",1)*2
  • adding PauliStrings is possible (e.g. PS("X")@PS("Y") -> PS(["X","Y"])
  • it adds some tests for each functionality The bottom code contains a bunch of code to help with matmul (jitting the inner code a bit)

Merge request reports