Challenge

System #0

You are a physics research assistant specializing in solving complex, research-level problems using precise, step-by-step reasoning.

Input Problems will be provided in Markdown format.

Output (Markdown format)

  1. Step-by-Step Derivation - Show every non-trivial step in the solution. Justify steps using relevant physical laws, theorems, mathematical identities or numerical codes.
  2. Mathematical Typesetting - Use LaTeX for all mathematics: $...$ for inline expressions, $$...$$ for display equations.
  3. Conventions and Units - Follow the unit system and conventions specified in the problem.
  4. Final Answer - At the end of the solution, start a new line with “Final Answer:”, and present the final result.

    For final answers involving values, follow the precision requirements specified in the problem. If no precision is specified: - If an exact value is possible, provide it (e.g., \$\sqrt(2)\$, \$\pi/4\$). - If exact form is not feasible, retain at least 12 significant digits in the result.

  5. Formatting Compliance - If the user requests a specific output format (e.g., code, table), provide the final answer accordingly.

User #1

Problem setup:

In quantum error correction, you encode quantum states into logical states made of many qubits in order to improve their resilience to errors. In quantum error detection, you do the same but can only detect the presence of errors and not correct them. In this problem, we will consider a single [[4,2,2]] quantum error detection code, which encodes two logical qubits into four physical qubits, and investigate how robust logical quantum operations in this code are to quantum errors.

Our convention is that the four physical qubits in the [[4,2,2]] code are labelled 0,1,2,3. The two logical qubits are labelled A and B. The stabilizers are \(XXXX\) and \(ZZZZ\), where \(X\) and \(Z\) are Pauli matrices. The logical \(X\) and \(Z\) operators on the two qubits are \(X_A = XIXI\), \(X_B=XXII\), \(Z_A = ZZII\), \(Z_B = ZIZI\), up to multiplication by stabilizers.

We will consider different state preparation circuits consisting of controlled not \(CNOT_{ij}\) gates, where \(CNOT_{ij}\) has control qubit \(i\) and target qubit \(j\). As a simple model of quantum errors in hardware, we will suppose that each \(CNOT_{ij}\) gate in the circuit has a two qubit depolarizing error channel following it that produces one of the 15 non-identity two-qubit Paulis with equal probability \(p/15\). The probability \(p\) indicates the probability of an error in a single two-qubit gate. We will assess the logical infidelity of certain state preparation protocols as a function of the physical infidelity \(p\).

Challenge

Suppose that we prepare a logical two-qubit \(|00\rangle_{AB}\) state in the [[4,2,2]] code. To do so, we introduce an ancilla qubit, qubit 4, and use the following state preparation circuit:

\[ M_4 (CNOT_{04}) (CNOT_{34}) (CNOT_{23}) (CNOT_{10}) (CNOT_{12}) (H_1) \]

Note that this equation is written in matrix multiplication order, while the quantum operations in the circuit occur in the reverse order (from right-to-left in the above equation). \(H\) is a single-qubit Hadamard gate and \(M\) is a single-qubit measurement. The ancilla is used to detect errors in the state preparation circuit and makes the circuit fault-tolerant. If the ancilla measurement is \(|0\rangle\) (\(|1\rangle\)), the state preparation succeeds (fails).

What is the logical state fidelity of the final 2-qubit logical state at the end of the circuit as a function of two-qubit gate error rate \(p\), assuming the state is post-selected on all detectable errors in the code and on the ancilla qubit measuring \(|0\rangle\)?

Assistant #2
Tool Call (code to execute)
# We'll enumerate all possible two-qubit Pauli errors inserted after each of 5 CNOT gates
# and compute the exact analytic (symbolic-by-counting) fidelity under post-selection.

from collections import defaultdict

# Qubits: 0,1,2,3 are data; 4 is ancilla
nq = 5

# Represent Paulis by (X_bits, Z_bits), each a list of 0/1 of length nq. Phase ignored.

def pauli_id():
    return [0]*nq, [0]*nq

# Multiply two Paulis modulo phase: XOR X and Z bits

def pauli_mul(p, q):
    X1, Z1 = p
    X2, Z2 = q
    return [x1 ^ x2 for x1, x2 in zip(X1, X2)], [z1 ^ z2 for z1, z2 in zip(Z1, Z2)]

# Conjugate Pauli by CNOT(control -> target)

def conj_cnot(p, c, t):
    X, Z = p
    # Copy to avoid in-place hazards
    Xc, Xt = X[c], X[t]
    Zc, Zt = Z[c], Z[t]
    # Mapping (Aaronson-Gottesman):
    # X_c -> X_c, X_t -> X_t ^ X_c
    # Z_c -> Z_c ^ Z_t, Z_t -> Z_t
    X[t] = Xt ^ Xc
    Z[c] = Zc ^ Zt
    # X[c] and Z[t] unchanged otherwise
    return X, Z

# Build single-qubit Pauli given symbol: 'I','X','Y','Z' on a given qubit

def single_pauli(sym, q):
    X = [0]*nq
    Z = [0]*nq
    if sym == 'I':
        return X, Z
    if sym == 'X':
        X[q] = 1
        return X, Z
    if sym == 'Z':
        Z[q] = 1
        return X, Z
    if sym == 'Y':
        X[q] = 1
        Z[q] = 1
        return X, Z
    raise ValueError('bad sym')

# Build two-qubit Pauli on qubits (qa, qb) as tensor product Pa*Pb

def twoq_pauli(sym_a, qa, sym_b, qb):
    Xa, Za = single_pauli(sym_a, qa)
    Xb, Zb = single_pauli(sym_b, qb)
    return pauli_mul((Xa, Za), (Xb, Zb))

# CNOT gates sequence indices and their qubits in time order after H_1
# Gate list: C1: (1->2), C2: (1->0), C3: (2->3), C4: (3->4), C5: (0->4)
cnots = [(1,2), (1,0), (2,3), (3,4), (0,4)]
ng = len(cnots)

# Build the list of 16 two-qubit Paulis for a given pair of qubits: identity + 15 non-identity.
syms = ['I','X','Y','Z']

def twoq_pauli_list(qa, qb):
    plist = []
    for a in syms:
        for b in syms:
            if a == 'I' and b == 'I':
                continue
            plist.append(twoq_pauli(a, qa, b, qb))
    # identity as index 0 separately
    return plist

# Precompute for each gate i, the 16 possibilities (0=identity, 1..15 non-identity) propagated to the end
precomp = []
for i, (c, t) in enumerate(cnots):
    # Build 16 entries
    arr = []
    # idx 0: identity
    arr.append(pauli_id())
    # 15 non-identity two-qubit Paulis on qubits c,t
    nonids = twoq_pauli_list(c, t)
    for P in nonids:
        X, Z = [row[:] for row in P]
        # Conjugate by subsequent CNOTs j>i
        for j in range(i+1, ng):
            cj, tj = cnots[j]
            X, Z = conj_cnot((X, Z), cj, tj)
        arr.append((X, Z))
    precomp.append(arr)

# Helper: compute commutation of Pauli P with Q given by (XQ,ZQ): returns 0 if commute, 1 if anticommute
# Using symplectic product over all qubits.

def commutes(P, Q):
    XP, ZP = P
    XQ, ZQ = Q
    s = 0
    for j in range(nq):
        s ^= (XP[j] & ZQ[j]) ^ (ZP[j] & XQ[j])
    return (s == 0)

# Build stabilizers and logical operators on data only, promoted to 5 qubits (ancilla idle)
# Sx = XXXX on qubits 0..3
Sx = ([1,1,1,1,0], [0,0,0,0,0])
Sz = ([0,0,0,0,0], [1,1,1,1,0])
# Z_A = ZZII (qubits 0,1)
ZA = ([0,0,0,0,0], [1,1,0,0,0])
# Z_B = ZIZI (qubits 0,2)
ZB = ([0,0,0,0,0], [1,0,1,0,0])

# Acceptance and correctness counters by number of faulty gates k
c_acc = [0]*(ng+1)
c_cor = [0]*(ng+1)

# Enumerate over all 16 choices per gate: 0=identity, 1..15 non-identity
# To speed up, we'll do 5 nested loops but with integers; Should be fine.

choices = [range(16) for _ in range(ng)]

def build_total(idx_tuple):
    # XOR the contributions
    Xtot = [0]*nq
    Ztot = [0]*nq
    for i, idx in enumerate(idx_tuple):
        Xp, Zp = precomp[i][idx]
        Xtot = [a ^ b for a,b in zip(Xtot, Xp)]
        Ztot = [a ^ b for a,b in zip(Ztot, Zp)]
    return (Xtot, Ztot)

# We'll iterate and count.

import itertools

for idx_tuple in itertools.product(*choices):
    # Count faulty gates
    k = sum(1 for idx in idx_tuple if idx != 0)
    # Quickly skip if too many? No, count all.
    Xtot, Ztot = build_total(idx_tuple)
    Ptot = (Xtot, Ztot)
    # Ancilla acceptance: X bit on qubit 4 must be 0 (no X/Y on ancilla)
    if Xtot[4] != 0:
        continue
    # Data acceptance: commute with Sx and Sz
    if not commutes(Ptot, Sx):
        continue
    if not commutes(Ptot, Sz):
        continue
    # Accepted
    c_acc[k] += 1
    # Correct if commute with ZA and ZB as well
    if commutes(Ptot, ZA) and commutes(Ptot, ZB):
        c_cor[k] += 1

c_acc, c_cor
Tool #3
''
Assistant #4
Tool Call (code to execute)
print('Computing...')
from collections import defaultdict
nq=5

def pauli_id():
    return [0]*nq, [0]*nq

def pauli_mul(p, q):
    X1, Z1 = p
    X2, Z2 = q
    return [x1 ^ x2 for x1, x2 in zip(X1, X2)], [z1 ^ z2 for z1, z2 in zip(Z1, Z2)]

def conj_cnot(p, c, t):
    X, Z = p
    Xc, Xt = X[c], X[t]
    Zc, Zt = Z[c], Z[t]
    X[t] = Xt ^ Xc
    Z[c] = Zc ^ Zt
    return X, Z

syms = ['I','X','Y','Z']

def single_pauli(sym, q):
    X = [0]*nq
    Z = [0]*nq
    if sym == 'I':
        return X, Z
    if sym == 'X':
        X[q] = 1
    elif sym == 'Z':
        Z[q] = 1
    elif sym == 'Y':
        X[q] = 1
        Z[q] = 1
    else:
        raise ValueError
    return X, Z

def twoq_pauli(sa, qa, sb, qb):
    Xa, Za = single_pauli(sa, qa)
    Xb, Zb = single_pauli(sb, qb)
    return pauli_mul((Xa, Za), (Xb, Zb))

cnots = [(1,2), (1,0), (2,3), (3,4), (0,4)]
ng = len(cnots)


def twoq_pauli_list(qa, qb):
    plist = []
    for a in syms:
        for b in syms:
            if a=='I' and b=='I':
                continue
            plist.append(twoq_pauli(a, qa, b, qb))
    return plist

precomp = []
for i,(c,t) in enumerate(cnots):
    arr = []
    arr.append(pauli_id())
    for P in twoq_pauli_list(c,t):
        X,Z = [row[:] for row in P]
        for j in range(i+1, ng):
            cj, tj = cnots[j]
            X,Z = conj_cnot((X,Z), cj, tj)
        arr.append((X,Z))
    precomp.append(arr)

# Build operators
Sx = ([1,1,1,1,0], [0,0,0,0,0])
Sz = ([0,0,0,0,0], [1,1,1,1,0])
ZA = ([0,0,0,0,0], [1,1,0,0,0])
ZB = ([0,0,0,0,0], [1,0,1,0,0])


def commutes(P,Q):
    XP,ZP = P
    XQ,ZQ = Q
    s=0
    for j in range(nq):
        s ^= (XP[j] & ZQ[j]) ^ (ZP[j] & XQ[j])
    return (s==0)

import itertools

c_acc = [0]*(ng+1)
c_cor = [0]*(ng+1)

for idx_tuple in itertools.product(*([range(16)]*ng)):
    k = sum(1 for idx in idx_tuple if idx!=0)
    # Build total
    Xtot=[0]*nq
    Ztot=[0]*nq
    for i,idx in enumerate(idx_tuple):
        Xp,Zp = precomp[i][idx]
        Xtot = [a^b for a,b in zip(Xtot,Xp)]
        Ztot = [a^b for a,b in zip(Ztot,Zp)]
    # acceptance checks
    if Xtot[4]!=0:
        continue
    Ptot=(Xtot,Ztot)
    if not commutes(Ptot,Sx):
        continue
    if not commutes(Ptot,Sz):
        continue
    c_acc[k]+=1
    if commutes(Ptot,ZA) and commutes(Ptot,ZB):
        c_cor[k]+=1

print('c_acc:', c_acc)
print('c_cor:', c_cor)
Tool #5
Computing...
c_acc: [1, 7, 282, 4222, 31637, 94923]
c_cor: [1, 7, 138, 1198, 7397, 24027]
Assistant #6
Tool Call (code to execute)
from fractions import Fraction

c_acc = [1, 7, 282, 4222, 31637, 94923]
c_cor = [1, 7, 138, 1198, 7397, 24027]

# Build polynomials N(p), D(p) as lists of coefficients for p^0..p^5
# N(p) = sum_k c_cor[k]*(p/15)^k*(1-p)^{5-k}
# (1-p)^{5-k} = sum_{j=0}^{5-k} binom(5-k,j) * (1)^{5-k-j} * (-p)^j
# So the coefficient for p^{k+j} accumulates c_cor[k]*(1/15)^k * binom(5-k,j) * (-1)^j

import math

def poly_from_counts(counts):
    coeffs = [Fraction(0,1) for _ in range(6)]
    for k, ck in enumerate(counts):
        for j in range(0, 6-k):
            deg = k + j
            coeffs[deg] += Fraction(ck, 15**k) * Fraction(math.comb(5-k, j)) * ((-1)**j)
    return coeffs

N = poly_from_counts(c_cor)
D = poly_from_counts(c_acc)

print('N coefficients (p^0..p^5):')
print([str(c) for c in N])
print('D coefficients (p^0..p^5):')
print([str(c) for c in D])

# Small-p expansion of F(p) up to p^2 or p^3 by series division
from decimal import Decimal, getcontext
getcontext().prec = 50

# Let's also compute numeric coefficients rational to show maybe exact

# Series division to degree 3
F = [Fraction(0,1) for _ in range(6)]
# We'll compute F such that N = D * F modulo p^5; standard power series division
for m in range(6):
    # compute F[m]
    s = N[m]
    for j in range(m):
        s -= D[m-j] * F[j]
    F[m] = s / D[0]

print('Series F coeffs (p^0..p^5):', [str(f) for f in F])
Tool #7
N coefficients (p^0..p^5):
['1', '-68/15', '656/75', '-29312/3375', '223232/50625', '-229376/253125']
D coefficients (p^0..p^5):
['1', '-68/15', '704/75', '-32768/3375', '253952/50625', '-262144/253125']
Series F coeffs (p^0..p^5): ['1', '0', '-16/25', '-704/375', '-10496/3375', '-216064/84375']
Assistant #8
Tool Call (code to execute)
from decimal import Decimal, getcontext
getcontext().prec = 50

c_acc = [1, 7, 282, 4222, 31637, 94923]
c_cor = [1, 7, 138, 1198, 7397, 24027]

def Acc(p):
    from math import comb
    # direct formula using counts
    res_acc = Decimal(0)
    res_cor = Decimal(0)
    for k in range(6):
        w = (Decimal(p)/Decimal(15))**k * (Decimal(1)-Decimal(p))**(5-k)
        res_acc += Decimal(c_acc[k]) * w
        res_cor += Decimal(c_cor[k]) * w
    return res_acc, res_cor, (res_cor/res_acc if res_acc!=0 else Decimal(0))

for pv in [Decimal('0.001'), Decimal('0.01'), Decimal('0.05'), Decimal('0.1')]:
    A, C, F = Acc(pv)
    print('p=', pv, ' Acc=', A, ' Cor=', C, ' F=', F)
Tool #9
p= 0.001  Acc= 0.99547604362931159646814814814814814814814814814815  Cor= 0.99547540465270491110716049382716049382716049382716  F= 0.99999935811955418256290517755535495085330744739973
p= 0.01  Acc= 0.95559567435609125925925925925925925925925925925926  Cor= 0.95553269230088849382716049382716049382716049382716  F= 0.99993409131404324887607192865156309294818434670800
p= 0.05  Acc= 0.79561739883456790123456790123456790123456790123457  Cor= 0.79414164669629629629629629629629629629629629629629  F= 0.99814514848414161325117237535713156764181060054879
p= 0.1  Acc= 0.63131557357037037037037037037037037037037037037037  Cor= 0.62588018662716049382716049382716049382716049382716  F= 0.99139038038857437686446388414422675785669421125535
Assistant #10
  1. Step-by-Step Derivation
  • Code and logical operators
  • Physical qubits: 0,1,2,3 (data) and 4 (ancilla).
  • Stabilizers: Sx = XXXX and Sz = ZZZZ on data qubits 0–3.
  • Logical operators (up to stabilizers):

    • X_A = X I X I, X_B = X X I I
    • Z_A = Z Z I I, Z_B = Z I Z I
  • Ideal, noiseless state preparation

  • Initial state: |00000⟩ (qubits 0–4).
  • Circuit (right-to-left): 1) H on qubit 1 creates |+⟩ on qubit 1. 2) CNOT12 and CNOT10 build a 3-qubit GHZ on 1–2–0. 3) CNOT23 extends it to a 4-qubit GHZ on 0–1–2–3: |ψ_data⟩ = (|0000⟩ + |1111⟩)/√2. 4) CNOT34 and CNOT04 compute ancilla parity q4 = q3 ⊕ q0. Since GHZ has q0 = q3, q4 = 0 deterministically.
  • Thus, in the absence of errors, ancilla measurement M4 in the Z basis yields |0⟩ with certainty and the data are in the code space stabilized by XXXX and ZZZZ, corresponding to the logical state |00⟩AB.

  • Noise model

  • After each CNOT gate, a two-qubit depolarizing error occurs with probability p: one of the 15 non-identity two-qubit Paulis is applied uniformly with probability p/15; with probability 1 − p, the identity is applied.
  • Only the five CNOTs are noisy; H and the measurement are ideal.

  • Pauli propagation and acceptance criteria

  • Because the circuit is Clifford and the noise is Pauli, all faults can be pushed to the end of the circuit by conjugation. For a given error pattern, the net effect is a single 5-qubit Pauli Ptot applied right before the ancilla measurement to the ideal state |ψ_data⟩ ⊗ |0⟩4.
  • Acceptance consists of: 1) Ancilla post-selection M4 = |0⟩: since the ideal ancilla is |0⟩ and Ptot acts at the end, this is accepted if and only if the ancilla Pauli is I or Z (i.e., no X or Y on qubit 4). 2) “All detectable code errors” are post-selected away by (conceptually) measuring Sx = XXXX and Sz = ZZZZ on the data and keeping only +1 outcomes. Since Ptot acts at the end on |ψ_data⟩, this acceptance is deterministic: keep the event if and only if Pdata (the restriction of Ptot to qubits 0–3) commutes with both Sx and Sz. Equivalently, in symplectic terms,
    • commute with Sx iff the number of Z or Y on data is even,
    • commute with Sz iff the number of X or Y on data is even.
  • Logical correctness among accepted events:

    • Within the normalizer N(S) (commuting with both stabilizers), the final logical state equals a logical Pauli acting on |00⟩AB. This final state is correct iff the applied logical Pauli has no X component on A or B, i.e., iff Pdata commutes with Z_A and Z_B. Equivalently, Pdata ∈ S × ⟨Z_A, Z_B⟩.
  • Exact counting by exhaustive Pauli propagation

  • We enumerated all 16^5 error choices (16 per CNOT: identity + 15 Paulis) and, for each choice:
    • Pushed each two-qubit Pauli through the subsequent CNOTs by conjugation,
    • Multiplied all contributions to obtain Ptot on the 5 qubits,
    • Applied the acceptance rules above,
    • Tested logical correctness by commutation with Z_A and Z_B.
  • Let c_acc[k] be the number of accepted error patterns with exactly k non-identity gate errors, and c_cor[k] the number of those that are also logically correct. The exact counts are:
    • c_acc = [1, 7, 282, 4222, 31637, 94923]
    • c_cor = [1, 7, 138, 1198, 7397, 24027]
  • Interpretation:

    • There are 5 × 15 = 75 single-fault possibilities; of these, 68 are rejected (by the ancilla flag or by stabilizer checks) and the remaining 7 are accepted but benign (make no logical error on |00⟩AB). Hence all first-order faults are either caught or harmless: this is the hallmark of fault-tolerant, distance-2 state preparation.
  • Exact fidelity as a function of p

  • The total acceptance probability is
\[ D(p) \equiv \sum_{k=0}^{5} c_{\mathrm{acc}}[k] \left(\frac{p}{15}\right)^k (1-p)^{5-k}. \]
  • The accepted-and-correct weight is
\[ N(p) \equiv \sum_{k=0}^{5} c_{\mathrm{cor}}[k] \left(\frac{p}{15}\right)^k (1-p)^{5-k}. \]
  • The post-selected logical state fidelity is the ratio
\[ F(p) = \frac{N(p)}{D(p)}. \]
  • Expanding both polynomials gives the closed forms
\[ N(p) &= 1 - \frac{68}{15} p + \frac{656}{75} p^2 - \frac{29312}{3375} p^3 + \frac{223232}{50625} p^4 - \frac{229376}{253125} p^5, \\\\ D(p) &= 1 - \frac{68}{15} p + \frac{704}{75} p^2 - \frac{32768}{3375} p^3 + \frac{253952}{50625} p^4 - \frac{262144}{253125} p^5. \]
  • Therefore
\[ F(p) = \frac{1 - \frac{68}{15} p + \frac{656}{75} p^2 - \frac{29312}{3375} p^3 + \frac{223232}{50625} p^4 - \frac{229376}{253125} p^5}{1 - \frac{68}{15} p + \frac{704}{75} p^2 - \frac{32768}{3375} p^3 + \frac{253952}{50625} p^4 - \frac{262144}{253125} p^5}. \]
  • Small-p expansion (logical infidelity scaling)
  • Series division yields
\[ F(p) = 1 - \frac{16}{25} p^2 - \frac{704}{375} p^3 - \frac{10496}{3375} p^4 - \frac{216064}{84375} p^5. \]
  • Hence, to leading order, the post-selected logical infidelity is
\[ 1 - F(p) = \frac{16}{25}\,p^2 + O(p^3), \]
showing second-order suppression of logical error due to fault-tolerant, flagged state preparation.
  1. Mathematical Typesetting
  • Included in-line and display equations above.
  1. Conventions and Units
  • Conventions follow the problem statement: [4,2,2] code with given stabilizers and logical operators, two-qubit depolarizing error with probability p per CNOT, ideal single-qubit operations, post-selection on ancilla M4 = 0 and stabilizer +1 outcomes.
  1. Final Answer: F(p) = [1 − (68/15) p + (656/75) p^2 − (29312/3375) p^3 + (223232/50625) p^4 − (229376/253125) p^5] / [1 − (68/15) p + (704/75) p^2 − (32768/3375) p^3 + (253952/50625) p^4 − (262144/253125) p^5].

Equivalently, for small p, F(p) = 1 − (16/25) p^2 − (704/375) p^3 + O(p^4), so the leading-order logical infidelity is 1 − F(p) = (16/25) p^2 + O(p^3).

User #11

Populate your final answer into the code template provided below. This step is purely for formatting/display purposes. No additional reasoning or derivation should be performed. Do not import any modules or packages beyond what is provided in the template.

import sympy as sp

p = sp.symbols('p')

def answer(p):
    r"""
    Return the expression of the logical state fidelity of the final 2-qubit logical state
    at the end of the circuit as a function of two-qubit gate error rate $p$.

    Inputs
    ----------
    p: sympy.Symbol, two-qubit gate error rate, $p$

    Outputs
    ----------
    F_logical: sympy.Expr, logical state fidelity of the final 2-qubit logical state
    """

    # ------------------ FILL IN YOUR RESULTS BELOW ------------------
    F_logical = ...  # a SymPy expression of inputs
    # ---------------------------------------------------------------

    return F_logical
Assistant #12
import sympy as sp

p = sp.symbols('p')

def answer(p):
    r"""
    Return the expression of the logical state fidelity of the final 2-qubit logical state
    at the end of the circuit as a function of two-qubit gate error rate $p$.

    Inputs
    ----------
    p: sympy.Symbol, two-qubit gate error rate, $p$

    Outputs
    ----------
    F_logical: sympy.Expr, logical state fidelity of the final 2-qubit logical state
    """

    # ------------------ FILL IN YOUR RESULTS BELOW ------------------
    F_logical = (
        1
        - sp.Rational(68, 15)*p
        + sp.Rational(656, 75)*p**2
        - sp.Rational(29312, 3375)*p**3
        + sp.Rational(223232, 50625)*p**4
        - sp.Rational(229376, 253125)*p**5
    ) / (
        1
        - sp.Rational(68, 15)*p
        + sp.Rational(704, 75)*p**2
        - sp.Rational(32768, 3375)*p**3
        + sp.Rational(253952, 50625)*p**4
        - sp.Rational(262144, 253125)*p**5
    )
    # ---------------------------------------------------------------

    return F_logical