question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Default bounds for UCC ansatz circuits

See original GitHub issue

What is the expected enhancement?

Bounds are required for many optimizers (all of the package scikit-quant as can be read on page 9 of their documentation and possibly some of the other optimizers).

Most of the ansatzes located in qiskit terra (EfficientSU2, ExcitationPreservation, …) have default bounds for the parameters (-pi to pi). See e.g. method parameter_bounds of EfficientSU2.

The ansatzes in qiskit nature (UCC, …) don’t have these default bounds implemented. Thus, those VQE calculations fail as pointed out in this bug report.

So, I propose to add the parameter_bounds method also to the ansatzes is qiskit nature.

I’ll gladly help adding the code.

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
mrossinekcommented, Nov 15, 2022

I will raise this idea to the people for involved with the affected components of Qiskit Terra and get back to you 👍

1reaction
cposselcommented, Nov 15, 2022

The question now is whether float("inf") should be the default instead of None (similarly to EfficientSU2 just hard-coded in UCC) or to dynamically set it to inf if the optimizer requires it. This would be possible within vqe.py or rather in the function validate_bounds called by VQE (located in validate_bounds.py). There the VQE can actually check whether the optimizer needs bounds and then could set them if required. This would have the advantage that these arbitrary bounds would be inserted only when needed (allowing for unbounded optimizers to work properly).

As soon as this question is clarified, I’ll gladly add some code to implement it and open a PR (though in the latter case it would be in qiskit terra code).

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to prepare Unitary Coupled Cluster ansatz for VQE in a ...
I have read the following paper by Dumitrescu et al. To make a Unitary Coupled Cluster (UCC) ansatz, one prepares with the following...
Read more >
A Generic Compilation Strategy for the Unitary Coupled ...
We describe a compilation strategy for Variational Quantum Eigensolver (VQE) algorithms which use the Unitary Coupled Cluster (UCC) ansatz, ...
Read more >
Bug using SNOBFIT in combination with UCCSD (VQE ...
I tracked down the error to be caused by missing parameter bounds. The function signature of the optimizer's minimize function (``) suggests ...
Read more >
Generalized Unitary Coupled Cluster Wavefunctions ... - arXiv
We introduce a unitary coupled-cluster (UCC) ansatz termed k-UpCCGSD that is based on a family of sparse generalized doubles operators which ...
Read more >
Comparison of Unitary Coupled Cluster Ansatz Methods for ...
(UCCGSD), singlet unitary coupled cluster singles and doubles (UCCSD) ... of the VQE paper wrote another paper to “extend the general theory ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found