Resource-efficient simulation of noisy quantum circuits and application to network-enabled QRAM optimization

Giovannetti, Lloyd, and Maccone [Phys. Rev. Lett. 100, 160501] proposed a quantum random access memory (QRAM) architecture to retrieve arbitrary superpositions of $N$ (quantum) memory cells via $O(\log(N))$ quantum switches and $O(\log(N))$ address qubits. Towards physical QRAM implementations, Chen et al. [PRX Quantum 2, 030319] recently showed that QRAM maps natively onto optically connected quantum networks with $O(\log(N))$ overhead and built-in error detection. However, modeling QRAM on large networks has been stymied by exponentially rising classical compute requirements. Here, we address this bottleneck by: (i) introducing a resource-efficient method for simulating large-scale noisy entanglement, allowing us to evaluate hundreds and even thousands of qubits under various noise channels; and (ii) analyzing Chen et al.'s network-based QRAM as an application at the scale of quantum data centers or near-term quantum internet; and (iii) introducing a modified network-based QRAM architecture to improve quantum fidelity and access rate. We conclude that network-based QRAM could be built with existing or near-term technologies leveraging photonic integrated circuits and atomic or atom-like quantum memories.


Introduction
A quantum random access memory (QRAM) is an essential computational primitive for many quantum algorithms.The ability to perform a QRAM query in log(N ) time steps, where N = 2 n is the number of memory cells, implies polynomial speed-ups for applications such as quantum machine learning [1], matrix inversion [2], quantum imaging [3], and quantum searching [4].Despite its clear importance to quantum information processing, a QRAM has yet to be realized experimentally.Hence, finding a suitable architecture that can be realized in the near-future remains an active research subject in the theoretical and experimental domains.
In this article, we present a method to simulate largescale entanglement accounting for various sources of noise.We are able to efficiently simulate circuits with thousands of qubits under dephasing, amplitude damping, and CNOT errors.Based on our simulation model, we present a QRAM architecture for photonic networkbased QRAM based on Ref. [5].The feasibility assessment is based on realistic parameters extracted from recent experiments, which we will refer to throughout the article.
A classical RAM [6] consists of a binary tree leading to a final layer of memory cells, each corresponding to an unique address.The address is represented as a series of bits, with each bit corresponding to a layer of the binary tree.Each bit of an address describes how the bus signal propagates in the layer: to the right or to the left child node.Hence, the nodes of the binary tree act as switches for the address.When provided with a n-bit address, the RAM returns a bit string f k associated to the memory cell labeled k.This is called the fan-out scheme [7].
A QRAM is the quantum analog of the RAM, similarly consisting of addresses, quantum switches, and memory cells in the form of qubits.In particular, with a quantum address state, over the set of address qubits a, given by |ψ ′ in ⟩ = n j=1 α j |j⟩ a , one can retrieve data from a superposition of memory cells.A QRAM query is defined via the following transformation, where |∅⟩ represents an ancillary state, over the bus qubit b, which transforms into the retrieved data state after querying.In this article, we will restrict our investigations to classical data, i.e. |D j ⟩ are separable bits.
A direct conversion of classical fan-out protocol to the quantum realm is inefficient since it requires maintaining quantum coherence over an exponential number of connections [7].Three main schemes have been investigated to date: the fan-out scheme that was already described, the bucket brigade model, and the teleportation-based scheme.Important figures of merit for the QRAM are the fidelity of the above transformation and the query time.For a detailed study and comparison of the first two schemes, please refer to Ref. [8].
In the bucket brigade (BB) model [7,9], the number of qubits of the device scales as O(2 n ), as does the number of gates.Moreover, the original protocol [7] includes an additional third state in each node, called the "wait" state in order to prevent the exponential scaling of the amount of decoherence, with respect to the memory size.However, Hann et al. [8] have shown that the origin of the noise resilience of the BB model is the amount of entanglement among the memory's components and not the presence of the "wait" state, as one can devise a BB model without the "wait" state that still achieves a polynomial scaling of the decoherence with respect to the number of memory addresses n.
More recently, Chen et al. presented a photonic network-based QRAM scheme [5] that makes use of quantum teleportation of addresses from a quantum computer to the QRAM binary tree.Such a scheme greatly increases the protocol's efficiency by teleporting the registers to the layers (initially prepared in GHZ states) in parallel as opposed to in series, thereby circumventing the event of a single qubit loss collapsing the entire tree state.Additionally, the proposed QRAM maps onto quantum networks, leading to potential applications in distributed quantum computing and sensing.
However, Chen et al. left as an open challenge the simulation of the scheme on large-scale networks since the computational complexity scales exponentially with the number of qubits.In this work, we bypass this problem resorting to more efficient ways of modeling the noise in stabilizer states.Moreover, this method generalizes to other quantum networking tasks with similar constructions, such as protocols for distributed quantum computation.
This comes in line with the fact that distributing entanglement is central in quantum information processing schemes ranging from quantum computing to sensing to communications [10][11][12].Simulation of distributed entanglement in a network setting, be it a long-distance network such as a possible future quantum internet [13], or small-distance quantum local area network (QLAN) [14], is important to assessing the limitations imposed by nearterm quantum technologies.The architecture of the QRAM considered in this paper, building on photonic network-based QRAM proposed in Ref. [5], involves a series of exponentially growing GHZ states, with the largest having as many qubits as there are memory cells.Each GHZ state spans across a physical layer in the QRAM architecture, and the number of nodes per layer grows exponentially with the number of memory cells 2 n ≡ N to be addressed, as shown in Fig. 1.
Computer simulations of noisy quantum processes in such a system quickly becomes computationally intensive [15][16][17] due to the density matrices growing exponentially in size with the number of qubits.Even though the entire QRAM protocol definition, i.e the retrieval of data given an input address (see Eq. 1), requires more than just Clifford operations, creating the routing state over the QRAM architecture only uses Clifford gates.These operations are the ones used to create these GHZ states and the teleporting the address state onto the QRAM access layers.Moreover, the operations required to access the QRAM after the routing state is distributed over the routing nodes only grows with the logarithm of the number of qubits of the QRAM, in comparison to the linear amount of operations required to create the routing state.This is the reason why noise in the system mostly comes from the GHZ states before access.In particular, this set of operations to create the routing state can be classically simulated efficiently [16].This approach enables an explicit and efficient description of all the intermediary states, up to local unitary corrections.In this article, we develop efficient methods to simulate large-scale noisy entanglement by characterizing the impact of noise at all intermediate steps, and apply these tools to simulate a noisy QRAM.A quantum RAM in the form of a binary tree comprises GHZ states for each physical layer.The left-most node of each layer i is entangled with an ancillary qubit in a remote quantum computer, which hosts the query address qubits (blue).Bell state measurement in the quantum computer then teleports the address state onto the access tree.The elementary operations to constructing GHZ states in a photonic integrated circuit (PIC) QRAM are identical to the ones over [5].
There are several architectures for a QRAM.Here, we focus on the optically mediated quantum network-based QRAM architecture introduced in Ref. [5], as it offers several key benefits: implementation in quantum networks compatible with envisioned quantum internet architecture and quantum data centers, and faster query times and possibility of executing in a non-local manner by means of teleportation.Hence, this scheme works under any network-like architecture, be it locally (e.g. on a chip) or across large distances (e.g. over a quantum internet).Without loss of generality, we characterize each node of the architecture as one of a spin-photon network that could be implemented in photonic integrated circuits (PIC).
The architecture of the QRAM is similar to previous models, such as BB and the fan-out models.The main difference concerns the execution of the protocol and the resources available at each node.In this architecture, one considers two agents: the quantum computer, which prepares the addresses, and the QRAM or quantum access tree (see Fig. 1).The quantum computer must provide an address state with n = log 2 N qubits, where N is the total number of memories (for simplicity assume n ∈ N).
The QRAM has a binary tree architecture, with n physical layers, where the kth layer (k ∈ {1, ..., n − 1}) has 2 k−1 quantum nodes.As we describe next, in each physical layer, all the nodes share a GHZ state, which is used to teleport the address state onto the QRAM itself, allowing for an ancilla qubit to access the memories in the correct superposition.
As for the type of physical implementation chosen, and without loss of generality, we focus on a QRAM implementation involving solid-state spin qubits integrated into PICs, an approach that is promising in terms of scalability.In particular, we consider diamond nanophotonic cavities coupled with silicon-vacancy centers [18,19] as each QRAM tree node.Each emitter contains an electronic spin that directly interacts with the photonic address register qubits and an accompanying nuclear spin acting as a long-lived memory.By entangling the electronic spin with the photon via cavity reflection, consecutive reflection of a photon off two neighboring nodes and subsequent heralding achieves spin-spin entanglement.This remote entangling strategy is repeatedly used to generate a GHZ state across each layer.Such operations are probabilistic (see Fig. 2): the photon has a nonzero probability of being lost to the environment before reflecting off two cavities and arriving at the detector.On the other hand, it is possible to perform close to deterministic two-qubit gates between the electronic and nuclear spin qubits, albeit with a larger error [20,21].For this reason, we term this architecture teleportationbased deterministic QRAM, or TD-QRAM.
In these types of systems, the main contributors to errors are (i) spin phase errors (at rate 1/T 2 ), (ii) spin flip errors (at rate 1/T 1 ), and (iii) errors in hyperfine gates between electron and nuclear spins (see Supplementary Table I).We leave out photon-electron interactions, as one could conceive trading-off the efficiency η for arbitrarily high fidelity in the cavity-reflection based scheme proposed in Ref. [22] in the high-cooperativity and overcoupling regime.
Hence, we explore different values for T 1 , T 2 of both electronic and nuclear spin qubits, and p e and p n for the probabilities of error in electronic and nuclear spin CNOTs.For the remaining of this article, we set T n 1 = 100 T e 1 ≡ 100 T 1 and T n 2 = 100 T e 2 ≡ 100 T 2 .Nuclear spins have a higher coherence time as they are much less coupled to the noisy spin-bath compared to electronic spins.Reported values of characteristic times go, experimentally, up to T e 1 ∼ 1 s, T e 2 ∼ 10 ms [23], and there are theoretical predictions of being able to reach p e , p n = 10 −2 ∼ 10 −4 [24,25].Moreover, we detail other important physical parameters of this type of system, used for the simulations, in Supplementary Table I.

Results
Simulating the effects of decoherence for a TD-QRAM.To simulate the QRAM initialization protocol, we use NetSquid [26] under the stabiliser formalism and extract all the parameters of the noise channels before implementing them in simulations, for instances: timing parameters for every qubit used throughout the simulation, all the noisy CNOTs with corresponding error probabilities, and to which qubits and at which step it is applied.From here, we compute the fidelity of the final QRAM state by substituting all these values into the expressions presented in the methods.
We start by presenting the simulation of a 2 12 -qubit QRAM in Fig. 3. Here, we detail individually the fidelities of the GHZ state distributed at each physical layer of the QRAM.The fidelity of the full state of the QRAM is given by: i.e., the fidelity of the entire tree (or the QRAM) is defined as the product of the fidelities of each physical layer (see Supplementary Methods for more details).We distinguish access fidelity from tree fidelity, where the former refers to the fidelity of the state retrieved after accessing the memory cells (|ψ out ⟩ in Eq. 1), and the latter refers to the multipartite state fidelity of the binary tree constituting the QRAM.Only the access fidelity depends on the address and bus qubits.
One observes an exponential decrease of the fidelity with the number of the layer (notice the logarithmic scaling on the y-axis corresponding to the fidelity).This agrees with the GHZ state size increasing exponentially with the number of layers, i.e. scaling 2 k .When one qubit in this multipartite state suffers an error, the entire state is affected.
One critical figure of merit that we extract from the NetSquid simulations is the query time.As demonstrated in Ref. [5], the query efficiency scales logarithmically with the number of qubits.Extracting from multiple queries of the QRAM, we obtain the query times (apart from (a) TD-QRAM access protocol for 12 layers, with the efficiency of generating a Bell pair swept from η = 50% to η = 90%.The noise analysis considers only dephasing and damping errors.The final fidelity is calculated according to Eq. 2, with T1 = 20 ms, T2 = 10 ms, and ϵCNOT = 0 for each layer.(b) Query times with varying sizes from 2 layers to 12 layers, and sweeping the efficiency of generating a Bell pair from η = 50% to η = 90%.There is an expected logarithmic scaling of the query time with the number of qubits.(c) TD-QRAM noise analysis with dephasing errors, T2 = 10 ms (filled lines) and T2 = 100 ms (traced lines), with fixed amplitude-damping error T1 = 2 s.We consider different QRAM sizes from 2 layers to 12 layers as well as various efficiencies of generating a Bell pair from η = 50% to η = 90%.(d) TD-QRAM noise analysis with noisy CNOTs, pe = pn ∈ {0, 10 −5 , 10 −4 , 10 −3 , 10 −2 }, for a QRAM with the number of layers ranging from 2 to 12.The dephasing time is fixed at T2 = 100 ms, and the amplitude-damping time is fixed at T1 = 2 s.
The efficiency of generating a Bell pair is fixed at η = 90%.The final fidelity mainly depends on the number of noisy CNOTs performed throughout the protocol and has little dependence on the efficiency.All the error bars over the data correspond to the error of the average value over 100 simulations of the protocol.
a logarithmic factor derived from making the bus qubit traverse the binary tree) in Fig. 3.
Dephasing and Damping Errors for TD-QRAM.Considering only the effects of dephasing and amplitudedamping errors in the spin qubits, we take T 2 = ∞ ms for amplitude-damping errors only, and then T 2 = 10 ms and T 2 = 100 ms with a fixed T 1 = 2 s [23], see Supplementary Table I.We also set the CNOT error rate to 0. We present the simulation results for the TD-QRAM scheme under memory dephasing for increasing QRAM size, as shown in Fig. 3.
Looking closely at Figure 3(c), one can observe that the effect of amplitude-damping shows an identical behavior to the one of dephasing and amplitude-damping combined, i.e., with the same type of scaling.However, it is residual comparatively to the effect of dephasing.This is easily explainable by the time-scales of the coherence times of the corresponding noises (T 1 and T 2 ) in the memory differ by orders of magnitude, with the first, T 1 , being usually much longer than the latter, T 2 , i.e.T 1 ∼ 1 s [23].For this reason, its impact can be neglected relative to other sources of error.
Dephasing, Damping and Noisy CNOTs for TD-QRAM.The only type of error missing in the analysis is the error derived from the use of noisy CNOTs.Illustrated in Fig. 3, the dephasing and damping errors minimally contribute to infidelity.We now analyse the case for noisy CNOTs on top of fixed T 1 = 2 s and T 2 = 100 ms (note we now switch to linear scale in the y-axis for the fidelity, due to the set of values present for the different simulations).For simplicity, we consider equal CNOT error probability, ϵ CNOT , for both electronic and nuclear CNOTs, and vary ϵ CNOT from 10 −5 to 10 −2 as shown in Fig. 3: These simulations show that the CNOT gates dominate the overall error in the QRAM state fidelity in the TD-QRAM.For instance, to access a 128-qubit QRAM, one needs fidelities of the CNOT gates to be somewhere near 99.9% to obtain an access fidelity exceeding 90%.In this architecture, while the query times do not increase linearly with the size of the memory, the errors do.Expectedly, applying an error to a single qubit of a GHZ state contributes in the same order for the entire state.
The price to pay for performing CNOTs with such large error rates deterministically could be circumvented by near-perfect yet probabilistic CNOTs [22,27] via cavitybased electron spin-photon interactions, as opposed to deterministic yet error-prone nuclear-electron spin coupling.In light of this, we explore a hybrid teleportationbased QRAM architecture in the following section.
Teleportation-based Stochastic QRAM .In the TD-QRAM protocol, the entanglement generation and swap (Fig. 8) operation are still probabilistic given the finite chance of photon loss.Hence, these probabilistic CNOTs are done in parallel throughout each physical layer to improve efficiency.After an EPR pair is created between two electron spins, however, transferring entanglement onto the nuclear spins is a deterministic procedure.Thereby, the query time grows sub-linearly.As noted before addressing the TD-QRAM scheme, this deterministic CNOT based on nuclear-electron spin interaction mainly dominates the infidelity of the GHZ state, motivating us to contemplate an alternative solution.
Since the decoherence errors from T 1 and T 2 contribute much less to the infidelity relative to electron-nuclear spin CNOT, replacing some of the noisy deterministic CNOTs with probabilistic CNOTs helps improve the fidelity despite reducing efficiency.As we will show, this leads to higher QRAM tree state fidelities, albeit with longer query times.We call this architecture 'teleportationbased stochastic QRAM', or TS-QRAM.
Relying solely on probabilistic CNOTs in every step of the protocol would be very inefficient since the probability of generating a GHZ state diminishes exponentially with the number of nodes.In other words, if one entanglement attempt fails during construction of a GHZ state, the entire state collapses.Since each linking process is heralded, there are ways to circumvent this by choosing a specified order to perform the CNOTs, similar to entanglement swapping in a repeater chain [28,29].Here, the probabilistic swapping operations are equivalent to the probabilistic CNOTs, and measuring the middle node is analogous to joining smaller GHZ states to form a larger GHZ state.Abstractly, they describe the same problem, which allows us to use the solutions provided by Ref. [29].Next, we present an in-depth analysis of the trade-off between fidelity and query rate as a function of error rates and physical implements.
Increasing T 1 and T 2 .To decrease the number of employed deterministic CNOTs, and taking into account that these always happen when the electronic spins interact with the nuclear spins, it is natural to consider dropping the nuclear spins altogether.This is motivated by the fact that we can perform CNOTs, albeit probabilistically, between the electron spins.The downside is that electron spins suffer from having shorter coherence times than their nuclear counterparts.Still, it is advantageous to consider such schemes to avoid the use of noisier deterministic CNOTs.
To minimize the consequently increased decoherence, one could conceive schemes for increasing the T 1 and T 2 times for the electrons, since these are the ones now causing the fidelity bottleneck, together with the required time to query the memory.
Presently, the SiV's electronic spin's T 1 time is shown to be longer than 1 s [23], thereby posing no concern over depolarisation.On the other hand, its T 2 coherence time is limited to tens of milliseconds [23] even under dynamical decoupling.The main dephasing mechanism is attributed to the surrounding nuclear spin bath, which is weakly coupled to the electronic spin of interest via hyperfine interaction [30].A potential avenue to improving the electronic spin's T 2 is therefore to "purify" its environment by materials engineering [31].By producing SiV in a carbon-13 free matrix, for example, the coherence time may be further extended.
Nevertheless, our numerical analyses of the hybrid scheme show fidelities still exceeding 60% for a reasonable CNOT error rate of 10 −3 and 1024 memory cells, using a T 2 of 100 ms.For such a result, a probability of success of about 70% for the CNOT is required.
The Teleportation-based Stochastic QRAM Protocol.
In the TD-QRAM protocol, there are two steps occurring in parallel across each layer in the QRAM: one for generating EPR pairs across every other node and another for linking all the states into a larger GHZ state, via sharing EPR pairs in-between nodes holding the previously shared EPR pairs (see Fig. 8).This could be made in parallel because the linking operations are deterministic.
In the TS-QRAM protocol, however, we must now consider an order for the linking step that depends on the node's position, similar to the quantum repeater chain problem [26,29,32].If a linking process fails, the subset of qubits that would have become entangled must be reset.The optimal strategy is then performing the linking process in a binary-tree-like approach [29].This binary-tree order for the linking processes means that now a heralding signal for a successful link must be exchanged within the tree.Each parenting node will have two children, the right-child and the left-child.Each node only attempts entanglement if it receives heralding signals from both children nodes that have been successfully entangled themselves.Fig. 4 illustrates this procedure and defines the order.Moreover, as mentioned before, the advantage of the TS-QRAM protocol is that probabilistic CNOTs are used to minimize state infidelity.One might consider the optimal placements for the deterministic CNOTs to maximize the GHZ state fidelity across each physical layer.We further introduce having an additional distribution layer.This is the layer of the order binary-tree at which a linking step is attempted, as shown in Fig. 4.These abstract layers are only needed to describe the order of the linking steps and help illustrate the optimal placements for the deterministic CNOTs.
For this reason, we present two possible options to solve the placement of deterministic nodes problem: the first is randomly choosing a set of nodes to be deterministic, regardless of their distribution layer.The second option is choosing the nodes that attempt to link entanglement at the higher steps, since if those attempts are unsuccessful, they take the biggest toll on the protocol requiring re-attempting every preceded step.We illustrate these two possible options in Fig. 4.
As we will verify later, we need a much smaller number of deterministic nodes if we place them in higher-level distribution layers.We first present simulation results for both cases.
Simulating the effects of Decoherence for a TS-QRAM.Using the aforementioned results, we compare the TD-QRAM protocol with the TS-QRAM that includes both probabilistic EPR pair generation and deterministic linking.For comparison purposes, we start by assuming all probabilistic CNOTs (P rob (node being deterministic) ≡ P d = 0%) have unit efficiency in the latter scheme.If the deterministic and the probabilistic CNOTs are of the same order in gate time, then the binary-tree approach is bound to be more time-consuming considering its greater number of entanglement attempts.However, the probabilistic CNOT based on cavity-reflection is typically several orders of magnitude faster than the deterministic CNOT (10 1 ns vs. 10 5 ns).We therefore present both the QRAM's query time and its fidelity for both schemes in Fig. 5, assuming perfect deterministic CNOTs.We also consider the case where the CNOT efficiency is less than unity for comparison.
Before moving onto the noise simulations, we delve into the query times.It is not obvious that now the query times scale logarithmically (or even polylogarithmically), since the efficiency of the distributed CNOTs can increase the query times depending on the order of the linking steps.In fact, Figure 5 already shows a non-logarithmic behavior when considering a completely probabilistic protocol.If one were to choose sequential linking steps, the query times would increase exponentially with the efficiency.By choosing the scheme demonstrated in Fig. 4, we are able to reduce this to polynomial scaling [26].However, depending on the noise parameters, this increase in time, compared to the initial two-step scheme, might not be wanted, as we will verify next.In Fig. 5, we present the query times for different efficiencies of the distributed CNOT, under the two possible hybrid schemes, with different number of deterministic CNOTs placed strategically (see Fig. 4).
We start by verifying that, for a random placement of the deterministic nodes, there is no clear dependence on the number of deterministic CNOTs.The reason is that, when choosing random placements for the deterministic nodes, the best order for the linking steps immediately changes and is no longer a binary tree.There already exist algorithms [29] that use linear programming to solve an identical problem of finding the best order to attempt entanglement swapping along a chain, which is virtually identical to our problem.However, the polynomial scaling of these algorithms in terms of the number of nodes of ) and comparison under identical efficiencies of the distribution of Bell pairs for the TD-QRAM (two-step) scheme.T1 = 2 s, T2 = 100 ms, and ϵCNOT = 0. (c) Query time scaling for randomly distributed deterministic nodes under the regular binary tree ordering and (d) and placed at higher-level steps for the linking tree, comparing between the two deterministic CNOT placement strategies for distributing the GHZ states in the TS-QRAM scheme (see Fig. 4).Notice that for the non-random placement strategy, the ratio of deterministic nodes P d is approximately given by P d ≈ 2 −(log 2 (N )−D)−1 .In both cases, the efficiency of the distribution of a Bell pair was set at η = 0.5.All the error bars over the data correspond to the error of the average value over 100 simulations of the protocol.
the chain makes it unsuitable for exponentially growing chains.For the intuitive placement of the deterministic nodes, this is not the case, as choosing only the top layers of the linking tree does not change the best order to do the linking.We also consider varying the efficiency of the distribution of the Bell pairs, as shown in Supplementary Figure 1.
Dephasing and Damping Errors for a TS-QRAM.We start by considering the case where there are no deterministic CNOTs, and vary the dephasing and damping parameters, T 2 and T 1 respectively.Note that, as expected, the query times have increased by orders of magnitude (see in greater detail in Supplementary Fig- ure 2), hence the extent of decoherence in the memories.Moreover, to overcome the necessity of performing noisy deterministic CNOTs, the qubits used are now the electronic spin qubits, whose dephasing and damping times are much smaller than their nuclear counterparts, thereby limiting the fidelity of the QRAM tree state.For this reason, we analyzed a wide range of possible values for T e 1 and T e 2 : {20 ms, 200 ms, 2 s, 20 s} and {10 ms, 100 ms, 1 s, 10 s}, respectively.In this scenario of having only probabilistic distributed CNOTs, we analyse for multiple CNOT efficiencies η and T 2 values, fixing T 1 = 2 s, as its contribution to the error is negligible compared to the T 2 .In Fig. 6, we observe infidelity values scaling exponentially with the number of qubits for a completely probabilistic execution of the hybrid protocol.Only for memory coherence times on the second timescale, i.e.T 2 = 1 s, does the fidelity reach around 80% under a CNOT efficiency of η = 0.5.For other combinations of parameters, we refer to Supplementary Figures 3, 4 and 5. Dephasing, Damping and Noisy CNOTs for TS-QRAM.Here, we explore adding some noisy deterministic CNOTs to counteract the effect of the decoherence for longer periods of time.As seen previously, the better location for these deterministic CNOTs are the nodes that perform the linking step at higher levels of the linking tree.In our simulations, we evaluate different values of the first deterministic layer log 2 (N ) − D ∈ {2, 3, 4, 5, 6}.The results are presented in Fig. 7.
Depending on the CNOT error, the TS-QRAM scheme can surpass the fidelities of access of the TD-QRAM scheme under high enough T 2 times in the order of seconds.For other possible sets of parameters, we refer again to Supplementary Figures 3, 4 and 5.

Discussion
In this article, we introduce a method to simulate large quantum networks in an open system model.Specifically, this approach enables us to model networks comprising hundreds of stationary qubits by modeling decoherence processes as noisy channels with spin dephasing errors, spin-flip errors, and noisy CNOT gates.When applied to the challenging but important problem of network-based QRAM, we find that the qubit depth of memory calls in the recently proposed TD-QRAM architecture becomes limited by CNOT errors.To overcome this bottleneck, we propose a modified network-enabled QRAM in which the noisy deterministic gates of Ref. [20] are replaced by heralded probabilistic CNOT gates, which can sharply reduce gate errors.This scheme, TS-QRAM, trades increased query time for improved memory access fidelity and/or memory depth.The TS-QRAM protocol makes use of already demonstrated elements (see Supplementary Table I), suggesting the viability of near-term demonstrations in platforms of solid-state color centers as well as potentially other atomic memory modalities.
An outstanding problem relates to the compounding loss of photonic qubits with increasing memory depth.Since teleportation-based QRAM [5] has shown that distributed quantum computers naturally map onto quantum networks, error correction schemes proposed for the former may be applied to address the issue of photon loss for the latter.Approaches include (i) photonic forward error correction using, for example, 2D photonic cluster states [33][34][35][36][37][38] and (ii) error-corrected cluster states [39][40][41].We leave the exploration of error correction schemes in the context of QRAM for future studies.

Methods
Discrete-time-event based simulations with NetSquid.Given the complexity of a quantum network and its formulations, a tool such as NetSquid [28] is essential to simulating a QRAM.NetSquid is capable of defining intricate discrete-time-event based protocols, with a number of steps and operations that are executed conditioned on the signaling and heralding of prior processes.Furthermore, NetSquid can simulate quantum circuits, providing methods for (i) stabilizer circuits, with simpler and faster execution, of complexity O m 2 , where m is the number of qubits; (ii) graph states formalism, with possibly even faster execution, in O d 2 , where log m < d < m and m is again the number of qubits; (iii) density matrix formalism, which is slower in execution, in O 2 3m ; (iv) sparse density matrix formalism that relies on sparse matrix codes to speed up the execution.
Instead of using the density matrix formalism from NetSquid, we begin by retrieving all the noise information in each step of the protocol from a noiseless discretetime event simulation, resorting to the stabilizer formalism in polynomial time.The noise information is constituted by the time qubits spent decohering, together with the information about the channels of decoherence that would have been applied in real noisy simulations, both for waiting times and gate errors.We then incorporate the extracted information to estimate the effects of decoherence at each step a posteriori.With this information at hand, we have access to the time-evolved state of the QRAM tree at all steps of the protocol, which allows us to reconstruct the noise that would have been applied .The simulations are in the hybrid regime, with 6.2% of deterministic nodes.We present different simulations for several possible values for the efficiency of each distributed CNOT (i.e. the probability of success of each of the distributed CNOT), namely η ∈ {0.5, 0.6, 0.7, 0.8, 0.9}.In dashed black lines, we also plot the values for the two-step scheme for the case with η = 0.5, and with the same T1, T2 and ϵCNOT as the hybrid scheme.All the error bars over the data correspond to the error of the average value over 100 simulations of the protocol.
in the system, in a noisy simulation.To reconstruct the density matrix, we find the analytical expressions for the density matrices of smaller parts of the system, and how they evolve after the required operations, under a set of noise channels.We express these as fundamental building blocks in terms of noise parameters, namely the probability of error and time of decoherence.This is what allows to postpone the noise calculations to the end of the simulation, without losing the effects of the natural stochastic behavior of the protocol.In a way, this can be understood as pre-compiling the error effect on the intermediary states of the protocol, to shortcome the exponential complexity of calculating the density matrix at each time step using a quantum simulator.
In the rest of the methods section, we formalise these elementary building blocks for the operations required to create these GHZ states across each physical layer in the QRAM, and explain how different types of noise affect each of the intermediate steps, allowing for a reconstruction of the density matrix.We analysed dephasing, damping and depolarizing channels, and we believe other noise models could be added in a similar manner.The result is an explicit description of the final state of the QRAM access tree state prior to the execution of the teleportation protocol.The error in the state of the access tree encompasses the majority of all the error of accessing the QRAM, as the number of steps and operations made after creating the GHZ state grows with the total number of memory addresses logarithmically, whereas the process of generating the GHZ state requires a number of operations linear with the number of memories.
Elementary building blocks for TD-QRAM.The protocol for generating GHZ states across each layer consists of two steps (see Fig. 8): 1. Generating entanglement between the odd-indexed links.This entails first distributing photonmediated heralded entanglement between the electrons, with a certain efficiency η, followed by electronic CNOTs being applied with the electron qubit acting as the control and the nuclear qubits as the target.Finally, a measurement of the electron spin in the X basis, with posterior corrections sent to the nuclear qubits.
2. The second step links the entangled pairs, creating a larger GHZ state distributed across each layer.This starts off by generating heralded entanglement, with the same efficiency η, between the even-indexed links, followed by applying nuclear CNOTs, where now the control is the nuclear qubit and the target is the electronic qubit.We then make consequent measurements in the Z basis on both electronic qubits followed by appropriate Pauli corrections.
After the aforementioned steps, each physical layer hosts a GHZ state shared among all the nodes.Subsequently, each physical layer extends its (2 k−1 )-GHZ state into a (2 k−1 + 1)-GHZ state by sharing an additional entangled pair between an outermost node in the QRAM layer and the quantum computer, which holds the address state.After performing a Bell state measurement and corresponding corrections, the address state is teleported to the QRAM.Lastly, the memories can be accessed in superposition to complete the QRAM protocol.
EPR pair creation and transferring for TD-QRAM.The first step to creating a GHZ state across each layer is to share entanglement between neighbouring nodes.EPR pairs are created by performing a distributed CNOT gate between these nodes' electronic spin qubits, mediated by a photon.Despite the process being probabilistic with an efficiency dependent on the experimental implementation, it is a heralded entanglement.Hence, the presence (absence) of photon detection informs the  success (failure) of the entangling attempt.After this CNOT is applied between the electronic spins, an EPR pair is created and transferred to the nuclear spins in each node via a deterministic electronic CNOT.Given the different operations and various types of qubits involved, we introduce noise sources in the system to estimate the protocol's fidelity.We consider amplitude damping, dephasing, and CNOT gate errors for both electronic and nuclear spin qubits.
In this step, illustrated in Fig. 8, the following takes place: 1. eL and eR decohere for a duration of time t eL and t eR , respectively; 2. An electronic CNOT is applied between eL and nL, with an error probability of p e , 3. An electronic CNOT is applied between eR and nR with an error probability of p e , 4. nL and nR decohere for a duration of time t nL and t nR , respectively.
Hence, these parameters, plus the parameters associated with the physical systems, namely the T 1 and T 2 times, govern the final form of the entangled pairs.Using the notation ϵ(σ) = 1−e −σ and ϵ(σ) = 1−ϵ(σ) = e −σ for parameters that are functions of other physical parameters, namely the elapsed times and coherence times.We will use ϵ for parameters that go to zero in the absence of noise, as is the case for ϵ(•) and p n .We also further assume ϵ ≪ 1.We then apply the following sequence of noise channels (check Supplementary Methods for details on the parameters): nR to nuclear spin qubits nL and nR, respectively; The final state for each entangled pair becomes: where eL , ϵ eR )(1 − p e ) 2 g(ϵ and For intuition regarding the ϵ function, consider the following two limits: (1) σ → 0 in the noiseless regime where the memory coherence time goes to infinity (no decoherence) and (2) σ → ∞ where there only exists noise and all the information is scrambled.In these limits we retrieve: lim σ→0 ϵ(σ) = 0, lim σ→∞ ϵ(σ) = 1, lim σ→0 ϵ(σ) = 1 and lim σ→∞ ϵ(σ) = 0.
Linking of Bell pairs for TD-QRAM.The following step is crucial to extending entanglement from bipartite to GHZ states across the entire physical layer of the QRAM.It relies on using an entangled pair to combine two GHZ states of smaller sizes into a larger GHZ state, whose number of qubits equals to the sum of each of the elementary GHZ states (i.e.n 1 -GHZ linked with a n 2 -GHZ becomes a (n 1 + n 2 )-GHZ state).
In this step, we account for decoherence before applying CNOTs, therefore entering the previous expressions for the form of each pair.The decoherence to be analysed in this step stems from: Note that all the following calculations are now lower bounds for the fidelity, as calculation of the full analytical expressions grows exponentially with the number of qubits.Because of this, we keep only the terms up to O (ϵ).In Supplementary Methods, we detail and test the validity of our approximations.
The final GHZ state in each layer is described by a matrix with the following form: where all ϵ terms are of at least order O(ϵ) and do not contribute to infidelity, as they are orthogonal to the GHZ state.
The diagonal elements that we consider are only the first and the last, as the remaining ones have at least O (ϵ) and, when expanding to a larger GHZ state, contribute in O ϵ 2 or higher orders, hence negligibly affecting the fidelity.
Let us first consider the form of the state after executing the linking protocol in a noiseless manner, with previously noisy states, as the ones that result from the entangling step given by Eq. 3. Starting with the simple case of a 4-qubit GHZ state built from three states of the form of Eq. 3, with parameters (µ j , ν j ), j = 1, 2, 3 respectively, the final matrix is: where we, again, denote a bar over a variable as 1 minus itself, µ i ≡ 1 − µ i .Note that each of the µ i comes from one of the pairs used to create the GHZ state, as these pairs are solely described by two numbers (µ i , ν i ) (see Eq. 3).There exists a rule for each entry in the diagonal, which we detail in Supplementary Methods, and the same rule holds for any number of qubits of the final state.The GHZ diagonal entries then become: Now, adding the effect of the noisy CNOTs on the state, we calculate the diagonal terms that are shown to be identical, given by: where we recall that every term with p n , µ i ≪ 1 converges to zero in the noiseless limit.For the other diagonal entries, we multiply them by h(p n ).
Finally, incorporating memory decoherence after CNOTs, we perform another approximation.For the diagonal terms, only the damping channel plays a role.The first and last entries of the diagonal become: In this approximation, the extra terms that appear for the first entry are already of order O ϵ 3 and could be neglected.
Lastly, we compute the off-diagonal terms by multiplying every contribution from each noise channel applied in the correct manner.The expression is given by: ) When extending the linking protocol to a larger number of qubits, the expressions maintain their form.We only need to add all the terms in a similar manner as in the case of the 4-GHZ state.The complete analysis is detailed in Supplementary Methods.
Thus far, we show how three types of noise (one for the two-qubit operations and two for individual memories) influence the final state of the GHZ states generated across each physical layer of the QRAM access tree.Note that we always present the full-expressions accounting for all the noise channels.In fact, if we include a specific noise channel or a subset of what we have considered, we may simply set the parameters corresponding to other noises to zero.For example, it is straightforward to verify that setting p e and p n to zero and T 1 to infinity recovers the case for only having dephasing, thus affecting only the off-diagonal terms.The same is valid for all the other noises.
Modified Protocol and Building Blocks for TS-QRAM.We now consider an alternative architecture that enables different subsets of each layer to create GHZ states independently.As illustrated in Fig. 9, this architecture assumes two electron spins and one nuclear spin (instead of each node of the QRAM having an electronic spin and a nuclear spin assumed for the TD-QRAM.As we will show, this architecture still retains similar building blocks as the aforementioned TD-QRAM protocol.
EPR creation for TS-QRAM.As in the nonhybrid version of the protocol, the first step to creating an EPR pair between two physically separated electronic spins is sending a photon that interacts with them sequentially.A subsequent measurement heralds the successful production of a spin-spin EPR pair.Notably, there are no deterministic CNOTs applied to transfer the qubit states onto the nuclear spins, as we only work with the electron spins at this stage.
The final state shared between the electronic spins is the one of Eq. 3 in the limit of the absence of electronic CNOT error (p e → 0) and altering the memory decoherence noise from nuclear to electronic (ϵ nL → ϵ ′ eL and ϵ nR → ϵ ′ eR ): where eL , ϵ eR )g(ϵ eL , ϵ 1) eR (15) and again, where we use the same abbreviation ϵ Linking Pairs in the Probabilistic Scenario for a TS-QRAM.TS-QRAM differs from TD-QRAM in that the operation of linking pairs has a non-unity probability of succeeding -let us call this probability p CN OT .Moreover, it is executed in a similar way as that of creating an EPR pair: Importantly, both cavities belong to the same node in this step.This results in a controlled gate applied between the right and left electronic spin qubits.Unlike before, it is still necessary to measure one of the nodes' electronic spin qubits, as the state has twice the number of qubits as the final state (we chose to measure the right electron, but one could choose to keep the right and measure the left instead; the choice is arbitrary and translates to the same practical outcome).This measurement should be in the X basis, in order to not destroy the entanglement shared among all the qubits and rendering the state useless.Moreover, a correction must be made depending on the outcome on the measurement of the electronic spin qubit and the photonic qubit.
Afterwards, the GHZ states shared between the left and right nodes are linked into a larger GHZ state, via an intermediary node.Inside this intermediary node, its left electronic spin merges into the larger GHZ state.We again take into account the previous calculations for detailing the density matrix of the final state.The decoherence steps are now only provenient from the memories of where each qubit is being held (which we chose to be the left cavity of the node).As we used near-perfect probabilistic CNOTs mediated by a photon, only its memory affects the state fidelity.Thus, for the remainder of the protocol, we: 1. Apply a dephasing channel with probability ϵ(t ′′ eL /T e 2 ) ≡ ϵ eL to electronic spin qubit eL; 2. Apply an amplitude damping channel with probability ϵ(t ′′ eL /T e 1 ) ≡ ϵ eL to electronic spin qubit eL.
Importantly, the following calculations are again lowerbound approximations for the fidelity.Performing the calculations for a simple link of two entangled pairs described by Eq. 13, with parameters (µ j , ν j ), j = 1, 2, the final density matrix of the 3-GHZ state, prior to any memory decoherence, is: Adding the memory decoherence accounting for both dephasing and amplitude-damping leads to a matrix similar in form to one shown in Eq. 7, except with entries changing to: Linking Pairs in the Deterministic Scenario for TS-QRAM.We next describe a scheme for deterministic CNOT gates.Since the composition of each node is now different, the operations one needs to execute to deterministically link smaller GHZ states into larger GHZ states changes as well: 1. Apply a deterministic electronic CNOT controlled by the left electronic spin qubit eL and targeted at the nuclear spin qubit n, 2. Measure the left electronic spin qubit eL in X, 3. Apply a deterministic nuclear CNOT controlled by the nuclear spin qubit n and targeted at the right electronic spin qubit eR, 4. Measure the right electronic spin qubit eR in Z.
Measurement-conditioned corrections result in a GHZ state consisting the nuclear spin and the remaining electronic spin qubits.Notice that by not involving the photon mediated CNOT, this has been done in a deterministic fashion.In this case, we must consider additional errors, namely those that arise from using deterministic electronic and nuclear CNOTs.The sequence of noise channels becomes: 1. Apply depolarising channels with probability p e to the electronic spin qubit eL and to the nuclear spin qubit n, 2. Apply depolarising channels with probability p n to the nuclear spin qubit n and to the electronic spin qubit eR,

Apply a dephasing channel with probability
to nuclear spin qubit n,

Apply an amplitude damping channel with probability
to nuclear spin qubit n.
From here, we calculate the final state's density matrix.Performing the calculations for the same simple link of two entangled pairs described by Eq. 13, with parameters (µ j , ν j ), j = 1, 2, the final density matrix of the 3-GHZ state, prior to any memory decoherence and without any CNOT errors is the same as Eq. 17. Adding the effect of the CNOTs leads to: where we set p e = p n ≡ p.In fact, all diagonal entries can be decomposed into terms of the form Using this fact, we incorporate the posterior amplitude-damping noise channels: where h(p) = (1 − p) 2 + p/2(1 − p/2).In the Supplementary Methods we present the derivation for a chain of an arbitrary number of channels, as well as a proof of the validity of our approximations.
Validity of the Results.In this section, we discuss our methods and provide empirical proof for our noise analysis robustness.In our work we have considered an analysis of a discrete protocol, where each gate takes a fixed amount of time and qubits stay in memory waiting for instructions from the protocol.Given the discreteness of the problem, solving the master-equations in each of the specific time periods where the noise actually happens, is equivalent to applying the corresponding noise channels.
To support our claims and demonstrate the equivalence of using the full density matrix and our methods of postponing the noise analysis to the end of the protocol simulation, we present one additional figure.This figure shows the comparison of the fidelity of the GHZ states distributed at each of the layers of the QRAM for a small QRAM (5 layers, ∼ 36 qubits) obtained from our simulation methods and those derived using the density matrix formalism.We present the comparison for simulations for the TD-QRAM, as for TS-QRAM we use the same methods, just under different assumptions over which noise channels are applied.Let F DM be the fidelity calculated using the full density matrix and F S be the one from our simulation methods.The figure showcases how the difference of the fidelities calculated using the density matrix and our methods evolve for different layers (with increasing amounts of qubits), weighted by the overall error (or infidelity of the state), i.e. |F DM − F S |/(1 − F DM ).
One can observe in Fig. 10 that the error is always less than 1%, showing a trend of either maintaining or decreasing as the size of the system increases.This provides empirical proof of the power of our methods across the different scenarios.

Brief description of noise channels.
A noise channel is a special type of quantum channel, and, as all quantum channels, it can be described by a set of Kraus operators {K i } E .Its action on a quantum state, represented by a density matrix ρ, is given by the following equation, which can also be conceived as a unitary evolution of the system in question ρ and a complementary system ρ E , usually the environment, after tracing out the complementary system: Because of this, these operations are completely positive trace preserving (CPTP) maps and verify the identity i K † i Ki = I.Moreover, the set of Kraus operators is not unique to a quantum channel, as a unitary map between two sets of Kraus operators leaves the action of the quantum channel itself invariant.
As we described in the main text, we deal with several types of noise, all of them described by corresponding noise channels.In the memories we consider dephasing and amplitude-damping noise, described by corresponding dephasing and amplitude damping channels, with sets of Kraus operators given respectively by: Moreover, to also consider the possibility of noisy CNOTs, and following the lines of NetSquid to be able to corroborate results, we model the error in CNOTs by applying a perfect CNOT gate proceeded by two depolarising channels, one applied to the control qubit, and another applied to the target qubit: where the depolarising channel is defined by the following set of operators: Bell Pair States under different Noise Channels.
For completion let us describe the memory noise channels action on the elementary building block of either of the detailed schemes, namely, the Bell pair state |ϕ + ⟩ ∝ |00⟩ + |11⟩.We do this for an arbitrary error parameter p, and one that is useful for the noise analysis in terms of the time the qubits spend decohering in the memories σ = ∆t/T coh .
In this appendix we detail all the calculations for extending the previous results for arbitrary number of qubits GHZ states, together with verifying the approximations made throughout the calculations, namely for the amplitudedamping channel and the noisy CNOTs.To do this we utilise some results known from quantum channels theory, that simplify the result into something easier to handle.
The first important result is the following: let E(•) and D(•) be two arbitrary noise channels, with corresponding sets of Kraus operators { Ki } and { Mi }: if [ Ki , Mj ] = 0 ∀i, j, meaning, all Kraus operators commute.The most obvious case of this is the case where E(•) acts over a subsystem A and D(•) acts over a subsystem B, such that A ∩ B = ∅, which is always the case when applying noise channels over distinct qubits.This will allow in particular to refrain from calculating the final memory decoherence until the final step, and divide both protocols always in three phases: Bell pair creation, linking the GHZ states (whether they are deterministic as in the teleportation-based protocol, or probabilistic, in the hybrid protocol), and final decoherence over the memories.

Bell Pair Creation.
The first step of Bell pair creation is already detailed in the main text.To verify this is simply to apply every noise channel described in the text following the protocol, and symmetrize the state, since the amplitude-damping channel introduces some terms which are not symmetric.Later in the Supplementary Methods, we explain exactly what we mean by symmetrizing, and the correspondence within the protocol.
Linking GHZ States.For the linking part, we assume that every pair that will be linked is described by: where the µ i s and the ν i s depend on all the errors previous to the entanglement linking step.Let us start by the most simple case: the one where the linking does not contain any error, meaning no noisy deterministic CNOTs are applied.Take two different pairs on qubits i 1 , i 2 and j 1 , j 2 : The protocol, under this assumption, is identical to applying a regular CNOT between qubits i 2 and j 1 and measuring afterwards either qubit i 2 or j 1 in the X basis, with posterior correction.The result of doing so is: In fact, we can see the general rule from this already simple example: the entry ρ ii of the density matrix of the GHZ state connecting n nodes is given by: where L(n) represents the line graph composed by the set of vertices (i, i+1), 1 ≤ i ≤ n−1, and where (i, j) represents one link, equivalently one Bell pair, between one qubit on node i and one qubit on node j.Moreover, consider the notation i k as the kth most valuable bit of the number i expressed in basis 2, with word length n.For example 5 3 with word length 4 is given by first converting 5 to basis 2, 5 = 0101, and then choosing its 3rd most valuable digit counting from the right: 5 3 = 1.This is not really that surprising, as applying CNOTs can be seen as an addition modulo 2 of two qubits expressed in the computational basis.Since the CNOTs are applied between neighbouring links, Eq. 30 seems somewhat intuitive.
Finally, the only step missing here is the step of adding the noise contribution of the CNOTs.To do this, we have to consider separately the cases for the two-step protocol and the repeater protocol (only the deterministic execution, as it is the one where noisy CNOTs are applied).The simpler way to calculate this is recursively.For the two-step protocol we had that: , and in fact the diagonal terms that are not part of the GHZ state are always at least O ϵ 1 .The first thing to note is that, under the linking protocol, these diagonal terms can never jump to the GHZ state entries without it resulting from an error, meaning, they always contribute to the fidelity of the final state in O ϵ 1 • O ϵ 1 = O ϵ 2 .Doing so and calculating the GHZ entries recursively, by adding more links, we get that: where p ≡ p n it is the CNOT error, and we denote by L E (n) the set of links in L(n) with links (j, j + 1) where j is even.Since in a chain with n links, half of them are even, assuming all the CNOTs have an equal amount of noise, the first expression can be simplified into the second expression of Eq. 31.
As for the off-diagonal terms, namely the corner entries corresponding to the GHZ state, as usual, the expression is quite simple and an exact value.They will be given by: Noisy CNOTs -Repeater Protocol.
Identically to the previous case, we also recover the fact that every contribution from the diagonal terms which do not belong to the GHZ state, are always at least O ϵ 2 .Using this fact, and calculating recursively from Eq. 19 in the main text, we get that: where p = p n is again the CNOT error, and we denote by D(n) the set of nodes in the chain L(n) which perform a deterministic CNOT.As for the off-diagonal terms, the result is again very simple, but slightly different: Final Decoherence in Memories.
Finally, after each linking step is performed, the qubits stay in the memory suffering decoherence, which can be described by dephasing and amplitude-damping channels.Moreover, this step is identical to both protocols.
The dephasing contributions are the simplest to calculate.They contribute in the exact same manner as previously, affecting only the off-diagonal entries of the density matrix.The amplitude-damping contributions to this off-diagonal terms are also straightforward to calculate: where T e,n 1,2 is chosen accordingly, meaning, if the qubit is an electronic spin or a nuclear spin.If the protocol is the first two-step scheme, then it is always a nuclear spin.In the case of the hybrid scheme, one can have both a nuclear or electronic spin.
As for the diagonal terms, an approximation is made, similarly to the main text, in order to not calculate an exponential number of terms coming from each of the diagonal entries of the density matrix.Take that, when talking about the density matrix entries, except the GHZ entries (the first and the last, ρ 00 and ρ 11 ), the terms can be described by: since ρ ii is already O ϵ 1 for these entries.Each amplitude-damping channel applied to a qubit will make all the entries where such qubit takes value one, climb up the diagonal multiplied by a factor in O (ϵ).For this reason, including a contribution from this error, we verify that the contributions come in at order at least O ϵ 2 .Nonetheless, since there are many contributions in O ϵ 2 , as there are qubits, and they might add-up to something not in O ϵ 2 .This is the reason we also include them in the calculations.Let us first demonstrate an example of calculating diagonal terms of a 4-GHZ state, built from 3 different entangled pairs with {µ i , ν i } i=1,2,3 .
ρ 00 =(000)+ + ϵ 1 (100) + ϵ 2 (110) + ϵ 3 (011) + ϵ 4 (001 where (i 1 i 2 i 3 ) = θ i1 (µ 1 )θ i2 (µ 2 )θ i3 (µ 3 ) and the θ function was defined in Eq. 30, for example (010) = (1−µ 1 )µ 2 (1−µ 3 ).Moreover, we abbreviate ϵ(t i /T e,n 1 ) as ϵ i , representing the error parameter from the amplitude-damping channel applied to qubit i.One can verify that in fact (i 1 i 2 ...i n ) ∼ O(µ j ij ), and for the kth line in Eq. 30 there are N k terms (where N is the number of qubits of the GHZ state).Given this, since the biggest terms in the kth line are of O ϵ k+1 , and there are at most N k of them, we can verify that our approximation is good if at least: Since T 1 is not the shortcoming in current setups, we can expect that even for t/T 1 ∼ 10µs/20ms we have ϵ → 10 −4 which means the approximations are valid for at least 10.000 qubits.Since the first line is the same as not adding any contributions from the final amplitude-damping, adding the second line results in the following expression for ρ 00 : Fidelity of Accessing the QRAM.
In this appendix, we will discuss why the fidelity for accessing the QRAM will essentially be affected by the several GHZ states existent in each of its layers.
In terms of noisy operations, the operations that are used to create the GHZ states within each layer grow linearly with the number of memory cells.The number of operations used to route the bus qubit along the QRAM itself only grows logarithmically, as this is one of the main benefits from this architecture.
In terms of actual time the qubits are spent decohering on the memory, after the GHZ state is distributed within each layer, it takes O (log N ) for the bus qubit to be routed through the memory cells, which is at its worse, as big as the time it took to distribute the GHZ states.However, if these operations are photonic, this time is much smaller than that of creating the GHZ states as most of the decoherence occurs when creating the GHZ states.
Taking this into account, then the bus qubit will be routed via the noisy GHZ states.Trying to find a decent measure for the fidelity of access implies finding an average over all possible states for the address, execute the protocol, and measure the fidelity between the output state of the address plus bus qubit and the state for the case of a noiseless access.Even with a large representation of address states, this does not seem like a smart approach.If one looks at the fidelity of each of the GHZ states, it will essentially dictate how much of the bus qubit will be routed correctly, for any address state.Then, if each layer routes at a different level, the probability of a bus qubit being routed correctly along the tree, will be given by the product of being routed correctly at each of the layers.This happens since, if an error happens on one of the first layers, the bus qubit can never be routed to its correct memory cell.Then, this introduces an error on the final state.This is the reason why simply multiplying, for each layer, the fidelities of the GHZ states (as shown in the main text) translates in a good measure for the fidelity of accessing the QRAM.In Supplementary Figures 13, 14 and 15 we present combinations of error parameters (increasing T 2 times across the horizontal) and amounts of deterministic nodes (decreasing P d across the vertical) for CNOT errors in the order of 1%, 0.1% and 0.01%, respectively.For each of the plots, we also plot, for comparison purposes with equivalent error parameters, the initial TD-QRAM architecture, to verify when there is an advantage to use the hybrid scheme.Supplementary Figure 13.Fidelity scaling in function of the number of memory qubits for a TS-QRAM.Dephasing time T2 ranging from 10ms to 1s.Amplitude-damping time T1 fixed at 2 s.Deterministic CNOT error probability fixed at 1%.The simulations are for the hybrid scheme under different possible amounts of deterministic nodes (P d = {3.1%,6.2%, 12.5%, 25%}).We present different simulations for several possible values for the efficiency of each distributed CNOT (i.e. the probability of success of each of the distributed CNOT), namely η ∈ {0.5, 0.6, 0.7, 0.8, 0.9}.Supplementary Figure 14.Fidelity scaling in function of the number of memory qubits for a TS-QRAM.Dephasing time T2 ranging from 10ms to 1s.Amplitude-damping time T1 fixed at 2 s.Deterministic CNOT error probability fixed at 0.1%.The simulations are for the hybrid scheme under different possible amounts of deterministic nodes (P d = {3.1%,6.2%, 12.5%, 25%}).We present different simulations for several possible values for the efficiency of each distributed CNOT (i.e. the probability of success of each of the distributed CNOT), namely η ∈ {0.5, 0.6, 0.7, 0.8, 0.9}.Supplementary Figure 15.Fidelity scaling in function of the number of memory qubits for a TS-QRAM.Dephasing time T2 ranging from 10ms to 1s.Amplitude-damping time T1 fixed at 2 s.Deterministic CNOT error probability fixed at 0.01%.The simulations are for the hybrid scheme under different possible amounts of deterministic nodes (P d = {3.1%,6.2%, 12.5%, 25%}).We present different simulations for several possible values for the efficiency of each distributed CNOT (i.e. the probability of success of each of the distributed CNOT), namely η ∈ {0.5, 0.6, 0.7, 0.8, 0.9}.

FIG. 1 .
FIG.1.Overview of a teleportation-based QRAM architecture.A quantum RAM in the form of a binary tree comprises GHZ states for each physical layer.The left-most node of each layer i is entangled with an ancillary qubit in a remote quantum computer, which hosts the query address qubits (blue).Bell state measurement in the quantum computer then teleports the address state onto the access tree.The elementary operations to constructing GHZ states in a photonic integrated circuit (PIC) QRAM are identical to the ones over[5].

FIG. 3 .
FIG.3.TD-QRAM Simulations.(a) TD-QRAM access protocol for 12 layers, with the efficiency of generating a Bell pair swept from η = 50% to η = 90%.The noise analysis considers only dephasing and damping errors.The final fidelity is calculated according to Eq. 2, with T1 = 20 ms, T2 = 10 ms, and ϵCNOT = 0 for each layer.(b) Query times with varying sizes from 2 layers to 12 layers, and sweeping the efficiency of generating a Bell pair from η = 50% to η = 90%.There is an expected logarithmic scaling of the query time with the number of qubits.(c) TD-QRAM noise analysis with dephasing errors, T2 = 10 ms (filled lines) and T2 = 100 ms (traced lines), with fixed amplitude-damping error T1 = 2 s.We consider different QRAM sizes from 2 layers to 12 layers as well as various efficiencies of generating a Bell pair from η = 50% to η = 90%.(d) TD-QRAM noise analysis with noisy CNOTs, pe = pn ∈ {0, 10 −5 , 10 −4 , 10 −3 , 10 −2 }, for a QRAM with the number of layers ranging from 2 to 12.The dephasing time is fixed at T2 = 100 ms, and the amplitude-damping time is fixed at T1 = 2 s.The efficiency of generating a Bell pair is fixed at η = 90%.The final fidelity mainly depends on the number of noisy CNOTs performed throughout the protocol and has little dependence on the efficiency.All the error bars over the data correspond to the error of the average value over 100 simulations of the protocol.

FIG. 4 .
FIG. 4. Binary-tree-like approach of linking nodes and possible placement of deterministic CNOTs.(a) The arrows represent heralding signals for the subsequent step, and the dark nodes represent the selected nodes for attempting entanglement at each time step.(b) Randomly distributed deterministic nodes across the log N distribution layers.(c) Intuitively distributed deterministic nodes with D deterministic distribution layers.

FIG. 5 .
FIG.5.TS-QRAM simulations for protocol comparison.(a) Query times for accessing a QRAM and (b) Fidelity of access of a QRAM for a completely probabilistic hybrid scheme (P d = 0%) and comparison under identical efficiencies of the distribution of Bell pairs for the TD-QRAM (two-step) scheme.T1 = 2 s, T2 = 100 ms, and ϵCNOT = 0. (c) Query time scaling for randomly distributed deterministic nodes under the regular binary tree ordering and (d) and placed at higher-level steps for the linking tree, comparing between the two deterministic CNOT placement strategies for distributing the GHZ states in the TS-QRAM scheme (see Fig.4).Notice that for the non-random placement strategy, the ratio of deterministic nodes P d is approximately given by P d ≈ 2 −(log 2 (N )−D)−1 .In both cases, the efficiency of the distribution of a Bell pair was set at η = 0.5.All the error bars over the data correspond to the error of the average value over 100 simulations of the protocol.

5 FIG. 6 .
FIG.6.Fidelity scaling for a dephasing time T2 = 1 s and amplitude-damping time T1 = 2 s.The simulations are for the completely probabilistic execution of the linking step (P d = 0%), meaning there are no deterministic CNOTs being executed to create the GHZ states within each layer of the QRAM.We present different simulations for several possible values for the efficiency of each distributed CNOT (i.e. the probability of success of each of the distributed CNOT), namely η ∈ {0.5, 0.6, 0.7, 0.8, 0.9}.All the error bars over the data correspond to the error of the average value over 100 simulations of the protocol.

FIG. 7 .
FIG. 7. Fidelity scaling for a dephasing time T2 = 1 s, amplitude-damping time of T1 = 2 s and a varying CNOT error.(a) ϵCNOT = 10 −2 .(b) ϵCNOT = 10 −3 .(c) ϵCNOT = 10 −4.The simulations are in the hybrid regime, with 6.2% of deterministic nodes.We present different simulations for several possible values for the efficiency of each distributed CNOT (i.e. the probability of success of each of the distributed CNOT), namely η ∈ {0.5, 0.6, 0.7, 0.8, 0.9}.In dashed black lines, we also plot the values for the two-step scheme for the case with η = 0.5, and with the same T1, T2 and ϵCNOT as the hybrid scheme.All the error bars over the data correspond to the error of the average value over 100 simulations of the protocol.

FIG. 8 .
FIG.8.Building blocks for creating the GHZ state for a chain of 6-qubits excluding the final step of entangling with the quantum computer: (a) Creating an EPR pair between two electrons, then transferring the entanglement to the nuclear spin qubits.(b) Linking two GHZ states through an entangled pair and a set of operations and measurements.(c) EPR pair creation along the odd-indexed links and transfer followed by linking of pairs by pre-sharing a EPR along the even-indexed links.Note the index of a link is with respect to the left node numbering.

9 | 2 = 0 . 9 | 3 = 0 . 9 | 4 = 0 . 9 | 5 FIG. 10 .
FIG. 10.Comparison between the infidelity calculated using a full density matrix simulation and our methods.Simulations made under a TD-QRAM protocol execution up to 5 layers, for different combinations of error parameters.All the error bars over the data correspond to the error of the average value over 100 simulations of the protocol.

Supplementary Figure 12 .
Fidelity scaling for different values of the dephasing time T2, ranging from 10ms to 1s (with T1 fixed at 2 s).The simulations are for the completely probabilistic execution of the linking step (P d = 0%), meaning there are no deterministic CNOTs being executed to create the GHZ states within each layer of the QRAM.We present different simulations for several possible values for the efficiency of each distributed CNOT (i.e. the probability of success of each of the distributed CNOT), namely η ∈ {0.5, 0.6, 0.7, 0.8, 0.9}.