-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Integrate the Cirq backend with OpenQAOA #306
Comments
Hi @KilianPoirier! |
Hi @shubhamkaushal765 , thanks for looking into openqaoa! |
Hi @KilianPoirier, Thanks! OpenQAOA looks great and I really wanted to contribute to it. First of all, sorry for the long post, therefore added a TLDR. TLDR:
So, I had been tackling this issue, and I have run into some creative challenges, some of which I had solved, and for others I wanted your suggestion on how to proceed. They are: Cirq dependency conflicts
Dependency Conflictsamazon-braket-default-simulator 1.23.2 requires pydantic>2, but pydantic 1.10.16 is installed which is incompatible.
amazon-braket-schemas 1.22.0 requires pydantic>2, but pydantic 1.10.16 is installed which is incompatible.
cirq-rigetti==1.4.0 -> pyquil<4.0.0,>=3.2.0 -> qcs-api-client<0.22.0,>=0.21.0 -> pydantic 1.10.16
jsonschema 4.22.0 requires attrs>=22.2.0, but attrs 21.4.0 is installed which is incompatible.
referencing 0.35.1 requires attrs>=22.2.0, but attrs 21.4.0 is installed which is incompatible.
cirq==1.4.0 -> cirq-core==1.4.0 -> attrs 21.4.0
jupyterlab 4.2.2 requires httpx>=0.25.0, but httpx 0.23.3 is installed which is incompatible.
cirq-rigetti==1.4.0 -> pyquil<4.0.0,>=3.2.0 -> qcs-api-client<0.22.0,>=0.21.0 -> httpx 0.23.3 QPU availability by
|
Hi @shubhamkaushal765 thanks for tackling this issue! Let me address your points in order:
a = cirq.ZZPowGate(exponent=1.0, global_shift=0.5)
b = RZZGate(theta=-np.pi)
np.all(cirq.unitary(a) == np.round(b.to_matrix())) # returns True
I hope this helps. Let me know if you have any additional questions! |
Issue Description
Can we add the Cirq backend to the OpenQAOA stack?
Cirq provides a SDK to simulate and execute quantum circuits on multiple backends:
Note: someone already tackled this issue but couldn't finish the task. You can find the details of their attempt in this closed PR.
Changes to be made
In the same way we implemented different backends (physical QPU or simulators), implement a plugin package
openqaoa-cirq
that allows execution on Cirq's backend. More specifically, changes include:openqaoa-cirq
including all necessary components (e.g. setup.py, pyproject.toml, etc...).openqaoa-cirq/backend
equivalent, bridging the stack's internal representation to one compatible with Cirq Quantum SDK.The text was updated successfully, but these errors were encountered: