    \begin{algorithmic}[1]
    \Procedure{CSP}{$m$, $n$, $D$, $B$, $F$}

    \Comment{$D$: data register of size $m - n$}
    
    \Comment{$B$: buffer register of size $\frac{N}{M} - 1$}
    
    \Comment{$F$: flag register of size $\frac{N}{M} - 1$}
    
        \For{$k$ \textbf{in} range($2^m$)}
            \For{$s$ \textbf{in} range($n - m$) \textbf{and} $p$ \textbf{in} range($2^s$)}
            \State Classically compute $\theta_{s,p}^{(k)}$ from $\mathbf{x}$ \Comment{Use Eq.~\eqref{eq:theta_ksp}}
            \EndFor
        \EndFor
        \For{$s$ \textbf{in} range($n - m$) \textbf{and} $p$ \textbf{in} range($2^s$)}
            \State $\mathrm{X}(F_{s,p})$ onto fresh ``flag'' ancilla
        \EndFor
        \State LOADF$(D, B, F)[\theta^{(k)}_{s,p}]$ load angles into buffer ancillae \Comment{$O(n)$}
        \State SPF$(D, B, n-m)$ to prepare $n-m$ qubit state with garbage \Comment{$O(n-m)$}
        \State FLAG$(D, F, n-m)$ \Comment{$O(n-m)$}
        \State $\mathrm{LOADF}^{\dagger}$$(D, B, F)[\theta^{(k)}_{s,p}]$ to unload angles in buffer ancillae \Comment{$O(n)$}
        \State $\mathrm{FLAG}^{\dagger}(D, F, n-m)$ \Comment{$O(n-m)$}
        \For{$s$ \textbf{in} range($n - m$) \textbf{and} $p$ \textbf{in} range($2^s$)}
            \State $\mathrm{X}(F_{s,p})$ to reset ``flag'' ancilla
        \EndFor
    \EndProcedure
    \end{algorithmic}

\begin{algorithmic}
[1]
\Procedure{CSP}{$m$, $n$, $D$, $B$, $F$}
\Comment{$D$: data register of size $m - n$}
\Comment{$B$: buffer register of size $\frac{N}{M} - 1$}
\Comment{$F$: flag register of size $\frac{N}{M} - 1$}
\For{$k$ \textbf{in} range($2^m$)}
\For{$s$ \textbf{in} range($n - m$) \textbf{and} $p$ \textbf{in} range($2^s$)}
\State Classically compute $\theta_{s,p}^{(k)}$ from $\mathbf{x}$ \Comment{Use Eq.~\eqref{eq:theta_ksp}}
\EndFor
\EndFor
\For{$s$ \textbf{in} range($n - m$) \textbf{and} $p$ \textbf{in} range($2^s$)}
\State $\mathrm{X}(F_{s,p})$ onto fresh ``flag'' ancilla
\EndFor
\State LOADF$(D, B, F)[\theta^{(k)}_{s,p}]$ load angles into buffer ancillae \Comment{$O(n)$}
\State SPF$(D, B, n-m)$ to prepare $n-m$ qubit state with garbage \Comment{$O(n-m)$}
\State FLAG$(D, F, n-m)$ \Comment{$O(n-m)$}
\State $\mathrm{LOADF}^{\dagger}$$(D, B, F)[\theta^{(k)}_{s,p}]$ to unload angles in buffer ancillae \Comment{$O(n)$}
\State $\mathrm{FLAG}^{\dagger}(D, F, n-m)$ \Comment{$O(n-m)$}
\For{$s$ \textbf{in} range($n - m$) \textbf{and} $p$ \textbf{in} range($2^s$)}
\State $\mathrm{X}(F_{s,p})$ to reset ``flag'' ancilla
\EndFor
\EndProcedure
\end{algorithmic}
{
    "title": "spacetime-efficient low-depth quantum state preparation with   applications",
    "id": "2303.02131",
    "abstract": "we propose a novel deterministic method for preparing arbitrary quantum states. when our protocol is compiled into cnot and arbitrary single-qubit gates, it prepares an $n$-dimensional state in depth $o(\\log(n))$ and spacetime allocation (a metric that accounts for the fact that oftentimes some ancilla qubits need not be active for the entire circuit) $o(n)$, which are both optimal. when compiled into the $\\{\\mathrm{h,s,t,cnot}\\}$ gate set, we show that it requires asymptotically fewer quantum resources than previous methods. specifically, it prepares an arbitrary state up to error $\\epsilon$ with optimal depth of $o(\\log(n) + \\log (1/\\epsilon))$ and spacetime allocation $o(n\\log(\\log(n)/\\epsilon))$, improving over $o(\\log(n)\\log(\\log (n)/\\epsilon))$ and $o(n\\log(n/\\epsilon))$, respectively. we illustrate how the reduced spacetime allocation of our protocol enables rapid preparation of many disjoint states with only constant-factor ancilla overhead -- $o(n)$ ancilla qubits are reused efficiently to prepare a product state of $w$ $n$-dimensional states in depth $o(w + \\log(n))$ rather than $o(w\\log(n))$, achieving effectively constant depth per state. we highlight several applications where this ability would be useful, including quantum machine learning, hamiltonian simulation, and solving linear systems of equations. we provide quantum circuit descriptions of our protocol, detailed pseudocode, and gate-level implementation examples using braket.",
    "categories": "quant-ph cs.cc cs.lg",
    "doi": "10.22331/q-2024-02-15-1257",
    "created": "2023-03-03",
    "updated": "2024-02-09",
    "authors": [
        "kaiwen gui",
        "alexander m. dalzell",
        "alessandro achille",
        "martin suchara",
        "frederic t. chong"
    ],
    "affiliation": [],
    "url": "https://arxiv.org/abs/2303.02131"
}
{
    "ToxicityFilter": {
        "text_to_toxicity_attributes": {
            "quantum_template.tex": {
                "toxicity_score": 0.0071626552,
                "severe_toxicity_score": 0.0007247925,
                "identity_attack_score": 0.0022753682,
                "insult_score": 0.00649637,
                "profanity_score": 0.012277958,
                "threat_score": 0.0067445673,
                "sexually_explicit_score": 0.009023507,
                "flirtation_score": 0.22418799
            },
            "sections/03sp+csp.tex": {
                "toxicity_score": 0.0056547276,
                "severe_toxicity_score": 0.00056505203,
                "identity_attack_score": 0.0017296498,
                "insult_score": 0.006173368,
                "profanity_score": 0.010672474,
                "threat_score": 0.0062332097,
                "sexually_explicit_score": 0.0065759546,
                "flirtation_score": 0.26993847
            },
            "sections/07acknowledgment.tex": {
                "toxicity_score": 0.009990019,
                "severe_toxicity_score": 0.00093460083,
                "identity_attack_score": 0.0029783275,
                "insult_score": 0.006885872,
                "profanity_score": 0.01402008,
                "threat_score": 0.007301235,
                "sexually_explicit_score": 0.011146685,
                "flirtation_score": 0.32888338
            },
            "sections/_legacy_04_circuit_interleaving_technique.tex": {
                "toxicity_score": 0.007790958,
                "severe_toxicity_score": 0.0006866455,
                "identity_attack_score": 0.002330865,
                "insult_score": 0.0066198707,
                "profanity_score": 0.011902207,
                "threat_score": 0.0067057298,
                "sexually_explicit_score": 0.00855169,
                "flirtation_score": 0.2309284
            },
            "sections/05applications.tex": {
                "toxicity_score": 0.006942749,
                "severe_toxicity_score": 0.0007200241,
                "identity_attack_score": 0.0021273769,
                "insult_score": 0.0064298697,
                "profanity_score": 0.012312118,
                "threat_score": 0.0066086366,
                "sexually_explicit_score": 0.009495324,
                "flirtation_score": 0.19534646
            },
            "sections/02quantum_computing_background.tex": {
                "toxicity_score": 0.0072569004,
                "severe_toxicity_score": 0.0007867813,
                "identity_attack_score": 0.0021828737,
                "insult_score": 0.0064108693,
                "profanity_score": 0.013166099,
                "threat_score": 0.006763986,
                "sexually_explicit_score": 0.010969753,
                "flirtation_score": 0.18547978
            },
            "sections/08potential_improvement.tex": {
                "toxicity_score": 0.007696713,
                "severe_toxicity_score": 0.0007867813,
                "identity_attack_score": 0.0024418586,
                "insult_score": 0.0065533705,
                "profanity_score": 0.012243799,
                "threat_score": 0.0068999166,
                "sexually_explicit_score": 0.008610667,
                "flirtation_score": 0.2122394
            },
            "quantumarticle.cls": {
                "toxicity_score": 0.012126249,
                "severe_toxicity_score": 0.001001358,
                "identity_attack_score": 0.0029783275,
                "insult_score": 0.007607877,
                "profanity_score": 0.014225035,
                "threat_score": 0.0069387536,
                "sexually_explicit_score": 0.01020305,
                "flirtation_score": 0.42424405
            },
            "sections/11blog-proposal.tex": {
                "toxicity_score": 0.006722843,
                "severe_toxicity_score": 0.000705719,
                "identity_attack_score": 0.0021273769,
                "insult_score": 0.0067908717,
                "profanity_score": 0.012517073,
                "threat_score": 0.0064532873,
                "sexually_explicit_score": 0.008846575,
                "flirtation_score": 0.2300407
            },
            "sections/06code.tex": {
                "toxicity_score": 0.0043038763,
                "severe_toxicity_score": 0.0004911423,
                "identity_attack_score": 0.0010451894,
                "insult_score": 0.0057648653,
                "profanity_score": 0.0108774295,
                "threat_score": 0.0059840037,
                "sexually_explicit_score": 0.0071362373,
                "flirtation_score": 0.2409465
            },
            "main.bbl": {
                "toxicity_score": 0.011874928,
                "severe_toxicity_score": 0.0011348724,
                "identity_attack_score": 0.003866276,
                "insult_score": 0.0075508766,
                "profanity_score": 0.014532468,
                "threat_score": 0.007521313,
                "sexually_explicit_score": 0.010969753,
                "flirtation_score": 0.27629572
            },
            "sections/01intro.tex": {
                "toxicity_score": 0.006754258,
                "severe_toxicity_score": 0.00067710876,
                "identity_attack_score": 0.0019146391,
                "insult_score": 0.0064393696,
                "profanity_score": 0.012243799,
                "threat_score": 0.0065180166,
                "sexually_explicit_score": 0.009318393,
                "flirtation_score": 0.27036667
            },
            "main.tex": {
                "toxicity_score": 0.014639461,
                "severe_toxicity_score": 0.0012016296,
                "identity_attack_score": 0.0047357255,
                "insult_score": 0.008766884,
                "profanity_score": 0.015864678,
                "threat_score": 0.007741391,
                "sexually_explicit_score": 0.0136827035,
                "flirtation_score": 0.4269956
            },
            "sections/04multiple_copy.tex": {
                "toxicity_score": 0.018723432,
                "severe_toxicity_score": 0.0011730194,
                "identity_attack_score": 0.0060676485,
                "insult_score": 0.0088618845,
                "profanity_score": 0.015181494,
                "threat_score": 0.008168601,
                "sexually_explicit_score": 0.011795434,
                "flirtation_score": 0.21719036
            },
            "tikzlibraryquantikz.code.tex": {
                "toxicity_score": 0.011435116,
                "severe_toxicity_score": 0.00091552734,
                "identity_attack_score": 0.003884775,
                "insult_score": 0.0077028773,
                "profanity_score": 0.0138151245,
                "threat_score": 0.0076766624,
                "sexually_explicit_score": 0.010262027,
                "flirtation_score": 0.46759063
            },
            "reference.bib": {
                "toxicity_score": 0.006345861,
                "severe_toxicity_score": 0.0010156631,
                "identity_attack_score": 0.0013874196,
                "insult_score": 0.0068003717,
                "profanity_score": 0.013063621,
                "threat_score": 0.0059386934,
                "sexually_explicit_score": 0.009908165,
                "flirtation_score": 0.2611724
            },
            "dirty_qubit_circuit.tex": {
                "toxicity_score": 0.011497946,
                "severe_toxicity_score": 0.0011205673,
                "identity_attack_score": 0.0035887922,
                "insult_score": 0.007493876,
                "profanity_score": 0.015215653,
                "threat_score": 0.0074565844,
                "sexually_explicit_score": 0.012149297,
                "flirtation_score": 0.21014765
            },
            "sections/APPappendix.tex": {
                "toxicity_score": 0.015079274,
                "severe_toxicity_score": 0.0015735626,
                "identity_attack_score": 0.004439743,
                "insult_score": 0.008690883,
                "profanity_score": 0.019007329,
                "threat_score": 0.008336896,
                "sexually_explicit_score": 0.01769315,
                "flirtation_score": 0.2779886
            }
        },
        "reason": null
    }
}
{
    "num_done": {
        "figure": 0,
        "algorithm": 3,
        "plot": 0
    }
}
{
    "NonTrivialRenderingFilter": {
        "white_pixels_ratio": 92.09071459135643,
        "hash": "f899870f033f073f",
        "most_frequent_color_ratio": 92.09071459135643
    }
}