Skip to content

Enable one-qubit optimization for UCCSD #5436

@hhorii

Description

@hhorii

What is the expected enhancement?

0.23.1 transpiles a UCCSD circuit without one-qubit optimization though 0.22.0 does with it. Probably deprecating U1, U2, and U3 is a reason.

0.22.0:

       ┌─────────────────────┐                                   »
  q_0: ┤ U3(pi/2,pi/2,3pi/2) ├──■────────────────────────────────»
       └──┬───────────────┬──┘┌─┴─┐                              »
  q_1: ───┤ U3(pi/2,0,pi) ├───┤ X ├──■────────────────────────■──»
          └───────────────┘   └───┘┌─┴─┐┌──────────────────┐┌─┴─┐»
  q_2: ────────────────────────────┤ X ├┤ U3(0,0,1.0*θ[0]) ├┤ X ├»
                                   └───┘└──────────────────┘└───┘»
  q_3: ──────────────────────────────────────────────────────────»
                                                                 »
  q_4: ──────────────────────────────────────────────────────────»
                                                                 »
  q_5: ──────────────────────────────────────────────────────────»
                                                                 »
  q_6: ──────────────────────────────────────────────────────────»
                                                                 »
  q_7: ──────────────────────────────────────────────────────────»
                                                                 »
  q_8: ──────────────────────────────────────────────────────────»
                                                                 »
  q_9: ──────────────────────────────────────────────────────────»
                                                                 »
c0: 10/══════════════════════════════════════════════════════════»
                                                                 »
«                        ┌────────────────────┐                               »
«  q_0: ────────■────────┤ U3(pi/2,3pi/2,-pi) ├──■─────────────────────────■──»
«             ┌─┴─┐      └┬──────────────────┬┘┌─┴─┐┌───────────────────┐┌─┴─┐»
«  q_1: ──────┤ X ├───────┤ U3(pi/2,0,3pi/2) ├─┤ X ├┤ U3(0,0,-1.0*θ[0]) ├┤ X ├»
«       ┌─────┴───┴─────┐ └──────────────────┘ └───┘└───────────────────┘└───┘»
«  q_2: ┤ U3(pi/2,0,pi) ├─────────────────────────────────────────────────────»
«       └───────────────┘                                                     »
«  q_3: ──────────────────────────────────────────────────────────────────────»
«                                                                             »
«  q_4: ──────────────────────────────────────────────────────────────────────»
«                                                                             »
«  q_5: ──────────────────────────────────────────────────────────────────────»
«                                                                             »
«  q_6: ──────────────────────────────────────────────────────────────────────»
«                                                                             »
«  q_7: ──────────────────────────────────────────────────────────────────────»
«                                                                             »
«  q_8: ──────────────────────────────────────────────────────────────────────»
«                                                                             »
«  q_9: ──────────────────────────────────────────────────────────────────────»
«                                                                             »
«c0: 10/══════════════════════════════════════════════════════════════════════»

0.23.0

       ┌───────────┐┌─────────────────┐                                  »
  q_0: ┤ U3(π,0,π) ├┤ U(π/2,-π/2,π/2) ├──■───────────────────────────────»
       └┬─────────┬┘└─────────────────┘┌─┴─┐                             »
  q_1: ─┤ U2(0,π) ├────────────────────┤ X ├──■───────────────────────■──»
        └─────────┘                    └───┘┌─┴─┐┌─────────────────┐┌─┴─┐»
  q_2: ─────────────────────────────────────┤ X ├┤ U(0,0,1.0*θ[0]) ├┤ X ├»
                                            └───┘└─────────────────┘└───┘»
  q_3: ──────────────────────────────────────────────────────────────────»
                                                                         »
  q_4: ──────────────────────────────────────────────────────────────────»
                                                                         »
  q_5: ──────────────────────────────────────────────────────────────────»
                                                                         »
  q_6: ──────────────────────────────────────────────────────────────────»
                                                                         »
  q_7: ──────────────────────────────────────────────────────────────────»
                                                                         »
  q_8: ──────────────────────────────────────────────────────────────────»
                                                                         »
  q_9: ──────────────────────────────────────────────────────────────────»
                                                                         »
c0: 10/══════════════════════════════════════════════════════════════════»
                                                                         »
«                  ┌──────────────────┐    ┌─────────┐         »
«  q_0: ─────■─────┤ U(-π/2,-π/2,π/2) ├────┤ U2(0,π) ├──────■──»
«          ┌─┴─┐   └───┬─────────┬────┘┌───┴─────────┴───┐┌─┴─┐»
«  q_1: ───┤ X ├───────┤ U2(0,π) ├─────┤ U(π/2,-π/2,π/2) ├┤ X ├»
«       ┌──┴───┴──┐    └─────────┘     └─────────────────┘└───┘»
«  q_2: ┤ U2(0,π) ├────────────────────────────────────────────»
«       └─────────┘                                            »
«  q_3: ───────────────────────────────────────────────────────»
«                                                              »
«  q_4: ───────────────────────────────────────────────────────»
«                                                              »
«  q_5: ───────────────────────────────────────────────────────»
«                                                              »
«  q_6: ───────────────────────────────────────────────────────»
«                                                              »
«  q_7: ───────────────────────────────────────────────────────»
«                                                              »
«  q_8: ───────────────────────────────────────────────────────»
«                                                              »
«  q_9: ───────────────────────────────────────────────────────»
«                                                              »
«c0: 10/═══════════════════════════════════════════════════════»

Related PRs: #5429, #5431

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions