Add LUCJ ansatz as parameterized Qiskit circuit

Open
#411 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

@MarcoBarroca is already working on this.

Since Jun 12, 2026.

  • #669 by @MarcoBarroca — open

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
python

Research direction

Start by tracing the shown ucj_spin_balanced_ansatz example and the existing ffsim.qiskit.UCJOpSpinBalancedJW and PRE_INIT APIs. The work is complete when a parameterized circuit uses the merged U1-J1-U2-J2 form and a separate function can generate its parameters from t2 amplitudes.

Written by the indexing model from the issue text.

Description

Traditionally, the LUCJ ansatz has this form:

U1 -> J1 -> U1dag -> U2 -> J2 -> U2dag -> ...

but when we convert it to a quantum circuit, we merge the orbital rotations and the resulting circuit has this form:

U1 -> J1 -> U2 -> J2 -> ...

This form is more natural for optimizing a Qiskit circuit using, for example, AQC-Tensor.

The function we add should have the same behavior as this:

from qiskit.circuit import QuantumCircuit, QuantumRegister
from qiskit_addon_aqc_tensor import parametrize_circuit

import ffsim


def ucj_spin_balanced_ansatz(
    norb: int,
    n_reps: int,
    interaction_pairs: tuple[
        list[tuple[int, int]] | None, list[tuple[int, int]] | None
    ],
) -> QuantumCircuit:
    ucj_op = ffsim.random.random_ucj_op_spin_balanced(
        norb,
        n_reps=n_reps,
        interaction_pairs=interaction_pairs,
    )
    qubits = QuantumRegister(2 * norb)
    circuit = QuantumCircuit(qubits)
    circuit.append(ffsim.qiskit.UCJOpSpinBalancedJW(ucj_op), qubits)
    circuit = ffsim.qiskit.PRE_INIT.run(circuit).decompose()
    ansatz, parameters = parametrize_circuit(circuit)
    return ansatz

Here the parameters are discarded, but we should also have a function to generate the parameters from t2 amplitudes.

Dominant language
Python
Stars
116
Forks
50
Avg merge
2h 1m
Merged PRs (30d)
8

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Qiskit/ffsim

All issues in Qiskit/ffsim

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.