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.

Implement an equivalent to legacy `succ_full` option

See original GitHub issue

What is the expected enhancement?

The legacy UCCSD implementation had a method_doubles="succ_full" option which is not yet implemented in Qiskit Nature. This option is a variant of the (now named) SUCCD option which also includes symmetrically mirrored double excitations, however, using the same parameter as the symmetric counter part (as also noted here).

The original implementation in Qiskit Aqua came from the work of this paper in which sections II.E.2 and appendix E provide more in-depth information. The following Qiskit Nature snippet shows the current state of the SUCCD ansatz for the example discussed the aforementioned paper’s appendix:

from qiskit_nature.circuit.library.ansatzes import SUCCD
from qiskit_nature.converters.second_quantization import QubitConverter
from qiskit_nature.mappers.second_quantization import JordanWignerMapper

converter = QubitConverter(JordanWignerMapper())
ansatz = SUCCD(converter, (1, 1), 6)

print(ansatz.decompose().draw())
print(ansatz.excitation_list)

which outputs:

     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Β»
q_0: ─0                                                                                            β”œΒ»
     β”‚                                                                                             β”‚Β»
q_1: ─1                                                                                            β”œΒ»
     β”‚                                                                                             β”‚Β»
q_2: ─2                                                                                            β”œΒ»
     β”‚  exp(-it (IYYIXY + IXXIXY + IXYIYY + IYXIYY + IXYIXX + IYXIXX + IYYIYX + IXXIYX))(1.0*t[0]) β”‚Β»
q_3: ─3                                                                                            β”œΒ»
     β”‚                                                                                             β”‚Β»
q_4: ─4                                                                                            β”œΒ»
     β”‚                                                                                             β”‚Β»
q_5: ─5                                                                                            β”œΒ»
     β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜Β»
Β«     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Β»
Β«q_0: ─0                                                                                            β”œΒ»
Β«     β”‚                                                                                             β”‚Β»
Β«q_1: ─1                                                                                            β”œΒ»
Β«     β”‚                                                                                             β”‚Β»
Β«q_2: ─2                                                                                            β”œΒ»
Β«     β”‚  exp(-it (YZYIXY + XZXIXY + XZYIYY + YZXIYY + XZYIXX + YZXIXX + YZYIYX + XZXIYX))(1.0*t[1]) β”‚Β»
Β«q_3: ─3                                                                                            β”œΒ»
Β«     β”‚                                                                                             β”‚Β»
Β«q_4: ─4                                                                                            β”œΒ»
Β«     β”‚                                                                                             β”‚Β»
Β«q_5: ─5                                                                                            β”œΒ»
Β«     β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜Β»
Β«     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
Β«q_0: ─0                                                                                            β”œ
Β«     β”‚                                                                                             β”‚
Β«q_1: ─1                                                                                            β”œ
Β«     β”‚                                                                                             β”‚
Β«q_2: ─2                                                                                            β”œ
Β«     β”‚  exp(-it (YZYXZY + XZXXZY + XZYYZY + YZXYZY + XZYXZX + YZXXZX + YZYYZX + XZXYZX))(1.0*t[2]) β”‚
Β«q_3: ─3                                                                                            β”œ
Β«     β”‚                                                                                             β”‚
Β«q_4: ─4                                                                                            β”œ
Β«     β”‚                                                                                             β”‚
Β«q_5: ─5                                                                                            β”œ
Β«     β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
[((0, 3), (1, 4)), ((0, 3), (1, 5)), ((0, 3), (2, 5))]

In this context, the goal of this issue is to implement a variant of SUCCD (or an additional keyword argument to its constructor) which results in the inclusion of the ((0, 3), (2, 4)) excitation, while at the same time still using only three parameters (namely t[0]-t[2] in the example above). This should be achieved by ensuring that ((0, 3), (1, 5)) and ((0, 3), (2, 4)) are assigned the same parameter (namely t[1] in the example above).

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
Dran-Zcommented, Jun 29, 2022

@YuNariai @Dran-Z I am not sure if you are collaborating on this.

@YuNariai you do not need to get permission to open a PR, so please feel free to do so.

@Dran-Z I would still like to give you the chance to also contribute so please check back in with me if you’re still interested and also take a look at the upcoming PR once it’s there πŸ‘

I don’t mind and actually feel happy that this issue could be solved without me. Feel free to go ahead.

1reaction
Dran-Zcommented, Jun 14, 2022

@Dran-Z if you want to work on this as part of unitary hack, please remember to register for the event (making you eligible for the bounty) and open a draft PR as soon as possible πŸ‘ For more information, please refer to: https://unitaryhack.dev/

@mrossinek Thanks for the reminder. I checked the code and believe I have a workflow pipeline in my mind. The modification involves how to pass the parameters up to its parent class UCC. The work can be divided in two steps: 1. Get the excitation list and pair the symmetric excitations together. 2. Pass each two symmetric excitations as one operator(maybe this is the easiest way) up.

I think I still need some time to figure out the relation between EvolvedOperatorAnsatz, UCC and SUCCD. I don’t think I am now aiming at getting the bounty because I have another deadline by this week(But anyone else interested can still aim at this cash bounty). If not, I will still keep working on this problem later.

Read more comments on GitHub >

github_iconTop Results From Across the Web

7 Options To Modernize Legacy Systems - Gartner
If you need to modernize legacy applications, the best approach depends on ... Gartner has ranked seven options by ease of implementation (the...
Read more >
Legacy System Modernization: How to Transform the Enterprise
To access legacy data, the applications in the new environment use a Reverse Gateway. Reverse Engineering Model is a good choice for high-cost,...
Read more >
What Is a Legacy System and What Are Legacy Applications?
A legacy system is any outdated computing system, hardware or software that is still in use. Legacy systems include computer hardware, software applicationsΒ ......
Read more >
Rehost, Rebuild or Rewrite a Legacy App With ... - ModLogix
Advantages of Legacy Software Rehosting. The task here is to create an environment equivalent to the original source environment. Digging deeper into the...
Read more >
Patterns of Legacy Displacement - Martin Fowler
Create your legacy replacement in the way you need to continue once it is live. There are definitely other strategies and approaches to...
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