amazon-braket / amazon-braket-sdk-python

A Python SDK for interacting with quantum devices on Amazon Braket
https://aws.amazon.com/braket/
Apache License 2.0
294 stars 118 forks source link

Pauli and Clifford groups #553

Open speller26 opened 1 year ago

speller26 commented 1 year ago

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

kvathupo commented 1 year ago

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

JordanAWS commented 1 year ago

@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 commented 1 year ago

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

kvathupo commented 1 year ago

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

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 commented 1 year ago

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 : ^)

JordanAWS commented 1 year ago

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

kvathupo commented 1 year ago

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 šŸ˜°

JordanAWS commented 1 year ago

@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 commented 1 year ago

@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 :)

kvathupo commented 1 year ago

@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 !

JordanAWS commented 1 year ago

@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 unitary-hack-braket-support@amazon.com with a request for credits to work on the issue :)