-
Notifications
You must be signed in to change notification settings - Fork 110
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
Modifying QAOA circuit #210
Comments
Hi @bahar2040phy, yes that looks like a fine way to construct the circuit. Regarding the error, its basically comes from
|
Thanks @jcmgray for the clarifications and your suggestions. I have tried different path optimizers and backends. In my case, after rehearsing the computation, the maximum contraction width is around 36. This indicates that the required memory will be 17GB, as determined during the rehearsal. However, when I run the code, it needs 120GB, otherwise it gives an "out of memory" error. Are there any other factors that could be contributing to the increased memory usage? |
I think unfortunately a single complex64 tensor of that size is more like However that is probably in the range that sliced contraction can handle - you will just need to investigate a higher quality optimizer and use 'slicing'. |
What is your issue?
Hi everyone. I need to modify the QAOA circuit by adding new gates where 'thetas' is an array of length (N=total number of qubits), containing constant rotation angles for each qubit. These gates are constant for all depth level in QAOA. The 'two_qubit_terms' and 'single_qubit_terms' are interactions between two and single qubits, respectively.
`
def circ_qaoa2(thetas, two_qubit_terms, single_qubit_terms, depth, gammas, betas, **circuit_opts,):
Would you please let me know if to is the correct and efficient way to generate the QAOA circuit in quimb? When the number of qubits is less than 30, the code works well. However, for a greater number of qubits, it leads to the following error:
"ValueError: Internal error while evaluating
ContractExpression
. Note that few checks are performed - the number and rank of the array arguments must match the original expression. The internal error was: '('too many subscripts in einsum',)'"The text was updated successfully, but these errors were encountered: