<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Posts on vrusso</title><link>https://vrusso.com/posts/</link><description>Recent content in Posts on vrusso</description><generator>Hugo -- gohugo.io</generator><language>en</language><lastBuildDate>Fri, 01 May 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://vrusso.com/posts/index.xml" rel="self" type="application/rss+xml"/><item><title>Compressed sensing for efficient fidelity estimation of GHZ states</title><link>https://vrusso.com/posts/ghz_cs/</link><pubDate>Fri, 01 May 2026 00:00:00 +0000</pubDate><guid>https://vrusso.com/posts/ghz_cs/</guid><description>This post accompanies our paper &amp;ldquo;Compressed Sensing for Efficient Fidelity Estimation of GHZ States&amp;rdquo; (arXiv:2604.27824) by Farrokh Labib, David Nicholaeff, Vincent Russo, and William J. Zeng.
We present an approach for preparing and verifying large GHZ states on quantum processors with all-to-all connectivity. The two key ideas are:
Flag qubits for error detection &amp;ndash; strategically placed ancilla qubits that detect errors via parity checks, improving fidelity through post-selection. Compressed sensing for efficient verification &amp;ndash; estimating fidelity with exponentially fewer measurements than traditional methods by exploiting the sparsity of parity oscillation signals.</description><content>&lt;!-- CDN Libraries -->
&lt;script src="https://d3js.org/d3.v7.min.js">&lt;/script>
&lt;script src="https://cdn.plot.ly/plotly-2.35.2.min.js">&lt;/script>
&lt;link rel="stylesheet" href="https://vrusso.com/blog/ghz_cs/ghz_widgets.css">
&lt;p>This post accompanies our paper
&lt;em>&amp;ldquo;Compressed Sensing for Efficient Fidelity Estimation of GHZ States&amp;rdquo;&lt;/em>
(&lt;a href="https://arxiv.org/abs/2604.27824">arXiv:2604.27824&lt;/a>) by Farrokh Labib, David Nicholaeff, Vincent Russo, and William J. Zeng.&lt;/p>
&lt;p>We present an approach for preparing and verifying large GHZ states on quantum processors with
all-to-all connectivity. The two key ideas are:&lt;/p>
&lt;ol>
&lt;li>&lt;strong>Flag qubits for error detection&lt;/strong> &amp;ndash; strategically placed ancilla qubits that detect errors via
parity checks, improving fidelity through post-selection.&lt;/li>
&lt;li>&lt;strong>Compressed sensing for efficient verification&lt;/strong> &amp;ndash; estimating fidelity with exponentially fewer
measurements than traditional methods by exploiting the sparsity of parity oscillation signals.&lt;/li>
&lt;/ol>
&lt;p>Below, we walk through each idea with interactive visualizations so you can build intuition for how
they work.&lt;/p>
&lt;h2 id="ghz-states">GHZ States&lt;/h2>
&lt;p>The \(N\)-qubit Greenberger-Horne-Zeilinger (GHZ) state is a maximally entangled state:&lt;/p>
$$|\text{GHZ}\rangle = \frac{1}{\sqrt{2}}\left(|0\rangle^{\otimes N} + |1\rangle^{\otimes N}\right)$$
&lt;p>GHZ states are fundamental benchmarks for quantum hardware. They are useful for quantum secret
sharing, metrology, and error correction &amp;ndash; but they are also extremely fragile. Any single-qubit
error can destroy the entanglement, making both &lt;em>preparation&lt;/em> and &lt;em>verification&lt;/em> of large GHZ states
a serious challenge.&lt;/p>
&lt;p>Recently, IBM demonstrated a 120-qubit GHZ state with fidelity above 0.5 in their
&lt;a href="https://arxiv.org/abs/2510.09520">&amp;ldquo;Big Cats&amp;rdquo;&lt;/a> paper (Javadi-Abhari et al., 2025), using
low-overhead error detection ideas from
&lt;a href="https://arxiv.org/abs/2504.15725">Martiel et al.&lt;/a>. The core technique is to use pairs of qubits as
parity checks that maximize &amp;ldquo;coverage&amp;rdquo; of the preparation circuit. Our work applies these same ideas
to trapped-ion hardware with all-to-all connectivity, where the binary tree circuit topology gives us
logarithmic depth and simplifies coverage-aware flag placement.&lt;/p>
&lt;h3 id="binary-tree-preparation">Binary tree preparation&lt;/h3>
&lt;p>On hardware with all-to-all connectivity (like Quantinuum&amp;rsquo;s trapped-ion systems), we can prepare an
\(N\)-qubit GHZ state in \(\log(N)\) depth using a binary tree of CNOT gates. Starting from a root
qubit in superposition, each CNOT spreads the entanglement to one more qubit, doubling the size at
each tree level.&lt;/p>
&lt;p>This is preferable to the linear-depth chain approach used on nearest-neighbor
hardware, but errors near the root of the tree are especially dangerous &amp;ndash; they
propagate through all downstream qubits.&lt;/p>
&lt;h2 id="error-detection-with-flag-qubits">Error Detection with Flag Qubits&lt;/h2>
&lt;p>The GHZ state has a useful stabilizer structure: \(Z_i Z_j = +1\) for any pair of qubits \(i, j\).
This means we can detect bit-flip errors by introducing an ancilla (&amp;ldquo;flag&amp;rdquo;) qubit and applying CNOTs
from two data qubits to it. If the flag measures 0, no error was detected on the path between those
two qubits; if it measures 1, we discard that shot.&lt;/p>
&lt;h3 id="coverage">Coverage&lt;/h3>
&lt;p>The key question is: &lt;em>which pairs of qubits should we connect with flags?&lt;/em>&lt;/p>
&lt;p>The &lt;strong>coverage&lt;/strong> of a flag pair \((i, j)\) is the set of all nodes on the paths from \(i\) and \(j\)
back to their least common ancestor (LCA) in the preparation tree. An error on any qubit in this
coverage set will propagate to the flag and be detected. We often normalize by the total number of
qubits to report a &lt;strong>coverage ratio&lt;/strong>.&lt;/p>
&lt;p>We want to choose \(k\) pairs that maximize the total coverage &amp;ndash; the union of all covered nodes.
This is an instance of the classical &lt;em>maximum coverage problem&lt;/em>: each candidate set is defined by a
leaf pair and the nodes on their paths to the LCA. The resulting objective is monotone submodular, so
the greedy algorithm that repeatedly picks the pair with the largest marginal coverage has a formal
\((1 - 1/e) \approx 63\%\) worst-case guarantee thanks to a theorem by Nemhauser, Wolsey, and Fisher.
This is the same guarantee we rely on in the paper. Because our GHZ preparation circuits are binary
trees, there may be opportunities to design tree-specific algorithms that do even better than the
general guarantee&amp;mdash;identifying those improved strategies is an open question we highlight in the
conclusion of the paper.&lt;/p>
&lt;p>With that caveat in mind, the greedy procedure works well in practice. Try it yourself below:&lt;/p>
&lt;div id="tree-coverage-widget" class="ghz-widget">
&lt;h4>Interactive: Flag Qubit Placement on Binary Tree&lt;/h4>
&lt;div class="controls">
&lt;div class="control-group">
&lt;label>Tree nodes (N): &lt;span id="tc-n-val">15&lt;/span>&lt;/label>
&lt;input type="range" id="tc-n" min="7" max="63" value="15" step="1">
&lt;/div>
&lt;div class="control-group">
&lt;label>Flag pairs (k): &lt;span id="tc-k-val">0&lt;/span>&lt;/label>
&lt;input type="range" id="tc-k" min="0" max="5" value="0" step="1">
&lt;/div>
&lt;div class="control-group" style="align-self: flex-end;">
&lt;button id="tc-step-btn">Step Through Greedy&lt;/button>
&lt;button id="tc-reset-btn" style="margin-top: 4px;">Reset&lt;/button>
&lt;/div>
&lt;/div>
&lt;div id="tc-tree-svg" style="width:100%; height:400px;">&lt;/div>
&lt;div class="step-indicator" id="tc-step-info">&lt;/div>
&lt;div class="results-panel" id="tc-results">&lt;/div>
&lt;/div>
&lt;script src="https://vrusso.com/blog/ghz_cs/tree_coverage_widget.js">&lt;/script>
&lt;p>Red nodes are covered by the selected flag pairs &amp;ndash; errors on those nodes will be detected. Gray
nodes are uncovered. The gold arcs show which leaf pairs are connected by flag qubits. Notice how
just a few well-chosen pairs can cover the majority of the tree, especially the critical high-weight
nodes near the root.&lt;/p>
&lt;h2 id="estimating-fidelity-parity-oscillation">Estimating Fidelity: Parity Oscillation&lt;/h2>
&lt;p>Once we have prepared a (hopefully) good GHZ state, how do we measure its quality? The standard
metric is &lt;strong>fidelity&lt;/strong>:&lt;/p>
$$F = \frac{1}{2}\left(\langle P \rangle + \langle \chi \rangle\right)$$
&lt;p>where \(\langle P \rangle = \langle 0 | \rho | 0 \rangle + \langle 1 | \rho | 1 \rangle\) is the
&lt;strong>population&lt;/strong> and \(\langle \chi \rangle = \langle 0 | \rho | 1 \rangle + \langle 1 | \rho | 0 \rangle\)
captures the &lt;strong>coherence&lt;/strong>.&lt;/p>
&lt;p>The population is easy to measure &amp;ndash; just prepare the state and measure in the computational basis.
The coherence is harder. The standard approach is &lt;strong>parity oscillation&lt;/strong>: apply \(R_z(-\phi)\) followed
by \(R_y(-\pi/2)\) to every qubit and then measure in the computational basis. This implements the
global observable&lt;/p>
$$\mathcal{P}(\phi) = \Big\langle \bigotimes_{j=1}^N (\cos \phi \, X_j + \sin \phi \, Y_j) \Big\rangle.$$
&lt;p>For an ideal \(N\)-qubit GHZ state, the signal oscillates as \(C \cos(N\phi + \theta)\). The phase
offset \(\theta\) accounts for coherent phase errors and corresponds to preparing a rotated state
\(|\mathrm{GHZ}_\theta\rangle = (|0^{\otimes N}\rangle + e^{i\theta} |1^{\otimes N}\rangle)/\sqrt{2}\).
By measuring at many different phases \(\phi\) and fitting the resulting cosine, we can estimate the
coherence amplitude \(C\) (and optionally \(\theta\)).&lt;/p>
&lt;h3 id="the-sampling-problem">The sampling problem&lt;/h3>
&lt;p>The oscillation frequency is \(N\) &amp;ndash; the number of qubits. By the Nyquist-Shannon theorem, we need
at least \(2N\) measurements to faithfully sample this signal, typically at angles
\(\phi_k = k\pi/(N+1)\) for \(k = 0, \dots, 2N-1\). For a 100-qubit GHZ state, that is at least 200
different phase circuits, each requiring thousands of shots. This quickly becomes expensive.&lt;/p>
&lt;h2 id="compressed-sensing-fewer-measurements">Compressed Sensing: Fewer Measurements&lt;/h2>
&lt;p>Here is the key insight: the parity oscillation signal is &lt;strong>1-sparse&lt;/strong> in the frequency domain. It
consists of a single cosine at frequency \(N\). We do not actually need to sample the full signal &amp;ndash;
we just need to identify that one frequency and its amplitude.&lt;/p>
&lt;p>This is exactly the setting where &lt;strong>compressed sensing&lt;/strong> excels. Instead of \(2N\) measurements, we
can recover the signal from just \(M \sim \mathcal{O}(\log N)\) random measurements using the Lasso
(L1-regularized regression):&lt;/p>
$$\min_{\beta} \frac{1}{2M} \|y - D\beta\|_2^2 + \alpha \|\beta\|_1$$
&lt;p>where \(D\) is a dictionary matrix with columns \(\cos(k\phi_i)\) and \(-\sin(k\phi_i)\) for
candidate frequencies \(k = 1, \ldots, N\), and \(y\) is the vector of measured parities.&lt;/p>
&lt;p>The L1 penalty promotes sparsity &amp;ndash; most coefficients are driven to zero, and only the true
frequency survives. We then refine the amplitude estimate with ordinary least squares on just the
detected frequency.&lt;/p>
&lt;p>Classical compressed sensing theory says that if only \(s\) coefficients are non-zero, a random
measurement design needs on the order of \(m \ge c s \log N\) samples for stable recovery. Our signal
is effectively \(s=2\) (one cosine and one sine term), so we only need logarithmically many parity
circuits in the number of qubits. In practice we choose \(M \approx 5 \log N\), matching the scaling
used in the paper&amp;rsquo;s simulations and hardware experiments. This is an exponential improvement over the
\(\mathcal{O}(N)\) scaling of traditional parity oscillation and a double-exponential reduction
relative to full state tomography.&lt;/p>
&lt;p>Try it below. Compare how parity oscillation (blue, which knows \(N\)) and compressed sensing (gold,
which discovers \(N\)) estimate the coherence from noisy data:&lt;/p>
&lt;div id="parity-cs-widget" class="ghz-widget">
&lt;h4>Interactive: Parity Oscillation vs Compressed Sensing&lt;/h4>
&lt;div class="controls">
&lt;div class="control-group">
&lt;label>Qubits (n): &lt;span id="pcs-n-val">7&lt;/span>&lt;/label>
&lt;input type="range" id="pcs-n" min="3" max="30" value="7" step="1">
&lt;/div>
&lt;div class="control-group">
&lt;label>Noise (σ): &lt;span id="pcs-noise-val">0.10&lt;/span>&lt;/label>
&lt;input type="range" id="pcs-noise" min="0" max="0.5" value="0.1" step="0.01">
&lt;/div>
&lt;div class="control-group">
&lt;label>Measurements (M): &lt;span id="pcs-m-val">15&lt;/span>&lt;/label>
&lt;input type="range" id="pcs-m" min="5" max="50" value="15" step="1">
&lt;/div>
&lt;div class="control-group">
&lt;label>Lasso α: &lt;span id="pcs-alpha-val">0.10&lt;/span>&lt;/label>
&lt;input type="range" id="pcs-alpha" min="0.001" max="0.5" value="0.1" step="0.001">
&lt;/div>
&lt;/div>
&lt;div id="pcs-signal-plot" style="width:100%; height:350px;">&lt;/div>
&lt;div id="pcs-spectrum-plot" style="width:100%; height:250px;">&lt;/div>
&lt;div class="results-panel" id="pcs-results">&lt;/div>
&lt;/div>
&lt;script src="https://vrusso.com/blog/ghz_cs/parity_cs_widget.js">&lt;/script>
&lt;p>A few things to notice as you play with the sliders:&lt;/p>
&lt;ul>
&lt;li>&lt;strong>Increase the number of qubits&lt;/strong> to see the oscillation frequency increase. Compressed sensing
handles this well because it searches over all candidate frequencies.&lt;/li>
&lt;li>&lt;strong>Increase the noise&lt;/strong> to see both methods degrade &amp;ndash; but they degrade in different ways. Parity
oscillation can overfit noise; CS tends to be more robust due to the sparsity constraint.&lt;/li>
&lt;li>&lt;strong>Reduce measurements&lt;/strong> to see the advantage of CS. With very few measurements, curve fitting
becomes unreliable, but CS can still identify the correct frequency.&lt;/li>
&lt;li>&lt;strong>Adjust Lasso α&lt;/strong> to control the sparsity-data tradeoff. Too high and the signal is
over-regularized; too low and noise frequencies leak through.&lt;/li>
&lt;/ul>
&lt;h2 id="putting-it-together">Putting It Together&lt;/h2>
&lt;p>The fidelity \(F = (P + C)/2\) benefits from both innovations:&lt;/p>
&lt;ul>
&lt;li>&lt;strong>Flag qubits&lt;/strong> improve both \(P\) and \(C\) by post-selecting away erroneous shots&lt;/li>
&lt;li>&lt;strong>Compressed sensing&lt;/strong> lets us estimate \(C\) efficiently with fewer measurement circuits&lt;/li>
&lt;/ul>
&lt;p>The widget below shows a simplified analytical model of how fidelity improves as you add flag pairs.
The model assumes depolarizing noise with a given 2-qubit gate error rate:&lt;/p>
&lt;div id="fidelity-widget" class="ghz-widget">
&lt;h4>Interactive: Fidelity Improvement with Flag Qubits&lt;/h4>
&lt;div class="controls">
&lt;div class="control-group">
&lt;label>Qubits (N): &lt;span id="fc-n-val">11&lt;/span>&lt;/label>
&lt;input type="range" id="fc-n" min="5" max="40" value="11" step="1">
&lt;/div>
&lt;div class="control-group">
&lt;label>2-qubit gate error (p₂q): &lt;span id="fc-err-val">0.010&lt;/span>&lt;/label>
&lt;input type="range" id="fc-err" min="0.001" max="0.05" value="0.01" step="0.001">
&lt;/div>
&lt;div class="control-group">
&lt;label>Flag pairs (k): &lt;span id="fc-k-val">0&lt;/span>&lt;/label>
&lt;input type="range" id="fc-k" min="0" max="6" value="0" step="1">
&lt;/div>
&lt;/div>
&lt;div id="fc-bar-plot" style="width:100%; height:350px;">&lt;/div>
&lt;div class="results-panel" id="fc-results">&lt;/div>
&lt;/div>
&lt;script src="https://vrusso.com/blog/ghz_cs/fidelity_comparison_widget.js">&lt;/script>
&lt;p>Notice how even a small number of flag pairs can meaningfully improve fidelity, especially for
moderate error rates. The &amp;ldquo;acceptance&amp;rdquo; rate shows the fraction of shots that survive post-selection
&amp;ndash; this is the cost of the improved fidelity.&lt;/p>
&lt;h2 id="summary">Summary&lt;/h2>
&lt;p>We showed that:&lt;/p>
&lt;ol>
&lt;li>&lt;strong>Flag qubits&lt;/strong> on binary-tree GHZ circuits can be positioned with a simple greedy algorithm that
enjoys the classical \((1-1/e)\) performance guarantee for maximum coverage; designing tree-specific
algorithms that beat this bound remains an open direction.&lt;/li>
&lt;li>&lt;strong>Compressed sensing&lt;/strong> allows estimating GHZ state coherence from \(\mathcal{O}(\log N)\)
measurements instead of \(\mathcal{O}(N)\), a significant reduction for large states.&lt;/li>
&lt;li>The combination of these techniques makes it practical to prepare and verify large, high-fidelity
GHZ states on all-to-all connected hardware.&lt;/li>
&lt;/ol>
&lt;p>For the full details, proofs, and experimental results on Quantinuum hardware, see the paper:
&lt;em>&amp;ldquo;Compressed Sensing for Efficient Fidelity Estimation of GHZ States&amp;rdquo;&lt;/em>
(&lt;a href="https://arxiv.org/abs/2604.27824">arXiv:2604.27824&lt;/a>).&lt;/p>
&lt;p>The code is available at
&lt;a href="https://github.com/unitaryfoundation/wigners_friend">github.com/unitaryfoundation/wigners_friend&lt;/a>.&lt;/p></content></item><item><title>The QEM Zoo: A catalog of quantum error mitigation techniques</title><link>https://vrusso.com/posts/qem_zoo/</link><pubDate>Tue, 10 Feb 2026 00:00:00 +0000</pubDate><guid>https://vrusso.com/posts/qem_zoo/</guid><description>In a comprehensive review paper on quantum error mitigation by Cai et al. (arXiv:2210.00921), the authors posed an open problem: what is the full landscape of the &amp;ldquo;zoo&amp;rdquo; of QEM techniques?
I recently launched a website to help address this: the QEM Zoo.
It&amp;rsquo;s a living catalog of quantum error mitigation and suppression techniques, inspired by the Complexity Zoo and the Error Correction Zoo. The site organizes techniques into protocols, supporting methods, noise models, and applications—all searchable and filterable.</description><content>&lt;p>In a comprehensive review paper on quantum error mitigation by Cai et al.
(&lt;a href="https://arxiv.org/abs/2210.00921">arXiv:2210.00921&lt;/a>), the authors posed an open problem: what is the full landscape of
the &amp;ldquo;zoo&amp;rdquo; of QEM techniques?&lt;/p>
&lt;p>&lt;img alt="qem-open-problem" src="https://vrusso.com/blog/qem_open_problem.png">&lt;/p>
&lt;p>I recently launched a website to help address this: the &lt;a href="https://qemzoo.com/">QEM Zoo&lt;/a>.&lt;/p>
&lt;p>It&amp;rsquo;s a living catalog of quantum error mitigation and suppression techniques, inspired by the &lt;a href="https://complexityzoo.net/">Complexity
Zoo&lt;/a> and the &lt;a href="https://errorcorrectionzoo.org/">Error Correction Zoo&lt;/a>. The site organizes
techniques into protocols, supporting methods, noise models, and applications—all searchable and filterable.&lt;/p>
&lt;p>Contributions welcome: &lt;a href="https://github.com/vprusso/qemzoo">github.com/vprusso/qemzoo&lt;/a>&lt;/p></content></item><item><title>Quantum error mitigation by layerwise Richardson extrapolation</title><link>https://vrusso.com/posts/lre/</link><pubDate>Sat, 24 Jan 2026 00:00:00 +0000</pubDate><guid>https://vrusso.com/posts/lre/</guid><description>In a previous post, I gave a high-level overview of zero-noise extrapolation (ZNE) and how we can increase the noise of quantum circuits for ZNE using a technique known as quantum circuit unoptimization. In this post, I&amp;rsquo;ll describe a technique that my colleague Andrea Mari and I came up with called layerwise Richardson extrapolation (LRE), which can be thought of as a generalization of standard ZNE.
The paper can be found on arXiv (arXiv:2402.</description><content>&lt;p>In a &lt;a href="https://vrusso.com/posts/circuit_unopt_zne/">previous post&lt;/a>, I gave a high-level overview of zero-noise extrapolation (ZNE) and how we
can increase the noise of quantum circuits for ZNE using a technique known as quantum circuit unoptimization. In this
post, I&amp;rsquo;ll describe a technique that my colleague &lt;a href="https://github.com/andreamari">Andrea Mari&lt;/a> and I came up with called
&lt;em>layerwise Richardson extrapolation&lt;/em> (LRE), which can be thought of as a generalization of standard ZNE.&lt;/p>
&lt;p>The paper can be found on arXiv (&lt;a href="https://arxiv.org/abs/2402.04000">arXiv:2402.04000&lt;/a>) and was published in Physical
Review A (&lt;a href="https://doi.org/10.1103/PhysRevA.110.062420">Phys. Rev. A 110, 062420, 2024&lt;/a>). LRE has also been integrated
into the open-source quantum error mitigation toolkit &lt;a href="https://mitiq.readthedocs.io/en/stable/guide/lre.html">mitiq&lt;/a>,
developed by the &lt;a href="https://unitary.foundation/">Unitary Foundation&lt;/a>.&lt;/p>
&lt;h3 id="quick-recap-standard-zne">Quick recap: standard ZNE&lt;/h3>
&lt;p>To set the stage, let&amp;rsquo;s briefly recap how standard ZNE works (see the &lt;a href="https://vrusso.com/posts/circuit_unopt_zne/">previous post&lt;/a> for more
detail). The idea is:&lt;/p>
&lt;ol>
&lt;li>Take a quantum circuit and create multiple copies of it where the noise has been progressively amplified (e.g., via
unitary folding).&lt;/li>
&lt;li>Execute each noisy circuit and collect the expectation values.&lt;/li>
&lt;li>Fit a curve through these data points and extrapolate back to the zero-noise limit.&lt;/li>
&lt;/ol>
&lt;p>The key point is that standard ZNE treats the circuit&amp;rsquo;s noise as a &lt;em>single&lt;/em> scalar parameter \(\lambda\). When you fold
the circuit (say, with global folding), every layer gets scaled by the same factor. The extrapolation is then a
&lt;em>univariate&lt;/em> polynomial fit: \(f(\lambda) = a_0 + a_1\lambda + a_2\lambda^2 + \cdots\).&lt;/p>
&lt;p>This is a perfectly reasonable approach, but it makes an implicit assumption: that all layers of the circuit experience
the same type and magnitude of noise. In practice, this is often not the case. Different layers can have different gate
error rates, different qubit connectivities, and different levels of crosstalk. Standard ZNE has no way to account for
this layer-to-layer variation.&lt;/p>
&lt;h3 id="the-idea-behind-lre">The idea behind LRE&lt;/h3>
&lt;p>The core idea of LRE is to treat the noise in each circuit layer as an &lt;em>independent&lt;/em> variable. Instead of a single
noise-scale factor \(\lambda\), we now have a &lt;em>vector&lt;/em> of scale factors \(\mathbf{\lambda} = (\lambda_1, \lambda_2, \ldots, \lambda_l)\), where \(l\) is the number of layers in the circuit.&lt;/p>
&lt;p>&lt;img alt="zne-vs-lre" src="https://vrusso.com/blog/lre_zne_vs_lre.svg">&lt;/p>
&lt;p>By scaling each layer independently, we can capture the distinct noise characteristics of different parts of the circuit.
The extrapolation then becomes a &lt;em>multivariate&lt;/em> polynomial fit over this higher-dimensional space, allowing for a more
fine-grained and accurate estimate of the zero-noise expectation value.&lt;/p>
&lt;h3 id="how-lre-works">How LRE works&lt;/h3>
&lt;p>The LRE workflow consists of two main stages:&lt;/p>
&lt;p>&lt;img alt="lre-workflow" src="https://vrusso.com/blog/lre_workflow.svg">&lt;/p>
&lt;p>&lt;strong>Stage 1: Multivariate noise scaling.&lt;/strong> Given a circuit with \(l\) layers and a chosen polynomial degree \(d\), we
generate a collection of noise-scaled circuits. Each circuit in this collection has its layers folded according to a
specific scale-factor vector \(\mathbf{\lambda}_i = (\lambda_1^{(i)}, \lambda_2^{(i)}, \ldots, \lambda_l^{(i)})\).
The total number of noise-scaled circuits we need is determined by the number of monomials in the multivariate
polynomial basis:&lt;/p>
$$M = \binom{d + l}{d}$$
&lt;p>For example, with degree \(d = 2\) and \(l = 2\) layers, the monomial basis is \(\{1, \lambda_1, \lambda_2, \lambda_1^2, \lambda_1\lambda_2, \lambda_2^2\}\), giving us \(M = 6\) terms and hence 6 noise-scaled circuits.&lt;/p>
&lt;p>&lt;strong>Stage 2: Multivariate Richardson extrapolation.&lt;/strong> After executing all the noise-scaled circuits and collecting their
expectation values \(\langle O(\mathbf{\lambda}_i)\rangle\), we compute the zero-noise estimate as a linear
combination:&lt;/p>
$$O_{\text{LRE}} = \sum_{i=1}^{M} c_i \langle O(\mathbf{\lambda}_i)\rangle$$
&lt;p>The coefficients \(c_i\) are determined analytically from multivariate Lagrange interpolation theory. Specifically, they
are given by the ratio of determinants:&lt;/p>
$$c_i = \frac{\det(B_i(\mathbf{0}))}{\det(A)}$$
&lt;p>where \(A\) is the sample matrix formed by evaluating the monomial basis at each scale-factor vector, and
\(B_i(\mathbf{0})\) is the matrix obtained by replacing the \(i\)-th row of \(A\) with the monomials evaluated at
\(\mathbf{\lambda} = \mathbf{0}\) (i.e., the zero-noise point). This is analogous to Cramer&amp;rsquo;s rule applied to the
interpolation problem.&lt;/p>
&lt;h3 id="using-lre-in-mitiq">Using LRE in mitiq&lt;/h3>
&lt;p>LRE is available in &lt;a href="https://mitiq.readthedocs.io/en/stable/guide/lre.html">mitiq&lt;/a>, making it straightforward to apply
in practice. Here&amp;rsquo;s a minimal example using Cirq:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-python" data-lang="python">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f92672">import&lt;/span> numpy &lt;span style="color:#66d9ef">as&lt;/span> np
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f92672">from&lt;/span> cirq &lt;span style="color:#f92672">import&lt;/span> (
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> DensityMatrixSimulator, depolarize,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> LineQubit, Circuit, Moment,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> H, CNOT, rx, ry,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f92672">from&lt;/span> mitiq.lre &lt;span style="color:#f92672">import&lt;/span> execute_with_lre
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e"># Define a circuit with a few layers.&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>qubits &lt;span style="color:#f92672">=&lt;/span> LineQubit&lt;span style="color:#f92672">.&lt;/span>range(&lt;span style="color:#ae81ff">2&lt;/span>)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>circuit &lt;span style="color:#f92672">=&lt;/span> Circuit([
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> Moment([H(qubits[&lt;span style="color:#ae81ff">0&lt;/span>])]),
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> Moment([CNOT(qubits[&lt;span style="color:#ae81ff">0&lt;/span>], qubits[&lt;span style="color:#ae81ff">1&lt;/span>])]),
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> Moment([rx(np&lt;span style="color:#f92672">.&lt;/span>pi &lt;span style="color:#f92672">/&lt;/span> &lt;span style="color:#ae81ff">4&lt;/span>)&lt;span style="color:#f92672">.&lt;/span>on(qubits[&lt;span style="color:#ae81ff">0&lt;/span>]), ry(np&lt;span style="color:#f92672">.&lt;/span>pi &lt;span style="color:#f92672">/&lt;/span> &lt;span style="color:#ae81ff">3&lt;/span>)&lt;span style="color:#f92672">.&lt;/span>on(qubits[&lt;span style="color:#ae81ff">1&lt;/span>])]),
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>])
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e"># Define an executor that simulates a noisy backend.&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#66d9ef">def&lt;/span> &lt;span style="color:#a6e22e">execute&lt;/span>(circuit, noise_level&lt;span style="color:#f92672">=&lt;/span>&lt;span style="color:#ae81ff">0.02&lt;/span>):
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> noisy_circuit &lt;span style="color:#f92672">=&lt;/span> circuit&lt;span style="color:#f92672">.&lt;/span>with_noise(depolarize(p&lt;span style="color:#f92672">=&lt;/span>noise_level))
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> rho &lt;span style="color:#f92672">=&lt;/span> DensityMatrixSimulator()&lt;span style="color:#f92672">.&lt;/span>simulate(noisy_circuit)&lt;span style="color:#f92672">.&lt;/span>final_density_matrix
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">return&lt;/span> np&lt;span style="color:#f92672">.&lt;/span>real(rho[&lt;span style="color:#ae81ff">0&lt;/span>, &lt;span style="color:#ae81ff">0&lt;/span>])
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e"># Run LRE.&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>mitigated_value &lt;span style="color:#f92672">=&lt;/span> execute_with_lre(
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> circuit,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> execute,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> degree&lt;span style="color:#f92672">=&lt;/span>&lt;span style="color:#ae81ff">2&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> fold_multiplier&lt;span style="color:#f92672">=&lt;/span>&lt;span style="color:#ae81ff">3&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>noisy_value &lt;span style="color:#f92672">=&lt;/span> execute(circuit)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>ideal_value &lt;span style="color:#f92672">=&lt;/span> execute(circuit, noise_level&lt;span style="color:#f92672">=&lt;/span>&lt;span style="color:#ae81ff">0.0&lt;/span>)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>print(&lt;span style="color:#e6db74">f&lt;/span>&lt;span style="color:#e6db74">&amp;#34;Ideal value: &lt;/span>&lt;span style="color:#e6db74">{&lt;/span>ideal_value&lt;span style="color:#e6db74">:&lt;/span>&lt;span style="color:#e6db74">.5f&lt;/span>&lt;span style="color:#e6db74">}&lt;/span>&lt;span style="color:#e6db74">&amp;#34;&lt;/span>)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>print(&lt;span style="color:#e6db74">f&lt;/span>&lt;span style="color:#e6db74">&amp;#34;Noisy value: &lt;/span>&lt;span style="color:#e6db74">{&lt;/span>noisy_value&lt;span style="color:#e6db74">:&lt;/span>&lt;span style="color:#e6db74">.5f&lt;/span>&lt;span style="color:#e6db74">}&lt;/span>&lt;span style="color:#e6db74">&amp;#34;&lt;/span>)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>print(&lt;span style="color:#e6db74">f&lt;/span>&lt;span style="color:#e6db74">&amp;#34;Mitigated (LRE): &lt;/span>&lt;span style="color:#e6db74">{&lt;/span>mitigated_value&lt;span style="color:#e6db74">:&lt;/span>&lt;span style="color:#e6db74">.5f&lt;/span>&lt;span style="color:#e6db74">}&lt;/span>&lt;span style="color:#e6db74">&amp;#34;&lt;/span>)
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Running this produces:&lt;/p>
&lt;pre tabindex="0">&lt;code>Ideal value: 0.33839
Noisy value: 0.32722
Mitigated (LRE): 0.33687
&lt;/code>&lt;/pre>&lt;p>The LRE-mitigated value (0.33687) is closer to the ideal (0.33839) than the raw noisy value (0.32722), reducing the error from ~0.011 to ~0.002.
The two key parameters are:&lt;/p>
&lt;ul>
&lt;li>&lt;strong>&lt;code>degree&lt;/code>&lt;/strong>: The degree of the extrapolating polynomial. Higher degree can capture more complex noise behavior, but
requires more noise-scaled circuits.&lt;/li>
&lt;li>&lt;strong>&lt;code>fold_multiplier&lt;/code>&lt;/strong>: Controls how aggressively each layer is folded. A larger fold multiplier means more separation
between noise levels.&lt;/li>
&lt;/ul>
&lt;h3 id="under-the-hood">Under the hood&lt;/h3>
&lt;p>If you want more control, mitiq exposes the two stages of LRE as separate functions:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-python" data-lang="python">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f92672">from&lt;/span> mitiq.lre.multivariate_scaling &lt;span style="color:#f92672">import&lt;/span> multivariate_layer_scaling
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f92672">from&lt;/span> mitiq.lre.inference &lt;span style="color:#f92672">import&lt;/span> multivariate_richardson_coefficients
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e"># Stage 1: Generate noise-scaled circuits.&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>noise_scaled_circuits &lt;span style="color:#f92672">=&lt;/span> multivariate_layer_scaling(circuit, degree&lt;span style="color:#f92672">=&lt;/span>&lt;span style="color:#ae81ff">2&lt;/span>, fold_multiplier&lt;span style="color:#f92672">=&lt;/span>&lt;span style="color:#ae81ff">3&lt;/span>)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>print(&lt;span style="color:#e6db74">f&lt;/span>&lt;span style="color:#e6db74">&amp;#34;Number of noise-scaled circuits: &lt;/span>&lt;span style="color:#e6db74">{&lt;/span>len(noise_scaled_circuits)&lt;span style="color:#e6db74">}&lt;/span>&lt;span style="color:#e6db74">&amp;#34;&lt;/span>)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e"># Execute each noise-scaled circuit.&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>noisy_exp_values &lt;span style="color:#f92672">=&lt;/span> [execute(circ) &lt;span style="color:#66d9ef">for&lt;/span> circ &lt;span style="color:#f92672">in&lt;/span> noise_scaled_circuits]
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e"># Stage 2: Compute Richardson coefficients and combine.&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>coefficients &lt;span style="color:#f92672">=&lt;/span> multivariate_richardson_coefficients(
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> circuit, fold_multiplier&lt;span style="color:#f92672">=&lt;/span>&lt;span style="color:#ae81ff">3&lt;/span>, degree&lt;span style="color:#f92672">=&lt;/span>&lt;span style="color:#ae81ff">2&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>mitigated_value &lt;span style="color:#f92672">=&lt;/span> sum(
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> exp_val &lt;span style="color:#f92672">*&lt;/span> coeff &lt;span style="color:#66d9ef">for&lt;/span> exp_val, coeff &lt;span style="color:#f92672">in&lt;/span> zip(noisy_exp_values, coefficients)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>)
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;pre tabindex="0">&lt;code>Number of noise-scaled circuits: 10
Mitigated (manual): 0.33687
&lt;/code>&lt;/pre>&lt;p>For this 3-layer circuit with degree 2, we need \(\binom{2+3}{2} = 10\) noise-scaled circuits. This gives you the
flexibility to batch the circuit executions, use different backends, or inspect the intermediate noise-scaled circuits.&lt;/p>
&lt;h3 id="performance-comparison-lre-vs-zne">Performance comparison: LRE vs. ZNE&lt;/h3>
&lt;p>To see how LRE compares to standard ZNE, consider a 12-moment circuit under layer-dependent noise where later layers
experience up to 5x higher depolarizing rates than early layers:&lt;/p>
&lt;p>&lt;img alt="lre-test-circuit" src="https://vrusso.com/blog/lre_test_circuit.svg">&lt;/p>
&lt;p>Averaging over 10 random circuits at each noise level, LRE consistently achieves lower error than ZNE:&lt;/p>
&lt;p>&lt;img alt="lre-vs-zne-performance" src="https://vrusso.com/blog/lre_vs_zne_performance.png">&lt;/p>
&lt;p>The trade-off is circuit overhead: for a 12-layer circuit with degree 2, LRE requires \(\binom{14}{2} = 91\)
noise-scaled circuits, while ZNE typically uses 3-5. Whether this is worthwhile depends on your application&amp;mdash;on
simulators the overhead is negligible, while on real hardware with limited shot budgets, chunking (discussed below)
can reduce the number of circuits substantially.&lt;/p>
&lt;p>The benefit is most pronounced for deeper circuits where noise accumulation across layers becomes significant. For
shallow circuits or uniform noise, LRE and ZNE tend to perform similarly (since uniform noise reduces the multivariate
model to the univariate case).&lt;/p>
&lt;h3 id="tuning-lre-degree-and-fold-multiplier">Tuning LRE: degree and fold multiplier&lt;/h3>
&lt;p>The two main hyperparameters that control LRE&amp;rsquo;s behavior are the polynomial degree and the fold multiplier. Higher
degree allows the polynomial to capture more complex noise dependencies, but requires exponentially more noise-scaled
circuits. The fold multiplier controls the spacing between noise levels.&lt;/p>
&lt;p>&lt;img alt="lre-degree-comparison" src="https://vrusso.com/blog/lre_degree_comparison.png">&lt;/p>
&lt;p>As the plot shows, increasing the degree from 1 to 2 yields lower error, as the polynomial model becomes more
expressive. Degree 3 is not shown because the sample matrix becomes too large to compute determinants reliably even
for an 8-layer test circuit&amp;mdash;this is exactly where chunking becomes necessary.&lt;/p>
&lt;h3 id="chunking-handling-large-circuits">Chunking: handling large circuits&lt;/h3>
&lt;p>For circuits with many layers, the number of required noise-scaled circuits grows combinatorially. The formula
\(M = \binom{d+l}{d}\) means that a 20-layer circuit at degree 2 requires 231 noise-scaled circuits, and a 20-layer
circuit at degree 3 requires 1771.&lt;/p>
&lt;p>&lt;img alt="lre-scaling-overhead" src="https://vrusso.com/blog/lre_scaling_overhead.png">&lt;/p>
&lt;p>To address this, LRE supports &lt;em>chunking&lt;/em>, where consecutive layers are grouped together and treated as a single unit
for the purposes of noise scaling. This reduces the effective number of independent variables from \(l\) to the number
of chunks.&lt;/p>
&lt;p>&lt;img alt="lre-chunking" src="https://vrusso.com/blog/lre_chunking.png">&lt;/p>
&lt;p>The visualization above shows how an 8-layer circuit, which would require \(\binom{10}{2} = 45\) noise-scaled circuits
without chunking, only requires \(\binom{6}{2} = 15\) circuits when grouped into 4 chunks. In mitiq, this is a single
parameter:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-python" data-lang="python">&lt;span style="display:flex;">&lt;span>mitigated_value &lt;span style="color:#f92672">=&lt;/span> execute_with_lre(
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> circuit,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> execute,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> degree&lt;span style="color:#f92672">=&lt;/span>&lt;span style="color:#ae81ff">2&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> fold_multiplier&lt;span style="color:#f92672">=&lt;/span>&lt;span style="color:#ae81ff">3&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> num_chunks&lt;span style="color:#f92672">=&lt;/span>&lt;span style="color:#ae81ff">4&lt;/span>, &lt;span style="color:#75715e"># Group layers into 4 chunks.&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>)
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>This trades some granularity in the layer-by-layer noise model for practical feasibility. For large circuits, chunking
is essential to keep the circuit overhead manageable.&lt;/p>
&lt;h3 id="when-to-use-lre">When to use LRE&lt;/h3>
&lt;p>LRE is particularly well-suited for circuits where different layers have meaningfully different noise characteristics.
This includes scenarios where:&lt;/p>
&lt;ul>
&lt;li>The circuit has a mix of single-qubit and two-qubit gate layers (two-qubit gates typically have higher error rates).&lt;/li>
&lt;li>The circuit uses qubits with varying coherence times or gate fidelities.&lt;/li>
&lt;li>Crosstalk effects are localized to specific layers.&lt;/li>
&lt;li>Noise accumulates with circuit depth (as is common on real hardware).&lt;/li>
&lt;/ul>
&lt;p>When the noise is perfectly uniform across all layers, LRE and standard ZNE yield similar results (as expected, since
uniform noise means the multivariate model degenerates to the univariate case). So there is no penalty for using LRE
in the uniform case&amp;mdash;it simply reduces to the standard approach.&lt;/p>
&lt;h3 id="further-reading">Further reading&lt;/h3>
&lt;ul>
&lt;li>&lt;strong>Paper&lt;/strong>: &lt;a href="https://arxiv.org/abs/2402.04000">arXiv:2402.04000&lt;/a> (Phys. Rev. A 110, 062420, 2024)&lt;/li>
&lt;li>&lt;strong>Mitiq docs&lt;/strong>: &lt;a href="https://mitiq.readthedocs.io/en/stable/guide/lre.html">LRE user guide&lt;/a>&lt;/li>
&lt;/ul></content></item><item><title>A Tale of Two Measurements: How quantum nonlocality can appear and disappear</title><link>https://vrusso.com/posts/nonlocality_without_entanglement/</link><pubDate>Tue, 01 Jul 2025 00:00:00 +0000</pubDate><guid>https://vrusso.com/posts/nonlocality_without_entanglement/</guid><description>In the quantum world, things are often weird. One of the classic sources of weirdness is entanglement, the &amp;ldquo;spooky action at a distance&amp;rdquo; that connects particles no matter how far apart they are. But there&amp;rsquo;s a lesser-known, yet equally fascinating, type of weirdness called &amp;ldquo;quantum nonlocality without entanglement.&amp;rdquo;
This phenomenon occurs when you have a set of unentangled (product) quantum states that are, surprisingly, impossible to tell apart perfectly if you&amp;rsquo;re restricted to local operations.</description><content>&lt;p>In the quantum world, things are often weird. One of the classic sources of weirdness is entanglement, the &amp;ldquo;spooky
action at a distance&amp;rdquo; that connects particles no matter how far apart they are. But there&amp;rsquo;s a lesser-known, yet equally
fascinating, type of weirdness called &lt;strong>&amp;ldquo;quantum nonlocality without entanglement.&amp;rdquo;&lt;/strong>&lt;/p>
&lt;p>This phenomenon occurs when you have a set of &lt;em>unentangled&lt;/em> (product) quantum states that are, surprisingly, impossible
to tell apart perfectly if you&amp;rsquo;re restricted to local operations. Imagine two physicists, Alice and Bob, in separate
labs. Someone prepares a quantum system in one of several possible product states—meaning Alice&amp;rsquo;s part and Bob&amp;rsquo;s part
are fundamentally independent—and sends one part to each of them. Even though there&amp;rsquo;s no entanglement, they might find
that to have the best possible chance of identifying which state they were given, they need to bring their parts
together and perform a joint measurement. Acting alone in their labs and communicating over the phone (a process called
LOCC, for Local Operations and Classical Communication) just isn&amp;rsquo;t good enough.&lt;/p>
&lt;p>This leads to a natural question: is this &amp;ldquo;nonlocality&amp;rdquo; an inherent, fixed property of a given set of quantum states? If
a set of states is nonlocal, is it &lt;em>always&lt;/em> nonlocal, no matter how you try to discriminate them?&lt;/p>
&lt;p>It turns out the answer is &lt;strong>no&lt;/strong>. In a &lt;a href="https://arxiv.org/abs/2506.20560">recent paper&lt;/a> I co-authored, we found that
this nonlocality isn&amp;rsquo;t just a property of the states, but also depends crucially on the &lt;em>rules of the game&lt;/em> you&amp;rsquo;re
playing to tell them apart.&lt;/p>
&lt;h2 id="the-two-games-of-state-discrimination">The two games of state discrimination&lt;/h2>
&lt;p>When you&amp;rsquo;re trying to identify an unknown quantum state from a known list, there are two main ways to approach the
problem:&lt;/p>
&lt;ol>
&lt;li>
&lt;p>&lt;strong>Minimum-Error Discrimination (The &amp;ldquo;Best Guess&amp;rdquo; Game):&lt;/strong> In this game, you &lt;em>must&lt;/em> make a guess every time. Your
goal is to maximize the probability of being correct. You accept that you&amp;rsquo;ll sometimes be wrong, but you want to
minimize your average error rate. This is like a multiple-choice test where you&amp;rsquo;re penalized for wrong answers, but you
have to answer every question.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>&lt;strong>Unambiguous Discrimination (The &amp;ldquo;No Wrong Answers&amp;rdquo; Game):&lt;/strong> This game is stricter. You are allowed to say, &amp;ldquo;I
don&amp;rsquo;t know&amp;rdquo; (an inconclusive result). But if you &lt;em>do&lt;/em> provide an answer, it &lt;strong>must&lt;/strong> be correct. There is zero room for
error. Your goal is to maximize the probability of getting a conclusive, correct result.&lt;/p>
&lt;/li>
&lt;/ol>
&lt;p>One might assume that if a set of states is hard for Alice and Bob to distinguish in the &amp;ldquo;best guess&amp;rdquo; game (i.e., LOCC
is suboptimal), it would also be hard for them in the &amp;ldquo;no wrong answers&amp;rdquo; game. Our work shows this intuition is wrong.&lt;/p>
&lt;h2 id="the-main-result">The main result&lt;/h2>
&lt;p>We constructed a special family of ensembles, each with six unentangled, linearly independent product states in a
\(\mathbb{C}^3 \otimes \mathbb{C}^3\) system. For this set of states, we discovered an interesting duality:&lt;/p>
&lt;blockquote>
&lt;p>The ensemble exhibits nonlocality without entanglement for minimum-error discrimination, but is perfectly local for
unambiguous discrimination.&lt;/p>
&lt;/blockquote>
&lt;p>In other words:&lt;/p>
&lt;ul>
&lt;li>&lt;strong>When playing the &amp;ldquo;Best Guess&amp;rdquo; game&lt;/strong>, Alice and Bob using only LOCC &lt;em>cannot&lt;/em> achieve the optimal success rate. A joint, global measurement is provably better. The states are nonlocal.
$$p_{_{L}}^{me} &lt; p_{_{G}}^{me}$$&lt;/li>
&lt;li>&lt;strong>When playing the &amp;ldquo;No Wrong Answers&amp;rdquo; game&lt;/strong>, Alice and Bob using only LOCC &lt;em>can&lt;/em> achieve the absolute maximum success rate. A fancy global measurement offers no advantage whatsoever. The states are not nonlocal in this context.
$$p_{_{L}}^{ud} = p_{_{G}}^{ud}$$&lt;/li>
&lt;/ul>
&lt;h2 id="how-is-this-possible">How is this possible?&lt;/h2>
&lt;p>The proof for the &lt;strong>minimum-error&lt;/strong> case is quite subtle. We showed that finding the best possible measurement for our
product states is mathematically equivalent to being able to perfectly distinguish a &lt;em>different&lt;/em> set of states—and this
new set of states is &lt;em>entangled&lt;/em>. Since we know that LOCC cannot perfectly distinguish all sets of orthogonal entangled
states, it follows that LOCC cannot be optimal for our original problem.&lt;/p>
&lt;p>The proof for the &lt;strong>unambiguous&lt;/strong> case was more direct. We first calculated the absolute theoretical maximum success
probability for this task, a value no measurement (local or global) could ever beat. Then, we designed a simple,
step-by-step LOCC protocol that Alice and Bob could use. We showed that our local protocol achieves that exact
theoretical maximum. Since their local method is as good as any possible global method, it is, by definition, optimal.&lt;/p>
&lt;h2 id="python-code-and-numerics">Python code and numerics&lt;/h2>
&lt;p>While the proofs in the paper are purely mathematical, we can use numerical optimization to find the optimal success
probabilities for these &amp;ldquo;games&amp;rdquo;. The problem of finding the best quantum measurement can be elegantly framed as a
Semidefinite Program (SDP), a type of convex optimization problem that can be solved efficiently.&lt;/p>
&lt;p>Let&amp;rsquo;s walk through how to verify this with a Python script.&lt;/p>
&lt;p>&lt;strong>Constructing the states:&lt;/strong>
First, we need to create the specific set of six product states from the paper. We&amp;rsquo;ll start
*by defining three vectors in \(\mathbb{C}^3\) that have a pairwise inner product of \(s\). For example, we&amp;rsquo;ll choose
*\(s = 0.5\).&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-python" data-lang="python">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f92672">import&lt;/span> numpy &lt;span style="color:#66d9ef">as&lt;/span> np
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e"># We define a set of 3 vectors in C^3 with pairwise inner product `s`.&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>s &lt;span style="color:#f92672">=&lt;/span> &lt;span style="color:#ae81ff">0.5&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>psi_1 &lt;span style="color:#f92672">=&lt;/span> np&lt;span style="color:#f92672">.&lt;/span>array([&lt;span style="color:#ae81ff">1&lt;/span>, &lt;span style="color:#ae81ff">0&lt;/span>, &lt;span style="color:#ae81ff">0&lt;/span>], dtype&lt;span style="color:#f92672">=&lt;/span>complex)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>psi_2 &lt;span style="color:#f92672">=&lt;/span> np&lt;span style="color:#f92672">.&lt;/span>array([s, np&lt;span style="color:#f92672">.&lt;/span>sqrt(&lt;span style="color:#ae81ff">1&lt;/span> &lt;span style="color:#f92672">-&lt;/span> s&lt;span style="color:#f92672">**&lt;/span>&lt;span style="color:#ae81ff">2&lt;/span>), &lt;span style="color:#ae81ff">0&lt;/span>], dtype&lt;span style="color:#f92672">=&lt;/span>complex)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e"># Construct the third vector to be symmetric with the first two.&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>x &lt;span style="color:#f92672">=&lt;/span> s
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>y &lt;span style="color:#f92672">=&lt;/span> (s &lt;span style="color:#f92672">-&lt;/span> s&lt;span style="color:#f92672">**&lt;/span>&lt;span style="color:#ae81ff">2&lt;/span>) &lt;span style="color:#f92672">/&lt;/span> np&lt;span style="color:#f92672">.&lt;/span>sqrt(&lt;span style="color:#ae81ff">1&lt;/span> &lt;span style="color:#f92672">-&lt;/span> s&lt;span style="color:#f92672">**&lt;/span>&lt;span style="color:#ae81ff">2&lt;/span>)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>z &lt;span style="color:#f92672">=&lt;/span> np&lt;span style="color:#f92672">.&lt;/span>sqrt(&lt;span style="color:#ae81ff">1&lt;/span> &lt;span style="color:#f92672">-&lt;/span> x&lt;span style="color:#f92672">**&lt;/span>&lt;span style="color:#ae81ff">2&lt;/span> &lt;span style="color:#f92672">-&lt;/span> y&lt;span style="color:#f92672">**&lt;/span>&lt;span style="color:#ae81ff">2&lt;/span>)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>psi_3 &lt;span style="color:#f92672">=&lt;/span> np&lt;span style="color:#f92672">.&lt;/span>array([x, y, z], dtype&lt;span style="color:#f92672">=&lt;/span>complex)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e"># The full ensemble lives in C^3 ⊗ C^3 and consists of 6 product states.&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>ensemble &lt;span style="color:#f92672">=&lt;/span> [
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> np&lt;span style="color:#f92672">.&lt;/span>kron(psi_1, psi_2), np&lt;span style="color:#f92672">.&lt;/span>kron(psi_1, psi_3),
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> np&lt;span style="color:#f92672">.&lt;/span>kron(psi_2, psi_1), np&lt;span style="color:#f92672">.&lt;/span>kron(psi_2, psi_3),
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> np&lt;span style="color:#f92672">.&lt;/span>kron(psi_3, psi_1), np&lt;span style="color:#f92672">.&lt;/span>kron(psi_3, psi_2),
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>]
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>&lt;strong>Defining the optimization problem&lt;/strong>:&lt;/p>
&lt;p>Next, we create a function that takes these states and formulates the SDP. This function uses the cvxpy library to
define the variables (the measurement operators), the objective (maximize success probability), and the physical
constraints (e.g., measurements must be valid, and for the unambiguous case, errors must be zero).&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-python" data-lang="python">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f92672">import&lt;/span> cvxpy
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#66d9ef">def&lt;/span> &lt;span style="color:#a6e22e">to_density_matrix&lt;/span>(psi: np&lt;span style="color:#f92672">.&lt;/span>ndarray) &lt;span style="color:#f92672">-&amp;gt;&lt;/span> np&lt;span style="color:#f92672">.&lt;/span>ndarray:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#e6db74">&amp;#34;&amp;#34;&amp;#34;Converts a state vector to a density matrix.&amp;#34;&amp;#34;&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">return&lt;/span> np&lt;span style="color:#f92672">.&lt;/span>outer(psi, psi&lt;span style="color:#f92672">.&lt;/span>conj())
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#66d9ef">def&lt;/span> &lt;span style="color:#a6e22e">get_optimal_prob&lt;/span>(
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> states: list[np&lt;span style="color:#f92672">.&lt;/span>ndarray],
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> strategy: str &lt;span style="color:#f92672">=&lt;/span> &lt;span style="color:#e6db74">&amp;#34;min_error&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> solver: str &lt;span style="color:#f92672">=&lt;/span> &lt;span style="color:#e6db74">&amp;#34;SCS&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>) &lt;span style="color:#f92672">-&amp;gt;&lt;/span> float:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#e6db74">&amp;#34;&amp;#34;&amp;#34;Calculates the optimal success probability using an SDP.&amp;#34;&amp;#34;&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> dim &lt;span style="color:#f92672">=&lt;/span> states[&lt;span style="color:#ae81ff">0&lt;/span>]&lt;span style="color:#f92672">.&lt;/span>shape[&lt;span style="color:#ae81ff">0&lt;/span>]
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> n &lt;span style="color:#f92672">=&lt;/span> len(states)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> probs &lt;span style="color:#f92672">=&lt;/span> [&lt;span style="color:#ae81ff">1&lt;/span> &lt;span style="color:#f92672">/&lt;/span> n] &lt;span style="color:#f92672">*&lt;/span> n
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#75715e"># For unambiguous discrimination, we add a &amp;#34;failure&amp;#34; outcome.&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> num_measurements &lt;span style="color:#f92672">=&lt;/span> n &lt;span style="color:#f92672">+&lt;/span> &lt;span style="color:#ae81ff">1&lt;/span> &lt;span style="color:#66d9ef">if&lt;/span> strategy &lt;span style="color:#f92672">==&lt;/span> &lt;span style="color:#e6db74">&amp;#34;unambiguous&amp;#34;&lt;/span> &lt;span style="color:#66d9ef">else&lt;/span> n
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> measurements &lt;span style="color:#f92672">=&lt;/span> [cvxpy&lt;span style="color:#f92672">.&lt;/span>Variable((dim, dim), hermitian&lt;span style="color:#f92672">=&lt;/span>&lt;span style="color:#66d9ef">True&lt;/span>) &lt;span style="color:#66d9ef">for&lt;/span> _ &lt;span style="color:#f92672">in&lt;/span> range(num_measurements)]
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#75715e"># Objective: maximize the average probability of a correct guess.&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> obj_func &lt;span style="color:#f92672">=&lt;/span> sum(probs[i] &lt;span style="color:#f92672">*&lt;/span> cvxpy&lt;span style="color:#f92672">.&lt;/span>trace(to_density_matrix(states[i]) &lt;span style="color:#f92672">@&lt;/span> measurements[i]) &lt;span style="color:#66d9ef">for&lt;/span> i &lt;span style="color:#f92672">in&lt;/span> range(n))
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#75715e"># Constraints for a valid measurement (POVM).&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> constraints &lt;span style="color:#f92672">=&lt;/span> [sum(measurements) &lt;span style="color:#f92672">==&lt;/span> np&lt;span style="color:#f92672">.&lt;/span>eye(dim)]
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> constraints &lt;span style="color:#f92672">+=&lt;/span> [m &lt;span style="color:#f92672">&amp;gt;&amp;gt;&lt;/span> &lt;span style="color:#ae81ff">0&lt;/span> &lt;span style="color:#66d9ef">for&lt;/span> m &lt;span style="color:#f92672">in&lt;/span> measurements]
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#75715e"># Additional zero-error constraints for the unambiguous game.&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">if&lt;/span> strategy &lt;span style="color:#f92672">==&lt;/span> &lt;span style="color:#e6db74">&amp;#34;unambiguous&amp;#34;&lt;/span>:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">for&lt;/span> i &lt;span style="color:#f92672">in&lt;/span> range(n):
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">for&lt;/span> j &lt;span style="color:#f92672">in&lt;/span> range(n):
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">if&lt;/span> i &lt;span style="color:#f92672">!=&lt;/span> j:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> constraints&lt;span style="color:#f92672">.&lt;/span>append(cvxpy&lt;span style="color:#f92672">.&lt;/span>trace(to_density_matrix(states[j]) &lt;span style="color:#f92672">@&lt;/span> measurements[i]) &lt;span style="color:#f92672">==&lt;/span> &lt;span style="color:#ae81ff">0&lt;/span>)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#75715e"># Solve the SDP and return the optimal value.&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> problem &lt;span style="color:#f92672">=&lt;/span> cvxpy&lt;span style="color:#f92672">.&lt;/span>Problem(cvxpy&lt;span style="color:#f92672">.&lt;/span>Maximize(cvxpy&lt;span style="color:#f92672">.&lt;/span>real(obj_func)), constraints)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">return&lt;/span> problem&lt;span style="color:#f92672">.&lt;/span>solve(solver&lt;span style="color:#f92672">=&lt;/span>solver)
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>&lt;strong>Running the games and seeing the results&lt;/strong>:
Finally, we use our function to play both games and print the optimal success probabilities.&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-python" data-lang="python">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e"># For the &amp;#34;Best Guess&amp;#34; (minimum-error) game.&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>p_G_me &lt;span style="color:#f92672">=&lt;/span> get_optimal_prob(ensemble, strategy&lt;span style="color:#f92672">=&lt;/span>&lt;span style="color:#e6db74">&amp;#34;min_error&amp;#34;&lt;/span>)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e"># For the &amp;#34;No Wrong Answers&amp;#34; (unambiguous) game.&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>p_G_ud &lt;span style="color:#f92672">=&lt;/span> get_optimal_prob(ensemble, strategy&lt;span style="color:#f92672">=&lt;/span>&lt;span style="color:#e6db74">&amp;#34;unambiguous&amp;#34;&lt;/span>)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>print(&lt;span style="color:#e6db74">&amp;#34;--- Optimal Global Success Probabilities (p_G) ---&amp;#34;&lt;/span>)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>print(&lt;span style="color:#e6db74">f&lt;/span>&lt;span style="color:#e6db74">&amp;#34;Minimum-Error Discrimination: &lt;/span>&lt;span style="color:#e6db74">{&lt;/span>p_G_me&lt;span style="color:#e6db74">:&lt;/span>&lt;span style="color:#e6db74">.4f&lt;/span>&lt;span style="color:#e6db74">}&lt;/span>&lt;span style="color:#e6db74">&amp;#34;&lt;/span>)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>print(&lt;span style="color:#e6db74">f&lt;/span>&lt;span style="color:#e6db74">&amp;#34;Unambiguous Discrimination: &lt;/span>&lt;span style="color:#e6db74">{&lt;/span>p_G_ud&lt;span style="color:#e6db74">:&lt;/span>&lt;span style="color:#e6db74">.4f&lt;/span>&lt;span style="color:#e6db74">}&lt;/span>&lt;span style="color:#e6db74">&amp;#34;&lt;/span>)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e"># The paper proves p_G_ud = (1-s)^2. Let&amp;#39;s verify.&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>theoretical_ud_prob &lt;span style="color:#f92672">=&lt;/span> (&lt;span style="color:#ae81ff">1&lt;/span> &lt;span style="color:#f92672">-&lt;/span> s)&lt;span style="color:#f92672">**&lt;/span>&lt;span style="color:#ae81ff">2&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>print(&lt;span style="color:#e6db74">f&lt;/span>&lt;span style="color:#e6db74">&amp;#34;&lt;/span>&lt;span style="color:#ae81ff">\n&lt;/span>&lt;span style="color:#e6db74">Theoretical Unambiguous Prob. (1-s)^2: &lt;/span>&lt;span style="color:#e6db74">{&lt;/span>theoretical_ud_prob&lt;span style="color:#e6db74">:&lt;/span>&lt;span style="color:#e6db74">.4f&lt;/span>&lt;span style="color:#e6db74">}&lt;/span>&lt;span style="color:#e6db74">&amp;#34;&lt;/span>)
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>This script produces the following output:&lt;/p>
&lt;pre tabindex="0">&lt;code>--- Optimal Global Success Probabilities (p_G) ---
Minimum-Error Discrimination: 0.8626
Unambiguous Discrimination: 0.2500
Theoretical Unambiguous Prob. (1-s)^2: 0.2500
&lt;/code>&lt;/pre>&lt;p>This shows that the maximum achievable success rate depends heavily on which &amp;ldquo;game&amp;rdquo; is being played. As the paper
proves, the nonlocality of the ensemble appears for the minimum-error task but vanishes entirely for the unambiguous
one.&lt;/p>
&lt;h2 id="the-takeaway">The takeaway&lt;/h2>
&lt;p>The punchline is that &amp;ldquo;quantum nonlocality without entanglement&amp;rdquo; is not a fundamental attribute of a set of states
alone. It&amp;rsquo;s a relational property that emerges from the interplay between the states and the specific question you&amp;rsquo;re
asking about them. The very same set of states can be nonlocal under one set of rules but perfectly local under another.
The quantum weirdness can appear or disappear depending on how you choose to look.&lt;/p>
&lt;p>For all the mathematical details and the nitty-gritty of the proofs, feel free to check out &lt;a href="https://arxiv.org/abs/2506.20560">the full paper&lt;/a>.&lt;/p></content></item><item><title>Digital zero-noise extrapolation via quantum circuit unoptimization</title><link>https://vrusso.com/posts/circuit_unopt_zne/</link><pubDate>Mon, 10 Mar 2025 00:00:00 +0000</pubDate><guid>https://vrusso.com/posts/circuit_unopt_zne/</guid><description>While quantum computers have continued to improve over the past few years, it&amp;rsquo;s a known issue that error rates cannot be made low enough simply by improvements to the hardware. One approach to this problem is the domain of quantum error correction (QEC) which promises fault-tolerant devices that properly deals with the issue of noise. While the theory of QEC is well-established, the implementation of the theory is still a while away from being physically realizable.</description><content>&lt;p>While quantum computers have continued to improve over the past few years, it&amp;rsquo;s a known issue that error rates cannot be
made low enough simply by improvements to the hardware. One approach to this problem is the domain of &lt;em>quantum error
correction&lt;/em> (QEC) which promises fault-tolerant devices that properly deals with the issue of noise. While the theory of
QEC is well-established, the implementation of the theory is still a while away from being physically realizable. One
strategy to deal with the noise in a less idealized manner in the interim is the field of &lt;em>quantum error mitigation&lt;/em>
(QEM).&lt;/p>
&lt;p>There are a variety of QEM techniques that are the subject of active research, for example, zero-noise extrapolation
(ZNE), probabilistic-error cancellation (PEC), dynamical decoupling (DD), and Clifford data regression (CDR) to name a
few.&lt;/p>
&lt;h3 id="zero-noise-extrapolation-zne">Zero-noise extrapolation (ZNE)&lt;/h3>
&lt;p>As you can probably tell from the title, we will be focused on ZNE in this post. The general idea of ZNE is quite simple
(although, perhaps at first, a bit counterintuitive). Here&amp;rsquo;s a memorable tongue-and-cheek description of the technique:&lt;/p>
&lt;p>&lt;strong>Basic idea of ZNE&lt;/strong>: Quantum computers are noisy and they kinda suck. To make them suck less you can do something
counterintuitive and deliberately make them suck &lt;em>even more&lt;/em> by chopping up the quantum circuit you want to run on the
quantum computer and increasing the suck factor. Then, you can statistically extrapolate the suckiness of how much it
sucked to the point of least suckiness.&lt;/p>
&lt;p>Let&amp;rsquo;s make this a bit more formal. You have a quantum circuit that you want to run on a quantum computer. You know that
the device is inherently noisy, so you expect your result to be impacted by this noise. However, you would like to know
what the output of your computation was if you had run it in an ideal (noiseless) environment.&lt;/p>
&lt;ol>
&lt;li>
&lt;p>Progressively increase the noise for a set of quantum circuits that are obtained from your original quantum circuit
(we will discuss ways to do this later). Generate a set of data points by calculating expectation
values for each circuit in this set.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>Plot each of these expectation values on a graph and draw a line through them (extrapolate) to the so-called
&amp;ldquo;zero-noise limit&amp;rdquo; to infer what the expectation &lt;em>would&lt;/em> be if it was executed in a noiseless environment.&lt;/p>
&lt;/li>
&lt;/ol>
&lt;p>&lt;img alt="zne-extrapolation" src="https://vrusso.com/blog/zne_extrapolation.png">&lt;/p>
&lt;p>That&amp;rsquo;s the basic idea in a nutshell; pump up the volume and then ride the wave. The figure above shows the basic idea of
how these two steps can be used to statistically infer the expectation value at the zero-noise limit. Each of the data
points labeled as \(\lambda_{i_1}, \lambda_{i_2}\), and \(\lambda_{i_n}\) are called &lt;em>noise-scale factors&lt;/em> (which we
describe in greater detail in the subsequent sections).&lt;/p>
&lt;h3 id="boosting-the-volume-increasing-the-noise">Boosting the volume (increasing the noise)&lt;/h3>
&lt;p>So &lt;em>how&lt;/em> can one increase the noise of a quantum circuit, and do so in a way that is controlled. It&amp;rsquo;s not difficult to
completely garble the circuit so that it&amp;rsquo;s a complete mess of noise and sadness (which is not helpful for us). Instead,
we want something like a volume knob that, at specific discrete points in the dial, turns the volume up by a specific
amount.&lt;/p>
&lt;p>&lt;img alt="zne-volume" src="https://vrusso.com/blog/zne_volume.png">&lt;/p>
&lt;p>One way you can do this for quantum circuits (like the ones you might define in a library like Qiskit to be run on a
quantum computer) would be to use the technique of &lt;em>unitary folding&lt;/em>. Given a quantum circuit, unitary folding increases
the effective length (or depth) of the quantum circuit by adding a larger number of gates in a specific way which
inherently increases the noise.&lt;/p>
&lt;p>There are a couple of different flavors of unitary folding, but for simplicity we will just look at &lt;em>global folding&lt;/em>.
The other folding techniques are all means to the same end with minor tweaks, but global folding is one of the more
straightforward approaches.&lt;/p>
&lt;p>In global folding each set of layers in the circuit are replaced by \(G G^{\dagger}G\). Since \(G G^{\dagger} =
\mathbb{I}\), in the case where we are running our circuit on an ideal (noiseless) simulator this has no effect on the
circuit. However, if we run this circuit on a noisy device, this increases the noise and effective gate errors of the
computation.&lt;/p>
&lt;p>The &amp;ldquo;volume level&amp;rdquo; (or noise-scale factor) is usually referred to as a parameter \(\lambda\), which in this case,
determines how many times to fold the gates in the circuit.&lt;/p>
&lt;p>&lt;img alt="global-folding" src="https://vrusso.com/blog/global_folding.png">&lt;/p>
&lt;p>An example of the global folding technique applied to an arbitrary quantum circuit can be seen in the above figure. For
a given collection of gates denotes by \(G\), we increase the effective length of the overall circuit by create \(G
G^{\dagger} G\).&lt;/p>
&lt;h4 id="quantum-circuit-unoptimization">Quantum circuit unoptimization&lt;/h4>
&lt;p>In a nutshell, quantum circuit unoptimization is a procedure applied to a quantum circuit that makes it more complicated
by increasing the depth and gates of the circuit, but keeping the overall output of the circuit the same. That is, if
you run something through the original circuit and run the same thing through the unoptimized circuit, the result in
both cases will be unitarily equivalent.&lt;/p>
&lt;p>Why would anyone want to do this&amp;mdash;aren&amp;rsquo;t people are concerned with &lt;em>optimizing&lt;/em> a quantum circuit? Well, yes, usually
this is the case. However, one primary reason to do this is to check how good quantum hardware compilers are at
simplifying garbled circuits.&lt;/p>
&lt;p>In our instance, we are interested in techniques that can effectively increase the noise of a quantum circuit in a
deliberate and controlled manner. Quantum circuit unoptimization gives us one way of doing that.&lt;/p>
&lt;p>So what is the process of unoptimizing a quantum circuit? Well, as described by the authors in
&lt;a href="https://arxiv.org/abs/2311.03805">arXiv:2311.03805&lt;/a>, it can be done by following a specific &lt;em>recipe&lt;/em> that consists of
four steps, namely:&lt;/p>
&lt;ol>
&lt;li>
&lt;p>&lt;strong>Insert&lt;/strong>: Insert a two-qubit gate \(A\) and its Hermitian conjugate \(A^{\dagger}\) between two gates in the circuit
labeled as \(B_1\) and \(B_2\).&lt;/p>
&lt;/li>
&lt;li>
&lt;p>&lt;strong>Swap&lt;/strong>: Swap the \(B_1\) gate with the \(A^{\dagger}\) gate in the circuit, replacing \(A^{\dagger}\) with
\(\widetilde{A^\dagger}\).&lt;/p>
&lt;/li>
&lt;li>
&lt;p>&lt;strong>Decompose&lt;/strong>: Decompose multi-qubit unitary gates into elementary gates.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>&lt;strong>Synthesize&lt;/strong>: Apply quantum circuit synthesis.&lt;/p>
&lt;/li>
&lt;/ol>
&lt;p>For a given quantum circuit, you apply the four steps of the recipe. At the end, the quantum circuit cake that you&amp;rsquo;ve
baked is a much more complicated quantum circuit. You can apply this recipe as many times as you like. Each time you do
so, the circuit will end up being longer and more complicated. Importantly, however, the output of the final circuit
remains unitarily equivalent to the output of the initial circuit.&lt;/p>
&lt;p>We implemented this process in Python using Qiskit quantum circuits and released this as companion software for our
paper (&lt;a href="https://github.com/unitaryfund/circuit-unoptimization">GitHub&lt;/a>). As an example, consider the following arbitrary
quantum circuit:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-py" data-lang="py">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f92672">from&lt;/span> qiskit &lt;span style="color:#f92672">import&lt;/span> QuantumCircuit
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e"># Create a 4-qubit fully connected graph state.&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>num_qubits &lt;span style="color:#f92672">=&lt;/span> &lt;span style="color:#ae81ff">4&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>qc &lt;span style="color:#f92672">=&lt;/span> QuantumCircuit(num_qubits)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#66d9ef">for&lt;/span> qubit &lt;span style="color:#f92672">in&lt;/span> range(num_qubits):
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> qc&lt;span style="color:#f92672">.&lt;/span>h(qubit)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#66d9ef">for&lt;/span> i &lt;span style="color:#f92672">in&lt;/span> range(num_qubits):
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">for&lt;/span> j &lt;span style="color:#f92672">in&lt;/span> range(i &lt;span style="color:#f92672">+&lt;/span> &lt;span style="color:#ae81ff">1&lt;/span>, num_qubits):
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> qc&lt;span style="color:#f92672">.&lt;/span>cz(i, j)
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>This is just an arbitrary circuit consisting of one and two-qubit gates that in this case represents a 4-qubit fully
connected &lt;a href="https://en.wikipedia.org/wiki/Graph_state">graph state&lt;/a> (for the sake of example).&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-py" data-lang="py">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f92672">&amp;gt;&amp;gt;&amp;gt;&lt;/span> print(qc)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#960050;background-color:#1e0010">┌───┐&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>q_0: &lt;span style="color:#960050;background-color:#1e0010">┤&lt;/span> H &lt;span style="color:#960050;background-color:#1e0010">├─■──■──■──────────&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#960050;background-color:#1e0010">├───┤&lt;/span> &lt;span style="color:#960050;background-color:#1e0010">│&lt;/span> &lt;span style="color:#960050;background-color:#1e0010">│&lt;/span> &lt;span style="color:#960050;background-color:#1e0010">│&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>q_1: &lt;span style="color:#960050;background-color:#1e0010">┤&lt;/span> H &lt;span style="color:#960050;background-color:#1e0010">├─■──┼──┼──■──■────&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#960050;background-color:#1e0010">├───┤&lt;/span> &lt;span style="color:#960050;background-color:#1e0010">│&lt;/span> &lt;span style="color:#960050;background-color:#1e0010">│&lt;/span> &lt;span style="color:#960050;background-color:#1e0010">│&lt;/span> &lt;span style="color:#960050;background-color:#1e0010">│&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>q_2: &lt;span style="color:#960050;background-color:#1e0010">┤&lt;/span> H &lt;span style="color:#960050;background-color:#1e0010">├────■──┼──■──┼──■─&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#960050;background-color:#1e0010">├───┤&lt;/span> &lt;span style="color:#960050;background-color:#1e0010">│&lt;/span> &lt;span style="color:#960050;background-color:#1e0010">│&lt;/span> &lt;span style="color:#960050;background-color:#1e0010">│&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>q_3: &lt;span style="color:#960050;background-color:#1e0010">┤&lt;/span> H &lt;span style="color:#960050;background-color:#1e0010">├───────■─────■──■─&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#960050;background-color:#1e0010">└───┘&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>We can use the &lt;code>unoptimize_circuit&lt;/code> function from our software package on this circuit and apply as many rounds of the
unoptimization recipe as we would like. For the sake of not giving you carpal tunnel syndrome from having to scroll
such a large circuit, let&amp;rsquo;s just apply a single iteration of the recipe.&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-py" data-lang="py">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f92672">&amp;gt;&amp;gt;&amp;gt;&lt;/span> &lt;span style="color:#f92672">from&lt;/span> unopt.recipe &lt;span style="color:#f92672">import&lt;/span> unoptimize_circuit
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f92672">&amp;gt;&amp;gt;&amp;gt;&lt;/span> unoptimize_circuit(qc, iterations&lt;span style="color:#f92672">=&lt;/span>&lt;span style="color:#ae81ff">1&lt;/span>)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#66d9ef">global&lt;/span> phase: &lt;span style="color:#ae81ff">2.0949&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#960050;background-color:#1e0010">┌────────────────────────┐&lt;/span> &lt;span style="color:#960050;background-color:#1e0010">┌────────────────┐&lt;/span> &lt;span style="color:#960050;background-color:#1e0010">┌──────────────────────────┐&lt;/span> &lt;span style="color:#960050;background-color:#1e0010">┌──────────────────────────┐&lt;/span> &lt;span style="color:#960050;background-color:#1e0010">»&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>q_0: &lt;span style="color:#960050;background-color:#1e0010">┤&lt;/span> U3(&lt;span style="color:#ae81ff">2.0356&lt;/span>,π&lt;span style="color:#f92672">/&lt;/span>&lt;span style="color:#ae81ff">2&lt;/span>,&lt;span style="color:#f92672">-&lt;/span>&lt;span style="color:#ae81ff">2.1618&lt;/span>) &lt;span style="color:#960050;background-color:#1e0010">├──■────────┤&lt;/span> U3(π,&lt;span style="color:#f92672">-&lt;/span>π&lt;span style="color:#f92672">/&lt;/span>&lt;span style="color:#ae81ff">4&lt;/span>,π&lt;span style="color:#f92672">/&lt;/span>&lt;span style="color:#ae81ff">4&lt;/span>) &lt;span style="color:#960050;background-color:#1e0010">├───────■──┤&lt;/span> U3(&lt;span style="color:#ae81ff">1.2421&lt;/span>,&lt;span style="color:#f92672">-&lt;/span>&lt;span style="color:#ae81ff">1.84&lt;/span>,&lt;span style="color:#f92672">-&lt;/span>&lt;span style="color:#ae81ff">1.2786&lt;/span>) &lt;span style="color:#960050;background-color:#1e0010">├──■──────────────────────■──┤&lt;/span> U3(&lt;span style="color:#ae81ff">0.83219&lt;/span>,&lt;span style="color:#f92672">-&lt;/span>π&lt;span style="color:#f92672">/&lt;/span>&lt;span style="color:#ae81ff">2&lt;/span>,&lt;span style="color:#f92672">-&lt;/span>&lt;span style="color:#ae81ff">0.5782&lt;/span>) &lt;span style="color:#960050;background-color:#1e0010">├──■──»&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#960050;background-color:#1e0010">└──┬──────────────────┬──┘┌─┴─┐┌─────┴────────────────┴────┐┌─┴─┐├──────────────────────────┤&lt;/span> &lt;span style="color:#960050;background-color:#1e0010">│&lt;/span> &lt;span style="color:#960050;background-color:#1e0010">│&lt;/span> &lt;span style="color:#960050;background-color:#1e0010">└──────────────────────────┘┌─┴─┐»&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>q_1: &lt;span style="color:#960050;background-color:#1e0010">───┤&lt;/span> U3(&lt;span style="color:#ae81ff">2.1322&lt;/span>,π&lt;span style="color:#f92672">/&lt;/span>&lt;span style="color:#ae81ff">2&lt;/span>,&lt;span style="color:#ae81ff">0&lt;/span>) &lt;span style="color:#960050;background-color:#1e0010">├───┤&lt;/span> X &lt;span style="color:#960050;background-color:#1e0010">├┤&lt;/span> U3(&lt;span style="color:#ae81ff">1.7549&lt;/span>,&lt;span style="color:#ae81ff">2.0217&lt;/span>,&lt;span style="color:#f92672">-&lt;/span>&lt;span style="color:#ae81ff">2.3363&lt;/span>) &lt;span style="color:#960050;background-color:#1e0010">├┤&lt;/span> X &lt;span style="color:#960050;background-color:#1e0010">├┤&lt;/span> U3(&lt;span style="color:#ae81ff">1.1386&lt;/span>,&lt;span style="color:#ae81ff">1.7574&lt;/span>,&lt;span style="color:#ae81ff">1.3842&lt;/span>) &lt;span style="color:#960050;background-color:#1e0010">├──┼──────────────────────┼──────────────────────────────┤&lt;/span> X &lt;span style="color:#960050;background-color:#1e0010">├»&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#960050;background-color:#1e0010">┌─┴──────────────────┴┐&lt;/span> &lt;span style="color:#960050;background-color:#1e0010">└───┘└───────────────────────────┘└───┘└──────────────────────────┘┌─┴─┐┌────────────────┐┌─┴─┐&lt;/span> &lt;span style="color:#960050;background-color:#1e0010">┌──────────────────┐&lt;/span> &lt;span style="color:#960050;background-color:#1e0010">└───┘»&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>q_2: &lt;span style="color:#960050;background-color:#1e0010">─┤&lt;/span> U3(π&lt;span style="color:#f92672">/&lt;/span>&lt;span style="color:#ae81ff">2&lt;/span>,&lt;span style="color:#ae81ff">0.062179&lt;/span>,&lt;span style="color:#f92672">-&lt;/span>π) &lt;span style="color:#960050;background-color:#1e0010">├─────────────────────────────────────────────────────────────────────┤&lt;/span> X &lt;span style="color:#960050;background-color:#1e0010">├┤&lt;/span> U3(&lt;span style="color:#ae81ff">0&lt;/span>,&lt;span style="color:#ae81ff">0&lt;/span>,&lt;span style="color:#ae81ff">1.0704&lt;/span>) &lt;span style="color:#960050;background-color:#1e0010">├┤&lt;/span> X &lt;span style="color:#960050;background-color:#1e0010">├────┤&lt;/span> U3(&lt;span style="color:#ae81ff">0.68791&lt;/span>,&lt;span style="color:#f92672">-&lt;/span>π,&lt;span style="color:#ae81ff">0&lt;/span>) &lt;span style="color:#960050;background-color:#1e0010">├─────────»&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#960050;background-color:#1e0010">└─────────────────────┘&lt;/span> &lt;span style="color:#960050;background-color:#1e0010">└───┘└────────────────┘└───┘&lt;/span> &lt;span style="color:#960050;background-color:#1e0010">└──────────────────┘&lt;/span> &lt;span style="color:#960050;background-color:#1e0010">»&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>q_3: &lt;span style="color:#960050;background-color:#1e0010">──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────»&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#960050;background-color:#1e0010">»&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#960050;background-color:#1e0010">«&lt;/span> &lt;span style="color:#960050;background-color:#1e0010">┌───────────────┐&lt;/span> &lt;span style="color:#960050;background-color:#1e0010">┌────────────────────┐&lt;/span> &lt;span style="color:#960050;background-color:#1e0010">┌───────────────┐&lt;/span> &lt;span style="color:#960050;background-color:#1e0010">┌──────────────────────┐&lt;/span> &lt;span style="color:#960050;background-color:#1e0010">»&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#960050;background-color:#1e0010">«&lt;/span>q_0: &lt;span style="color:#960050;background-color:#1e0010">──────┤&lt;/span> U3(π&lt;span style="color:#f92672">/&lt;/span>&lt;span style="color:#ae81ff">2&lt;/span>,&lt;span style="color:#ae81ff">0&lt;/span>,π&lt;span style="color:#f92672">/&lt;/span>&lt;span style="color:#ae81ff">2&lt;/span>) &lt;span style="color:#960050;background-color:#1e0010">├────────■─────┤&lt;/span> U3(&lt;span style="color:#ae81ff">3.0151&lt;/span>,&lt;span style="color:#f92672">-&lt;/span>π,&lt;span style="color:#f92672">-&lt;/span>π&lt;span style="color:#f92672">/&lt;/span>&lt;span style="color:#ae81ff">2&lt;/span>) &lt;span style="color:#960050;background-color:#1e0010">├──────────────────────────────────────■────────┤&lt;/span> U3(π&lt;span style="color:#f92672">/&lt;/span>&lt;span style="color:#ae81ff">2&lt;/span>,&lt;span style="color:#ae81ff">0&lt;/span>,π&lt;span style="color:#f92672">/&lt;/span>&lt;span style="color:#ae81ff">2&lt;/span>) &lt;span style="color:#960050;background-color:#1e0010">├────────■───────┤&lt;/span> U3(&lt;span style="color:#ae81ff">1.132&lt;/span>,&lt;span style="color:#f92672">-&lt;/span>&lt;span style="color:#ae81ff">0.51688&lt;/span>,&lt;span style="color:#ae81ff">0&lt;/span>) &lt;span style="color:#960050;background-color:#1e0010">├───────■──»&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#960050;background-color:#1e0010">«&lt;/span> &lt;span style="color:#960050;background-color:#1e0010">┌─────┴───────────────┴─────┐┌─┴─┐┌──┴────────────────────┴─┐&lt;/span> &lt;span style="color:#960050;background-color:#1e0010">┌───────────────────────────┐┌─┴─┐┌─────┴───────────────┴─────┐┌─┴─┐┌────┴──────────────────────┴────┐&lt;/span> &lt;span style="color:#960050;background-color:#1e0010">│&lt;/span> &lt;span style="color:#960050;background-color:#1e0010">»&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#960050;background-color:#1e0010">«&lt;/span>q_1: &lt;span style="color:#960050;background-color:#1e0010">┤&lt;/span> U3(&lt;span style="color:#ae81ff">2.0383&lt;/span>,&lt;span style="color:#ae81ff">2.2097&lt;/span>,&lt;span style="color:#f92672">-&lt;/span>&lt;span style="color:#ae81ff">2.8185&lt;/span>) &lt;span style="color:#960050;background-color:#1e0010">├┤&lt;/span> X &lt;span style="color:#960050;background-color:#1e0010">├┤&lt;/span> U3(&lt;span style="color:#ae81ff">1.5857&lt;/span>,&lt;span style="color:#f92672">-&lt;/span>&lt;span style="color:#ae81ff">0.9553&lt;/span>,&lt;span style="color:#f92672">-&lt;/span>π&lt;span style="color:#f92672">/&lt;/span>&lt;span style="color:#ae81ff">2&lt;/span>) &lt;span style="color:#960050;background-color:#1e0010">├──■──┤&lt;/span> U3(&lt;span style="color:#ae81ff">0.56249&lt;/span>,&lt;span style="color:#f92672">-&lt;/span>π&lt;span style="color:#f92672">/&lt;/span>&lt;span style="color:#ae81ff">2&lt;/span>,&lt;span style="color:#f92672">-&lt;/span>&lt;span style="color:#ae81ff">0.81816&lt;/span>) &lt;span style="color:#960050;background-color:#1e0010">├┤&lt;/span> X &lt;span style="color:#960050;background-color:#1e0010">├┤&lt;/span> U3(&lt;span style="color:#ae81ff">2.0383&lt;/span>,&lt;span style="color:#ae81ff">2.2097&lt;/span>,&lt;span style="color:#f92672">-&lt;/span>&lt;span style="color:#ae81ff">2.8185&lt;/span>) &lt;span style="color:#960050;background-color:#1e0010">├┤&lt;/span> X &lt;span style="color:#960050;background-color:#1e0010">├┤&lt;/span> U3(&lt;span style="color:#ae81ff">0.039343&lt;/span>,&lt;span style="color:#ae81ff">0.031289&lt;/span>,&lt;span style="color:#ae81ff">0.031289&lt;/span>) &lt;span style="color:#960050;background-color:#1e0010">├──┼──»&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#960050;background-color:#1e0010">«&lt;/span> &lt;span style="color:#960050;background-color:#1e0010">└───────────────────────────┘└───┘└─────────────────────────┘┌─┴─┐└─┬───────────────────────┬─┘└───┘└───────────────────────────┘└───┘└────────────────────────────────┘┌─┴─┐»&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#960050;background-color:#1e0010">«&lt;/span>q_2: &lt;span style="color:#960050;background-color:#1e0010">─────────────────────────────────────────────────────────────┤&lt;/span> X &lt;span style="color:#960050;background-color:#1e0010">├──┤&lt;/span> U3(&lt;span style="color:#ae81ff">1.0967&lt;/span>,&lt;span style="color:#ae81ff">0.40856&lt;/span>,&lt;span style="color:#f92672">-&lt;/span>π) &lt;span style="color:#960050;background-color:#1e0010">├───────────────────────────────────────────────────────────────────────────┤&lt;/span> X &lt;span style="color:#960050;background-color:#1e0010">├»&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#960050;background-color:#1e0010">«&lt;/span> &lt;span style="color:#960050;background-color:#1e0010">└───┘&lt;/span> &lt;span style="color:#960050;background-color:#1e0010">└───────────────────────┘&lt;/span> &lt;span style="color:#960050;background-color:#1e0010">└───┘»&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#960050;background-color:#1e0010">«&lt;/span>q_3: &lt;span style="color:#960050;background-color:#1e0010">─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────»&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#960050;background-color:#1e0010">«&lt;/span> &lt;span style="color:#960050;background-color:#1e0010">»&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#960050;background-color:#1e0010">«&lt;/span> &lt;span style="color:#960050;background-color:#1e0010">┌─────────────────────────┐&lt;/span> &lt;span style="color:#960050;background-color:#1e0010">┌────────────────┐&lt;/span> &lt;span style="color:#960050;background-color:#1e0010">┌─────────────────────────────┐&lt;/span> &lt;span style="color:#960050;background-color:#1e0010">┌───────────────────────┐&lt;/span> &lt;span style="color:#960050;background-color:#1e0010">»&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#960050;background-color:#1e0010">«&lt;/span>q_0: &lt;span style="color:#960050;background-color:#1e0010">─────────────────────■──┤&lt;/span> U3(π,&lt;span style="color:#f92672">-&lt;/span>&lt;span style="color:#ae81ff">0.51538&lt;/span>,&lt;span style="color:#f92672">-&lt;/span>&lt;span style="color:#ae81ff">0.51538&lt;/span>) &lt;span style="color:#960050;background-color:#1e0010">├───■────────┤&lt;/span> U3(π,&lt;span style="color:#f92672">-&lt;/span>π&lt;span style="color:#f92672">/&lt;/span>&lt;span style="color:#ae81ff">4&lt;/span>,π&lt;span style="color:#f92672">/&lt;/span>&lt;span style="color:#ae81ff">4&lt;/span>) &lt;span style="color:#960050;background-color:#1e0010">├───────■──┤&lt;/span> U3(&lt;span style="color:#ae81ff">2.2152&lt;/span>,&lt;span style="color:#f92672">-&lt;/span>&lt;span style="color:#ae81ff">0.15561&lt;/span>,&lt;span style="color:#f92672">-&lt;/span>&lt;span style="color:#ae81ff">1.6024&lt;/span>) &lt;span style="color:#960050;background-color:#1e0010">├──■───┤&lt;/span> U3(&lt;span style="color:#ae81ff">0.40369&lt;/span>,&lt;span style="color:#f92672">-&lt;/span>π&lt;span style="color:#f92672">/&lt;/span>&lt;span style="color:#ae81ff">2&lt;/span>,&lt;span style="color:#f92672">-&lt;/span>π&lt;span style="color:#f92672">/&lt;/span>&lt;span style="color:#ae81ff">2&lt;/span>) &lt;span style="color:#960050;background-color:#1e0010">├────■──»&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#960050;background-color:#1e0010">«&lt;/span> &lt;span style="color:#960050;background-color:#1e0010">│&lt;/span> &lt;span style="color:#960050;background-color:#1e0010">└─────────────────────────┘&lt;/span> &lt;span style="color:#960050;background-color:#1e0010">┌─┴─┐┌─────┴────────────────┴────┐┌─┴─┐└───┬─────────────────────┬───┘&lt;/span> &lt;span style="color:#960050;background-color:#1e0010">│&lt;/span> &lt;span style="color:#960050;background-color:#1e0010">└───────────────────────┘&lt;/span> &lt;span style="color:#960050;background-color:#1e0010">│&lt;/span> &lt;span style="color:#960050;background-color:#1e0010">»&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#960050;background-color:#1e0010">«&lt;/span>q_1: &lt;span style="color:#960050;background-color:#1e0010">─────────────────────┼──────────────────────────────┤&lt;/span> X &lt;span style="color:#960050;background-color:#1e0010">├┤&lt;/span> U3(&lt;span style="color:#ae81ff">1.7231&lt;/span>,&lt;span style="color:#ae81ff">1.9856&lt;/span>,&lt;span style="color:#f92672">-&lt;/span>&lt;span style="color:#ae81ff">2.2664&lt;/span>) &lt;span style="color:#960050;background-color:#1e0010">├┤&lt;/span> X &lt;span style="color:#960050;background-color:#1e0010">├────┤&lt;/span> U3(&lt;span style="color:#ae81ff">2.1322&lt;/span>,&lt;span style="color:#f92672">-&lt;/span>π&lt;span style="color:#f92672">/&lt;/span>&lt;span style="color:#ae81ff">2&lt;/span>,π&lt;span style="color:#f92672">/&lt;/span>&lt;span style="color:#ae81ff">2&lt;/span>) &lt;span style="color:#960050;background-color:#1e0010">├──────┼────────────────────────────────┼──»&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#960050;background-color:#1e0010">«&lt;/span> &lt;span style="color:#960050;background-color:#1e0010">┌─────────────────┐┌─┴─┐┌──────────────────────────┐└───┘└───────────────────────────┘└───┘&lt;/span> &lt;span style="color:#960050;background-color:#1e0010">└─────────────────────┘&lt;/span> &lt;span style="color:#960050;background-color:#1e0010">┌─┴─┐┌──────────────────────────┐┌─┴─┐»&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#960050;background-color:#1e0010">«&lt;/span>q_2: &lt;span style="color:#960050;background-color:#1e0010">┤&lt;/span> U3(&lt;span style="color:#ae81ff">0&lt;/span>,&lt;span style="color:#ae81ff">0&lt;/span>,&lt;span style="color:#f92672">-&lt;/span>&lt;span style="color:#ae81ff">1.3608&lt;/span>) &lt;span style="color:#960050;background-color:#1e0010">├┤&lt;/span> X &lt;span style="color:#960050;background-color:#1e0010">├┤&lt;/span> U3(&lt;span style="color:#ae81ff">1.8527&lt;/span>,&lt;span style="color:#ae81ff">1.8089&lt;/span>,&lt;span style="color:#ae81ff">1.6118&lt;/span>) &lt;span style="color:#960050;background-color:#1e0010">├──────────────────────────────────────────────────────────────────────┤&lt;/span> X &lt;span style="color:#960050;background-color:#1e0010">├┤&lt;/span> U3(&lt;span style="color:#ae81ff">2.1223&lt;/span>,&lt;span style="color:#ae81ff">3.0309&lt;/span>,&lt;span style="color:#ae81ff">1.3617&lt;/span>) &lt;span style="color:#960050;background-color:#1e0010">├┤&lt;/span> X &lt;span style="color:#960050;background-color:#1e0010">├»&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#960050;background-color:#1e0010">«&lt;/span> &lt;span style="color:#960050;background-color:#1e0010">└─────────────────┘└───┘└──────────────────────────┘&lt;/span> &lt;span style="color:#960050;background-color:#1e0010">└───┘└──────────────────────────┘└───┘»&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#960050;background-color:#1e0010">«&lt;/span>q_3: &lt;span style="color:#960050;background-color:#1e0010">────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────»&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#960050;background-color:#1e0010">«&lt;/span> &lt;span style="color:#960050;background-color:#1e0010">»&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#960050;background-color:#1e0010">«&lt;/span> &lt;span style="color:#960050;background-color:#1e0010">┌────────────────────┐&lt;/span> &lt;span style="color:#960050;background-color:#1e0010">┌──────────────────────────────┐&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#960050;background-color:#1e0010">«&lt;/span>q_0: &lt;span style="color:#960050;background-color:#1e0010">────┤&lt;/span> U3(&lt;span style="color:#ae81ff">0.29827&lt;/span>,&lt;span style="color:#ae81ff">0&lt;/span>,&lt;span style="color:#f92672">-&lt;/span>π&lt;span style="color:#f92672">/&lt;/span>&lt;span style="color:#ae81ff">2&lt;/span>) &lt;span style="color:#960050;background-color:#1e0010">├──────■──┤&lt;/span> U3(&lt;span style="color:#ae81ff">1.9596&lt;/span>,&lt;span style="color:#f92672">-&lt;/span>&lt;span style="color:#ae81ff">0.96632&lt;/span>,&lt;span style="color:#f92672">-&lt;/span>&lt;span style="color:#ae81ff">0.54303&lt;/span>) &lt;span style="color:#960050;background-color:#1e0010">├───────■──────────────────────────────────────────&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#960050;background-color:#1e0010">«&lt;/span> &lt;span style="color:#960050;background-color:#1e0010">└────────────────────┘&lt;/span> &lt;span style="color:#960050;background-color:#1e0010">│&lt;/span> &lt;span style="color:#960050;background-color:#1e0010">└──────────────────────────────┘&lt;/span> &lt;span style="color:#960050;background-color:#1e0010">│&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#960050;background-color:#1e0010">«&lt;/span>q_1: &lt;span style="color:#960050;background-color:#1e0010">────────────────────────────────┼────────────────────────────────────■────┼───────────────────■──────────────────────&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#960050;background-color:#1e0010">«&lt;/span> &lt;span style="color:#960050;background-color:#1e0010">┌────────────────────────────┐┌─┴─┐┌─────────────────────────────┐&lt;/span> &lt;span style="color:#960050;background-color:#1e0010">┌─┴─┐&lt;/span> &lt;span style="color:#960050;background-color:#1e0010">│&lt;/span> &lt;span style="color:#960050;background-color:#1e0010">┌─────────────┐&lt;/span> &lt;span style="color:#960050;background-color:#1e0010">│&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#960050;background-color:#1e0010">«&lt;/span>q_2: &lt;span style="color:#960050;background-color:#1e0010">┤&lt;/span> U3(&lt;span style="color:#ae81ff">1.1033&lt;/span>,&lt;span style="color:#ae81ff">0.32306&lt;/span>,&lt;span style="color:#f92672">-&lt;/span>&lt;span style="color:#ae81ff">2.2097&lt;/span>) &lt;span style="color:#960050;background-color:#1e0010">├┤&lt;/span> X &lt;span style="color:#960050;background-color:#1e0010">├┤&lt;/span> U3(&lt;span style="color:#ae81ff">0.23528&lt;/span>,&lt;span style="color:#ae81ff">0.096677&lt;/span>,&lt;span style="color:#ae81ff">2.2331&lt;/span>) &lt;span style="color:#960050;background-color:#1e0010">├─┤&lt;/span> X &lt;span style="color:#960050;background-color:#1e0010">├──┼──┤&lt;/span> U3(π&lt;span style="color:#f92672">/&lt;/span>&lt;span style="color:#ae81ff">2&lt;/span>,&lt;span style="color:#ae81ff">0&lt;/span>,π) &lt;span style="color:#960050;background-color:#1e0010">├──┼────■─────────────────&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#960050;background-color:#1e0010">«&lt;/span> &lt;span style="color:#960050;background-color:#1e0010">└────────────────────────────┘└───┘└─────────────────────────────┘&lt;/span> &lt;span style="color:#960050;background-color:#1e0010">└───┘┌─┴─┐└─────────────┘┌─┴─┐┌─┴─┐┌─────────────┐&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#960050;background-color:#1e0010">«&lt;/span>q_3: &lt;span style="color:#960050;background-color:#1e0010">────────────────────────────────────────────────────────────────────────┤&lt;/span> X &lt;span style="color:#960050;background-color:#1e0010">├───────────────┤&lt;/span> X &lt;span style="color:#960050;background-color:#1e0010">├┤&lt;/span> X &lt;span style="color:#960050;background-color:#1e0010">├┤&lt;/span> U3(π&lt;span style="color:#f92672">/&lt;/span>&lt;span style="color:#ae81ff">2&lt;/span>,&lt;span style="color:#ae81ff">0&lt;/span>,π) &lt;span style="color:#960050;background-color:#1e0010">├&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#960050;background-color:#1e0010">«&lt;/span> &lt;span style="color:#960050;background-color:#1e0010">└───┘&lt;/span> &lt;span style="color:#960050;background-color:#1e0010">└───┘└───┘└─────────────┘&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>From a cursory visual inspection, this circuit looks wildly different than the original one. The more iterations you
subsequently apply, the larger and more garbled the circuit will become. However, it will remain unitarily equivalent to
the original circuit (even if it looks quite a bit different). You can confirm this by doing a sanity check:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-py" data-lang="py">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f92672">from&lt;/span> qiskit.quantum_info &lt;span style="color:#f92672">import&lt;/span> Operator
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>unopt_qc &lt;span style="color:#f92672">=&lt;/span> unoptimize_circuit(qc, iterations&lt;span style="color:#f92672">=&lt;/span>&lt;span style="color:#ae81ff">1&lt;/span>)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>original_unitary &lt;span style="color:#f92672">=&lt;/span> Operator(qc)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>unopt_unitary &lt;span style="color:#f92672">=&lt;/span> Operator(unopt_qc)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>unitaries_are_equal &lt;span style="color:#f92672">=&lt;/span> original_unitary&lt;span style="color:#f92672">.&lt;/span>equiv(unopt_unitary)
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Indeed, we can see that the original and unoptimized circuit are unitarily equivalent:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-py" data-lang="py">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f92672">&amp;gt;&amp;gt;&amp;gt;&lt;/span> print(&lt;span style="color:#e6db74">f&lt;/span>&lt;span style="color:#e6db74">&amp;#34;Are the circuits functionally equivalent? &lt;/span>&lt;span style="color:#e6db74">{&lt;/span>unitaries_are_equal&lt;span style="color:#e6db74">}&lt;/span>&lt;span style="color:#e6db74">&amp;#34;&lt;/span>)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>Are the circuits functionally equivalent&lt;span style="color:#960050;background-color:#1e0010">?&lt;/span> &lt;span style="color:#66d9ef">True&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>You can continually bump up the number of &lt;code>iterations&lt;/code>, and the circuits will remain unitarily equivalent.&lt;/p>
&lt;h3 id="unoptimization-and-zne">Unoptimization and ZNE&lt;/h3>
&lt;p>Like unitary folding, we can use the technique of circuit unoptimization to progressively increase the noise and
extrapolate to the zero-noise limit. In our paper, (&lt;a href="https://arxiv.org/abs/2503.06341">arXiv:2503.06341&lt;/a>), we considered
this on two classes of circuits that people find interesting for various reasons; quantum volume (QV) and Quantum
Approximate Optimization Algorithm (QAOA) circuits.&lt;/p>
&lt;p>I&amp;rsquo;ll leave the detailed analyses of how quantum circuit unoptimization can be used for those classes of circuits to the
paper. However, we can take a more general look at how one can apply unoptimization as a noise-scaling technique for
ZNE. Furthermore, we can also compare how this noise-scaling does in comparison to the ideal (noiseless) case, the
unmitigated case (i.e. running the circuit in a noisy setting with no error mitigation), and the case where ZNE is used
but some type of unitary folding is applied for the noise-scaling.&lt;/p>
&lt;p>We can perform comparative benchmarks for ZNE with unoptimization as a scaling technique against the ideal, unmitigated,
and ZNE with folding&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-py" data-lang="py">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f92672">&amp;gt;&amp;gt;&amp;gt;&lt;/span> &lt;span style="color:#f92672">from&lt;/span> unopt.benchmark &lt;span style="color:#f92672">import&lt;/span> bench
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>Averages Across All Trials:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> Ideal Value: &lt;span style="color:#ae81ff">0.06250000000000006&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> Unmitigated Value: &lt;span style="color:#ae81ff">0.003799999999999956&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> ZNE &lt;span style="color:#f92672">+&lt;/span> Fold Value: &lt;span style="color:#ae81ff">0.00037500000000005443&lt;/span> (Error: &lt;span style="color:#ae81ff">0.062125&lt;/span>)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> ZNE &lt;span style="color:#f92672">+&lt;/span> Unopt Value: &lt;span style="color:#ae81ff">0.008441716269841373&lt;/span> (Error: &lt;span style="color:#ae81ff">0.05405828373015868&lt;/span>)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> Percent Improvement (Unmit): &lt;span style="color:#ae81ff">8.59&lt;/span>&lt;span style="color:#f92672">%&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> Percent Improvement (ZNE &lt;span style="color:#f92672">+&lt;/span> Fold): &lt;span style="color:#ae81ff">14.92&lt;/span>&lt;span style="color:#f92672">%&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> Original Circuit Depth: &lt;span style="color:#ae81ff">6&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> Avg Folded Depths: [&lt;span style="color:#ae81ff">6.0&lt;/span>, &lt;span style="color:#ae81ff">18.0&lt;/span>, &lt;span style="color:#ae81ff">30.0&lt;/span>]
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> Avg Unoptimized Depths: [&lt;span style="color:#ae81ff">37.0&lt;/span>, &lt;span style="color:#ae81ff">65.0&lt;/span>, &lt;span style="color:#ae81ff">101.0&lt;/span>]
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>Trial Details:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>Trial &lt;span style="color:#ae81ff">1&lt;/span>:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> Ideal Value: &lt;span style="color:#ae81ff">0.06250000000000006&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> Unmitigated Value: &lt;span style="color:#ae81ff">0.003799999999999956&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> ZNE &lt;span style="color:#f92672">+&lt;/span> Fold Value: &lt;span style="color:#ae81ff">0.00037500000000005443&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> ZNE &lt;span style="color:#f92672">+&lt;/span> Fold Depths: [&lt;span style="color:#ae81ff">6&lt;/span>, &lt;span style="color:#ae81ff">18&lt;/span>, &lt;span style="color:#ae81ff">30&lt;/span>]
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> ZNE &lt;span style="color:#f92672">+&lt;/span> Unopt Value: &lt;span style="color:#ae81ff">0.008441716269841373&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> ZNE &lt;span style="color:#f92672">+&lt;/span> Unopt Depths: [&lt;span style="color:#ae81ff">37&lt;/span>, &lt;span style="color:#ae81ff">65&lt;/span>, &lt;span style="color:#ae81ff">101&lt;/span>]
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Note that for certain circuits and runs, you may obtain different results as there is a randomized component to the
circuit unoptimization and extrapolation.&lt;/p>
&lt;h2 id="further-reading">Further reading&lt;/h2>
&lt;p>This post is just a high-level overview of the ideas elaborated on in more detail in the paper, so for further
information, examples, etc., please check out both the arXiv preprint
(&lt;a href="https://arxiv.org/abs/2503.06341">arXiv:2503.06341&lt;/a>) as well as the software
(&lt;a href="https://github.com/unitaryfund/circuit-unoptimization">GitHub&lt;/a>).&lt;/p></content></item><item><title>toqito is participating in Google Summer of Code for 2025</title><link>https://vrusso.com/posts/toqito_gsoc/</link><pubDate>Sun, 02 Mar 2025 00:00:00 +0000</pubDate><guid>https://vrusso.com/posts/toqito_gsoc/</guid><description>I created the toqito software project back in early 2020 as a pet project for delving into some research questions I wanted to pursue in quantum information but felt were lacking in the Python community. When I was a Ph.D. student, having software like toqito would have been indispensible for rapidly prototyping ideas and attacking problems numerically. I&amp;rsquo;ve been continuing to build my quantum information numerical arsenal that has been a real feather in my cap when probing into particularly thorny research questions and it&amp;rsquo;s also been a ton of fun to build and to watch grow.</description><content>&lt;p>I created the &lt;a href="https://github.com/vprusso/toqito">toqito&lt;/a> software project back in early 2020 as a pet project for
delving into some research questions I wanted to pursue in quantum information but felt were lacking in the Python
community. When I was a Ph.D. student, having software like toqito would have been indispensible for rapidly prototyping
ideas and attacking problems numerically. I&amp;rsquo;ve been continuing to build my quantum information numerical arsenal that
has been a real feather in my cap when probing into particularly thorny research questions and it&amp;rsquo;s also been a ton of
fun to build and to watch grow.&lt;/p>
&lt;p>&lt;img alt="toqito logo" src="https://vrusso.com/blog/toqito_logo.png">&lt;/p>
&lt;h2 id="google-summer-of-code-gsoc">Google Summer of Code (GSoC)&lt;/h2>
&lt;p>The toqito project has grown in no small part by being part of the open-source ecosystem. Prior hackathon involvement
has served to improve the functionality and quality of toqito beyond what I could reasonably do as one person, and I&amp;rsquo;m
eternally grateful for the stellar contributions and collective interest and use of toqito by the quantum information
open-source community. This is why I am thrilled to announce that toqito will be taking part in the 2025 &lt;a href="https://summerofcode.withgoogle.com/">Google Summer
of Code&lt;/a> project under the &lt;a href="https://numfocus.org/">NumFOCUS&lt;/a> organization.&lt;/p>
&lt;p>&lt;img alt="Google Summer of Code logo" src="https://vrusso.com/blog/gsoc.png">&lt;/p>
&lt;p>For the uninitiated, Google Summer of Code is a development program led by Google to incentivize students and new
contributors to the world of open-source. It serves as a program where these contributors can make meaningful
contributions to a variety of open-source software projects and where the contributors gain valuable experience in
working on open-source software.&lt;/p>
&lt;p>If you are interested in participating (or reading this at a later point in time and interested in the initial ideas)
you can consult the listing of ideas for contributors for toqito on the NumFOCUS GitHub page
&lt;a href="https://github.com/vprusso/toqito/wiki/GSoC-2025-Projects">here&lt;/a>.&lt;/p>
&lt;p>In any case, if you are so inclined to contribute to or to use toqito (whether within the context of GSoC our outside of
it), I encourage you to peruse the &lt;a href="https://github.com/vprusso/toqito/issues">issues board&lt;/a> and see if any of the
outstanding issues strike your fancy. Additionally, if there are features that you would like to see in toqito, I
welcome any feedback and suggestions for improvements.&lt;/p>
&lt;h2 id="gsoc-projects-in-toqito">GSoC projects in toqito&lt;/h2>
&lt;p>I am particularly excited to see progress on two research areas that I have
spent quite a lot of time thinking about and
developing software for; namely
the &amp;ldquo;extended nonlocal games&amp;rdquo; and &amp;ldquo;quantum state distinguishability and
antidistinguishability&amp;rdquo;.&lt;/p>
&lt;p>Extended nonlocal games are particularly close to my heart, as these abstractions were the subject of my &lt;a href="https://arxiv.org/abs/1704.07375">Ph.D.
thesis&lt;/a>. These are generalizatons of nonlocal games; a well-studied area that
conceptualizes many intriguing ideas in quantum information in the language of a computer scientist. There are already
numerical tools for studying extended nonlocal games within toqito (as described in &lt;a href="https://toqito.readthedocs.io/en/latest/tutorials.extended_nonlocal_games.html">this
tutorial&lt;/a>), but there are still many
areas in which this games can be applied and studied further that I find fascinating. For instance, many problems in
&lt;a href="https://en.wikipedia.org/wiki/Quantum_key_distribution">quantum key distribution&lt;/a> (QKD) and &lt;a href="https://en.wikipedia.org/wiki/Quantum_steering">quantum
steering&lt;/a> can be conceptualized by the abstraction of an extended
nonlocal game.&lt;/p>
&lt;p>&lt;img alt="extended nonlocal game" src="https://vrusso.com/blog/extended_nonlocal_game.svg">&lt;/p>
&lt;p>Likewise, quantum state distinguishability is a field that is so foundational to the area of quantum information and yet
has many open problems and areas to explore in which numerical methods can be quite useful in probing into.&lt;/p>
&lt;p>In short, I am thrilled to see the toqito project continue to grow, expand, and to be adopted by researchers in the
field of quantum information. It is a real treat and pleasure to be able to develop software that is useful not just to
my own selfish research pusuits, but the pursuits of others as well. I look forward to having toqito grow beyond just
&amp;ldquo;my&amp;rdquo; project and to instead be acquired as a collective tool and possession of the community at large for doing
legitimately interesting things and making research in this area easier and more enjoyable.&lt;/p></content></item><item><title>The two-copy problem for quantum states</title><link>https://vrusso.com/posts/two_copy_problem/</link><pubDate>Wed, 08 Jan 2025 00:00:00 +0000</pubDate><guid>https://vrusso.com/posts/two_copy_problem/</guid><description>Let \(n\) be an integer, let \(\mathcal{X}\) be a complex Euclidean space, let \(\rho_i \in \text{D}(\mathcal{X})\) be a pure quantum state represented as a density operator, and let
$$ \eta = \left\{\left(\frac{1}{n}, \rho_1\right), \ldots, \left(\frac{1}{n}, \rho_n\right)\right\} \subset \mathcal{X} $$ be an ensemble of pure and mutually orthogonal quantum states. Define \(\eta^{\otimes 2}\) as the two-copy ensemble where
$$ \eta^{\otimes 2} = \left\{\left(\frac{1}{n}, \rho_1 \otimes \rho_1\right), \ldots, \left(\frac{1}{n}, \rho_n \otimes \rho_n\right)\right\} \subset \mathcal{X} \otimes \mathcal{X}.</description><content>&lt;p>Let \(n\) be an integer, let \(\mathcal{X}\) be a complex Euclidean space, let \(\rho_i \in \text{D}(\mathcal{X})\) be a
pure quantum state represented as a density operator, and let&lt;/p>
$$
\eta = \left\{\left(\frac{1}{n}, \rho_1\right), \ldots, \left(\frac{1}{n}, \rho_n\right)\right\} \subset \mathcal{X}
$$
&lt;p>be an ensemble of pure and mutually orthogonal quantum states. Define \(\eta^{\otimes 2}\) as the two-copy ensemble where&lt;/p>
$$
\eta^{\otimes 2} = \left\{\left(\frac{1}{n}, \rho_1 \otimes \rho_1\right), \ldots, \left(\frac{1}{n}, \rho_n \otimes \rho_n\right)\right\}
\subset \mathcal{X} \otimes \mathcal{X}.
$$
&lt;p>&lt;strong>Question&lt;/strong>: Does there exist an ensemble \(\eta^{\otimes 2}\) such that the optimal LOCC, PPT, or SEP values is strictly less than \(1\)?&lt;/p>
&lt;p>Ghosh et al. &lt;a href="https://arxiv.org/abs/quant-ph/0205105">GKRS04&lt;/a> showed that orthogonal maximally entangled states drawn
from the canonical generalized-Bell family can be perfectly discriminated via LOCC if two copies of each of the states
are provided. Their argument does not cover an arbitrary set of \(d^2\) pairwise orthogonal maximally entangled states,
and they exhibit a \(3 \otimes 3\) case where it fails. The question above is more general still, and asks whether two
copies for any set of mutually orthogonal states are &lt;em>always&lt;/em> sufficient for perfectly distinguishing via LOCC, SEP, or
PPT measurements.&lt;/p>
&lt;p>These classes of measurements abide by the following inclusion relationship:&lt;/p>
$$
\text{LOCC} \subset \text{SEP} \subset \text{PPT} \subset \text{GLOBAL}
$$
&lt;p>The set of LOCC measurements has a seemingly complex mathematical structure and no tractable characterization of this
set is known. However, the set of PPT, SEP, and GLOBAL operators forms a closed convex cone and thus the problem of
state distinguishability can be phrased in terms of &lt;a href="https://en.wikipedia.org/wiki/Semidefinite_programming">semidefinite
programming&lt;/a> (SDP) optimization problems.&lt;/p>
&lt;p>The optimal value we obtain from these SDPs would be an upper bound on LOCC in the same way in which they are positioned
in the inclusion chain. As the states are mutually orthogonal, the optimal GLOBAL values will always attain the trivial
upper bound of one. We therefore turn to the respective optimization problems for SEP and PPT measurements.&lt;/p>
&lt;h3 id="semidefinite-program-for-ppt-distinguishability">Semidefinite program for PPT distinguishability&lt;/h3>
&lt;p>Let us first consider the primal problem for the PPT measurement SDP which was introduced in
&lt;a href="https://arxiv.org/abs/1205.1031">Cosentino12&lt;/a>. Given a set of states \(\{\rho_1, \ldots, \rho_n\} \subset \mathcal{A}
\otimes \mathcal{B}\), we wish to find a corresponding set of PPT meaurement operators \(P_1, \ldots, P_n\) that
maximize the equation in the objective function.&lt;/p>
$$
\begin{equation}
\begin{aligned}
\textbf{Primal:} \quad &amp; \\
\text{maximize:} \quad &amp; \sum_{j=1}^k \langle P_j, \rho_j \rangle \\
\text{subject to:} \quad &amp; P_1 + \cdots + P_k = \mathbb{I}_{\mathcal{A}}
\otimes \mathbb{I}_{\mathcal{B}}, \\
&amp; P_1, \ldots, P_k \in \text{PPT}(\mathcal{A} : \mathcal{B}).
\end{aligned}
\end{equation}
$$
&lt;p>Note that we use \(\text{PPT}(\mathcal{A} : \mathcal{B})\) to represent the set of &lt;em>PPT operators&lt;/em> over some complex
Euclidean spaces \(\mathcal{A}\) and \(\mathcal{B}\) where this is defined as the set of all positive semidefinite
operators \(P \in \text{Pos}(\mathcal{A} \otimes \mathcal{B})\) that satisfy \((T \otimes \mathbb{I}_{\mathcal{B}})(P)
\in \text{Pos}(\mathcal{A} \otimes \mathcal{B})\) where \(T\) denotes the linear transpose operation. We can implement
this SDP numerically in Python using the &lt;a href="https://github.com/cvxpy/cvxpy">&lt;code>cvxpy&lt;/code>&lt;/a> and
&lt;a href="https://github.com/vprusso/toqito">&lt;code>toqito&lt;/code>&lt;/a> modules.&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-py" data-lang="py">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f92672">import&lt;/span> cvxpy
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f92672">import&lt;/span> numpy &lt;span style="color:#66d9ef">as&lt;/span> np
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f92672">from&lt;/span> toqito.channels &lt;span style="color:#f92672">import&lt;/span> partial_transpose
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#66d9ef">def&lt;/span> &lt;span style="color:#a6e22e">ppt_primal&lt;/span>(
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> states: list[np&lt;span style="color:#f92672">.&lt;/span>ndarray],
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> dims: list[int],
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> sys: list[int],
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>) &lt;span style="color:#f92672">-&amp;gt;&lt;/span> float:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> n, d &lt;span style="color:#f92672">=&lt;/span> len(states), states[&lt;span style="color:#ae81ff">0&lt;/span>]&lt;span style="color:#f92672">.&lt;/span>shape[&lt;span style="color:#ae81ff">0&lt;/span>]
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#75715e"># Define PSD variables for the measurements.&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> meas &lt;span style="color:#f92672">=&lt;/span> [cvxpy&lt;span style="color:#f92672">.&lt;/span>Variable((d, d), hermitian&lt;span style="color:#f92672">=&lt;/span>&lt;span style="color:#66d9ef">True&lt;/span>) &lt;span style="color:#66d9ef">for&lt;/span> _ &lt;span style="color:#f92672">in&lt;/span> range(n)]
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#75715e"># Constraints: PPT, PSD, and valid measurement collection.&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> constraints &lt;span style="color:#f92672">=&lt;/span> [
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#f92672">*&lt;/span>(partial_transpose(meas[i], sys&lt;span style="color:#f92672">=&lt;/span>sys, dim&lt;span style="color:#f92672">=&lt;/span>dims) &lt;span style="color:#f92672">&amp;gt;&amp;gt;&lt;/span> &lt;span style="color:#ae81ff">0&lt;/span> &lt;span style="color:#66d9ef">for&lt;/span> i &lt;span style="color:#f92672">in&lt;/span> range(n)),
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#f92672">*&lt;/span>(meas[i] &lt;span style="color:#f92672">&amp;gt;&amp;gt;&lt;/span> &lt;span style="color:#ae81ff">0&lt;/span> &lt;span style="color:#66d9ef">for&lt;/span> i &lt;span style="color:#f92672">in&lt;/span> range(n)),
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> cvxpy&lt;span style="color:#f92672">.&lt;/span>sum(meas) &lt;span style="color:#f92672">==&lt;/span> np&lt;span style="color:#f92672">.&lt;/span>identity(d)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> ]
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#75715e"># Objective function: maximize the success probability.&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> obj_func &lt;span style="color:#f92672">=&lt;/span> [&lt;span style="color:#ae81ff">1&lt;/span>&lt;span style="color:#f92672">/&lt;/span>n &lt;span style="color:#f92672">*&lt;/span> cvxpy&lt;span style="color:#f92672">.&lt;/span>trace(states[i]&lt;span style="color:#f92672">.&lt;/span>conj()&lt;span style="color:#f92672">.&lt;/span>T &lt;span style="color:#f92672">@&lt;/span> meas[i]) &lt;span style="color:#66d9ef">for&lt;/span> i &lt;span style="color:#f92672">in&lt;/span> range(n)]
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> objective &lt;span style="color:#f92672">=&lt;/span> cvxpy&lt;span style="color:#f92672">.&lt;/span>Maximize(cvxpy&lt;span style="color:#f92672">.&lt;/span>real(cvxpy&lt;span style="color:#f92672">.&lt;/span>sum(obj_func)))
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">return&lt;/span> cvxpy&lt;span style="color:#f92672">.&lt;/span>Problem(objective, constraints)&lt;span style="color:#f92672">.&lt;/span>solve()
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Note that in addition to the states (that we provide to the function as density operators in &lt;code>states&lt;/code>), we need to
provide a list, &lt;code>dims&lt;/code>, that corresponds to the dimensions of the systems held by the bipartite parties. Additionally,
the &lt;code>sys&lt;/code> argument is a list that informs what subsystems to perform the partial transpose on. If we are assuming that
each state is a bipartite state held by Alice and Bob, we want to perform the partial trace only on Alice&amp;rsquo;s subsystem(s)
but not on Bob&amp;rsquo;s.&lt;/p>
&lt;p>As an example, consider the four Bell states&lt;/p>
$$
\begin{equation}
\begin{aligned}
|\psi_1\rangle = \frac{1}{\sqrt{2}}\left(|00\rangle + |11\rangle\right), \quad
|\psi_2\rangle &amp;= \frac{1}{\sqrt{2}}\left(|00\rangle - |11\rangle\right), \\
|\psi_3\rangle = \frac{1}{\sqrt{2}}\left(|01\rangle + |10\rangle\right), \quad
|\psi_4\rangle &amp;= \frac{1}{\sqrt{2}}\left(|01\rangle - |10\rangle\right).
\end{aligned}
\end{equation}
$$
&lt;p>where \(|\psi_i\rangle \in \mathcal{A} \otimes \mathcal{B}\) such that \(\mathcal{A} = \mathcal{B} = \mathbb{C}^2\). Since
\(\rho_i = |\psi_i\rangle\langle\psi_i| \in \mathcal{A} \otimes \mathcal{B}\), we only want to perform the partial transpose
on the first subsystem. Consider the following code:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-py" data-lang="py">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f92672">import&lt;/span> numpy &lt;span style="color:#66d9ef">as&lt;/span> np
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>e0, e1 &lt;span style="color:#f92672">=&lt;/span> np&lt;span style="color:#f92672">.&lt;/span>array([[&lt;span style="color:#ae81ff">1&lt;/span>], [&lt;span style="color:#ae81ff">0&lt;/span>]]), np&lt;span style="color:#f92672">.&lt;/span>array([[&lt;span style="color:#ae81ff">0&lt;/span>], [&lt;span style="color:#ae81ff">1&lt;/span>]])
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e"># Define the four Bell state vectors.&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>psi_1 &lt;span style="color:#f92672">=&lt;/span> &lt;span style="color:#ae81ff">1&lt;/span>&lt;span style="color:#f92672">/&lt;/span>np&lt;span style="color:#f92672">.&lt;/span>sqrt(&lt;span style="color:#ae81ff">2&lt;/span>) &lt;span style="color:#f92672">*&lt;/span> (np&lt;span style="color:#f92672">.&lt;/span>kron(e0, e0) &lt;span style="color:#f92672">+&lt;/span> np&lt;span style="color:#f92672">.&lt;/span>kron(e1, e1))
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>psi_2 &lt;span style="color:#f92672">=&lt;/span> &lt;span style="color:#ae81ff">1&lt;/span>&lt;span style="color:#f92672">/&lt;/span>np&lt;span style="color:#f92672">.&lt;/span>sqrt(&lt;span style="color:#ae81ff">2&lt;/span>) &lt;span style="color:#f92672">*&lt;/span> (np&lt;span style="color:#f92672">.&lt;/span>kron(e0, e0) &lt;span style="color:#f92672">-&lt;/span> np&lt;span style="color:#f92672">.&lt;/span>kron(e1, e1))
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>psi_3 &lt;span style="color:#f92672">=&lt;/span> &lt;span style="color:#ae81ff">1&lt;/span>&lt;span style="color:#f92672">/&lt;/span>np&lt;span style="color:#f92672">.&lt;/span>sqrt(&lt;span style="color:#ae81ff">2&lt;/span>) &lt;span style="color:#f92672">*&lt;/span> (np&lt;span style="color:#f92672">.&lt;/span>kron(e0, e1) &lt;span style="color:#f92672">+&lt;/span> np&lt;span style="color:#f92672">.&lt;/span>kron(e1, e0))
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>psi_4 &lt;span style="color:#f92672">=&lt;/span> &lt;span style="color:#ae81ff">1&lt;/span>&lt;span style="color:#f92672">/&lt;/span>np&lt;span style="color:#f92672">.&lt;/span>sqrt(&lt;span style="color:#ae81ff">2&lt;/span>) &lt;span style="color:#f92672">*&lt;/span> (np&lt;span style="color:#f92672">.&lt;/span>kron(e0, e1) &lt;span style="color:#f92672">-&lt;/span> np&lt;span style="color:#f92672">.&lt;/span>kron(e1, e0))
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e"># Compute the corresponding density matrices.&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>rho_1 &lt;span style="color:#f92672">=&lt;/span> psi_1 &lt;span style="color:#f92672">@&lt;/span> psi_1&lt;span style="color:#f92672">.&lt;/span>conj()&lt;span style="color:#f92672">.&lt;/span>T
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>rho_2 &lt;span style="color:#f92672">=&lt;/span> psi_2 &lt;span style="color:#f92672">@&lt;/span> psi_2&lt;span style="color:#f92672">.&lt;/span>conj()&lt;span style="color:#f92672">.&lt;/span>T
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>rho_3 &lt;span style="color:#f92672">=&lt;/span> psi_3 &lt;span style="color:#f92672">@&lt;/span> psi_3&lt;span style="color:#f92672">.&lt;/span>conj()&lt;span style="color:#f92672">.&lt;/span>T
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>rho_4 &lt;span style="color:#f92672">=&lt;/span> psi_4 &lt;span style="color:#f92672">@&lt;/span> psi_4&lt;span style="color:#f92672">.&lt;/span>conj()&lt;span style="color:#f92672">.&lt;/span>T
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e"># Compute the PPT-distinguishability of the four Bell states.&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>states &lt;span style="color:#f92672">=&lt;/span> [rho_1, rho_2, rho_3, rho_4]
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>ppt_primal(states, dims&lt;span style="color:#f92672">=&lt;/span>[&lt;span style="color:#ae81ff">2&lt;/span>, &lt;span style="color:#ae81ff">2&lt;/span>], sys&lt;span style="color:#f92672">=&lt;/span>[&lt;span style="color:#ae81ff">0&lt;/span>])
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Now, consider the &amp;ldquo;two-copy&amp;rdquo; setting for the four Bell states. That is, each state in the set is now \(|\psi_i\rangle
\otimes |\psi_i\rangle \in \mathcal{A}_1 \otimes \mathcal{B}_1 \otimes \mathcal{A}_2 \otimes \mathcal{B}_2\). In other
words, Alice&amp;rsquo;s subsystems, the ones we want to perform the partial transpose over, are now the first and third
subsystems.&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-py" data-lang="py">&lt;span style="display:flex;">&lt;span>two_copy_states &lt;span style="color:#f92672">=&lt;/span> [np&lt;span style="color:#f92672">.&lt;/span>kron(state, state) &lt;span style="color:#66d9ef">for&lt;/span> state &lt;span style="color:#f92672">in&lt;/span> states]
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>ppt_primal(two_copy_states, dims&lt;span style="color:#f92672">=&lt;/span>[&lt;span style="color:#ae81ff">2&lt;/span>, &lt;span style="color:#ae81ff">2&lt;/span>, &lt;span style="color:#ae81ff">2&lt;/span>, &lt;span style="color:#ae81ff">2&lt;/span>], sys&lt;span style="color:#f92672">=&lt;/span>[&lt;span style="color:#ae81ff">0&lt;/span>, &lt;span style="color:#ae81ff">2&lt;/span>])
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Note that &lt;code>0&lt;/code> and &lt;code>2&lt;/code> are used instead of &lt;code>1&lt;/code> and &lt;code>3&lt;/code> for the subsystem labeling as Python (like many other languages)
uses zero-based indexing.&lt;/p>
&lt;h3 id="numerical-search">Numerical search&lt;/h3>
&lt;p>Given that we have an implementation of the PPT SDP for quantum state distinguishability, we could attempt a numerical
approach to search for a counterexample for the two-copy problem. The approach would entail:&lt;/p>
&lt;ul>
&lt;li>Generate a set of \(n\) random mutually orthogonal quantum states.&lt;/li>
&lt;li>Compute the optimal PPT value for the corresponding &amp;ldquo;two-copy&amp;rdquo; set of states.&lt;/li>
&lt;/ul>
&lt;p>To compute a random set of states, we could use a fairly standard trick of using Gram-Schmidt orthogonalization to
obtain a set of \(n\) states of dimension \(d\).&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-py" data-lang="py">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#66d9ef">def&lt;/span> &lt;span style="color:#a6e22e">generate_orthogonal_states&lt;/span>(n: int, d: int) &lt;span style="color:#f92672">-&amp;gt;&lt;/span> list[np&lt;span style="color:#f92672">.&lt;/span>ndarray]:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#e6db74">&amp;#34;&amp;#34;&amp;#34;Generate a set of random mutually orthogonal pure states.&amp;#34;&amp;#34;&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">if&lt;/span> n &lt;span style="color:#f92672">&amp;gt;&lt;/span> d:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">raise&lt;/span> &lt;span style="color:#a6e22e">ValueError&lt;/span>(&lt;span style="color:#e6db74">&amp;#34;Number of states cannot exceed the dimension.&amp;#34;&lt;/span>)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#75715e"># Generate random complex vectors.&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> random_vectors &lt;span style="color:#f92672">=&lt;/span> np&lt;span style="color:#f92672">.&lt;/span>random&lt;span style="color:#f92672">.&lt;/span>randn(n, d) &lt;span style="color:#f92672">+&lt;/span> &lt;span style="color:#ae81ff">1&lt;/span>j &lt;span style="color:#f92672">*&lt;/span> np&lt;span style="color:#f92672">.&lt;/span>random&lt;span style="color:#f92672">.&lt;/span>randn(n, d)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#75715e"># Apply Gram-Schmidt orthogonalization.&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> orthogonal_states &lt;span style="color:#f92672">=&lt;/span> []
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">for&lt;/span> v &lt;span style="color:#f92672">in&lt;/span> random_vectors:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#75715e"># Subtract projections onto previously added states.&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">for&lt;/span> u &lt;span style="color:#f92672">in&lt;/span> orthogonal_states:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> v &lt;span style="color:#f92672">-=&lt;/span> np&lt;span style="color:#f92672">.&lt;/span>dot(np&lt;span style="color:#f92672">.&lt;/span>conj(u), v) &lt;span style="color:#f92672">*&lt;/span> u
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#75715e"># Normalize the vector.&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> v &lt;span style="color:#f92672">/=&lt;/span> np&lt;span style="color:#f92672">.&lt;/span>linalg&lt;span style="color:#f92672">.&lt;/span>norm(v)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> orthogonal_states&lt;span style="color:#f92672">.&lt;/span>append(v)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">return&lt;/span> orthogonal_states
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Now that we have both the mechanism by which to generate sets of orthogonal states and to calculate the optimal
PPT-distinguishable value, we can simply pick a dimension, a number of trial to run, and keep running until we find
something whose optimal two-copy value is strictly less than one.&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-py" data-lang="py">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f92672">import&lt;/span> pickle
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>num_trials &lt;span style="color:#f92672">=&lt;/span> &lt;span style="color:#ae81ff">100&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>dim &lt;span style="color:#f92672">=&lt;/span> &lt;span style="color:#ae81ff">2&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#66d9ef">for&lt;/span> trial &lt;span style="color:#f92672">in&lt;/span> range(num_trials):
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> states &lt;span style="color:#f92672">=&lt;/span> generate_orthogonal_states(dim&lt;span style="color:#f92672">**&lt;/span>&lt;span style="color:#ae81ff">2&lt;/span>, dim&lt;span style="color:#f92672">**&lt;/span>&lt;span style="color:#ae81ff">2&lt;/span>)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> two_copy &lt;span style="color:#f92672">=&lt;/span> [np&lt;span style="color:#f92672">.&lt;/span>kron(state, state) &lt;span style="color:#66d9ef">for&lt;/span> state &lt;span style="color:#f92672">in&lt;/span> states]
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> two_copy_opt, _ &lt;span style="color:#f92672">=&lt;/span> ppt_primal(two_copy, dims&lt;span style="color:#f92672">=&lt;/span>[dim, dim, dim, dim], sys&lt;span style="color:#f92672">=&lt;/span>[&lt;span style="color:#ae81ff">0&lt;/span>, &lt;span style="color:#ae81ff">2&lt;/span>])
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">if&lt;/span> &lt;span style="color:#f92672">not&lt;/span> np&lt;span style="color:#f92672">.&lt;/span>isclose(two_copy_opt, &lt;span style="color:#ae81ff">1&lt;/span>):
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> print(&lt;span style="color:#e6db74">f&lt;/span>&lt;span style="color:#e6db74">&amp;#34;Two-copy optimization value is not close to 1. Saving states...&amp;#34;&lt;/span>)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">with&lt;/span> open(&lt;span style="color:#e6db74">&amp;#34;states.pkl&amp;#34;&lt;/span>, &lt;span style="color:#e6db74">&amp;#34;wb&amp;#34;&lt;/span>) &lt;span style="color:#66d9ef">as&lt;/span> f:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> pickle&lt;span style="color:#f92672">.&lt;/span>dump(states, f)
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Of course, we may never find any such example. Perhaps because one does not exist, the structure of the states are too
special or specific to stumble upon randomly, or we are just unlucky.&lt;/p>
&lt;p>One thing to note here is that the problem scales quickly as a function of &lt;code>dim&lt;/code>, the dimenion. As we increase &lt;code>dim&lt;/code>,
the matrices scale exponentially, and therefore, will likely only be feasible for relatively small dimensions.&lt;/p>
&lt;p>Also, certain solvers tend to perform quite a bit better than others. For instance the &lt;a href="https://www.mosek.com/">MOSEK&lt;/a> solver
heuristically seems to be much better than either the free and stock &lt;a href="https://cvxopt.org/">CVXOPT&lt;/a> or
&lt;a href="https://yalmip.github.io/solver/scs/">SCS&lt;/a> solvers. MOSEK, however, is not free, (although there are options for
obtaining a trial license).&lt;/p>
&lt;p>Another thing to note as well is that one could also consider using SDPs to calculate the SEP-distinguishability of the
states (as this would be a closer approximation to the LOCC value). However, optimizing over the set of SEP operators is
NP-hard and requires a hierarchy of SDPs that become progressively more computationally expensive to compute as you
climb the hierarchy. The &lt;a href="https://github.com/vprusso/toqito">toqito&lt;/a> library does have such functionality for computing
these hierarchies (for instance,
&lt;a href="https://github.com/vprusso/toqito/blob/master/toqito/state_opt/symmetric_extension_hierarchy.py">symmetric_extension_hierarchy.py&lt;/a>),
and these may prove interesting to investigate further.&lt;/p>
&lt;p>I&amp;rsquo;m personally quite curious to know the resolution to this question. Please feel free to reach out to me should you
want to discuss it further!&lt;/p>
&lt;h1 id="update-august-2026">Update (August 2026)&lt;/h1>
&lt;p>Since writing this post I learned of work that settles a restricted form of the
question. It does not resolve the question as posed above, but it does show that
the question needs to be stated more carefully than I stated it.&lt;/p>
&lt;h2 id="adaptive-versus-generic-protocols">Adaptive versus generic protocols&lt;/h2>
&lt;p>There are two ways that Alice and Bob might use two copies. In an &lt;em>adaptive&lt;/em>
protocol the copies are measured one at a time, and the measurement applied to
the second copy may depend on the outcome obtained from the first. In a
&lt;em>non-adaptive&lt;/em> protocol each party addresses both of their systems at once, so
that Alice performs a single measurement on her halves of both copies while Bob
does the same. Neither class contains the other.&lt;/p>
&lt;p>The optimal values computed by the SDPs above are taken over a class that is
larger than both. A PPT or separable operator on \(\mathcal{X} \otimes
\mathcal{X}\) is under no obligation to factor across the two copies, nor to
arise from measuring one copy and then the other. This distinction is what the
question above turns on, and I did not draw it originally.&lt;/p>
&lt;h2 id="what-is-now-known">What is now known&lt;/h2>
&lt;p>Banik, Guha, Alimuddin, Kar, Halder, and Bhattacharya
&lt;a href="https://arxiv.org/abs/2011.09287">BGAKHB20&lt;/a> resolve the adaptive case for two
qubits. Their Theorem 3 states that any orthonormal basis of \(\mathbb{C}^2
\otimes \mathbb{C}^2\) containing exactly three entangled states requires three
copies for perfect discrimination under adaptive LOCC. Two copies therefore do
not suffice for such a basis under an adaptive protocol. One such basis is&lt;/p>
$$
\left\{
|00\rangle, \quad
\frac{|01\rangle + |10\rangle}{\sqrt{2}}, \quad
\frac{1}{\sqrt{2}}\left(\frac{|01\rangle - |10\rangle}{\sqrt{2}} + |11\rangle\right), \quad
\frac{1}{\sqrt{2}}\left(\frac{|01\rangle - |10\rangle}{\sqrt{2}} - |11\rangle\right)
\right\},
$$
&lt;p>whose first element is a product state and whose remaining three elements are
entangled. The result is striking in that the Bell basis, in which all four
states are entangled, &lt;em>is&lt;/em> two-copy distinguishable under an adaptive protocol.
A basis with less entanglement is here the harder one.&lt;/p>
&lt;p>That paper is explicit that the non-adaptive case is not settled. The authors
write that their constructions &amp;ldquo;either will establish two-copy
indistinguishability (under generic protocol) or it will demonstrate
super-additivity of locally accessible information&amp;rdquo;, and they leave the
construction of such ensembles open.&lt;/p>
&lt;p>The question posed in this post is the generic one, so it remains open.&lt;/p>
&lt;h2 id="what-the-numerics-say">What the numerics say&lt;/h2>
&lt;p>Running the search described above turns up nothing. The optimal PPT value for
the two-copy ensemble came back equal to one for random orthonormal bases in
\(2 \otimes 2\), \(2 \otimes 3\), and \(2 \otimes 4\), for structured families,
and for gradient-free minimization run directly against the two-copy value from
several starting points.&lt;/p>
&lt;p>The most informative of these is a one-parameter family interpolating between a
maximally entangled basis and a product basis. Along that family the single-copy
value moves smoothly from \(1/2\) to \(1\), so the family covers the full range
from hard to trivial, while the two-copy value stays fixed at one throughout.&lt;/p>
&lt;p>Two remarks bear on where a counterexample could live, though they constrain
less than I first supposed. A basis of product states is perfectly
distinguishable by the measurement onto those states, which is separable, so the
value is one for a trivial reason. The maximally entangled case is narrower than
I stated it above: &lt;a href="https://arxiv.org/abs/quant-ph/0205105">GKRS04&lt;/a> covers sets
drawn from the canonical generalized-Bell family
\(\frac{1}{\sqrt{d}}\sum_j e^{2\pi i jn/d}|j\rangle|(j+m) \bmod d\rangle\),
and its authors write that they are unable to proceed the same way for an
arbitrary set of \(d^2\) pairwise orthogonal maximally entangled states, giving
a \(3 \otimes 3\) case where the method fails. A maximally entangled basis
outside that family is therefore still a candidate, and the middle range is not
the only place to look.&lt;/p>
&lt;p>One caution about reading such numerics, which cost me some time. The three
classes are ordered by inclusion, so their optimal values satisfy&lt;/p>
$$
\omega_{\text{LOCC}} \leq \omega_{\text{SEP}} \leq \omega_{\text{PPT}}.
$$
&lt;p>A PPT value of one is consistent with a separable or LOCC value strictly below
one, and says nothing about either. The PPT computations above are evidence only
about the largest of the three classes.&lt;/p>
&lt;h2 id="what-the-literature-does-and-does-not-contain">What the literature does and does not contain&lt;/h2>
&lt;p>A systematic search turned up one partial result worth recording. Shu
(&lt;a href="https://doi.org/10.1140/s13360-021-02182-5">EPJ Plus 136:1172&lt;/a>) proves that any
\(N\) pairwise orthogonal &lt;em>product&lt;/em> states in \(\mathbb{C}^m \otimes
\mathbb{C}^n\) are perfectly LOCC-distinguishable with \(\lceil N/4 \rceil\)
copies, so any set of at most eight orthogonal product states is two-copy
distinguishable. That covers no entangled ensemble, but it does transfer to SEP
and PPT for the reason given next.&lt;/p>
&lt;p>There is a logical asymmetry here that is easy to get backwards, and I did. An
adaptive protocol is itself a measurement on the joint two-copy system, so every
achievability result stated for adaptive protocols is already valid for the
generic classes, and for SEP and PPT above them. The adaptive restriction
therefore matters only for &lt;em>negative&lt;/em> results. A counterexample answering the
question must be a lower bound against a genuinely joint measurement, and no
bound of that kind appears in the literature.&lt;/p>
&lt;p>I could find no treatment of the two-copy PPT question for orthogonal pure
states anywhere in the literature. The multi-copy PPT results I am aware of, such
as those of &lt;a href="https://arxiv.org/abs/1209.4222">YDY14&lt;/a> and
&lt;a href="https://arxiv.org/abs/1702.00231">LWD17&lt;/a>, all concern ensembles containing a
mixed state, and the reason is structural rather than incidental. That machinery
requires the support of one ensemble member to be strongly PPT-unextendible, and
the minimum dimension of such a subspace in an \(m \otimes n\) system is
\(m + n - 1 \geq 3\). A pure state has support of dimension one, so the
mechanism can never be triggered by a pure-state ensemble. Relatedly, since
\(N-1\) copies always suffice for \(N\) orthogonal pure states, no pure
ensemble is &lt;em>many&lt;/em>-copy indistinguishable at all, which is why that literature
never formulates the fixed two-copy question.&lt;/p>
&lt;p>As before, I would be glad to hear from anyone who wants to discuss it.&lt;/p></content></item><item><title>Disproving a conjecture on quantum state antidistinguishability</title><link>https://vrusso.com/posts/antidist_conjecture/</link><pubDate>Sun, 05 Jan 2025 00:00:00 +0000</pubDate><guid>https://vrusso.com/posts/antidist_conjecture/</guid><description>I&amp;rsquo;m going to discuss a conjecture that got me interested in the topic of &amp;ldquo;quantum state antidistinguishability&amp;rdquo;.
Conjecture [Havlíček-Barret (2020)]:
Let \(S = \{|\psi_1\rangle, \ldots, |\psi_n\rangle\} \subset \mathbb{C}^n\) be a set of \(n\) pure quantum states each of dimension \(n\). Then \(S\) is antidistinguishable when
$$ |\langle \psi_i | \psi_j \rangle| \leq \frac{n-2}{n-1} $$ for all \(i \neq j\).
Before unpacking this statement more formally, I want to mention some points that drew me to it:</description><content>&lt;p>I&amp;rsquo;m going to discuss a conjecture that got me interested in the topic of &amp;ldquo;quantum state antidistinguishability&amp;rdquo;.&lt;/p>
&lt;p>&lt;strong>Conjecture&lt;/strong> [&lt;a href="https://arxiv.org/abs/1911.01927">Havlíček-Barret (2020)&lt;/a>]:&lt;/p>
&lt;p>Let \(S = \{|\psi_1\rangle, \ldots, |\psi_n\rangle\} \subset \mathbb{C}^n\) be a set of \(n\) pure quantum states each
of dimension \(n\). Then \(S\) is antidistinguishable when&lt;/p>
$$
|\langle \psi_i | \psi_j \rangle| \leq \frac{n-2}{n-1}
$$
&lt;p>
for all \(i \neq j\).&lt;/p>
&lt;p>Before unpacking this statement more formally, I want to mention some points that drew me to it:&lt;/p>
&lt;ul>
&lt;li>
&lt;p>The validity of the conjecture would imply the existence of a quantum communication task with an exponential
separation between classical and quantum communication complexity.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>The notion of &amp;ldquo;antidistinguishability&amp;rdquo; is closely related to a quantum state distinguishability; a topic that I&amp;rsquo;ve
been interested in and have previously worked on (&lt;a href="https://arxiv.org/abs/1307.3232">arXiv:1307.3232&lt;/a>,
&lt;a href="https://arxiv.org/abs/1408.6981">arXiv:1408.6981&lt;/a>, &lt;a href="https://arxiv.org/abs/2106.08721">arXiv:2106.08721&lt;/a>, and
&lt;a href="https://arxiv.org/abs/2406.13430">arXiv:2406.13430&lt;/a>, to name a few).&lt;/p>
&lt;/li>
&lt;li>
&lt;p>Antidistinguishability has connections to the foundations of quantum mechanics. Specifically, in the &lt;a href="https://en.wikipedia.org/wiki/Pusey%E2%80%93Barrett%E2%80%93Rudolph_theorem">PBR
theorem&lt;/a>, it was used (although the term
&amp;ldquo;antidistinguishable&amp;rdquo; was not used) as a key piece of machinery about the question of whether the quantum state
is ontological or epistemic.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>It&amp;rsquo;s an intriguingly concise conjecture with little baggage and lends itself to numerical attack. This seemed like a
good way for me to kick the tires on my (at the time) newly developed &lt;a href="https://github.com/vprusso/toqito">|toqito&amp;gt;&lt;/a>
software package.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>I tend to excel at breaking things, so I figured that an attempt to disprove it would be fun and keep me out of
trouble.&lt;/p>
&lt;/li>
&lt;/ul>
&lt;p>The conjecture can be viewed as a statement about a set of unit vectors in a complex Euclidean space (pure quantum
states) and a property that a set of quantum states can possess called &lt;em>antidistinguishability&lt;/em>.&lt;/p>
&lt;h3 id="antidistinguishability">Antidistinguishability&lt;/h3>
&lt;p>To describe antidistinguishability, let&amp;rsquo;s consider the following setting:&lt;/p>
&lt;p>&lt;strong>Problem&lt;/strong>:
Given a single copy of an arbitrary pure state (in a lab, not on paper), from a set of states, we want to figure out
exactly which one were &lt;em>not&lt;/em> given to us: measuring it provides some information but causes the state to collapse.&lt;/p>
&lt;p>&lt;strong>Approach&lt;/strong>:
However, if we are given extra information about the state, sometimes we can figure out which state was (not) given to us.&lt;/p>
&lt;p>&lt;strong>Scenario&lt;/strong>:
Suppose we are given (on paper) a set of potential states:&lt;/p>
$$
S = \{|\psi_1\rangle, |\psi_2\rangle, \ldots, |\psi_n\rangle \} \subset \mathbb{C}^d.
$$
&lt;p>Then we are given (in a lab) one of those \(n\) states. If we can successfully determine which states was &lt;em>not&lt;/em> given to
us for every state in the set, then we say that the set of quantum states are &lt;em>antidistinguishable&lt;/em>.&lt;/p>
&lt;p>This scenario is depicted in the following ASCII image: Note that &lt;code>---&amp;gt;&lt;/code> denotes the transmission of quantum information
whereas &lt;code>===&amp;gt;&lt;/code> denotes the transmission of classical information (in this case, Bob&amp;rsquo;s answer about the index of the
state).&lt;/p>
&lt;pre tabindex="0">&lt;code> Alice Bob
--------- ---------
| | |ψ_i⟩ | |
| | ------------------&amp;gt; | |
| Prepare | i | Measure |
| | &amp;lt;================= | |
| | | |
--------- ---------
&lt;/code>&lt;/pre>&lt;p>Alice selects one of the states \(|\psi_i\rangle\) from the set \(\{|\psi_1\rangle, \ldots, |\psi_n\rangle\}\) and sends
\(|\psi_i\rangle\) to Bob. Bob needs to return an index &amp;ldquo;i&amp;rdquo;. We say that Bob&amp;rsquo;s answer is &amp;ldquo;correct&amp;rdquo; if the index &amp;ldquo;i&amp;rdquo; he
returns is &lt;em>not&lt;/em> the index corresponding to the index of the state \(|\psi_i\rangle\). If Bob can perform this task
correctly for each state in the set, then the states are antidistinguishable and otherwise, they are not.&lt;/p>
&lt;p>For clarity, let&amp;rsquo;s write a formal definition for what it means for a set of states to be antidistinguishable:&lt;/p>
&lt;p>&lt;strong>Definition&lt;/strong>: Let \(n\) and \(d\) be integers. A collection of quantum states&lt;/p>
$$
\begin{equation}
S = \{|\psi_1\rangle, \ldots, |\psi_{n}\rangle\} \subset \mathbb{C}^d
\end{equation}
$$
&lt;p>are &lt;em>antidistinguishable&lt;/em> if there exists a collection of positive operator value measurements (POVMs) \(\{M_1, \ldots,
M_{n}\}\) such that \(\langle \psi_i | M_i | \psi_i \rangle = 0\) for all \(1 \leq i \leq n\).&lt;/p>
&lt;p>Recall that a collection of POVMs are positive semidefinite operators \(\{M_i : 1 \leq i \leq n\} \subset \mathbb{C}^d\)
that satisfy&lt;/p>
$$
\begin{equation}
\sum_{i=1}^{n} M_i = \mathbb{I}_d.
\end{equation}
$$
&lt;p>Another way of phrasing this is that if such a valid set of measurement operators exists that gives an inner product value
of zero for each state in the set, then the set of states are antidistinguishable, and otherwise, they are not.&lt;/p>
&lt;h4 id="example-trine-states">Example: Trine states&lt;/h4>
&lt;p>Let&amp;rsquo;s take a look at a set of states that we will show to be antidistinguishable (but interestingly are &lt;em>not&lt;/em>
distinguishable, that is, they cannot be perfectly distinguished). Consider the so-called &lt;em>trine states&lt;/em> which are a set
of three states, each of dimension two defined as&lt;/p>
$$
\begin{equation}
|\psi_1\rangle = |0\rangle, \quad
|\psi_2\rangle = -\frac{1}{2}(|0\rangle + \sqrt{3}|1\rangle), \quad
|\psi_3\rangle = -\frac{1}{2}(|0\rangle - \sqrt{3}|1\rangle).
\end{equation}
$$
&lt;p>We can define this set of states in Python like so:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-py" data-lang="py">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f92672">import&lt;/span> numpy &lt;span style="color:#66d9ef">as&lt;/span> np
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>e_0, e_1 &lt;span style="color:#f92672">=&lt;/span> np&lt;span style="color:#f92672">.&lt;/span>array([[&lt;span style="color:#ae81ff">1&lt;/span>], [&lt;span style="color:#ae81ff">0&lt;/span>]]), np&lt;span style="color:#f92672">.&lt;/span>array([[&lt;span style="color:#ae81ff">0&lt;/span>], [&lt;span style="color:#ae81ff">1&lt;/span>]])
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>psi_1 &lt;span style="color:#f92672">=&lt;/span> e_0
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>psi_2 &lt;span style="color:#f92672">=&lt;/span> &lt;span style="color:#f92672">-&lt;/span>&lt;span style="color:#ae81ff">1&lt;/span> &lt;span style="color:#f92672">/&lt;/span> &lt;span style="color:#ae81ff">2&lt;/span> &lt;span style="color:#f92672">*&lt;/span> (e_0 &lt;span style="color:#f92672">+&lt;/span> np&lt;span style="color:#f92672">.&lt;/span>sqrt(&lt;span style="color:#ae81ff">3&lt;/span>) &lt;span style="color:#f92672">*&lt;/span> e_1)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>psi_3 &lt;span style="color:#f92672">=&lt;/span> &lt;span style="color:#f92672">-&lt;/span>&lt;span style="color:#ae81ff">1&lt;/span> &lt;span style="color:#f92672">/&lt;/span> &lt;span style="color:#ae81ff">2&lt;/span> &lt;span style="color:#f92672">*&lt;/span> (e_0 &lt;span style="color:#f92672">-&lt;/span> np&lt;span style="color:#f92672">.&lt;/span>sqrt(&lt;span style="color:#ae81ff">3&lt;/span>) &lt;span style="color:#f92672">*&lt;/span> e_1)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>trine_states &lt;span style="color:#f92672">=&lt;/span> [psi_1, psi_2, psi_3]
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Here are a set of measurements we can verify that satisfy the antidistinguishability constraints. We will see a
method that we can use to obtain these directly later, but for now, let&amp;rsquo;s just assume that we have a process to obtain
these from a black box.&lt;/p>
$$
\begin{equation}
M_1 = \frac{2}{3} (\mathbb{I} - |\psi_1\rangle \langle \psi_1|), \quad
M_2 = \frac{2}{3} (\mathbb{I} - |\psi_2\rangle \langle \psi_2|), \quad
M_3 = \frac{2}{3} (\mathbb{I} - |\psi_3\rangle \langle \psi_3|).
\end{equation}
$$
&lt;p>We will want to check the requisite properties of these measurements, so let&amp;rsquo;s go ahead and define them numerically.&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-py" data-lang="py">&lt;span style="display:flex;">&lt;span>M1 &lt;span style="color:#f92672">=&lt;/span> &lt;span style="color:#ae81ff">2&lt;/span>&lt;span style="color:#f92672">/&lt;/span>&lt;span style="color:#ae81ff">3&lt;/span> &lt;span style="color:#f92672">*&lt;/span> (np&lt;span style="color:#f92672">.&lt;/span>identity(&lt;span style="color:#ae81ff">2&lt;/span>) &lt;span style="color:#f92672">-&lt;/span> psi1 &lt;span style="color:#f92672">@&lt;/span> psi1&lt;span style="color:#f92672">.&lt;/span>conj()&lt;span style="color:#f92672">.&lt;/span>T)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>M2 &lt;span style="color:#f92672">=&lt;/span> &lt;span style="color:#ae81ff">2&lt;/span>&lt;span style="color:#f92672">/&lt;/span>&lt;span style="color:#ae81ff">3&lt;/span> &lt;span style="color:#f92672">*&lt;/span> (np&lt;span style="color:#f92672">.&lt;/span>identity(&lt;span style="color:#ae81ff">2&lt;/span>) &lt;span style="color:#f92672">-&lt;/span> psi2 &lt;span style="color:#f92672">@&lt;/span> psi2&lt;span style="color:#f92672">.&lt;/span>conj()&lt;span style="color:#f92672">.&lt;/span>T)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>M3 &lt;span style="color:#f92672">=&lt;/span> &lt;span style="color:#ae81ff">2&lt;/span>&lt;span style="color:#f92672">/&lt;/span>&lt;span style="color:#ae81ff">3&lt;/span> &lt;span style="color:#f92672">*&lt;/span> (np&lt;span style="color:#f92672">.&lt;/span>identity(&lt;span style="color:#ae81ff">2&lt;/span>) &lt;span style="color:#f92672">-&lt;/span> psi3 &lt;span style="color:#f92672">@&lt;/span> psi3&lt;span style="color:#f92672">.&lt;/span>conj()&lt;span style="color:#f92672">.&lt;/span>T)
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>In order for \(M_1\), \(M_2\), and \(M_3\) to constitute as valid POVMs, each of these matrices must be positive
semidefinite and we must ensure that \(\sum_{i \in \{1,2,3\}} M_i = \mathbb{I}_2\). It&amp;rsquo;s straightforward to confirm that
the matrices are positive semidefinite by inspection and we can also see that they do indeed sum to the identity
operator.&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-py" data-lang="py">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f92672">&amp;gt;&amp;gt;&amp;gt;&lt;/span> print(&lt;span style="color:#e6db74">f&lt;/span>&lt;span style="color:#e6db74">&amp;#34;M_1 + M_2 + M_3: &lt;/span>&lt;span style="color:#ae81ff">\n&lt;/span>&lt;span style="color:#e6db74"> &lt;/span>&lt;span style="color:#e6db74">{&lt;/span>M1 &lt;span style="color:#f92672">+&lt;/span> M2 &lt;span style="color:#f92672">+&lt;/span> M3&lt;span style="color:#e6db74">}&lt;/span>&lt;span style="color:#e6db74">&amp;#34;&lt;/span>)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>M_1 &lt;span style="color:#f92672">+&lt;/span> M_2 &lt;span style="color:#f92672">+&lt;/span> M_3:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> [[&lt;span style="color:#ae81ff">1.&lt;/span> &lt;span style="color:#ae81ff">0.&lt;/span>]
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> [&lt;span style="color:#ae81ff">0.&lt;/span> &lt;span style="color:#ae81ff">1.&lt;/span>]]
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Next, we must show that these measurements satisfy \(\langle \psi_i | M_i | \psi_i \rangle = 0\) for all \(i \in
\{1,2,3\}\). Indeed, for the measurements we have defined, we can check that this is the case.&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-py" data-lang="py">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f92672">&amp;gt;&amp;gt;&amp;gt;&lt;/span> print(&lt;span style="color:#e6db74">f&lt;/span>&lt;span style="color:#e6db74">&amp;#34;&amp;lt;𝛙_1| M_1 |𝛙_1&amp;gt;: &amp;#34;&lt;/span>, (psi1&lt;span style="color:#f92672">.&lt;/span>reshape(&lt;span style="color:#ae81ff">1&lt;/span>, &lt;span style="color:#f92672">-&lt;/span>&lt;span style="color:#ae81ff">1&lt;/span>)[&lt;span style="color:#ae81ff">0&lt;/span>] &lt;span style="color:#f92672">@&lt;/span> M1 &lt;span style="color:#f92672">@&lt;/span> psi1)[&lt;span style="color:#ae81ff">0&lt;/span>])
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f92672">&amp;gt;&amp;gt;&amp;gt;&lt;/span> print(&lt;span style="color:#e6db74">f&lt;/span>&lt;span style="color:#e6db74">&amp;#34;&amp;lt;𝛙_2| M_2 |𝛙_2&amp;gt;: &amp;#34;&lt;/span>, (psi2&lt;span style="color:#f92672">.&lt;/span>reshape(&lt;span style="color:#ae81ff">1&lt;/span>, &lt;span style="color:#f92672">-&lt;/span>&lt;span style="color:#ae81ff">1&lt;/span>)[&lt;span style="color:#ae81ff">0&lt;/span>] &lt;span style="color:#f92672">@&lt;/span> M2 &lt;span style="color:#f92672">@&lt;/span> psi2)[&lt;span style="color:#ae81ff">0&lt;/span>])
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f92672">&amp;gt;&amp;gt;&amp;gt;&lt;/span> print(&lt;span style="color:#e6db74">f&lt;/span>&lt;span style="color:#e6db74">&amp;#34;&amp;lt;𝛙_3| M_3 |𝛙_3&amp;gt;: &amp;#34;&lt;/span>, (psi3&lt;span style="color:#f92672">.&lt;/span>reshape(&lt;span style="color:#ae81ff">1&lt;/span>, &lt;span style="color:#f92672">-&lt;/span>&lt;span style="color:#ae81ff">1&lt;/span>)[&lt;span style="color:#ae81ff">0&lt;/span>] &lt;span style="color:#f92672">@&lt;/span> M3 &lt;span style="color:#f92672">@&lt;/span> psi3)[&lt;span style="color:#ae81ff">0&lt;/span>])
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f92672">&amp;lt;&lt;/span>𝛙_1&lt;span style="color:#f92672">|&lt;/span> M_1 &lt;span style="color:#f92672">|&lt;/span>𝛙_1&lt;span style="color:#f92672">&amp;gt;&lt;/span>: &lt;span style="color:#ae81ff">0.0&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f92672">&amp;lt;&lt;/span>𝛙_2&lt;span style="color:#f92672">|&lt;/span> M_2 &lt;span style="color:#f92672">|&lt;/span>𝛙_2&lt;span style="color:#f92672">&amp;gt;&lt;/span>: &lt;span style="color:#ae81ff">6.999554767325977e-17&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f92672">&amp;lt;&lt;/span>𝛙_3&lt;span style="color:#f92672">|&lt;/span> M_3 &lt;span style="color:#f92672">|&lt;/span>𝛙_3&lt;span style="color:#f92672">&amp;gt;&lt;/span>: &lt;span style="color:#ae81ff">6.999554767325977e-17&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Since we have exhibited a set of measurements \(\{M_i: i \in \{1,2,3\}\} \subset \text{Pos}(\mathbb{C^d})\) that satisfy&lt;/p>
$$
\begin{equation}
\langle \psi_i | M_i | \psi_i \rangle = 0
\quad \text{and} \quad
\sum_{i \in \{1,2,3\}} M_i = \mathbb{I}_2
\end{equation}
$$
&lt;p>for all \(i\), we conclude that the trine states are antidistinguishable. So, we have shown that the trine states are
antidistinguishable by exhibiting a set of measurement operators that satisfy the necessary criteria.&lt;/p>
&lt;p>But where did these measurements come from and how can we construct such a set of measurements (if such a set exists)
for an arbitrary set of quantum states? For this, we require the technique of semidefinite programming.&lt;/p>
&lt;h3 id="semidefinite-program-for-determining-antidistinguishability">Semidefinite program for determining antidistinguishability&lt;/h3>
&lt;p>&lt;a href="https://en.wikipedia.org/wiki/Semidefinite_programming">Semidefinite programming&lt;/a> is a technique for optimizing over
positive semidefinite (PSD) matrices. Conveniently, in quantum information, many of the objects of interest (quantum
states, channels, and measurements) can all be represented by positive semidefinite matrices.&lt;/p>
&lt;p>In general semidefinite programs (SDPs) are:&lt;/p>
&lt;ul>
&lt;li>Generalization of linear programming.&lt;/li>
&lt;li>Powerful tool with many applications in quantum information.&lt;/li>
&lt;li>SDPs are efficiently solvable (polynomial time).&lt;/li>
&lt;li>Provides an upper bound (dual) and lower bound (primal) for the problem.&lt;/li>
&lt;li>Software packages for solving SDPs exist (&lt;a href="https://www.cvxpy.org/">cvxpy&lt;/a>, &lt;a href="https://cvxopt.org/">cvxopt&lt;/a>, &lt;a href="https://picos-api.gitlab.io/picos/complex.html">picos&lt;/a>, etc.).&lt;/li>
&lt;/ul>
&lt;p>&lt;a href="https://sites.google.com/site/jamiesikora/home">Jamie Sikora&lt;/a> has compiled a list of useful SDP resources with a focus
on quantum information &lt;a href="https://sites.google.com/site/jamiesikora/sdp-resources?authuser=0">here&lt;/a>.&lt;/p>
&lt;p>Whether a collection of states \(\{|\psi_1 \rangle, |\psi_2\rangle, \ldots, |\psi_{n}\rangle \}\) are antidistinguishable
or not can be determined by the following semidefinite program.&lt;/p>
$$
\begin{equation}
\begin{aligned}
\text{minimize:} \quad &amp; \sum_{i=1}^{n} \langle \psi_i | M_i | \psi_i \rangle \\
\text{subject to:} \quad &amp; \sum_{i=1}^{n} M_i = \mathbb{I}_{\mathcal{X}}, \\
&amp; M_i \succeq 0 \quad \forall \ 1 \leq i \leq n.
\end{aligned}
\end{equation}
$$
&lt;p>In this SDP, we are optimizing over a set of \(n\) valid quantum measurements (this is what our constraints impose). If
the objective function yields a value of zero, this indicates that the set of states are indeed antidistinguishable. We
can numerically implement the primal problem using &lt;code>cvxpy&lt;/code> for a given set of vectors specified as &lt;code>numpy&lt;/code> arrays.&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-py" data-lang="py">&lt;span style="display:flex;">&lt;span> &lt;span style="color:#f92672">import&lt;/span> cvxpy
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#f92672">import&lt;/span> numpy &lt;span style="color:#66d9ef">as&lt;/span> np
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#f92672">from&lt;/span> toqito.matrix_ops &lt;span style="color:#f92672">import&lt;/span> to_density_matrix
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">def&lt;/span> &lt;span style="color:#a6e22e">primal&lt;/span>(vectors: list[np&lt;span style="color:#f92672">.&lt;/span>nadarray]):
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> n, d &lt;span style="color:#f92672">=&lt;/span> len(vectors), vectors[&lt;span style="color:#ae81ff">0&lt;/span>]&lt;span style="color:#f92672">.&lt;/span>shape[&lt;span style="color:#ae81ff">0&lt;/span>]
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#75715e"># Define PSD variables for the measurements.&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> meas &lt;span style="color:#f92672">=&lt;/span> [cvxpy&lt;span style="color:#f92672">.&lt;/span>Variable((d, d), hermitian&lt;span style="color:#f92672">=&lt;/span>&lt;span style="color:#66d9ef">True&lt;/span>) &lt;span style="color:#66d9ef">for&lt;/span> _ &lt;span style="color:#f92672">in&lt;/span> range(n)]
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#75715e"># Constraints: measurements are PSD and sum to identity.&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> constraints &lt;span style="color:#f92672">=&lt;/span> [meas[i] &lt;span style="color:#f92672">&amp;gt;&amp;gt;&lt;/span> &lt;span style="color:#ae81ff">0&lt;/span> &lt;span style="color:#66d9ef">for&lt;/span> i &lt;span style="color:#f92672">in&lt;/span> range(n)]
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> constraints&lt;span style="color:#f92672">.&lt;/span>append([cvxpy&lt;span style="color:#f92672">.&lt;/span>sum(meas) &lt;span style="color:#f92672">==&lt;/span> np&lt;span style="color:#f92672">.&lt;/span>eye(d)])
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#75715e"># Objective function: maximize the success probability.&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> obj_func &lt;span style="color:#f92672">=&lt;/span> [
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ae81ff">1&lt;/span> &lt;span style="color:#f92672">/&lt;/span> n &lt;span style="color:#f92672">*&lt;/span> cvxpy&lt;span style="color:#f92672">.&lt;/span>trace(to_density_matrix(vectors[i])&lt;span style="color:#f92672">.&lt;/span>conj()&lt;span style="color:#f92672">.&lt;/span>T &lt;span style="color:#f92672">@&lt;/span> meas[i])
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">for&lt;/span> i &lt;span style="color:#f92672">in&lt;/span> range(n)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> ]
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> objective &lt;span style="color:#f92672">=&lt;/span> cvxpy&lt;span style="color:#f92672">.&lt;/span>Minimize(cvxpy&lt;span style="color:#f92672">.&lt;/span>real(cvxpy&lt;span style="color:#f92672">.&lt;/span>sum(obj_func)))
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> problem &lt;span style="color:#f92672">=&lt;/span> cvxpy&lt;span style="color:#f92672">.&lt;/span>Problem(objective, constraints)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">return&lt;/span> problem&lt;span style="color:#f92672">.&lt;/span>solve(), meas
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Using a standard SDP recipe, we can construct the corresponding dual optimization problem.&lt;/p>
$$
\begin{equation}
\begin{aligned}
\text{maximize:} \quad &amp; \text{Tr}(Y) \\
\text{subject to:} \quad &amp; Y \preceq |\psi_i\rangle\langle\psi_i|, \ \forall i \in \{1, \ldots, n\}.
\end{aligned}
\end{equation}
$$
&lt;p>where \(Y\) is understood to be a Hermitian operator. Using &lt;code>cvxpy&lt;/code>, we can code up the dual problem as well.&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-py" data-lang="py">&lt;span style="display:flex;">&lt;span> &lt;span style="color:#f92672">import&lt;/span> cvxpy
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#f92672">import&lt;/span> numpy &lt;span style="color:#66d9ef">as&lt;/span> np
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#f92672">from&lt;/span> toqito.matrix_ops &lt;span style="color:#f92672">import&lt;/span> to_density_matrix
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">def&lt;/span> &lt;span style="color:#a6e22e">dual&lt;/span>(vectors: list[np&lt;span style="color:#f92672">.&lt;/span>ndarray]):
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#75715e"># Define the dual problem.&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> y_var &lt;span style="color:#f92672">=&lt;/span> cvxpy&lt;span style="color:#f92672">.&lt;/span>Variable((d, d), hermitian&lt;span style="color:#f92672">=&lt;/span>&lt;span style="color:#66d9ef">True&lt;/span>)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> constraints &lt;span style="color:#f92672">=&lt;/span> [
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> y_var &lt;span style="color:#f92672">&amp;lt;&amp;lt;&lt;/span> &lt;span style="color:#ae81ff">1&lt;/span> &lt;span style="color:#f92672">/&lt;/span> n &lt;span style="color:#f92672">*&lt;/span> to_density_matrix(vector)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">for&lt;/span> vector &lt;span style="color:#f92672">in&lt;/span> vectors
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> ]
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> objective &lt;span style="color:#f92672">=&lt;/span> cvxpy&lt;span style="color:#f92672">.&lt;/span>Maximize(cvxpy&lt;span style="color:#f92672">.&lt;/span>trace(cvxpy&lt;span style="color:#f92672">.&lt;/span>real(y_var)))
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> problem &lt;span style="color:#f92672">=&lt;/span> cvxpy&lt;span style="color:#f92672">.&lt;/span>Problem(objective, constraints)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">return&lt;/span> problem&lt;span style="color:#f92672">.&lt;/span>solve(), y_var
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Through the magic of SDPs, this gives us a way to certify an upper bound for the specific instance of the problem we are
considering. In other words, for a given set of states, we can find a feasible variable \(Y\) that satisfies the
properties of the dual problem, we have a certificate to say that the upper bound is optimal.&lt;/p>
&lt;p>In the next section, we will see how we can use this property of the dual problem to disprove the conjecture for a given
set of states, but first, let&amp;rsquo;s take another look at the trine states with this SDP in our toolbelt.&lt;/p>
&lt;h4 id="example-revisiting-the-trine-states">Example: Revisiting the trine states&lt;/h4>
&lt;p>Consider again the trine states from the previous example. We can determine that they are antidistinguishable by way of
the antidistinguishability SDP.&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-py" data-lang="py">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f92672">&amp;gt;&amp;gt;&amp;gt;&lt;/span> opt_value, measurements &lt;span style="color:#f92672">=&lt;/span> primal(trine_states)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f92672">&amp;gt;&amp;gt;&amp;gt;&lt;/span> print(&lt;span style="color:#e6db74">f&lt;/span>&lt;span style="color:#e6db74">&amp;#34;Optimal SDP value: &lt;/span>&lt;span style="color:#e6db74">{&lt;/span>opt_value&lt;span style="color:#e6db74">}&lt;/span>&lt;span style="color:#e6db74">&amp;#34;&lt;/span>)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>Optimal SDP value: &lt;span style="color:#ae81ff">4.334787693145857e-08&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>The SDP not only gives us the optimal value, which is \(0\) in this case, indicating that the states are
antidistinguishable, but we also get a set of optimal measurement operators.&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-py" data-lang="py">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f92672">&amp;gt;&amp;gt;&amp;gt;&lt;/span> print(&lt;span style="color:#e6db74">f&lt;/span>&lt;span style="color:#e6db74">&amp;#34;M1: &lt;/span>&lt;span style="color:#ae81ff">\n&lt;/span>&lt;span style="color:#e6db74"> &lt;/span>&lt;span style="color:#e6db74">{&lt;/span>np&lt;span style="color:#f92672">.&lt;/span>around(measurements[&lt;span style="color:#ae81ff">0&lt;/span>], decimals&lt;span style="color:#f92672">=&lt;/span>&lt;span style="color:#ae81ff">5&lt;/span>)&lt;span style="color:#e6db74">}&lt;/span>&lt;span style="color:#e6db74">&amp;#34;&lt;/span>)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f92672">&amp;gt;&amp;gt;&amp;gt;&lt;/span> print(&lt;span style="color:#e6db74">f&lt;/span>&lt;span style="color:#e6db74">&amp;#34;M2: &lt;/span>&lt;span style="color:#ae81ff">\n&lt;/span>&lt;span style="color:#e6db74"> &lt;/span>&lt;span style="color:#e6db74">{&lt;/span>np&lt;span style="color:#f92672">.&lt;/span>around(measurements[&lt;span style="color:#ae81ff">1&lt;/span>], decimals&lt;span style="color:#f92672">=&lt;/span>&lt;span style="color:#ae81ff">5&lt;/span>)&lt;span style="color:#e6db74">}&lt;/span>&lt;span style="color:#e6db74">&amp;#34;&lt;/span>)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f92672">&amp;gt;&amp;gt;&amp;gt;&lt;/span> print(&lt;span style="color:#e6db74">f&lt;/span>&lt;span style="color:#e6db74">&amp;#34;M3: &lt;/span>&lt;span style="color:#ae81ff">\n&lt;/span>&lt;span style="color:#e6db74"> &lt;/span>&lt;span style="color:#e6db74">{&lt;/span>np&lt;span style="color:#f92672">.&lt;/span>around(measurements[&lt;span style="color:#ae81ff">2&lt;/span>], decimals&lt;span style="color:#f92672">=&lt;/span>&lt;span style="color:#ae81ff">5&lt;/span>)&lt;span style="color:#e6db74">}&lt;/span>&lt;span style="color:#e6db74">&amp;#34;&lt;/span>)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>M1:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> [[&lt;span style="color:#ae81ff">0.&lt;/span> &lt;span style="color:#f92672">+&lt;/span>&lt;span style="color:#ae81ff">0.&lt;/span>j &lt;span style="color:#ae81ff">0.&lt;/span> &lt;span style="color:#f92672">+&lt;/span>&lt;span style="color:#ae81ff">0.&lt;/span>j]
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> [&lt;span style="color:#ae81ff">0.&lt;/span> &lt;span style="color:#f92672">+&lt;/span>&lt;span style="color:#ae81ff">0.&lt;/span>j &lt;span style="color:#ae81ff">0.66664&lt;/span>&lt;span style="color:#f92672">+&lt;/span>&lt;span style="color:#ae81ff">0.&lt;/span>j]]
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>M2:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> [[ &lt;span style="color:#ae81ff">0.5&lt;/span> &lt;span style="color:#f92672">+&lt;/span>&lt;span style="color:#ae81ff">0.&lt;/span>j &lt;span style="color:#f92672">-&lt;/span>&lt;span style="color:#ae81ff">0.28869&lt;/span>&lt;span style="color:#f92672">+&lt;/span>&lt;span style="color:#ae81ff">0.&lt;/span>j]
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> [&lt;span style="color:#f92672">-&lt;/span>&lt;span style="color:#ae81ff">0.28869&lt;/span>&lt;span style="color:#f92672">+&lt;/span>&lt;span style="color:#ae81ff">0.&lt;/span>j &lt;span style="color:#ae81ff">0.16668&lt;/span>&lt;span style="color:#f92672">+&lt;/span>&lt;span style="color:#ae81ff">0.&lt;/span>j]]
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>M3:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> [[&lt;span style="color:#ae81ff">0.5&lt;/span> &lt;span style="color:#f92672">+&lt;/span>&lt;span style="color:#ae81ff">0.&lt;/span>j &lt;span style="color:#ae81ff">0.28869&lt;/span>&lt;span style="color:#f92672">+&lt;/span>&lt;span style="color:#ae81ff">0.&lt;/span>j]
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> [&lt;span style="color:#ae81ff">0.28869&lt;/span>&lt;span style="color:#f92672">+&lt;/span>&lt;span style="color:#ae81ff">0.&lt;/span>j &lt;span style="color:#ae81ff">0.16668&lt;/span>&lt;span style="color:#f92672">+&lt;/span>&lt;span style="color:#ae81ff">0.&lt;/span>j]]
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>These should look familiar to the measurements we explicitly constructed earlier.&lt;/p>
&lt;h3 id="disproving-the-conjecture">Disproving the conjecture&lt;/h3>
&lt;p>Now that we have defined antidistinguishability, let&amp;rsquo;s return to thinking about the conjecture at the beginning of this
blog post.&lt;/p>
&lt;p>If we want to disprove it, we would need to find a counterexample. We also need to be aware that when \(n = 2\) or \(n =
3\), the RHS of the conjectured equation is \(0\) or \(1/2\), respectively, which are true (and tight). So if any
counterexamples exist, we need to restrict our search to \(n \geq 4\).&lt;/p>
&lt;p>And unceremonously, that is precisely what can be done:&lt;/p>
&lt;ul>
&lt;li>Generate a random set of \(n\) quantum states each of dimension \(n\).&lt;/li>
&lt;li>Check if the conjectured bound is satisfied:&lt;/li>
&lt;li>Check if the states are antidistinguishable (using the SDP).&lt;/li>
&lt;li>If the bound is satisfied but the states are not antidistinguishable, we have our counterexample.&lt;/li>
&lt;/ul>
&lt;p>The following snippet of code follows this procedure for a fixed number of randomly generated examples.&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-py" data-lang="py">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e"># Generate a random collection of &amp;#34;n&amp;#34; states of dimension &amp;#34;d&amp;#34;:&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f92672">from&lt;/span> toqito.rand &lt;span style="color:#f92672">import&lt;/span> random_states
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#66d9ef">def&lt;/span> &lt;span style="color:#a6e22e">is_bound_satisfied&lt;/span>(S: np&lt;span style="color:#f92672">.&lt;/span>ndarray) &lt;span style="color:#f92672">-&amp;gt;&lt;/span> bool:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">for&lt;/span> i, _ &lt;span style="color:#f92672">in&lt;/span> enumerate(S):
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">for&lt;/span> j, _ &lt;span style="color:#f92672">in&lt;/span> enumerate(S):
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">if&lt;/span> i &lt;span style="color:#f92672">!=&lt;/span> j:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> ip_val &lt;span style="color:#f92672">=&lt;/span> np&lt;span style="color:#f92672">.&lt;/span>abs(np&lt;span style="color:#f92672">.&lt;/span>trace(S[i]&lt;span style="color:#f92672">.&lt;/span>conj()&lt;span style="color:#f92672">.&lt;/span>T &lt;span style="color:#f92672">*&lt;/span> S[j]&lt;span style="color:#f92672">.&lt;/span>reshape(&lt;span style="color:#f92672">-&lt;/span>&lt;span style="color:#ae81ff">1&lt;/span>, &lt;span style="color:#ae81ff">1&lt;/span>)))
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#75715e"># If |&amp;lt;Ψ_i|Ψ_j&amp;gt;| &amp;gt; (d − 2)/(d − 1) for some i != j, return False.&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">if&lt;/span> ip_val &lt;span style="color:#f92672">&amp;gt;&lt;/span> (len(S) &lt;span style="color:#f92672">-&lt;/span> &lt;span style="color:#ae81ff">2&lt;/span>)&lt;span style="color:#f92672">/&lt;/span>(len(S) &lt;span style="color:#f92672">-&lt;/span> &lt;span style="color:#ae81ff">1&lt;/span>):
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">return&lt;/span> &lt;span style="color:#66d9ef">True&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">return&lt;/span> &lt;span style="color:#66d9ef">False&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>n &lt;span style="color:#f92672">=&lt;/span> &lt;span style="color:#ae81ff">4&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>num_tests &lt;span style="color:#f92672">=&lt;/span> &lt;span style="color:#ae81ff">10_000&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#66d9ef">for&lt;/span> i &lt;span style="color:#f92672">in&lt;/span> range(num_tests):
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> S &lt;span style="color:#f92672">=&lt;/span> random_states(n&lt;span style="color:#f92672">=&lt;/span>n, d&lt;span style="color:#f92672">=&lt;/span>n)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> dual_val, y_var &lt;span style="color:#f92672">=&lt;/span> dual(S)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> print(&lt;span style="color:#e6db74">f&lt;/span>&lt;span style="color:#e6db74">&amp;#34;Is conjectured bound satisfied: &lt;/span>&lt;span style="color:#e6db74">{&lt;/span>is_bound_satisfied(S)&lt;span style="color:#e6db74">}&lt;/span>&lt;span style="color:#e6db74">&amp;#34;&lt;/span>)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> print(&lt;span style="color:#e6db74">f&lt;/span>&lt;span style="color:#e6db74">&amp;#34;Is antidistinguishable: &lt;/span>&lt;span style="color:#e6db74">{&lt;/span>dual(S)&lt;span style="color:#e6db74">}&lt;/span>&lt;span style="color:#e6db74">&amp;#34;&lt;/span>)
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>After running the code for a long while, we were able to stumble upon the following counterexample.&lt;/p>
&lt;p>&lt;strong>Counterexample&lt;/strong> [&lt;a href="https://arxiv.org/abs/2206.08313">Russo–Sikora, (2022)&lt;/a>]:
For \(n=4\), the conjecture states that if \(|\langle \psi_i | \psi_j \rangle| \leq 2/3 \approx 0.6666\) for all \(i \neq
j\) then \(S\) is antidistinguishable. A numerical search was able to exhibit a non-antidistinguishable set of states with
\(|\langle \psi_i | \psi_j \rangle| \leq 0.6451\) for all \(i \neq j\).&lt;/p>
&lt;p>While this counterexample is not unique, the one that was found and used in our paper was the following:&lt;/p>
$$
\begin{equation}
\begin{aligned}
|\psi_1\rangle = \begin{bmatrix}
+0.50127198 - 0.037607i \\
-0.00698152 - 0.590973i \\
+0.08186514 - 0.4497548i \\
-0.01299883 + 0.43458491i
\end{bmatrix}, &amp;\quad
|\psi_2\rangle = \begin{bmatrix}
-0.07115345 - 0.27080326i \\
+0.82047712 + 0.26320823i \\
+0.22105089 - 0.2091996i \\
-0.23575591 - 0.1758769i
\end{bmatrix}, \\
|\psi_3\rangle = \begin{bmatrix}
+0.31360906 + 0.46339313i \\
-0.0465825 - 0.47825017i \\
-0.10470394 - 0.11776404i \\
+0.60231515 + 0.26154959i
\end{bmatrix}, &amp;\quad
|\psi_4\rangle = \begin{bmatrix}
-0.53532122 - 0.03654632i \\
+0.40955941 - 0.15150576i \\
-0.05741386 + 0.23873985i \\
-0.4737113 - 0.48652564i \\
\end{bmatrix}.
\end{aligned}
\end{equation}
$$
&lt;p>We can observe that the above set of \(4\) states violates the conjecture.&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-py" data-lang="py">&lt;span style="display:flex;">&lt;span>dim &lt;span style="color:#f92672">=&lt;/span> &lt;span style="color:#ae81ff">4&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>S &lt;span style="color:#f92672">=&lt;/span> np&lt;span style="color:#f92672">.&lt;/span>array(
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> [
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> [
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ae81ff">0.50127198&lt;/span> &lt;span style="color:#f92672">-&lt;/span> &lt;span style="color:#ae81ff">0.037607&lt;/span>j,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#f92672">-&lt;/span>&lt;span style="color:#ae81ff">0.00698152&lt;/span> &lt;span style="color:#f92672">-&lt;/span> &lt;span style="color:#ae81ff">0.590973&lt;/span>j,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ae81ff">0.08186514&lt;/span> &lt;span style="color:#f92672">-&lt;/span> &lt;span style="color:#ae81ff">0.4497548&lt;/span>j,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#f92672">-&lt;/span>&lt;span style="color:#ae81ff">0.01299883&lt;/span> &lt;span style="color:#f92672">+&lt;/span> &lt;span style="color:#ae81ff">0.43458491&lt;/span>j,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> ],
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> [
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#f92672">-&lt;/span>&lt;span style="color:#ae81ff">0.07115345&lt;/span> &lt;span style="color:#f92672">-&lt;/span> &lt;span style="color:#ae81ff">0.27080326&lt;/span>j,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ae81ff">0.82047712&lt;/span> &lt;span style="color:#f92672">+&lt;/span> &lt;span style="color:#ae81ff">0.26320823&lt;/span>j,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ae81ff">0.22105089&lt;/span> &lt;span style="color:#f92672">-&lt;/span> &lt;span style="color:#ae81ff">0.2091996&lt;/span>j,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#f92672">-&lt;/span>&lt;span style="color:#ae81ff">0.23575591&lt;/span> &lt;span style="color:#f92672">-&lt;/span> &lt;span style="color:#ae81ff">0.1758769&lt;/span>j,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> ],
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> [
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ae81ff">0.31360906&lt;/span> &lt;span style="color:#f92672">+&lt;/span> &lt;span style="color:#ae81ff">0.46339313&lt;/span>j,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#f92672">-&lt;/span>&lt;span style="color:#ae81ff">0.0465825&lt;/span> &lt;span style="color:#f92672">-&lt;/span> &lt;span style="color:#ae81ff">0.47825017&lt;/span>j,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#f92672">-&lt;/span>&lt;span style="color:#ae81ff">0.10470394&lt;/span> &lt;span style="color:#f92672">-&lt;/span> &lt;span style="color:#ae81ff">0.11776404&lt;/span>j,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ae81ff">0.60231515&lt;/span> &lt;span style="color:#f92672">+&lt;/span> &lt;span style="color:#ae81ff">0.26154959&lt;/span>j,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> ],
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> [
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#f92672">-&lt;/span>&lt;span style="color:#ae81ff">0.53532122&lt;/span> &lt;span style="color:#f92672">-&lt;/span> &lt;span style="color:#ae81ff">0.03654632&lt;/span>j,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ae81ff">0.40955941&lt;/span> &lt;span style="color:#f92672">-&lt;/span> &lt;span style="color:#ae81ff">0.15150576&lt;/span>j,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#f92672">-&lt;/span>&lt;span style="color:#ae81ff">0.05741386&lt;/span> &lt;span style="color:#f92672">+&lt;/span> &lt;span style="color:#ae81ff">0.23873985&lt;/span>j,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#f92672">-&lt;/span>&lt;span style="color:#ae81ff">0.4737113&lt;/span> &lt;span style="color:#f92672">-&lt;/span> &lt;span style="color:#ae81ff">0.48652564&lt;/span>j,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> ],
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> ]
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e"># Is conjectured bound satisfied: True&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>print(&lt;span style="color:#e6db74">f&lt;/span>&lt;span style="color:#e6db74">&amp;#34;Is conjectured bound satisfied: &lt;/span>&lt;span style="color:#e6db74">{&lt;/span>is_bound_satisfied(S)&lt;span style="color:#e6db74">}&lt;/span>&lt;span style="color:#e6db74">&amp;#34;&lt;/span>)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e"># Is antidistinguishable: False&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>print(&lt;span style="color:#e6db74">f&lt;/span>&lt;span style="color:#e6db74">&amp;#34;Is antidistinguishable: &lt;/span>&lt;span style="color:#e6db74">{&lt;/span>dual(S)&lt;span style="color:#e6db74">}&lt;/span>&lt;span style="color:#e6db74">&amp;#34;&lt;/span>)
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>The nice thing about the code is that not only do we have access to the dual value, but also the dual variable, \(Y\)
which gives us a certificate to verify that this is an upper bound for this choice of states. I&amp;rsquo;ll omit this check
explicitly here, but this is precisely what we do in &lt;a href="https://arxiv.org/abs/2206.08313">arXiv:2206.08313&lt;/a>.&lt;/p>
&lt;p>Now, finding a counterexample and breaking things is fine, but it&amp;rsquo;s a bit unsatisfactory. In a follow-up work, we were
able to patch up the conjectured statement into the following theorem.&lt;/p>
&lt;p>&lt;strong>Theorem&lt;/strong> [&lt;a href="https://arxiv.org/abs/2311.17047">Johnston-Russo-Sikora, (2023)&lt;/a>]:&lt;/p>
&lt;p>Let \(n \geq 2\) be an integer and let \(S = \{|\psi_1\rangle, |\psi_2\rangle, \ldots, |\psi_n\rangle \}\). If&lt;/p>
$$
\begin{equation}
|\langle \psi_i | \psi_j \rangle| \leq \frac{1}{\sqrt{2}} \sqrt{\frac{n-2}{n-1}}
\end{equation}
$$
&lt;p>for all \(i \neq j\), then \(S\) is antidistinguishable.&lt;/p>
&lt;p>I&amp;rsquo;ll leave the details of this to our paper, but will mention that:&lt;/p>
&lt;ul>
&lt;li>
&lt;p>When \(n = 2, 3\), or \(4\), the RHS bound is \(0\), \(1/2\), or \(1/\sqrt{3}\) respectively, which are tight.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>Unknown if it’s tight for \(n \geq 5\).&lt;/p>
&lt;/li>
&lt;/ul>
&lt;p>There is certainly a lot more that can be said on the topic, and I look forward to continuing to doing so in the
future!&lt;/p></content></item><item><title>Hexagonal labyrinths in triangular arrays</title><link>https://vrusso.com/posts/hexagonal_labyrinths/</link><pubDate>Thu, 02 Jan 2025 00:00:00 +0000</pubDate><guid>https://vrusso.com/posts/hexagonal_labyrinths/</guid><description>I recently happened upon the textbook &amp;ldquo;Triangular Arrays with Applications&amp;rdquo; and decided to pick up a copy. I&amp;rsquo;m certainly no number theorist, but I still enjoy a good triangular arrangement of numbers as much as the next person.
My typical strategy for understanding something mathy is to write some code and to see lots and lots of examples to develop intuition. I suppose I&amp;rsquo;m one of those people who need to burn their hands on the stove multiple times to realize that doing so is a bad idea.</description><content>&lt;p>I recently happened upon the textbook &lt;a href="https://global.oup.com/academic/product/triangular-arrays-with-applications-9780199742943">&amp;ldquo;Triangular Arrays with
Applications&amp;rdquo;&lt;/a> and decided to
pick up a copy. I&amp;rsquo;m certainly no number theorist, but I still enjoy a good triangular arrangement of numbers as much as
the next person.&lt;/p>
&lt;p>My typical strategy for understanding something mathy is to write some code and to see lots and lots of examples to
develop intuition. I suppose I&amp;rsquo;m one of those people who need to burn their hands on the stove multiple times to realize
that doing so is a bad idea. Anyway, I digress.&lt;/p>
&lt;p>I realized there wasn&amp;rsquo;t much open-source software for manipulating and studying triangular
arrangements of numbers. Shocking, right? So, to make things right with the world, I spent the better part
of a weekend creating the &lt;a href="https://github.com/vprusso/triforce">&lt;code>triforce&lt;/code>&lt;/a> Python package. The
&lt;a href="https://en.wikipedia.org/wiki/Lateralus_(song)">&lt;code>triforce&lt;/code>&lt;/a> package is a suite of tools for the numerical exploration of
triangular arrays.&lt;/p>
&lt;h3 id="exploring-triangular-arrays-in-triforce">Exploring triangular arrays in triforce&lt;/h3>
&lt;p>You can invoke well-known triangular arrays (Pascal&amp;rsquo;s triangle, Bell&amp;rsquo;s triangle, etc.) from the &lt;code>triangles&lt;/code> library of
pre-defined triangular arrangements. Here is an example of the well-known &lt;a href="https://en.wikipedia.org/wiki/Pascal%27s_triangle">Pascal&amp;rsquo;s
triangle&lt;/a>&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-py" data-lang="py">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f92672">&amp;gt;&amp;gt;&amp;gt;&lt;/span> &lt;span style="color:#f92672">from&lt;/span> triforce.triangles &lt;span style="color:#f92672">import&lt;/span> PascalTriangle
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f92672">&amp;gt;&amp;gt;&amp;gt;&lt;/span> triangle &lt;span style="color:#f92672">=&lt;/span> PascalTriangle(&lt;span style="color:#ae81ff">10&lt;/span>)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f92672">&amp;gt;&amp;gt;&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f92672">&amp;gt;&amp;gt;&amp;gt;&lt;/span> &lt;span style="color:#75715e"># Print the output as a triangular shape:&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f92672">&amp;gt;&amp;gt;&amp;gt;&lt;/span> print(triangle)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ae81ff">1&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ae81ff">1&lt;/span> &lt;span style="color:#ae81ff">1&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ae81ff">1&lt;/span> &lt;span style="color:#ae81ff">2&lt;/span> &lt;span style="color:#ae81ff">1&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ae81ff">1&lt;/span> &lt;span style="color:#ae81ff">3&lt;/span> &lt;span style="color:#ae81ff">3&lt;/span> &lt;span style="color:#ae81ff">1&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ae81ff">1&lt;/span> &lt;span style="color:#ae81ff">4&lt;/span> &lt;span style="color:#ae81ff">6&lt;/span> &lt;span style="color:#ae81ff">4&lt;/span> &lt;span style="color:#ae81ff">1&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ae81ff">1&lt;/span> &lt;span style="color:#ae81ff">5&lt;/span> &lt;span style="color:#ae81ff">10&lt;/span> &lt;span style="color:#ae81ff">10&lt;/span> &lt;span style="color:#ae81ff">5&lt;/span> &lt;span style="color:#ae81ff">1&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ae81ff">1&lt;/span> &lt;span style="color:#ae81ff">6&lt;/span> &lt;span style="color:#ae81ff">15&lt;/span> &lt;span style="color:#ae81ff">20&lt;/span> &lt;span style="color:#ae81ff">15&lt;/span> &lt;span style="color:#ae81ff">6&lt;/span> &lt;span style="color:#ae81ff">1&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ae81ff">1&lt;/span> &lt;span style="color:#ae81ff">7&lt;/span> &lt;span style="color:#ae81ff">21&lt;/span> &lt;span style="color:#ae81ff">35&lt;/span> &lt;span style="color:#ae81ff">35&lt;/span> &lt;span style="color:#ae81ff">21&lt;/span> &lt;span style="color:#ae81ff">7&lt;/span> &lt;span style="color:#ae81ff">1&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ae81ff">1&lt;/span> &lt;span style="color:#ae81ff">8&lt;/span> &lt;span style="color:#ae81ff">28&lt;/span> &lt;span style="color:#ae81ff">56&lt;/span> &lt;span style="color:#ae81ff">70&lt;/span> &lt;span style="color:#ae81ff">56&lt;/span> &lt;span style="color:#ae81ff">28&lt;/span> &lt;span style="color:#ae81ff">8&lt;/span> &lt;span style="color:#ae81ff">1&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ae81ff">1&lt;/span> &lt;span style="color:#ae81ff">9&lt;/span> &lt;span style="color:#ae81ff">36&lt;/span> &lt;span style="color:#ae81ff">84&lt;/span> &lt;span style="color:#ae81ff">126&lt;/span> &lt;span style="color:#ae81ff">126&lt;/span> &lt;span style="color:#ae81ff">84&lt;/span> &lt;span style="color:#ae81ff">36&lt;/span> &lt;span style="color:#ae81ff">9&lt;/span> &lt;span style="color:#ae81ff">1&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>The &lt;code>triangle&lt;/code> object is of type &lt;code>Triangle&lt;/code> which has a number of attributes associated with it that can be useful for
exploring various properties of certain triangular arrays. Here are just some of the properties we can explore:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-py" data-lang="py">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f92672">&amp;gt;&amp;gt;&amp;gt;&lt;/span> &lt;span style="color:#75715e"># Extract the right-most diagonal of the triangle:&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f92672">&amp;gt;&amp;gt;&amp;gt;&lt;/span> print(triangle&lt;span style="color:#f92672">.&lt;/span>diagonal(diagonal_index&lt;span style="color:#f92672">=&lt;/span>&lt;span style="color:#ae81ff">0&lt;/span>, direction&lt;span style="color:#f92672">=&lt;/span>&lt;span style="color:#e6db74">&amp;#34;right&amp;#34;&lt;/span>))
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>[&lt;span style="color:#ae81ff">1&lt;/span>, &lt;span style="color:#ae81ff">1&lt;/span>, &lt;span style="color:#ae81ff">1&lt;/span>, &lt;span style="color:#ae81ff">1&lt;/span>, &lt;span style="color:#ae81ff">1&lt;/span>, &lt;span style="color:#ae81ff">1&lt;/span>, &lt;span style="color:#ae81ff">1&lt;/span>, &lt;span style="color:#ae81ff">1&lt;/span>, &lt;span style="color:#ae81ff">1&lt;/span>, &lt;span style="color:#ae81ff">1&lt;/span>]
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f92672">&amp;gt;&amp;gt;&amp;gt;&lt;/span> &lt;span style="color:#75715e"># Extract the second-to-the-right-most diagonal of the triangle:&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f92672">&amp;gt;&amp;gt;&amp;gt;&lt;/span> print(triangle&lt;span style="color:#f92672">.&lt;/span>diagonal(diagonal_index&lt;span style="color:#f92672">=&lt;/span>&lt;span style="color:#ae81ff">1&lt;/span>, direction&lt;span style="color:#f92672">=&lt;/span>&lt;span style="color:#e6db74">&amp;#34;right&amp;#34;&lt;/span>))
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>[&lt;span style="color:#ae81ff">1&lt;/span>, &lt;span style="color:#ae81ff">2&lt;/span>, &lt;span style="color:#ae81ff">3&lt;/span>, &lt;span style="color:#ae81ff">4&lt;/span>, &lt;span style="color:#ae81ff">5&lt;/span>, &lt;span style="color:#ae81ff">6&lt;/span>, &lt;span style="color:#ae81ff">7&lt;/span>, &lt;span style="color:#ae81ff">8&lt;/span>, &lt;span style="color:#ae81ff">9&lt;/span>]
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f92672">&amp;gt;&amp;gt;&amp;gt;&lt;/span> &lt;span style="color:#75715e"># Extract the center entries of the triangle:&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f92672">&amp;gt;&amp;gt;&amp;gt;&lt;/span> print(triangle&lt;span style="color:#f92672">.&lt;/span>center())
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>[&lt;span style="color:#ae81ff">1&lt;/span>, &lt;span style="color:#ae81ff">2&lt;/span>, &lt;span style="color:#ae81ff">6&lt;/span>, &lt;span style="color:#ae81ff">20&lt;/span>, &lt;span style="color:#ae81ff">70&lt;/span>]
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f92672">&amp;gt;&amp;gt;&amp;gt;&lt;/span> &lt;span style="color:#75715e"># Extract row sums:&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f92672">&amp;gt;&amp;gt;&amp;gt;&lt;/span> print(triangle&lt;span style="color:#f92672">.&lt;/span>row_sums())
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>[&lt;span style="color:#ae81ff">1&lt;/span>, &lt;span style="color:#ae81ff">2&lt;/span>, &lt;span style="color:#ae81ff">4&lt;/span>, &lt;span style="color:#ae81ff">8&lt;/span>, &lt;span style="color:#ae81ff">16&lt;/span>, &lt;span style="color:#ae81ff">32&lt;/span>, &lt;span style="color:#ae81ff">64&lt;/span>, &lt;span style="color:#ae81ff">128&lt;/span>, &lt;span style="color:#ae81ff">256&lt;/span>, &lt;span style="color:#ae81ff">512&lt;/span>]
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Additionally, the &lt;code>Triangle&lt;/code> class is extensible to allow you to define your own generating function for the rule-set. We
can override the &lt;code>generate_triangle&lt;/code> function to dictate how the triangular array is defined. As an example, here is how
we can do this to define the &lt;a href="https://en.wikipedia.org/wiki/Hosoya%27s_triangle">Hosoya Triangle&lt;/a>:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-py" data-lang="py">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f92672">from&lt;/span> trifoce.triangle &lt;span style="color:#f92672">import&lt;/span> Triangle
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f92672">from&lt;/span> triforce.sequences &lt;span style="color:#f92672">import&lt;/span> fibonacci
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#66d9ef">class&lt;/span> &lt;span style="color:#a6e22e">HosoyaTriangle&lt;/span>(Triangle):
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#e6db74">&amp;#34;&amp;#34;&amp;#34;Hosoya Triangle: https://en.wikipedia.org/wiki/Hosoya&lt;/span>&lt;span style="color:#e6db74">%27s&lt;/span>&lt;span style="color:#e6db74">_triangle&amp;#34;&amp;#34;&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">def&lt;/span> &lt;span style="color:#a6e22e">generate_triangle&lt;/span>(self) &lt;span style="color:#f92672">-&amp;gt;&lt;/span> list[list[int]]:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#e6db74">&amp;#34;&amp;#34;&amp;#34;Generate the Hosoya triangle up to row n.&amp;#34;&amp;#34;&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> triangle &lt;span style="color:#f92672">=&lt;/span> []
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">for&lt;/span> i &lt;span style="color:#f92672">in&lt;/span> range(self&lt;span style="color:#f92672">.&lt;/span>n):
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> row &lt;span style="color:#f92672">=&lt;/span> []
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">for&lt;/span> j &lt;span style="color:#f92672">in&lt;/span> range(i &lt;span style="color:#f92672">+&lt;/span> &lt;span style="color:#ae81ff">1&lt;/span>):
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> entry &lt;span style="color:#f92672">=&lt;/span> fibonacci(j &lt;span style="color:#f92672">+&lt;/span> &lt;span style="color:#ae81ff">1&lt;/span>) &lt;span style="color:#f92672">*&lt;/span> fibonacci(i &lt;span style="color:#f92672">-&lt;/span> j &lt;span style="color:#f92672">+&lt;/span> &lt;span style="color:#ae81ff">1&lt;/span>)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> row&lt;span style="color:#f92672">.&lt;/span>append(entry)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> triangle&lt;span style="color:#f92672">.&lt;/span>append(row)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">return&lt;/span> triangle
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>One can also visualize properties of the triangles by plotting. Here is an example of visualizing Pascal&amp;rsquo;s triangle such
that the even and odd terms are replaced by black and white pixels, respectively.&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-py" data-lang="py">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f92672">from&lt;/span> triforce.plots &lt;span style="color:#f92672">import&lt;/span> highlight_plot
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f92672">from&lt;/span> triforce.numerics &lt;span style="color:#f92672">import&lt;/span> is_even
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>highlight_plot(PascalTriangle(n&lt;span style="color:#f92672">=&lt;/span>&lt;span style="color:#ae81ff">510&lt;/span>), is_even)
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>&lt;img alt="even-odd plot for Pascal&amp;rsquo;s triangle" src="https://vrusso.com/blog/pascal_parity_plot.png">&lt;/p>
&lt;p>One could (and indeed should!) go to town in adding additional exploratory functionality. I encourage anyone
who is reading this and interested in either forking the project or making a PR to &lt;code>triforce&lt;/code> for enhancing the current
set of functionality.&lt;/p>
&lt;h3 id="using-triforce-in-the-wild">Using triforce in the wild&lt;/h3>
&lt;p>This is all well and good for exploring triangular arrangements of numbers that have been extensively studied, however
one may wish to conjecture properties of triangular numbers that are defined in a novel way.&lt;/p>
&lt;p>For instance, the authors of &amp;ldquo;&lt;em>Some properties of the Fibonacci-Pascal triangle&lt;/em>&amp;rdquo; (&lt;a href="https://www.fq.math.ca/Papers1/60-5/sonrod.pdf">Fibonacci Quart. 60 (2022), no. 5,
372–383&lt;/a>) define the so-called &lt;em>Fibonacci-Pascal triangle&lt;/em> via the recurrence&lt;/p>
$$
\begin{equation}
T(n, i) =
\begin{cases}
F_{n+1} &amp; \text{if } i = 0, \\
F_{n+1} &amp; \text{if } i = n, \\
T(n-1, i-1) + T(n-1, i) &amp; \text{otherwise,}
\end{cases}
\end{equation}
$$
&lt;p>
where \(F_i\) is the \(i\)-th Fibonacci number, with \(F_0 = 0\), \(F_1 = 1\), and \(F_n = F_{n-1} + F_{n-2}\) for \(n
\geq 2\).&lt;/p>
&lt;p>By inheriting from the &lt;code>Triangle&lt;/code> base class and overriding the &lt;code>generate_triangle&lt;/code> function, we can define this
triangular arrangement of numbers. Indeed, &lt;code>FibonacciPascalTriangle&lt;/code> is already defined in &lt;code>triforce&lt;/code> by using this
strategy of implementation, so we can just pull it off the shelf.&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-py" data-lang="py">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f92672">&amp;gt;&amp;gt;&amp;gt;&lt;/span> &lt;span style="color:#f92672">from&lt;/span> triforce.triangles &lt;span style="color:#f92672">import&lt;/span> FibonacciPascalTriangle
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f92672">&amp;gt;&amp;gt;&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f92672">&amp;gt;&amp;gt;&amp;gt;&lt;/span> triangle &lt;span style="color:#f92672">=&lt;/span> FibonacciPascalTriangle(&lt;span style="color:#ae81ff">5&lt;/span>)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f92672">&amp;gt;&amp;gt;&amp;gt;&lt;/span> print(triangle)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ae81ff">1&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ae81ff">1&lt;/span> &lt;span style="color:#ae81ff">1&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ae81ff">2&lt;/span> &lt;span style="color:#ae81ff">2&lt;/span> &lt;span style="color:#ae81ff">2&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ae81ff">3&lt;/span> &lt;span style="color:#ae81ff">4&lt;/span> &lt;span style="color:#ae81ff">4&lt;/span> &lt;span style="color:#ae81ff">3&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#ae81ff">5&lt;/span> &lt;span style="color:#ae81ff">7&lt;/span> &lt;span style="color:#ae81ff">8&lt;/span> &lt;span style="color:#ae81ff">7&lt;/span> &lt;span style="color:#ae81ff">5&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>While their paper is unfortunately pay-walled (thanks, Fibonacci Quarterly!), I can recall that the authors proved a
number of properties about the Fibonacci-Pascal triangle.&lt;/p>
&lt;p>If you have read the blog post this far, you&amp;rsquo;re likely interested in thinking about such things (NERD!). One
&amp;ldquo;exercise-for-the-reader&amp;rdquo; might be to consider a slightly different triangle that has the same recursive structure but
is defined in terms of Lucas numbers instead of Fibonacci numbers.&lt;/p>
&lt;p>Let&amp;rsquo;s define the &lt;em>Lucas-Pascal triangle&lt;/em> via the recurrence
&lt;/p>
$$
\begin{equation}
T(n, i) =
\begin{cases}
L_{n+1} &amp; \text{if } i = 0, \\
L_{n+1} &amp; \text{if } i = n, \\
T(n-1, i-1) + T(n-1, i) &amp; \text{otherwise,}
\end{cases}
\end{equation}
$$
&lt;p>
where \(L_i\) is the \(i\)-th Lucas number, with \(L_0 = 2\), \(L_1 = 1\), and \(L_n = L_{n-1} + L_{n-2}\) for \(n
\geq 2\). Here is a Lucas-Pascal triangle I prepared earlier 🥧:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-py" data-lang="py">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f92672">&amp;gt;&amp;gt;&amp;gt;&lt;/span> &lt;span style="color:#f92672">from&lt;/span> triforce.triangles &lt;span style="color:#f92672">import&lt;/span> LucasPascalTriangle
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f92672">&amp;gt;&amp;gt;&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f92672">&amp;gt;&amp;gt;&amp;gt;&lt;/span> triangle &lt;span style="color:#f92672">=&lt;/span> LucasPascalTriangle(&lt;span style="color:#ae81ff">5&lt;/span>)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f92672">&amp;gt;&amp;gt;&amp;gt;&lt;/span> print(triangle)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ae81ff">1&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ae81ff">3&lt;/span> &lt;span style="color:#ae81ff">3&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ae81ff">4&lt;/span> &lt;span style="color:#ae81ff">6&lt;/span> &lt;span style="color:#ae81ff">4&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ae81ff">7&lt;/span> &lt;span style="color:#ae81ff">10&lt;/span> &lt;span style="color:#ae81ff">10&lt;/span> &lt;span style="color:#ae81ff">7&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#ae81ff">11&lt;/span> &lt;span style="color:#ae81ff">17&lt;/span> &lt;span style="color:#ae81ff">20&lt;/span> &lt;span style="color:#ae81ff">17&lt;/span> &lt;span style="color:#ae81ff">11&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>One question we may want to answer is whether there is a closed-form expression for the row sum. We can look at the
first few values of each row sum of the Lucas-Pascal triangle using &lt;code>triforce&lt;/code>.&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-py" data-lang="py">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f92672">&amp;gt;&amp;gt;&amp;gt;&lt;/span> &lt;span style="color:#f92672">from&lt;/span> triforce.triangles &lt;span style="color:#f92672">import&lt;/span> LucasPascalTriangle
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f92672">&amp;gt;&amp;gt;&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f92672">&amp;gt;&amp;gt;&amp;gt;&lt;/span> triangle &lt;span style="color:#f92672">=&lt;/span> LucasPascalTriangle(&lt;span style="color:#ae81ff">15&lt;/span>)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f92672">&amp;gt;&amp;gt;&amp;gt;&lt;/span> print(triangle&lt;span style="color:#f92672">.&lt;/span>row_sums())
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>[&lt;span style="color:#ae81ff">1&lt;/span>, &lt;span style="color:#ae81ff">6&lt;/span>, &lt;span style="color:#ae81ff">14&lt;/span>, &lt;span style="color:#ae81ff">34&lt;/span>, &lt;span style="color:#ae81ff">76&lt;/span>, &lt;span style="color:#ae81ff">166&lt;/span>, &lt;span style="color:#ae81ff">354&lt;/span>, &lt;span style="color:#ae81ff">744&lt;/span>, &lt;span style="color:#ae81ff">1546&lt;/span>, &lt;span style="color:#ae81ff">3186&lt;/span>, &lt;span style="color:#ae81ff">6524&lt;/span>, &lt;span style="color:#ae81ff">13294&lt;/span>, &lt;span style="color:#ae81ff">26986&lt;/span>, &lt;span style="color:#ae81ff">54616&lt;/span>, &lt;span style="color:#ae81ff">110274&lt;/span>]
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>After playing around with the sum values and the Lucas numbers, I was able to conjecture the following. Let \(n \geq 0\)
be a positive integer. It holds that the row sum of the Lucas-Pascal triangle is given by&lt;/p>
$$
\begin{equation}
\sum_{j=0}^n T(n,j) = 2^n L_4 - 2 L_{n+2}.
\end{equation}
$$
&lt;p>I&amp;rsquo;ll omit the proof, but will mention that an inductive argument is straightforward to prove given the definition of the
triangle. While &lt;code>triforce&lt;/code> can&amp;rsquo;t be used to prove things of course, it can still garner intuition about the triangular
array structure for making conjectures about its properties.&lt;/p>
&lt;h3 id="hexagonal-labyrinths">Hexagonal labyrinths&lt;/h3>
&lt;p>I&amp;rsquo;ll end with an idea I had as a bit of a fever dream when thinking about these triangular arrays and reading the short
story &lt;a href="https://en.wikipedia.org/wiki/The_Library_of_Babel">&amp;ldquo;The Library of Babel&amp;rdquo;&lt;/a> by &lt;a href="https://en.wikipedia.org/wiki/Jorge_Luis_Borges">Jorge Luis
Borges&lt;/a>. In the story, the protagonist describes a labyrinth of
vertically adjacent hexagonal rooms of bookshelves with random books. The books contain every possible ordering of a set
of basic characters and thus contain every book that has been or will be written. The books include the meaning of life,
the cure for cancer, and even verbal sections of this blog post.&lt;/p>
&lt;p>&lt;img alt="library-of-babel" src="https://vrusso.com/blog/library_of_babel.jpg">&lt;/p>
&lt;p>Paradoxically, this information is utterly useless, given its sheer immensity and scope. Inspired by the hexagonal
architecture of this fictional library, we could consider a similar style of recursive structure superimposed on
triangular arrays of numbers.&lt;/p>
&lt;p>There are likely many ways one &lt;em>could&lt;/em> define a hexagonal labyrinth with the above description. One way is as a
recursive sequence of triangular arrays \(\{T_d\}_{d \geq 0}\) where given \(T_d\), for \(d \geq 0\), the array
\(T_{d+1}\) is constructed by extracting entries from \(T_d\) located at positions corresponding to the centers of
hexagonal patterns superimposed on \(T_d\). Specifically, for \(d \geq 0\), we define&lt;/p>
$$
\begin{equation}
T_{d+1}(j, k) = T_d(2(j+1), 2k + 1)
\end{equation}
$$
&lt;p>for \(j \geq 0\) and \(0 \leq k \leq j\). For example, here are some numbers arranged in such a hexagonal configuration:&lt;/p>
&lt;pre tabindex="0">&lt;code> 1
/ \
1---1
/ \
2 1 2
\ /
3---2---2---3
/ \ / \
5 3 4 3 5
8---5---6---6---5---8
...
&lt;/code>&lt;/pre>&lt;p>If one wished, they could extend &lt;code>triforce&lt;/code> to include a &lt;code>labyrinth.py&lt;/code>. Doing so would give similar capabilities to
empiraclly analyze the structure and make claims about the hexagonal labyrinth structures. Given an initial hexagonal
configuration, we could &amp;ldquo;descend&amp;rdquo; into a subsequent layer of the library by selecting a hexagonal center. Then, this
hexagonal center would dictate the starting point of the next triangular arrangement of numbers. Again, this is not the
only way one could define this, but it could be one way of staying &amp;ldquo;true&amp;rdquo; to the literature angle.&lt;/p>
&lt;p>As a bit of fun, we could assign some other names to some of the other attributes of the triangle that are creatively
inspired.&lt;/p>
&lt;p>For instance, we could define the path (or ladder) down from one section of the library to the next as a
&lt;em>Lateralus&lt;/em>. The term &lt;a href="https://en.wikipedia.org/wiki/Lateralus_(song)">&lt;em>Lateralus&lt;/em>&lt;/a> is derived from a song by the band
&lt;a href="https://en.wikipedia.org/wiki/Tool_(band)">Tool&lt;/a>. This song is particularly notable for its syllabic lyrical
construction, which is based off the Fibonacci sequence.&lt;/p>
&lt;p>Another one (perhaps more relevant to the structure at hand) is a &lt;a href="https://en.wikipedia.org/wiki/Hexagon_Sun">hexagon
sun&lt;/a> from the band &lt;a href="https://en.wikipedia.org/wiki/Boards_of_Canada">Boards of
Canada&lt;/a>. What is a &amp;ldquo;hexagon sun&amp;rdquo;? Well, it could be the hexagonal
configurations with the rays emanating from these configurations. Is it possible to determine an equation for hexagonal
suns for a given level of the labyrinth?&lt;/p>
&lt;p>Is it worth thinking about such a structure? Is it worth thinking about such properties within these structures? I don&amp;rsquo;t
know. I thought that the juxtaposition of a mathematical construct against something inspired by literature and music
was kind of cool. Others have thought about such structures within triangular arrays before (for instance, the &lt;a href="https://en.wikipedia.org/wiki/Star_of_David_theorem">&amp;ldquo;Star of
David&amp;rdquo;&lt;/a> theorem for triangular arrangements of numbers was surely
inspired by such a melding of comparisons).&lt;/p>
&lt;p>&lt;img alt="star-of-david" src="https://vrusso.com/blog/star_of_david.png">&lt;/p>
&lt;p>There&amp;rsquo;s obviously a lot of freedom with how one could define this type of structure and maybe even one of them would be
worthwhile to think about. I welcome any input on the above (very rough) thoughts and ideas as well as any pull-requests for the
&lt;code>triforce&lt;/code> package.&lt;/p></content></item><item><title>Books I read in 2024 and why I'll be reading less in 2025</title><link>https://vrusso.com/posts/books_2024/</link><pubDate>Wed, 01 Jan 2025 00:00:00 +0000</pubDate><guid>https://vrusso.com/posts/books_2024/</guid><description>There&amp;rsquo;s a scene in Cosmos (the good one with Carl Sagan) where he is at the public library in New York City. It&amp;rsquo;s a massive building filled with books. Sagan begins talking about how many books you could read if you read one book each week. He takes a few steps in front of some bookshelves he&amp;rsquo;s standing in front of and stops shortly after. The entirety of one&amp;rsquo;s reading life is contained within a few humble steps of an enormous library.</description><content>&lt;p>There&amp;rsquo;s a &lt;a href="https://www.youtube.com/watch?v=EuvKdE5e3eo&amp;ab_channel=MaximilianMontserrat">scene&lt;/a> in Cosmos (the good one
with Carl Sagan) where he is at the public library in New York City. It&amp;rsquo;s a massive building filled with books. Sagan
begins talking about how many books you could read if you read one book each week. He takes a few steps in front of some
bookshelves he&amp;rsquo;s standing in front of and stops shortly after. The entirety of one&amp;rsquo;s reading life is contained within a
few humble steps of an enormous library. &amp;ldquo;The trick&amp;rdquo;, he says, &amp;ldquo;to read the right ones&amp;rdquo;.&lt;/p>
&lt;p>In 2024, I read &lt;a href="https://www.goodreads.com/readingchallenges/gr/annual/2024">over 100 books&lt;/a>. I say this not to brag but
more so to highlight a glaring deficiency in my own habits and prioritization. I suppose I am perpetually overwhelmed at
the sheer number of amazing books out there and the prospect that I&amp;rsquo;ll never be able to read and experience them all. I
try to compensate with quantity, but 2025 will be about quality. I&amp;rsquo;ll be trying to focus exclusively on &amp;ldquo;the right
ones&amp;rdquo;.&lt;/p>
&lt;p>That&amp;rsquo;s not to say that 2024 was focused on reading low quality books, far from it. I feel as if I read many impactful
books that deeply changed my thought process. Perhaps I just feel like those high-value books didn&amp;rsquo;t get the
appropriate amount of &amp;ldquo;pondering&amp;rdquo; time post-read they deserved. Indeed, I will explicilty list and elaborate on
these books below. I feel that the majority of the books that I read did not hit that mark, in fact, many of them were
&amp;ldquo;guilt completion reads&amp;rdquo;; books that I felt needed to be finished because I started them.&lt;/p>
&lt;h3 id="my-top-5-books-of-2024">My top 5 books of 2024&lt;/h3>
&lt;p>These are in no particular ranked order.&lt;/p>
&lt;ul>
&lt;li>&lt;em>&lt;a href="https://www.goodreads.com/book/show/163620.My_Childhood">&amp;ldquo;My Childhood&amp;rdquo;&lt;/a>&lt;/em> by Maxim Gorky&lt;/li>
&lt;/ul>
&lt;p>I picked this up at a local bookstore, following the owner&amp;rsquo;s advice, when looking for Russian literature. I had not previously
heard of Gorky, so I went into this book blind. This stands shoulder-to-shoulder with the writing of other well-known
Russians (i.e., Tolstoy, Dostoevsky, etc.).&lt;/p>
&lt;p>It is a tragic story of trauma, violence, and strife written as an autobiography. While the other Russian writers came
from some higher place in Russian society, Gorky gives us a view of the state of common life during the same time
period. It&amp;rsquo;s the pure embodiment of the Russian soul and spirit, and this book&amp;rsquo;s writing is gripping and beautiful.&lt;/p>
&lt;p>There&amp;rsquo;s a quote that I think does a good job of encapsulating the spirit of the text:&lt;/p>
&lt;blockquote>
&lt;p>&amp;ldquo;Long afterwards I came to understand that Russians, as a result of the poverty and dullness of their lives, sought
diversion in grief, playing it up like children, and rarely feeling ashamed of their misfortunes. When life is
monotonous, even grief is a welcome event, even a fire is diversion. A wart is adornment to a vaccous face.&amp;rdquo;&lt;/p>
&lt;/blockquote>
&lt;p>In researching this text, I also stumbled on what I think was a &lt;a href="https://www.youtube.com/watch?v=k6yhhQznEhE&amp;ab_channel=TheActiveMind">really great
video&lt;/a> that showcases this book.&lt;/p>
&lt;ul>
&lt;li>&lt;em>&lt;a href="https://www.goodreads.com/book/show/2761.The_Denial_of_Death">&amp;ldquo;The Denial of Death&amp;rdquo;&lt;/a>&lt;/em> by Ernest Becker&lt;/li>
&lt;/ul>
&lt;p>This is not the most uplifting of reads, but, a necessary one, I think. For me, this book tore off the blindfold of my
all-too-human repression of death.&lt;/p>
&lt;ul>
&lt;li>&lt;em>&lt;a href="https://www.goodreads.com/book/show/44788820-savage-gods">&amp;ldquo;Savage Gods&amp;rdquo;&lt;/a>&lt;/em> by Paul Kingsnorth&lt;/li>
&lt;/ul>
&lt;p>Kingsnorth talks about writing and escaping to a more rural area to live with his family. I&amp;rsquo;d say this is a
&amp;ldquo;meta-memoir&amp;rdquo; on writing and one that is worth reading not only for aspiring writers but for anyone who strives to be
authentic and deliberate in their thinking, actions, and speech.&lt;/p>
&lt;p>This has also led me down a bit of a Kingsnorth rabbit hole and I&amp;rsquo;ve been enjoying his talks and writing on technology
and his journey to Greek Orthodoxy.&lt;/p>
&lt;ul>
&lt;li>&lt;em>&lt;a href="https://www.goodreads.com/book/show/74034.Amusing_Ourselves_to_Death">&amp;ldquo;Amusing Ourselves to Death: Public Discourse in the Age of Show Business&amp;rdquo;&lt;/a>&lt;/em> by Neil Postman&lt;/li>
&lt;/ul>
&lt;p>It might be easy to dismiss this book before diving into it by assuming that Postman is a Luddite or that he is
promoting the message that &amp;ldquo;television is bad, mmkay?&amp;rdquo;. His point is much subtler than that and one that I think
articulates the fears that have largely come to pass and become amplified by the technological advancement of the
computer, the internet, and social media. Postman passed away in 2003, so many of these insights did not make it into
this book, but it is not difficult to extrapolate from his writing.&lt;/p>
&lt;p>A vital point of this book is that in Orwell vs. Huxley, they proposed two very different dystopian societies. Orwell
warned his readers against government control and Big Brother, whereas Huxley&amp;rsquo;s view was endless self-amusement. There
is no conspiracy or over-arching thought-police, but instead, a world where people are selected to be in a constant
state of amusement and distraction. This is the state worth being concerned about and this appears to be the trajectory
that we are presently on.&lt;/p>
&lt;ul>
&lt;li>&lt;em>&lt;a href="https://www.goodreads.com/book/show/34760.All_I_Really_Need_to_Know_I_Learned_in_Kindergarten">&amp;ldquo;All I Really Need to Know I Learned in Kindergarten&amp;rdquo;&lt;/a>&lt;/em> by Robert Fulghum&lt;/li>
&lt;/ul>
&lt;p>I’m a big fan of Robert’s writing. It’s terse but dense in terms of content and life lessons. All of his stories end
with a gut punch of saccharin goodness. A few repeated short stories from other books of his, but those were worth
reading again.&lt;/p>
&lt;h3 id="my-top-5-to-reads-in-2025">My top 5 to-reads in 2025&lt;/h3>
&lt;p>The following books are heffers and ones that I feel like I have read in some form simply due to the osmosis in which
these books have pervaded multiple domains. Still, the broad brush strokes of the ideas within are only a topical view
within.&lt;/p>
&lt;p>This list is a &amp;ldquo;soft&amp;rdquo; list that I&amp;rsquo;m not going to too stringently hold myself to. The 2025 reading list will certainly
contain much more than this, but I would feel content having experienced the depth that I know these books have to
offer.&lt;/p>
&lt;ul>
&lt;li>&lt;em>&lt;a href="https://www.goodreads.com/book/show/4934.The_Brothers_Karamazov">&amp;ldquo;The Brothers Karamazov&amp;rdquo;&lt;/a>&lt;/em> by Fyodor Dostoevsky&lt;/li>
&lt;/ul>
&lt;p>I started this a while back but did not finish. My wife got me a nice hardcover edition of this book which I&amp;rsquo;ll be
starting fresh from. I am aware of the &amp;ldquo;punchline&amp;rdquo; of this book, namely, the dichotomy between Ivan and Alyosha and
Dostoevsky&amp;rsquo;s implication that despite Ivan&amp;rsquo;s wit, Alyosha was the &amp;ldquo;correct&amp;rdquo; one. At least, this is my high-level
impression of it now, and perhaps it will change as I read it. I know that Dostoevsky used these characters to battle
his own inner thoughts on the matter of religion.&lt;/p>
&lt;ul>
&lt;li>&lt;em>&lt;a href="https://www.goodreads.com/book/show/177068.The_Fabric_of_Reality">&amp;ldquo;The Fabric of Reality: The Science of Parallel Universes&amp;ndash;and Its Implications&amp;rdquo;&lt;/a>&lt;/em> by David Deutsch&lt;/li>
&lt;/ul>
&lt;p>As one of the pioneers in my field, I feel a sense of obligation to read more of Deutsch&amp;rsquo;s writings. His expositions on
quantum information and pedagogical lectures on the topic were instrumental for my own decision to pursue this area of
research.&lt;/p>
&lt;ul>
&lt;li>&lt;em>&lt;a href="https://www.goodreads.com/book/show/24113.G_del_Escher_Bach">&amp;ldquo;Gödel, Escher, Bach: An Eternal Golden Braid&amp;rdquo;&lt;/a>&lt;/em> by Douglas R. Hofstadter&lt;/li>
&lt;/ul>
&lt;p>I&amp;rsquo;m honestly surprised that I haven&amp;rsquo;t read this one by now. Given all of the references to this book in countless
podcasts, etc., I feel like I should actually take the time to go through it. I&amp;rsquo;m sure many of the themes are so
prevalent now in other forms as to become trite, but I still would like to read through it for the sake of completeness.&lt;/p>
&lt;ul>
&lt;li>&lt;em>&lt;a href="https://www.goodreads.com/book/show/338798.Ulysses?ref=nav_sb_ss_1_5">&amp;ldquo;Ulysses&amp;rdquo;&lt;/a>&lt;/em> by James Joyce&lt;/li>
&lt;/ul>
&lt;p>I actually already started reading this. While I appreciate the writing and style, I simply don&amp;rsquo;t have the requisite
literature background to fully appreciate all the references to the Odyssey and subtleties of the writing. Truly, it&amp;rsquo;s
even difficult to know what is happening during certain scenes due to the &amp;ldquo;stream of consciousness&amp;rdquo; writing that Joyce
employs. I&amp;rsquo;ve found that reading a chapter first and then consulting the &lt;a href="https://www.ulyssesguide.com/">Ulysses guide&lt;/a>
to be a helpful way of deciphering the text.&lt;/p>
&lt;ul>
&lt;li>&lt;em>&lt;a href="https://www.goodreads.com/book/show/33.The_Lord_of_the_Rings">&amp;ldquo;Lord of the Rings (trilogy)&amp;rdquo;&lt;/a>&lt;/em> by J.R.R. Tolkien&lt;/li>
&lt;/ul>
&lt;p>I&amp;rsquo;ve seen the movies but never read the books. I have read &amp;ldquo;The Hobbit&amp;rdquo;, but that was many moons ago. While I am
certainly familiar with the primary story arch (due to cultural osmosis and the movie trilogy), I am excited to read
the actual texts as J.R.R. Tolkien appears to have been a massively multi-dimensional and fascinating character and
writer.&lt;/p>
&lt;p>I&amp;rsquo;m looking forward to diving into these books, along with many others. If you&amp;rsquo;re a fellow reader and have a Goodreads
profile, feel free to send me a friend request on my profile
&lt;a href="https://www.goodreads.com/user/show/3600868-vincent-russo">here&lt;/a>.&lt;/p></content></item></channel></rss>