amazon-braket-sdk-python icon indicating copy to clipboard operation
amazon-braket-sdk-python copied to clipboard

Pauli and Clifford groups

Open speller26 opened this issue 2 years ago • 11 comments

The Qiskit quantum_information contains helpful classes for efficiently manipulating quantum information, most notably the Pauli and Clifford groups. The respective Pauli and Clifford classes allow users to quickly compose operators, enabling step-by-step inspection of an evolving quantum state. Furthermore, they can be converted to circuits to run on quantum devices.

The Amazon Braket SDK contains a quantum_information module consisting of a PauliString class; this module can be expanded to fully encompass the Pauli and Clifford groups.

Describe the feature you'd like

  • An implementation of CliffordTableau with, at the very least, multiplication and power operators that scale linearly with qubit count, an adjoint method, and a to_circuit method for converting to a Circuit.
  • Implementing multiplication and power operators and to_circuit on the existing PauliString class.

speller26 avatar May 23 '23 17:05 speller26

If I may, two questions:

  1. Did you mean CliffordString in the quantum_information module? Or would we have to mess around with young tablueax in another module?
  2. Looking at the code, I assume the parlance of PennyLane is used with respect to strings and words [1]?

[1] - https://docs.pennylane.ai/en/stable/code/qml_pauli.html

kvathupo avatar May 27 '23 17:05 kvathupo

@kvathupo

  1. We're referring to the attributes contained in the https://qiskit.org/documentation/stubs/qiskit.quantum_info.Clifford.html class (which includes the tableau).
  2. You are welcome to use the PennyLane parlance of strings and words, but it's not a hard requirement.

JordanAWS avatar May 30 '23 17:05 JordanAWS

@kvathupo Any updates on your progress? Can we provide any support? :)

JordanAWS avatar Jun 05 '23 17:06 JordanAWS

@JordanAWS Thanks for checking in, I just got busy with work! The PauliString methods seem straight-forward:

  • dot(self, other: PauliString, inplace: bool = False) -> PauliString
  • power(self, power: int, inplace: bool = False) -> PauliString
  • to_circuit(self) -> Circuit

I initially believed something like a CliffordString was wanted (so analogous to PauliString but with CNOT(a,b), H, and S), but I believe just the tableau is wanted? If so, my plan is to use qiskit's tableau convention from Aaronson and Gottesman. I'll have to finish the paper, but I see how to do dot(self, other: CliffordTableau) and power(self, power: int, inplace: bool = False) in time linear of qubit count (page 4), but I'll have to read further to figure out how to easily do the adjoint from just the tableau.

kvathupo avatar Jun 06 '23 14:06 kvathupo

P.S. I am doing this as a part of Unitary Hack, so I do ask that the issue be assigned to whoever has a merged PR. Hopefully yours truly : ^)

kvathupo avatar Jun 06 '23 14:06 kvathupo

@kvathupo do you need any help to submit your solution?

JordanAWS avatar Jun 12 '23 16:06 JordanAWS

Just submitted a PR, but just for the non-Tableau half 🫣 As for CliffordTableau, I would have to read more about the tableau representation of Clifford gates. So another can feel free to jump in!

From Aaronson and Gottesman, I can see how multiplication of a CliffordTableau by a generator of the Clifford Group is linear in qubit count but I'd have to finish reading the paper/check out other sources to see how to multiply two arbitrary Clifford tableaux with complexity linear in qubit count, given just the tableau representations 😰

kvathupo avatar Jun 13 '23 04:06 kvathupo

@kvathupo Thanks for your contribution! I imagine it would be pretty challenging to complete this issue before the end of UnitaryHack today (which is the requirement to win the bounty), so if you are interested, we can get you some AWS credits if you wanted to keep working on it! :)

JordanAWS avatar Jun 13 '23 19:06 JordanAWS

@kvathupo Sorry, correction! Because you submitted a PR with the main functionality before the June 13th deadline, you are still eligible to win the bounty as long as you complete the requested changes and get your code approved and merged by June 20th :)

JordanAWS avatar Jun 14 '23 18:06 JordanAWS

@JordanAWS No need for a financial incentive (I recall learning about the Gottesman–Knill theorem in school, so it's cool to see it in practice), but I won't say no to free credits : ~). I look forward to feedback on the existing PR in the meantime !

kvathupo avatar Jun 16 '23 03:06 kvathupo

@kvathupo For the credits, you'll need to create an AWS account (if you don't have one already), and share your account ID with [email protected] with a request for credits to work on the issue :)

JordanAWS avatar Jun 16 '23 19:06 JordanAWS

Closing due to reprioritization

speller26 avatar Jun 12 '25 17:06 speller26