Classical data compression is a crucial part of our modern digital infrastructure. For example, compression protocols enable the efficient storage and transmission of images, audio files, and videos. Similarly, quantum data compression is likely to be a crucial part of our future quantum infrastructure, where quantum compression algorithms will enable more efficient storage and transmission of quantum data. However, existing algorithms for quantum data compression tend to involve complex operations and large-volume circuits, necessitating large fault-tolerant quantum computers for their implementation.
Embodiments herein include quantum source coding methods that improve the practicality of quantum compression, i.e., how to compress quantum data using simpler operations with fewer qubits, noisier qubits, or both. Certain embodiments pertain to the task of source coding.
Data compression via classical source coding is a crucial part of our modern digital infrastructure. Despite the fact that analogous quantum source coding protocols have been developed for quantum data compression, severe practical challenges have thus far prevented their implementation.
Existing quantum source coding schemes face several challenges. The first challenge is that the coding schemes typically involve complex operations and deep circuits that are out of reach for near-term devices. The second challenge is that compiling these schemes to general-purpose quantum computing architectures can lead to significant additional overheads and slowdowns that further complicate the implementation. Embodiments disclosed herein address each of these challenges, and significantly improve the viability of quantum source coding in the near-and long-term.
To address the first challenge, we show that our protocols based on quantum sorting networks are naturally resilient to certain kinds of noise, which can significantly reduce the extent of quantum error correction required to reach a target error rate.
To address the second challenge, we propose a specialized class of architectures and accompanying algorithms for universal quantum source coding. Our architectures/algorithms are based on quantum sorting networks and are appealing because they have logarithmic running time and can be easily implemented in a distributed fashion.
Potential applications of disclosed architectures include quantum communication, sensing (telescopes), state preparation (Hamiltonian simulation), and tomography.
In a first aspect, a first quantum source coding method is disclosed. The first method includes initializing a quantum register having a plurality of nodes. Each of the plurality of nodes includes a data register and an address register. Each of the data register and address register has one or more qubits. The plurality of nodes is coupled to each other to support a reversible quantum sorting network. The plurality of nodes is partitioned into message nodes and output nodes. Said initializing includes (i) initializing each of the one or more qubits of the data register of each of the message nodes to a first computational basis state and (ii) initializing each of the one or more qubits of the data register of each of the output nodes to a second computational basis state that is orthogonal to the first computational basis state.
The first method also includes loading a unary-coded message into the quantum register. The unary-coded message includes an input sequence of symbols, each symbol of the input sequence is a two-dimensional quantum state. Said loading comprises storing each symbol in the data register of a respective one of the message nodes.
The first method also includes loading an address state, a first sorting step, applying a controlled-NOT (CNOT) gate, a first unsorting step, a second sorting step, applying a CNOT gate, and a second unsorting step. Loading an address state includes loading the address state into the address register of each of the message nodes. The address state indexes each symbol such that the message nodes form an initial sequence in one-to-one correspondence with the input sequence. The first sorting step includes sorting, with the reversible quantum sorting network, the message nodes based on the data register such that the message nodes form a message-sorted sequence. Applying a CNOT gate includes applying. for each message node of one or more of the message nodes located at an end of the message-sorted sequence, a CNOT gate to the address state of said each message node and the address state of a respective one of the output nodes. The first unsorting step includes unsorting. with the reversible quantum sorting network. the message nodes to return the message-sorted sequence to the initial sequence.
The second sorting step includes sorting. with the reversible quantum sorting network, the plurality of nodes based on the address register such that the plurality of nodes forms a fully-sorted sequence. Applying a CNOT gate includes applying, for each pair of adjacent nodes in the fully-sorted sequence having the same address state, a CNOT gate to the data registers of said each pair. The second unsorting step includes unsorting, with the reversible quantum sorting network. the plurality of nodes to return the fully-sorted sequence to the initial sequence. The address registers of the output states. after said unsorting the plurality of nodes. store a binary-coded message corresponding to the unary-coded message.
In a second aspect. a second quantum source coding method is disclosed. The second method includes initializing a quantum register having a plurality of nodes. Each of the plurality of nodes includes a data register and an address register. Each of the data register and address register has one or more qubits. The plurality of nodes is coupled to each other to support a reversible quantum sorting network. The plurality of nodes is partitioned into input nodes and message nodes. Said initializing includes (i) initializing each of the one or more qubits of the data register of each of the message nodes to a first computational basis state and (ii) initializing each of the one or more qubits of the data register of each of the output nodes to a second computational basis state that is orthogonal to the first computational basis state.
The second method also includes loading a binary-coded message into the quantum register. The binary-coded message includes an input sequence of binary-coded address states. Said loading includes loading each binary-coded address state of the input sequence into the address register of a respective one of the input nodes. The second method also includes loading an address state. a first sorting step. a first applying step. a first unsorting step. a second sorting step. a second applying step. and a second and a second unsorting step.
Loading the address state includes loading the address state into the address register of each of the message nodes. The address state indexes said each of the message nodes such that the message nodes form an initial sequence. The first sorting step includes sorting. with the reversible quantum sorting network. the plurality of nodes based on the address register such that the plurality of nodes forms a fully-sorted sequence. The first applying step includes applying. for each pair of adjacent nodes in the fully-sorted sequence having the same address state, a CNOT gate to the data registers of said each pair. The first unsorting step includes unsorting, with the reversible quantum sorting network, the plurality of nodes to return the fully-sorted sequence to the initial sequence.
The second sorting step includes sorting, with the reversible quantum sorting network, the message nodes based on the data register such that the message nodes form a message-sorted sequence. The second applying step includes applying. for each message node of one or more of the message nodes located at an end of the message-sorted sequence, a CNOT gate to the address state of said each message node and the address state of a respective one of the input nodes. The second unsorting step includes unsorting. with the reversible quantum sorting network, the message nodes to return the message-sorted sequence to the initial sequence. The data registers of the message nodes, after said unsorting the message nodes, store a unary-coded message correspond to the binary-coded message.
In a third aspect, a third quantum source coding method is disclosed. The third method includes initializing a quantum register having a plurality of nodes partitioned into codeword blocks having an identical number of the plurality of nodes. Each of the plurality of nodes includes a data register, a length register, and an address register. Each of the data register, length register, and address register have one or more qubits. The data registers of the plurality of nodes in each codeword block, of the plurality of codeword blocks, form a data sub-block. The length registers of the plurality of nodes in each codeword block form a length sub-block. The address registers of the plurality of nodes in each codeword block form an address sub-block. The plurality of nodes is coupled to each other to support a reversible quantum sorting network.
The third method also includes loading a message into the quantum register. The message includes an input sequence of symbols. Each symbol of the input sequence is a quantum state in d≥2 dimensions. Loading the message includes: (a) performing, with the reversible quantum sorting network, a parallel query of a codebook to retrieve a codeword state and a binary-coded length state corresponding to each symbol, each of the codeword state and the binary-coded length state is disentangled from said each symbol: (b) loading the codeword state into the data sub-block of a respective one of the codeword blocks: (c) formatting the binary-coded length state into a unary-coded length state: and (d) loading the unary-coded length state into the length sub-block of the respective one of the codeword blocks.
The third method also includes steps of loading, sorting, and unsorting. Loading includes loading an address state into the address register of each node of the plurality of nodes. The address state indexes said each node such that the plurality of nodes form an initial-node sequence.
Sorting includes sorting, with the reversible quantum sorting network, the plurality of nodes into a sorted-node sequence. The first level of said sorting is based on the length registers and a second level of said sorting is based on the address registers. Unsorting includes unsorting, with the reversible quantum sorting network, the address registers and the length registers such that the address registers and the length registers are ordered according to the initial-node sequence while the data registers remain ordered according to the sorted-node sequence. After said unsorting (i) the data registers store a sequence of compressed codeword states followed by a sequence of padding states and (ii) the length registers store a sequence of unary-coded length states.
Suppose a classical source X emits symbols x according to a probability distribution pX(x). We seek to compress a collection of N symbols (called a message, and denoted generically by xN) into as few bits as possible while preserving the information content of the message (lossless coding). The ultimate limit for such compression is given by Shannon's source coding theorem, which informally states that such a message can be compressed into NH(X) bits with negligible loss of information as N→∞, but compression into fewer bits guarantees information loss in the same limit. Here,
is the Shannon entropy.
That the entropy is an achievable compression rate can be proven by partitioning all possible messages into two sets: typical and atypical. The typical set Tδ is defined to be those messages for which the sample entropy,
is δ-close to the source entropy,
All other messages fall in the atypical set. One can show that, in the limit N→∞, the probability that a message is typical approaches 1 and that the number of typical messages is bounded by
Together, these facts furnish a compression protocol: encode each typical message as a sequence of N(H(X)+δ) bits, and throw an error if any atypical message is encountered. As desired, the error probability vanishes for large N, and the compression rate approaches H(X).
Many different compression protocols achieve compression rates approaching the entropy. These include Huffman coding, Shannon-Fano coding, Lempel-Ziv coding, enumerative coding, and arithmetic coding. Of particular interest here are variable-length codes, where each symbol xi is encoded into some fixed bit string called a code word, but the code words corresponding to different symbols do not generally have the same length. Compression is achieved by encoding more probable symbols into shorter code words. Optimal compression rates are obtained by choosing the length Li of xi's code word to be Li=┌−log pX(i)┐. With this choice, the expected length
i.e., within 1 bit of the fundamental limit.
Suppose a quantum source τ emits quantum states |ψy according to a probability distribution pY(y). The states |ψy
need not be mutually orthogonal. The density operator describing the source is
This operator can be diagonalized as
where |ψx are the mutually orthogonal eigenstates of ρ and pX(x) are the eigenvalues. Note that the Von Neumann entropy of the source, S(ρ)=−tr(ρ log ρ), is equal to the Shannon entropy of the eigenvalue distribution,
We seek to compress a message of N quantum states into as few qubits as possible while preserving the information content of the message. Analogously to the classical case, the ultimate limit for such compression is given by Schumacher's source coding theorem, which informally states that such a message can be compressed into NS(ρ)=NH(X) qubit with negligible loss of information as N␣∞, but compression into fewer qubits guarantees information loss in the same limit. The proof of achievability proceeds by analogously defining a typical subspace, spanned by the joint eigenstates of ρ⊗N that correspond to classical typical sequences.
Numerous quantum source coding protocols have been developed that have compression rates approaching the Von Neumann entropy [2, 3, 4, 5, 6, 7, 8]. These protocols typically involve constructing reversible implementations of corresponding classical protocols. For example, quantum versions of enumerative coding [3], Huffman coding [4], arithmetic coding [5], and Lempel-Ziv coding [8] have been proposed. More generally, Ref. [9] describes how any classical block coding scheme with compression rate approaching the Shannon entropy can be compiled into a corresponding quantum algorithm with compression rate approaching the Von Neumann entropy.
Unfortunately, for several reasons these existing quantum source coding protocols lie well beyond the capabilities of near-term quantum devices: First, such protocols typically rely on performing complex arithmetic operations that are out of reach near-term quantum devices. Second, compiling these protocols to general-purpose quantum computing architectures can lead to significant additional overheads. Third, all quantum coding schemes are block-coding schemes, which require many qubits to achieve lossless compression at near-optimal rates. Embodiments disclosed herein address these practical challenges so that quantum source coding can be more readily implemented in the near term.
In this section we describe a class of quantum computing architectures based on quantum sorting networks (QSNs). The architectures are particularly appealing for near-term implementation because they avoid large overheads typically associated with compiling coding algorithms to more general-purpose quantum computing architectures. Furthermore, the architectures can easily be implemented across separate modules in a distributed fashion. Section 3 presents various sourcing coding protocols, which (i) are specifically tailored to these architectures and (ii) can be implemented in logarithmic depth. We begin by first reviewing classical and quantum sorting networks, then we describe embodiments of QSN-based quantum-computing architectures.
A comparator is a classical gate that takes two inputs, compares them, and swaps them based on the outcome of the comparison. For example, a comparator can take two binary strings as input, compare their values, then order the strings lexicographically.
A classical sorting network is a circuit composed exclusively of comparators. Comparators are applied to the different elements of an input list in a predetermined order such that the output list is sorted according to the comparison criterion.
The depth of a sorting network is defined as the number of time steps required to execute the sort, assuming each comparator takes one time step and that comparators acting on disjoint inputs can be applied in parallel. We are interested in sorting networks whose depth is polylogarithmic in the input size N. For example, bitronic and pairwise sorting networks both have depth O(log2N). There also exist sorting networks with depth O(log N), but for these networks the big-O notation hides a large constant factor that prohibits their practical use.
Classical sorting networks can be generalized to quantum sorting networks by generalizing the notion of a comparator [10, 11, 12]. Because the operation of a classical comparator is not reversible, quantum comparator circuits disclosed herein may include an additional bit to make the operation reversible. In a reversible comparator, this bit is set to 1 if the inputs are swapped, and is left as 0 otherwise.
and |ϕ
.
In the circuits below, Uc is a unitary operation that checks which of two binary strings is larger and stores the result in the ancilla. In embodiments, such a circuit is constructed from only Toffoli gates, and it requires O(b) qubits and depth log(b) to compare two strings of length b.
QSNs may be constructed by taking a classical sorting network and replacing all classical comparators with quantum ones. Such networks sort states in the computational basis. For example,
where S is a QSN circuit. In this example, the first four registers are the inputs to the network, while A contains the ancillas affiliated with the quantum comparators.
Consider a distributed quantum processor with N nodes, where each node includes polylog(N) qubits, shown in panel (a) of
Sorting is effectively a native operation for such architectures because quantum comparators can be explicitly implemented using the classical gates, and because G supports a sorting network by construction. The depth of the sorting network, DG, depends on G, with higher connectivity graphs allowing for faster sorting networks. A fully-connected graph, for example, supports sorting networks with depth DG=O(log N). However, full connectivity could be challenging to achieve in large, distributed quantum processors. For this reason, an appealing alternative choice for G is a hypercubic graph, which offers an attractive compromise between circuit depth and connectivity. In a hypercubic graph, each node is connected to only log N others, yet this graph supports a bitronic sorting network with DG=O(log2N)−depth. Importantly, embodiments of the coding protocols we describe below may be applied to any graph supporting a sorting network, with the circuit depths of the protocols scaling as O(DG). That said, we will focus on Graphs with DG=polylog N since the resulting polylogarithmic-depth protocols are most appealing for near-term applications.
In this section, we present various embodiments of source coding algorithms based on QSNs. In addition to the practical advantages of the QSN architectures described above, these accompanying algorithms provide a further practical advantage: with suitable connectivity, the coding protocols may be implemented with circuits whose depth scales only logarithmically with the size of the message. These short-depth protocols are particularly appealing for noisy, near-term devices.
We begin first by providing a simple example of a QSN-based coding scheme. These simplicity of these coding schemes makes them appealing for near-term implementation, but this simplicity comes at the price of non-optimal compression rates. We present schemes with optimal compression rates (approaching the Von Neumann entropy) in later sections. We first describe our coding scheme in the abstract, then discuss its implementation with QSNs.
Consider a quantum source p that emits two-dimensional quantum states |ψy∈
2 according to the probability distribution pY(y). The source can be diagonalized as
where |0 and |1
denote the eigenstates of ρ and by convention p≤½. Messages emitted from ρ can thus be thought of as being composed of strings of |0
's and |1≡'s, appearing with probabilities (1−p) and p respectively. In fact, though, when the states |ψ
are not mutually orthogonal, the message will constitute a superposition of such strings, thus it is crucial that quantum coding protocols operate coherently over superpositions of different input strings. This is why we cannot compress the message simply by measuring each symbol in the eigenbasis and transmitting the (classical) result.
We can compress such messages through a procedure we call unary-to-binary coding. The basic idea of the scheme is to compress a string of k |1's and (N−k) |0
's into k log N qubits by encoding the binary address of each of the k excitations (the |1
's). For example, a message of the form (k=2 and N=8)
can be compressed to k log N=6 qubits as
where each group of three qubits specifies the address of an excitation. As previously mentioned, messages emitted by the source ρ may be composed of a superposition of such strings, each of which could have a different excitation number. To achieve near-lossless compression of such superpositions, we must specify some maximal number of excitations, kmax, such that with overwhelming probability all strings have fewer than kmax excitations. Then, the message is compressed by encoding the binary addresses of up to kmax excitations within each string. The coding scheme fails if any string in the superposition contains more than kmax excitations. Since the expected number of expectations in a message is pN, one can choose kmax=pN(1+δ), and the failure probability can be arbitrarily suppressed by increasing the parameter δ. Therefore, unary-to-binary coding allows one to compress an N-qubit message to pN(1+δ) log N qubits, achieving a code rate of
which can constitute a significant amount of compression for p<<1.
One drawback of this unary-to-binary coding scheme is the dependence of the code rate on the message length N, such that longer messages inevitably have increased compression rates. This problem can be solved by employing run-length excitation encoding, whereby the number of |0's between successive excitations is encoded rather than the positions of excitations themselves. For example, with a run-length encoding, the message may be encoded as
indicating that there are two |0's between the start of the message and the first |1
and three |0
's between the first and second |1
's. In this example, we have used b=2 bits to encode the length of each run, and the scheme fails if any runs longer than 2b bits are encountered. Since the expected length of a run is 1/p, in embodiments b=1/p(1+δ′) to achieve a vanishing failure probability. This run-length encoding scheme thus achieves a compression rate of
with vanishing error for sufficiently large δ (we have redefined to include the contribution from δ′). For small p, this rate matches the scaling of the dominant term of the binary entropy H(p<<1)≈−p log p, so the scheme achieves near-optimal compression rates in this regime.
We now describe how unary-to-binary coding and run-length coding can be implemented using QSNs. Algorithm 1, shown below, in an example of a unary-to-binary coding algorithm, shown schematically in
During the first stage of Algorithm 1 (lines 1-3), the addresses of kmax excitations are copied into the state of a (kmax log N)-qubit output register. This copying is performed as follows. In this example, each of the N symbols of the message are stored in a separate node of the QSN architecture (line 1). We refer to these N nodes as the message nodes. Also in this example, additional kmax nodes (referred to as the output nodes) are available to hold the output, so that in total the architecture includes N+kmax nodes. Let |ψi denote the ith symbol of the message (i.e., the ith emission from ρ). At the ith message node, this symbol is appended to an additional (log N)-qubit register prepared in the state |i
, so that the initial state of the ith node is |ψii
. The states of the message nodes are then sorted lexicographically, such that all states with |ψi
=|1
are sorted ahead of those with |ψi
−|0
. At each of the first kmax message nodes, the address information is copied into a corresponding output node via CNOTs. (When the first kmax message nodes are not directly connected to the corresponding output nodes in the graph G, their states can be brought adjacent to one another by sorting according to a known classical permutation. Hence, this copying can be performed in depth 0(DG).) Finally, the sorting operation is reversed, returning the message nodes to their initial states (line 3).
During the second stage of Algorithm 1 (lines 4-7), the information in the output nodes is used to erase the original message so that the output is disentangled from the rest of the system. To do so, each of the message nodes are prepared in the state |i, ψi similarly to before. At each output node, a single qubit in the state |1
is appended to the register already holding an excitation address, so that the initial state is of the form |aj, 1
, where aj denotes the address of the jth excitation. The joint system of (N+kmax) nodes is sorted lexicographically according to the addresses, such that states |i, ψi
and |aj, 1
are placed adjacent to one another for aj=i (line 4). Performing CNOTs between adjacent nodes then suffices to erase the excitations in the message (line 5). Finally, the system is unsorted (line 6), and the message nodes may be discarded (line 7).
In one example of how to perform CNOTs between adjacent nodes, between lines 3 and 4 of Algorithm 1, an extra ancillary qubit may be added to each node, where this ancillary qubit is initialized in |0 for each of the input nodes and |1
for each of the output nodes. Then, during the subsequent sorting performed in line 4, each extra ancillary qubit may be regarded as an additional address qubit used to implement two-level sorting, where the address is used for the first level and the extra ancillary qubits are used for the second level. For example, when an input node is compared to an output node of the same address (e.g., |6
), the input node (with its extra ancillary qubit in the state |0
) will be sorted before the output node (with its extra ancillary qubit in the state |1
) such that |6,0
comes before |6,1
. This ensures that when an input and output node have the same address, the input node will always wind up to the left of, or before, the corresponding output node (as shown in
With these extra ancillary qubits, CNOT gates may then be applied as follows: a set of CNOT gates are performed with the ancillary qubit of an even node j acting as the control, and the data qubit of the odd node j-1 acting as the target. Then a set of CNOTs are performed with the ancillary qubit of an odd node j-1 acting as the control and the data qubit of the even node j-2 acting as the target. This step erases the excitations in the original message.
After the CNOT gates, the nodes may be unsorted according to the address registers, again regarding the ancillary qubits as an extra bit of the address. After this unsorting, all ancillary qubits in the input nodes are again in the state |0 and all of the ancillary qubits in the output nodes are again in the state |1
. The extra ancillary qubits may then be discarded or disregarded.
Algorithm 1 can be performed in circuit depth O(DG), where DG is the minimum depth of the sorting network supported by the architecture's connectivity graph G. For sufficiently well-connected graphs, like the hypercube graph, DG=O(log2N), so the protocol has only polylogarithmic depth.
To subsequently achieve better compression rates, the run-length encoding described above may implemented by simply computing the difference between each adjacent pair of addresses. This can be done reversibly, and the original addresses may be uncomputed after.
In the preceding description of unary-to-binary coding, Algorithm 1 performs encoding. However, all of the quantum circuits used to implement Algorithm 1 perform unitary operations that can be operated in reverse. Therefore, it will be apparent to those trained in the art that the steps of Algorithm 1 can be performed in the reverse order to perform unary-to-binary decoding (or, equivalent, binary-to-unary encoding). The present embodiments include such unary-to-binary decoding.
In some embodiments, unary-to-binary encoding is performed without unary-to-binary decoding. For example, a quantum data center may be used to perform unary-to-binary encoding on an unary-encoded message to obtain a binary-encoded message. This binary-encoded message may then be transmitted to a third party that performs decoding to recover the original unary-encoded message.
In other embodiments, unary-to-binary decoding is performed without unary-to-binary encoding. For example, binary-encoded message may be received from a third party. Unary-to-binary decoding may then be performed on the received message to recover the original unary-encoded message.
We now consider the task of quantum source coding in full generality: the source ρ emits d-dimensional states |ψy∈
d according to an arbitrary distribution pY(y), and we seek to compress messages at a rate approaching the Von Neumann entropy. This Schumacher coding may be accomplished using QSNs with the aid of variable-length codes.
In variable-length quantum coding, each eigenstate |ψx of ρ is identified with a classical code word wx comprising Lx bits. Let Lmax denote the length of the longest code word and
where the first register on the right comprises Lmax qubits with the last Lmax−Lx qubits set to |0, and the second register comprises log Lmax qubits. (When the words wx correspond to a classical prefix code, this encoding is redundant, in that the length Lx information is already implicitly contained in the code word wx. However, the explicit length information is helpful in enabling a QSN implementations, so we keep this potentially redundant information.) After this initial encoding step, coding proceeds by “merging” code words together, e.g.,
Compression is achieved by keeping only the first N
By the law of large numbers, the error incurred in this truncation vanishes as N increases.
This scheme achieves a compression rate of
There exist classical variable-length codes, e.g., Huffman codes, for which the average code word length can be bounded to within a bit of the entropy, so the compression rate satisfies
In many situations, the entropy will dominate the compression rate, such that the log Lmax contribution will be negligible in comparison, and this coding scheme can reasonably be said to approach the Schumacher limit. The compression rate may be further improved by using a classical code which is not a prefix-free code (because the length information is already stored, the prefix-free property is not required for decoding): non-prefix codes allow for smaller Lmax such that the rate can be brought closer to the Schumacher limit.
The first step in source coding with a variable-length code is to implement the encoding operation (18). This encoding can be accomplished using QSNs, which can be used to perform parallel quantum queries to a classical data set. In the example of this section, the eigenstates |ψx are used to index a classical memory storing the classical codewords wx and their lengths Lx. Hence, operation (23) can be implemented.
Eigenstates |ψx may be erased by using the code words and their lengths to index a classical memory containing the classical bit strings ψx,
As described in Ref. 11, these operations can be performed in depth O(DG). We emphasize that this encoding operation is unitary because there is a one-to-one mapping between eigenstates and their codewords.
Once the encoding is completed, the data may be merged in order to complete the compression procedure. Our QSN implementation of this merging procedure is illustrated in →|lx
, where as before |Lx
denotes a log Lmax-qubit register prepared in state Lx, and |lx
denotes an Lmax-qubit register with the first Lx qubits in |1
and the remaining qubits in |0
. For example,
With this formatting, there are NLmax qubits, and we assign each to a node of the QSN architecture. A log (NLmax)-qubit address register is appended to each, and the states are sorted. This sort effects a permutation that would merge the code words as in Eqn. 17, and this permutation may be applied to the message by sending the message through the same sorting network with its already-initialized controls. Subsequently, an inverse sort may be performed, and the formatting is reversed to return the length information to its initial state. The merged data and length information constitute the compressed representation, while all other registers are discarded.
In the preceding description of variable-length coding, Algorithm 2 performs encoding. However, all of the quantum circuits used to implement Algorithm 2 perform unitary operations that can be operated in reverse. Therefore, it will be apparent to those trained in the art that the steps of Algorithm 2 can be performed in the reverse order to perform variable-length decoding. The present embodiments include such variable-length decoding.
In some embodiments, variable-length encoding is performed without variable-length decoding. For example, a quantum data center may be used to perform variable-length encoding on an unencoded message to obtain a variable-length-encoded message. This variable-length-encoded message may then be transmitted to a third party that performs decoding to recover the original unencoded message.
In other embodiments, variable-length decoding is performed without variable-length encoding. For example, a variable-length-encoded message may be received from a third party. Variable-length decoding may then be performed on the received message to recover the original unencoded message.
The source ρ is known in the above coding protocols. In practice, however, one may wish to compress messages generated by an unknown source ρ. A protocol that compresses messages for arbitrary, unknown ρ referred to as universal source coding, and in this section, we describe how universal source coding can be implemented with QSNs.
Universal source coding may be implemented via a two-step protocol. In the first step includes measuring message to obtain an estimate of ρ. The second step includes application of a compression scheme (like those described in the previous sections) that is tailored to the estimate of ρ. It is crucial that the measurements in the first stage be “gentle” in the sense that they should not result in significant back action that could corrupt the message. To realize such a measurement, we employ the “gentle tomography” scheme. We first summarize this scheme in the abstract, then show how it can be implemented with QSNs.
We consider a message composed of N emissions |ψx from an unknown source ρ. While we could directly measure a subset of these states to estimate ρ, this is necessarily destructive. Without knowledge of ρ's eigenbasis, measuring |ψx
will result in undesired backaction on the state. To avoid this backaction, we instead perform weak collective measurements on the entire message. These collective measurements are based on generalized excitation number measurements. Consider a measurement described by the operators
where Mk is the projector onto bitstrings with exactly k excitations. Measuring {Mk} reveals the expectation value 1|ρ|1
. Moreover, other expectation values
ϕ|ρ|ϕ
can be easily estimated using the same measurement by first applying a global unitary operation U⊗N to the message such that U|1
=|ϕ
. Unfortunately, these sorts of measurements project the message into a definite excitation number, which again constitutes unwanted backaction.
A way to avoid this unwanted backaction is to perform binned excitation number measurements, defined by measurement operators
Because the expected number of |1's in a message will be approximately normally distributed about N
{1|ρ|1
, the backaction of this binned measurement is likely to be negligible when the bin widths are larger than the standard deviation. There is thus a tradeoff between information gained about ρ and the backaction imparted to the message. The ability to perform binned excitation number measurements suffices to perform gentle tomography, which enables universal source coding.
Additional details of gentle measurement procedure 500 are as follows. Initially (step 2 in 's (six in this example) is encoded in the position of the rightmost |1
(the 6th node) in the sorted data. A binned measurement of this position is performed via a binary search (steps 4-6 in
lies in bin 1 or 2, and a subsequent measurement (m=2) of the leftmost qubit in bin 2 reveals that the rightmost |1
lies in bin 2. The data are unsorted after the measurements.
Together with the above QSN implementations of source coding (either unary-to-binary coding or variable-length coding), this QSN implementation of gentle tomography enables a QSN implementation of universal source coding.
For such protocols to be implemented in the near term, before fault-tolerant quantum computers with negligible logical error rates are available, it is crucial to understand how noise and decoherence affects the above protocols. In this section, we show that embodiments of QSN-based protocols disclosed herein are naturally resilient to certain kinds of noise, thus reducing the QEC overhead required to implement them with high fidelity. We begin first by defining an appropriate figure of merit for our schemes. Then, by analyzing how errors propagate through QSNs, we show that our protocols are resilient to noise according to this metric. More precisely, we show that the average qubit error rate due to dephasing errors scales only polylogarithmically with the message size, in contrast to the polynomial scaling that one would naively expect.
As an appropriate figure of merit for our compression schemes, we define the Qubit Error Rate (QER) as follows. Let |ψi denote the ith state emitted from the source ρ. Suppose that a message of N such states is compressed then decompressed, yielding a final N-partite state Ω. Denote the partial trace of Ω over all registers except the ith by σi. For truly lossless coding (where the message is perfectly preserved by the compression and decompression) we have σi=|ψi
ψi|. In practice, the coding may only be near-lossless, due either to errors or decoherence in the coding process, or to over-truncation of the compressed message. To quantify this information loss, we define the QER as
Intuitively this quantity quantifies the average probability that a state |ψi survives the compression and decompression processes. It is analogous to the bit error rate commonly used as a metric in classical communication. We note that, in the context of source coding, the QER is a more natural metric than the fidelity between the input and output N-state messages: a single error can reduce the latter metric to zero, even when the overwhelming majority of states are correctly transmitted. We thus focus on the QER in analysis.
In this section, we focus on how decoherence affects the QER. The natural expectation is that the QER scales as
Indeed, in the presence of a constant decoherence rate, any coding algorithms with polynomial run time (e.g., Refs. [2, 3, 5, 7, 8]) necessarily have this scaling, because the total probability that a qubit decoheres scales with the circuit (polynomial) depth. For algorithms with polylogarithmic run time (e.g., Ref. [4] and our QSN algorithms above), it is conceivable that one could have a much more favorable scaling,
By itself, however, a logarithmic-depth coding scheme is not sufficient to guarantee such a scaling. In fact, during the course of a generic quantum algorithm, all N qubits involved are liable to be entangled, such that even a single error can propagate widely and quickly degrade the quality of the output state. Therefore, even for polylogarithmic depth coding schemes one would still typically expect the QER to scale polynomially. Below, we show that the propagation of certain kinds of errors through QSNs can be highly constrained such that our protocols achieve a favorable polylogarithmic scaling QER with respect to these errors. The task of using error correction suppress the remaining errors can then be far more resource efficient.
To show that our QSN-based protocols are noise resilient in the above sense, we analyze how bit-flip and phase-flip errors propagate through quantum comparators. From these observations, we can deduce how errors propagate through QSNs and our coding schemes.
The propagation of X and Z errors through quantum comparators is shown in
We distinguish errors according to whether they occur in the data (the states which are compared) or the control (the ancilla that records the result of the comparison and swaps the states accordingly). It suffices to consider only the propagation of errors from the data, since ancilla errors can only propagate to the rest of the circuit by first propagating to the data. As shown in panel (a), X errors in the data propagate in an unconstrained manner, corrupting other data registers. As shown in panel (b), however, Z errors in the data are constrained in their propagation: an initial Z error in the data does not propagate to additional Z errors in the other data or in the control, and the total number of Z errors is unchanged.
Taken together, these two observations imply that the propagation of Z errors in QSNs is constrained, as illustrated in panels (d) and (e) of
In the context of source coding, it directly follows that the average probability of seeing a Z error in the final state σi, and hence the contribution to the QER from Z errors, scales as O(DG). For logarithmic-depth sorting networks, this yields a polylogarithmic scaling for the QER. Therefore, our QSN based source coding protocols are intrinsically resilient to Z errors.
Unfortunately, QSNs are not resilient to X errors. A generic X error can propagate to O(N) other qubits, such that the QER due these errors scale polynomially with N. (Note that X errors can potentially propagate to linear combinations of X and Z errors.) Accordingly, to achieve a low QER, quantum error correction needs to be employed to suppress the X error rate. Provided the gates in the QSN is implemented fault tolerantly at the logical level, i.e., in a way that preserves the respective X and Z distances of the code, the total QER should then scale as
where ∈X(L) and ∈Z(L) are the X and Z logical error rates. That is, fault tolerance guarantees that the resilience to Z errors persists at the logical level. As a result, the QEC hardware overhead can be reduced by choosing code that predominantly corrects X errors—such as a repetition code or thin strip surface code—in order to suppress the dominant term in the QER. Constructing logical qubits out of physical qubits with strongly biased noise provides another means to reduce the QEC overhead.
Changes may be made in the above methods and systems without departing from the scope of the present embodiments. It should thus be noted that the matter contained in the above description or shown in the accompanying drawings should be interpreted as illustrative and not in a limiting sense. Herein, and unless otherwise indicated, the phrase “in embodiments” is equivalent to the phrase “in certain embodiments,” and does not refer to all embodiments. The following claims are intended to cover all generic and specific features described herein, as well as all statements of the scope of the present method and system, which, as a matter of language, might be said to fall therebetween.
This application claims priority to U.S. Provisional Patent Application No. 63/235,265, filed on Aug. 20, 2021, the entirety of which is incorporated herein by reference.
This invention was made with government support under grant numbers W911NF-16-1-0349, W911NF-18-1-0020, and W911NF-18-1-0212 awarded by the Army Research Office, grant numbers EFMA1640959, OMA1936118, and EEC1941583 awarded by the National Science Foundation, and grant numbers FA9550-19-1-0399 and FA9550-21-1-0209 awarded by the Air Force Office of Scientific Research. The government has certain rights in the invention.
Filing Document | Filing Date | Country | Kind |
---|---|---|---|
PCT/US2022/040936 | 8/19/2022 | WO |
Number | Date | Country | |
---|---|---|---|
63235265 | Aug 2021 | US |