Skip to content
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

qaoa demo #85

Merged
merged 5 commits into from
Sep 16, 2023
Merged

qaoa demo #85

merged 5 commits into from
Sep 16, 2023

Conversation

Zhaoyilunnn
Copy link
Collaborator

  1. Implemented estimator on simulator.
  2. Add a demo in unit test.

Now the APIs in algorithms module are in very early stage.
There may be significant changes in the future, depending on

  1. Whether we need to integrate other DL platforms like tf and torch.
  2. Will we have different communication protocol when submitting VQA jobs.

Copy link
Collaborator

@chensgit169 chensgit169 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In simulation, $\langle\psi|$ is straightforward to be obtained by .conj(). However, in experimental circuits, it needs to be eplemeted manually by inverse the circuit that builds $|\psi\rangle$. Thus it seems there is still a method .inverse() to be implemented in ansatz circuit.

@Zhaoyilunnn
Copy link
Collaborator Author

Zhaoyilunnn commented Sep 16, 2023

In simulation, ⟨ψ| is straightforward to be obtained by .conj(). However, in experimental circuits, it needs to be eplemeted manually by inverse the circuit that builds |ψ⟩. Thus it seems there is still a method .inverse() to be implemented in ansatz circuit.

Thanks! I am still seeking the best implementation for calculating expectations on real devices. Previously shangshu has an implementation, my understanding is that we do not need to obtain $\langle\psi|$ (and maybe we are also not able to do so?) in experiment. Let me know if I misunderstood your comment...

Anyway I am adding a TODO for experimental implementation, currently I did some tricky conversion and reuse the Task.submit

@Zhaoyilunnn Zhaoyilunnn merged commit 5ca8027 into ScQ-Cloud:master Sep 16, 2023
32 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants