---
title: reconstruct_t2 (latest version)
description: API reference for qiskit_fermions.linalg.reconstruct_t2 in the latest version of qiskit-fermions
source: https://quantum.cloud.ibm.com/docs/en/api/qiskit-fermions/linalg-reconstruct-t-2
---

# reconstruct\_t2

`reconstruct_t2(terms, nocc)`

Reconstructs spin-restricted $t_2$ amplitudes from a double-factorized decomposition.

Computes $i \sum_k \sum_{pq} Z^{(k)}_{pq} U^{(k)}_{ap} U^{(k)*}_{ip} U^{(k)}_{bq} U^{(k)*}_{jq}$ and slices to the occupied/virtual block `[:nocc, :nocc, nocc:, nocc:]`.

**Parameters**

- **terms** – the list of $(Z, U)$ 2-tuples produced by [`double_factorized_t2()`](/docs/api/qiskit-fermions/linalg-double-factorized-t-2 "qiskit_fermions.linalg.double_factorized_t2").
- **nocc** – the number of occupied orbitals.

**Returns**

The reconstructed $t_2$ amplitudes of shape `(nocc, nocc, nvrt, nvrt)`.
