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

Extracting details of Circuits of QAOA and modify it. #655

Open
shangtai opened this issue Oct 4, 2022 · 2 comments
Open

Extracting details of Circuits of QAOA and modify it. #655

shangtai opened this issue Oct 4, 2022 · 2 comments

Comments

@shangtai
Copy link
Contributor

shangtai commented Oct 4, 2022

Hi,

I am trying to extract details of circuits of QAOA after I implement it in Qibo so that we can perform noise mitigation on it. May I know how can we do so?

For example, can we extract a list of the gates used?

After that, can we modify the list and construct a new circuit to be run?

@stavros11
Copy link
Member

I had a quick look at the QAOA code and I think that by default it is not using circuits as it is just exponentiating the Hamiltonians and applying them to the state in a time evolution fashion.

If you are using SymbolicHamiltonian you can obtain the circuit that performs the evolution using qaoa.hamiltonian.circuit or qaoa.mixer.circuit and you can use various circuit properties, such as circuit.gate_types, circuit.summary() or just circuit.queue to get the gates. Or create other circuits based on this.

@shangtai
Copy link
Contributor Author

shangtai commented Feb 8, 2023

Hi @stavros11,

I am considering if I should modify some of the code. Can I check how is exponentiation of the matrix implemented? If it's exponentiating the dense Hamiltonian matrix, for n qubits, are we expecting a matrix of 2^(2n) of complex floating point numbers?

Thanks.

@jf-kong and @shangtai

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

No branches or pull requests

2 participants