Patent Publication Number: US-2022230087-A1

Title: Estimating the fidelity of quantum logic gates and quantum circuits

Description:
BACKGROUND 
     This specification relates to quantum computing. 
     Quantum computing uses quantum-mechanical phenomena such as superposition and entanglement to perform computations. A quantum circuit is one example model for quantum computation in which a computation is a sequence of quantum logic gates, which are reversible transformations on a quantum mechanical analog of an n-bit register. 
     SUMMARY 
     This specification describes techniques for estimating the fidelity of quantum logic gates and quantum circuits. 
     In general, one innovative aspect of the subject matter described in this specification can be implemented in a method for estimating the fidelity of an n-qubit quantum logic gate, the method comprising: defining multiple sets of random quantum circuits, wherein the multiple sets of random quantum circuits correspond to different respective depths and each set in the multiple sets of random quantum circuits comprises random quantum circuits with a same circuit depth d, wherein defining the multiple sets of random quantum circuits comprises, for each set of random quantum circuits: defining one or more elements of the set of random quantum circuits, comprising, for each element: randomly sampling d*n single qubit gates from a predefined set of single qubit gates, wherein each single qubit gate operates on a respective qubit at a respective cycle; and defining the element of the set of random quantum circuits as equal to d cycles of n randomly sampled single qubit gates followed by the n-qubit quantum logic gate; for each set of random quantum circuits: selecting an observable for each element in the set of random quantum circuits, wherein each selected observable corresponds to a respective element of the set of random quantum circuits and is dependent on the element to which it corresponds; and estimating a value of a polarization parameter for the set of random quantum circuits, comprising performing a least mean squares minimization based on multiple expectation values, wherein each expectation value comprises an expectation value of a respective selected observable with respect to an output of an experimental implementation of a random quantum circuit corresponding to the respective selected observable; and processing the estimated polarization parameter values to obtain an estimate of the fidelity of the n-qubit quantum logic gate. 
     Other implementations of this aspect include corresponding classical and quantum computer systems, apparatus, and computer programs recorded on one or more computer storage devices, each configured to perform the actions of the methods. A system of one or more computers can be configured to perform particular operations or actions by virtue of having software, firmware, hardware, or a combination thereof installed on the system that in operation causes or cause the system to perform the actions. One or more computer programs can be configured to perform particular operations or actions by virtue of including instructions that, when executed by data processing apparatus, cause the apparatus to perform the actions. 
     The foregoing and other implementations can each optionally include one or more of the following features, alone or in combination. In some implementations estimating a value of a polarization parameter for the set of random quantum circuits further comprises determining the multiple expectation values, comprising, for each expectation value: defining the expectation value of the respective selected observable with respect to an output of an experimental implementation of a random quantum circuit corresponding to the respective selected observable as i) a trace of the respective selected observable divided by the size of Hilbert space, added to ii) a polarization of the random quantum circuit multiplied by a difference between an expectation value of the respective selected observable with respect to an ideal output state of the random quantum circuit and the trace of the respective selected observable divided by the size of Hilbert space; estimating values of i) the expectation value of the respective selected observable with respect to an ideal output state of the random quantum circuit, and ii) the trace of the respective selected observable divided by the size of Hilbert space, numerically; and estimating a value of the expectation value of the respective selected observable with respect to an output of an experimental implementation of the random quantum circuit experimentally. 
     In some implementations estimating a value of the expectation value of the respective selected observable with respect to an output of an experimental implementation of the random quantum circuit experimentally comprises: repeatedly: preparing a quantum system in an initial state; applying the random quantum circuit to the quantum system prepared in the initial state to generate an evolved state of the quantum system; and measuring the respective selected observable with respect to the evolved state of the quantum system; and averaging the measured selected observables to estimate the value of the expectation value of the respective selected observable with respect to an output of an experimental implementation of the random quantum circuit. 
     In some implementations performing the least squares minimization comprises: minimizing a sum of squared residuals, each squared residual corresponding to a respective element in the set of random quantum circuits, and each squared residual comprising a square of i) a trace of the respective selected observable divided by the size of Hilbert space, added to ii) the value of the polarization parameter for the set of the random quantum circuits multiplied by a difference between an expectation value of the respective selected observable with respect to an ideal output state of the random quantum circuit and the trace of the respective selected observable divided by the size of Hilbert space, minus iii) the expectation value of the respective selected observable with respect to an output of an experimental implementation of the random quantum circuit corresponding to the respective selected observable. 
     In some implementations processing the estimated polarization parameter values to obtain an estimate of the fidelity of the n-qubit quantum logic gate comprises: fitting the estimated polarization parameter values corresponding to each circuit depth d as an exponential decay in d; determining an estimated polarization per cycle p n  for the n-qubit quantum logic gate based on the exponential decay in d and an obtained estimate of polarization for a single qubit gate in a quantum circuit that operates on n qubits; and determining an estimate of the fidelity of the n-qubit quantum logic gate using F=p n +(1−p n )/D, where D=2 n  represents the Hilbert space dimension. 
     In some implementations the n-qubit quantum logic gate operates on at most 5 qubits. 
     In some implementations the selected observables are diagonal in the computational basis. 
     In some implementations the selected observables comprises a cross entropy benchmarking observable, a linear cross entropy observable, or a heavy output generation score observable. 
     In some implementations the method further comprises determining one or more properties of quantum hardware implementing the n-qubit quantum logic gate using the estimate of the fidelity of the n-qubit quantum logic gate. 
     In some implementations the method further comprises determining one or more adjustments to quantum hardware control parameters based on the determined estimate of the fidelity; and implementing the determined one or more adjustments to perform quantum computations using quantum computing hardware. 
     In some implementations the method further comprises calculating a distribution of a random variable associated with the selected observables; and performing one or more statistical tests using the calculated distribution of the random variable to obtain additional information about the n-qubit quantum logic gate. 
     In some implementations performing one or more statistical tests using the calculated distribution of the random variable to obtain additional information about the n-qubit quantum logic gate comprises performing a Kolmogorov-Smirnov test to validate the estimated fidelity of the n-qubit quantum logic gate. 
     In general, another innovative aspect of the subject matter described in this specification can be implemented in a method for estimating the fidelity of a quantum circuit, the method comprising: defining one or more random quantum circuits, wherein each of the one or more random quantum circuits has a same circuit depth d and operates on a same number of qubits n, wherein defining a random quantum circuit comprises: randomly sampling d*n single qubit gates from a predefined set of single qubit gates, wherein each single qubit gate operates on a respective qubit; and defining the random quantum circuit as equal to d cycles of n randomly sampled single qubit gates followed by multiple multi-qubit quantum logic gates acting on different qubits; selecting, for each defined random quantum circuit, an observable for the random quantum circuit, wherein i) the selected observable is dependent on the random quantum circuit, and ii) an expectation value of the selected observable with respect to a density matrix representing an effect of errors in an experimental implementation of the random quantum circuit obeys a concentration of measure about an expectation value of the selected observable; and determining, for each defined random quantum circuit, an estimate of the fidelity of the random quantum circuit, comprising, for each random quantum circuit, estimating an expectation value of the respective selected observable with respect to an output of an experimental implementation of the random quantum circuit. 
     Other implementations of this aspect include corresponding classical and quantum computer systems, apparatus, and computer programs recorded on one or more computer storage devices, each configured to perform the actions of the methods. A system of one or more computers can be configured to perform particular operations or actions by virtue of having software, firmware, hardware, or a combination thereof installed on the system that in operation causes or cause the system to perform the actions. One or more computer programs can be configured to perform particular operations or actions by virtue of including instructions that, when executed by data processing apparatus, cause the apparatus to perform the actions. 
     The foregoing and other implementations can each optionally include one or more of the following features, alone or in combination. In some implementations estimating an expectation value of the selected observable with respect to an output of an experimental implementation of a random quantum circuit comprises: approximating the expectation value of the selected observable with respect to an output of an experimental implementation of the random quantum circuit as a sum of a trace of the selected observable divided by Hilbert space size added to the fidelity of the quantum circuit multiplied by a difference between i) an expectation value of the selected observable with respect to an ideal output state of the quantum circuit and the a trace of the selected observable divided by Hilbert space size; estimating a value of the expectation value of the selected observable with respect to an output of an experimental implementation of the random quantum circuit experimentally; estimating values of i) the expectation value of the selected observable with respect to an ideal output state of the random quantum circuit, and ii) the trace of the respective selected observable, numerically or analytically. 
     In some implementations estimating a value of the expectation value of the selected observable with respect to an output of an experimental implementation of the random quantum circuit experimentally comprises: repeatedly: preparing a quantum system in an initial state; applying the random quantum circuit to the quantum system prepared in the initial state to generate an evolved state of the quantum system; and measuring the respective selected observable with respect to the evolved state of the quantum system; and averaging the measured selected observables to estimate the value of the expectation value of the selected observable with respect to an output of an experimental implementation of the random quantum circuit. 
     In some implementations the method comprises analytically estimating values of i) the expectation value of the selected observable with respect to an ideal output state of the random quantum circuit, and ii) the trace of the respective selected observable, and wherein the output of the experimental implementation of the random quantum circuit is approximated by a Porter-Thomas distribution. 
     In some implementations the method further comprises determining an average of the determined estimates of fidelity for each random quantum circuit to obtain an average estimate of circuit fidelity at the circuit depth d and number of qubits n. 
     In some implementations the quantum circuit operates on 10 or more qubits. 
     In some implementations the selected observables are diagonal in the computational basis. 
     In some implementations the selected observables comprises a cross entropy benchmarking observable, a linear cross entropy observable, or a heavy output generation score observable. 
     In some implementations the method further comprises determining one or more properties of quantum hardware implementing the quantum circuit using the determined estimates of the fidelity or the average estimate of circuit fidelity. 
     In some implementations the method further comprises determining one or more adjustments to quantum hardware control parameters based on the determined estimates of fidelity; and implementing the determined one or more adjustments to perform quantum computations using quantum computing hardware. 
     In some implementations the method further comprises calculating a distribution of a random variable associated with the selected observables; and performing one or more statistical tests using the calculated distribution of the random variable to obtain additional information about the quantum circuit. 
     In some implementations performing one or more statistical tests using the calculated distribution of the random variable to obtain additional information about the quantum circuit comprises performing a Kolmogorov-Smirnov test to validate the estimated fidelity of the quantum circuit. 
     The subject matter described in this specification can be implemented in particular ways so as to realize one or more of the following advantages. 
     The presently described techniques for estimating the fidelity of a quantum circuit can be applied to a wider range of quantum circuits and numbers of qubits compared to known techniques. For example, the presently described techniques do not have to assume that the quantum circuits approximate the Porter-Thomas distribution. In addition, the presently described techniques are not restricted to particular observables, e.g., cross entropy observables, but can be applied in conjunction with different observables that can provide more accurate estimates of fidelity for a particular quantum circuit. In addition, the presently described techniques are applicable to any quantum logic gates and is not restricted to Clifford gates. In addition, the presently described techniques provide increased scalability, e.g., to 40 qubits or beyond. 
     The presently described techniques can be applied to improve quantum computing hardware. For example, circuit fidelities can be used to calibrate or validate quantum computing hardware, or to determine adjustments that may improve the accuracy or efficiency of existing quantum computing hardware. Since circuit fidelities estimated using the techniques described in this specification can be more accurate and more tailored to a particular quantum circuit and/or quantum computing hardware, adjustments determined using the estimated circuit fidelities may be more effective. In addition, high fidelity gates are critical for quantum computers. High fidelity gates require high precision control, and the presently described techniques can be used to improve the precision of the control. In addition, high fidelity gates are critical for quantum computers. High fidelity gates require high precision control, and the presently described techniques can be used to improve the precision of the control. 
     Details of one or more implementations of the subject matter of this specification are set forth in the accompanying drawings and the description below. Other features, aspects, and advantages of the subject matter will become apparent from the description, the drawings, and the claims. 
    
    
     
       BRIEF DESCRIPTION OF THE DRAWINGS 
         FIG. 1  depicts an example system for benchmarking quantum computing hardware. 
         FIG. 2  is a flow diagram of a first example process for estimating the fidelity of a quantum logic gate. 
         FIG. 3  is a flow diagram of a second example process for estimating the fidelity of a quantum circuit. 
         FIG. 4  is a flow diagram of an example process for determining properties of a quantum circuit. 
     
    
    
     DETAILED DESCRIPTION 
     Overview 
     A quantum circuit is a model for quantum computation in which quantum logic gates are applied in a specific sequence to a register of qubits to encode quantum information. In theory, any quantum algorithm can be implemented with high precision by applying a correctly chosen sequence of quantum logic gates. However, in practice quantum logic gates are error prone—instead of implementing a unitary quantum operation representing an ideal quantum logic gate, a corresponding noisy quantum operation is implemented. 
     Quantum logic gate fidelity is a measure of how close a noisy quantum operation ε is to an ideal unitary quantum operation  . The quantum logic gate fidelity between ε and   for a given quantum state ρ may be given by 
     
       
         
           
             
               
                 ℱ 
                 
                   E 
                   ⁢ 
                   ′ 
                   ⁢ 
                   t 
                   ⁢ 
                   4 
                 
               
               ⁡ 
               
                 ( 
                 ρ 
                 ) 
               
             
             = 
             
               
                 
                   ( 
                   
                     t 
                     ⁢ 
                     
                       r 
                       ⁡ 
                       
                         ( 
                         
                           
                             
                               
                                 ℰ 
                                 ⁡ 
                                 
                                   ( 
                                   ρ 
                                   ) 
                                 
                               
                             
                             ⁢ 
                             
                               𝒰 
                               ⁡ 
                               
                                 ( 
                                 ρ 
                                 ) 
                               
                             
                             ⁢ 
                             
                               
                                 ℰ 
                                 ⁡ 
                                 
                                   ( 
                                   ρ 
                                   ) 
                                 
                               
                             
                           
                         
                         ) 
                       
                     
                   
                   ) 
                 
                 2 
               
               . 
             
           
         
       
     
     Estimating quantum logic gate fidelity is an important procedure for adjusting or correcting quantum hardware that physically realizes quantum logic gates and, in turn, is an important procedure for performing successful quantum computations. This specification describes generalized techniques for obtaining statistical fidelity estimators that do not necessarily assume a Porter-Thomas distribution and do not constrain to one type of observable. 
     Example Hardware 
       FIG. 1  depicts an example system  100  for benchmarking quantum computing hardware. The example system  100  is an example of a system implemented as classical and quantum computer programs on one or more classical and quantum computers in one or more locations, in which the systems, components, and techniques described below can be implemented. 
     The system  100  includes a classical processor  102  in data communication with quantum computing hardware  104 . For convenience, the classical processor  102  and quantum computing hardware  104  are illustrated as separate entities. However, in some implementations the classical processor  102  can be included in quantum computing hardware  104 , e.g., the quantum computing hardware  104  can include one or more components for performing classical computing operations. 
     The quantum computing hardware  104  includes components for performing quantum computations using quantum circuits. For example, the quantum computing hardware  104  includes a quantum system  120  and control devices  122 . The quantum system  120  includes one or more multi-level quantum subsystems, e.g., qubits, that are used to perform algorithmic operations or quantum computations. The specific realization of the multi-level quantum subsystems that the quantum computing hardware  104  includes and how they interact with one another is dependent on a variety of factors including the type of quantum computations that the quantum computing hardware is performing. For example, the multi-level quantum subsystems may include qubits that are realized via atomic, molecular or solid-state quantum systems. In other examples the qubits may include, but are not limited to, superconducting qubits or semi-conducting qubits. 
     The multi-level quantum subsystems can be frequency tunable. For example, each qubit may have associated operating frequencies that can be adjusted, e.g., using one or more control devices  122 , through application of voltage pulses via one or more drivelines coupled to the qubit. Example operating frequencies include qubit idling frequencies, qubit interaction frequencies, and qubit readout frequencies. Different frequencies correspond to different operations that the qubit can perform. For example, setting the operating frequency to a corresponding idling frequency may put the qubit into a state where it does not strongly interact with other qubits, and where it may be used to perform single-qubit gates. As another example, in cases where qubits interact via couplers with fixed coupling, qubits can be configured to interact with one another by setting their respective operating frequencies at some gate-dependent frequency detuning from their common interaction frequency. In other cases, e.g., when the qubits interact via tunable couplers, qubits can be configured to interact with one another by setting the parameters of their respective couplers to enable interactions between the qubits and then by setting the qubit&#39;s respective operating frequencies at some gate-dependent frequency detuning from their common interaction frequency. Such interactions may be performed in order to perform two-qubit or many-qubit gates. 
     The control devices  122  can further include measurement devices, e.g., readout resonators. Measurement results obtained via measurement devices may be provided to classical processors included in the quantum computing hardware  104  or to the classical processor  102  for processing and analyzing. 
     The classical processor  102  receives as input data  106  representing a quantum logic gate or quantum circuit to be benchmarked. For example, the input data  106  may include data representing an n-qubit quantum logic gate that the quantum computing hardware  104  is configured to implement. The input data  106  may also specify a type of observable to use when benchmarking the quantum logic gate or quantum circuit. Example observables are described in detail below with reference to  FIGS. 2 and 3 . 
     The classical processor  102  processes the received input data  106  to generate as output data  108  representing benchmarking results, e.g., properties of implementations of the quantum logic gate or quantum circuit. For example, the output data  108  may include data representing an estimated fidelity of an implementation of the n-qubit quantum logic gate. 
     The classical processor  102  includes multiple components for processing received input data. For example, the classical processor  102  can include a random quantum circuit generator  110 , fidelity estimation module  112 , and a post processing module  114 . 
     The random quantum circuit generator  110  can be configured to define multiple random quantum circuits. The multiple random quantum circuits can include sets of random quantum circuits that correspond to different respective circuit depths and that include random quantum circuits with a same circuit depth d. 
     To define a random quantum circuit of depth d, the random quantum circuit generator  110  is configured to randomly sample single qubit gates from a predefined set of single qubit gates, e.g., a set of single qubit gates that can be implemented by quantum hardware  120 . For example, the predefined set of single qubit gates may include quantum gates representing π/2 rotations around the axes located in the (x, y) plane whose orientations are sampled uniformly at random, and d phase quantum gates representing a non-Clifford diagonal matrix {0, e if } with f randomly sampled from the interval (0, 2π). Other sets of single qubit gates can also be used, as long as they are sufficiently random such that the depolarizing channel model can be used to model the effect of noise in the defined random quantum circuits. 
     The random quantum circuit generator  110  then defines a random quantum circuit as being equal to d cycles of randomly sampled single qubit gates followed by the quantum logic gate or circuit that is being benchmarked, e.g., each cycle includes respective randomly sampled single qubit gates followed by the quantum logic gate that is being benchmarked. The classical processor  102  can also define an observable corresponding to each defined random quantum circuit, e.g., based on the type of observable specified by the input data  106 . 
     The classical processor  102  can be configured to transmit data  116  representing defined random quantum circuits and observables to the quantum computing hardware  104 . The quantum computing hardware  104  is configured to implement defined random quantum circuits on the quantum system  120  using the control devices  122 , as described above, and provide as output data representing results of the circuit implementations, e.g., data  124  representing measured values of the observables. 
     The fidelity estimation module  112  can be configured to estimate a value of a fidelity parameter for the random quantum circuits generated by the random quantum circuit generator  110  and implemented by the quantum computing hardware  104 . For example, the fidelity estimation module  112  can be configured to perform the numerical simulations, least mean squares minimization routines, and other classical computations described below with reference to  FIGS. 2-4 . 
     The post processing module  114  can be configured to process estimated fidelity parameter values generated by the fidelity estimation module  112  based on random quantum circuits generated by the random quantum circuit generator  110  to obtain an estimate of a fidelity of a specific component of the random quantum circuits, e.g., a specific quantum logic gate specified by the input data  106 . The post processing module  114  may generate as output data representing a fidelity estimation of the component of the random quantum circuits, e.g., output data  108 . 
     In addition, in some implementations the post processing module  114  can be configured to process or analyze estimated fidelity parameter values to determine properties of the quantum computing hardware  104 , e.g., its performance, or to calibrate, validate or benchmark the quantum computing hardware  104 . The post processing module  114  can also be configured to perform additional statistical tests to obtain additional information about the quantum computing hardware, e.g., the variance of quantum circuit fidelity. An example process for performing additional statistical tests to obtain such information is described below with reference to  FIG. 4 . 
     In some implementations the post processing module  114  may further generate as output data representing one or more adjustments  126  that may be used to adjust and improve the quantum computing hardware  104 . For example, the post processing module  114  may use the estimated fidelity parameter values to determine adjustments to how the quantum computing hardware is controlled when implementing a particular quantum circuit or type of quantum circuits, e.g., determine modifications to the programming of the control devices  122  to achieve higher fidelity quantum gates. A parametrized control model may be used to determine the modifications, where the parameterized control model relates parameters of the quantum gates (e.g. phases, qubit rotation angles etc.) to physical parameters of the system/systems used to implement/control the quantum gate (e.g. voltages, pulse shapes, frequencies etc.) An outer loop may then be performed to find optimal experimental controls to improve the performance of the quantum computing hardware  104 . 
     Programming the Hardware 
       FIG. 2  is a flow diagram of a first example process  200  for estimating the fidelity of a n-qubit quantum logic gate G n . Example process  200  can be applied to determine the fidelity of a quantum logic gate G n  that operates on an arbitrary number of qubits, e.g., for any n≥1, however it is particularly suitable for estimating the fidelity of quantum logic gates G n  that operate on a small number of qubits, e.g., n&lt;5. For convenience, the process  200  will be described as being performed by a system of one or more classical and quantum computing devices located in one or more locations. For example, the system  100  of  FIG. 1 , appropriately programmed in accordance with this specification, can perform the process  200 . 
     Operating a single multi-qubit gate in isolation is different from operating it in the context of a complex algorithm on a large device, since non-idealities such as crosstalk and unwanted interactions affect the implementations of the multi-qubit gate. Therefore, to estimate the fidelity of the quantum logic gate G n , the gate is embedded into quantum circuits that include multiple quantum logic gates. The fidelity of each of the quantum circuits is then estimated, and the fidelity of the individual gate G n  can be extracted from the estimated circuit fidelities. 
     The quantum circuits that the gate G n  is embedded into take the same form: each quantum circuit includes one or more single-qubit gates chosen from a random set and the quantum logic gate G n . For example, the quantum circuits may each include one or more cycles of n randomly sampled single qubit gates, e.g., one per qubit, followed by the quantum logic gate G n . The depth of the quantum circuit is equal to the number of cycles. For example, a quantum circuit with depth d=2 may include two cycles, where each cycle includes n randomly sampled single qubit gates that each operate on a respective qubit followed by the quantum logic gate G n . Due to the random sampling of single qubit gates, a quantum circuit of this form is herein referred to as a random quantum circuit. 
     The system defines multiple sets of random quantum circuits (step  202 ). The multiple sets of random quantum circuits correspond to different respective depths and each set in the multiple sets of random quantum circuits comprises random quantum circuits with a same circuit depth d. To define a set of random quantum circuits with circuit depth d, the system defines elements of the set of random quantum circuits, i.e., random quantum circuits to be included in the set. Defining an element of a set of random quantum circuits with circuit depth d includes randomly sampling d*n single qubit gates from a predefined set of single qubit gates, wherein each single qubit gate operates on a respective qubit of the n qubits, and defining the element of the set of random quantum circuits as equal to d cycles of n randomly sampled single qubit gates followed by the n-qubit quantum logic gate. 
     The effect of noise in a random quantum circuit with depth d=1 can be represented by the depolarizing channel given below in Equation (1). 
     
       
         
           
             
               
                 
                   
                     
                       Λ 
                       p 
                     
                     ⁡ 
                     
                       ( 
                       ρ 
                       ) 
                     
                   
                   = 
                   
                     
                       p 
                       ⁢ 
                       
                           
                       
                       ⁢ 
                       ρ 
                     
                     + 
                     
                       
                         ( 
                         
                           1 
                           - 
                           p 
                         
                         ) 
                       
                       ⁢ 
                       
                         𝕀 
                         
                           2 
                           n 
                         
                       
                     
                   
                 
               
               
                 
                   ( 
                   1 
                   ) 
                 
               
             
           
         
       
     
     In Equation (1), ρ represents the state of the n qubits,   represents an identity matrix, and p represents the random circuit polarization and includes the fidelities from the quantum logic gate G n  and the single qubit gates included in the random circuit. The system estimates the parameter p using data taken from multiple sets of random circuits. Each set includes random circuits with a same circuit depth d, and the multiple sets of random circuits correspond to different respective depths, e.g., approximately 100 different depths between 10 and 700. 
     The effect of noise in an instance of a random circuit with depth d&gt;1 and parameter p (corresponding to a random circuit with depth d=1) can be represented by the depolarizing channel given below in Equation (2). 
     
       
         
           
             
               
                 
                   
                     
                       Λ 
                       p 
                     
                     ⁡ 
                     
                       ( 
                       ρ 
                       ) 
                     
                   
                   = 
                   
                     
                       
                         p 
                         d 
                       
                       ⁢ 
                       ρ 
                     
                     + 
                     
                       
                         ( 
                         
                           1 
                           - 
                           
                             p 
                             d 
                           
                         
                         ) 
                       
                       ⁢ 
                       
                         𝕀 
                         
                           2 
                           n 
                         
                       
                     
                   
                 
               
               
                 
                   ( 
                   2 
                   ) 
                 
               
             
           
         
       
     
     In Equation (2), ρ represents the state of the n qubits and p d  represents the random circuit. The system estimates the parameter p d  from a set of experimental realizations of random circuits of depth d, as described in more detail below with reference to step  206 . 
     The system selects an observable O (step  204 ). The selected observable is an observable that depends on a particular instance of a random quantum circuit U, that is, O=O U . In some implementations the selected observable O U  can be chosen to be diagonal in the computational basis, e.g., to simplify obtaining an experimental estimation of an expectation value of the observable O U  with respect to the output of an experimental noisy implementation of the random circuit. 
     For example, in some implementations the system may select a linear cross entropy observable. The linear cross entropy observable is given by Equation (3) below. 
     
       
         
           
             
               
                 
                   
                     O 
                     U 
                     L 
                   
                   = 
                   
                     
                       ∑ 
                       z 
                     
                     ⁢ 
                     
                       N 
                       ⁢ 
                       
                           
                       
                       ⁢ 
                       
                         
                           p 
                           U 
                         
                         ⁡ 
                         
                           ( 
                           z 
                           ) 
                         
                       
                       ⁢ 
                       
                          
                         z 
                         〉 
                       
                       ⁢ 
                       
                         〈 
                         z 
                          
                       
                     
                   
                 
               
               
                 
                   ( 
                   3 
                   ) 
                 
               
             
           
         
       
     
     In Equation (3), N=2 n , p U (z) represents a probability that circuit U outputs a particular bit string z and |z  represents an output state corresponding to the particular bit string z. 
     As another example, in some implementations the system may select a heavy output generation score observable. The heavy output generation score observable is given by Equation (4) below. 
     
       
         
           
             
               
                 
                   
                     O 
                     U 
                     H 
                   
                   = 
                   
                     
                       ∑ 
                       z 
                     
                     ⁢ 
                     
                       1 
                       
                         
                           N 
                           ⁢ 
                           
                               
                           
                           ⁢ 
                           
                             
                               p 
                               U 
                             
                             ⁡ 
                             
                               ( 
                               z 
                               ) 
                             
                           
                         
                         ≥ 
                         
                           
                             log 
                             2 
                           
                           ⁢ 
                           
                              
                             z 
                             〉 
                           
                           ⁢ 
                           
                             〈 
                             z 
                              
                           
                         
                       
                     
                   
                 
               
               
                 
                   ( 
                   4 
                   ) 
                 
               
             
           
         
       
     
     In Equation (4), 1 Np     U     (z)≥log 2  is equal to 1 if Np U (z)≥log 2 and is otherwise equal to 0, and |z  represents an output state corresponding to the particular bit string z. 
     Since the selected observable depends on a particular instance of a random quantum circuit (e.g., a respective random sampling of single qubit gates and circuit depth), the system defines a respective observable for each element in each set of random quantum circuits. 
     The expectation value of an observable O U  with respect to the output ρ U  of an experimental noisy implementation of the random quantum circuit U can be given by Equation (5) below. 
     
       
         
           
             
               
                 
                   
                     
                       
                         
                           Tr 
                           ⁢ 
                           
                               
                           
                           ⁢ 
                           
                             ρ 
                             U 
                           
                           ⁢ 
                           
                             O 
                             U 
                           
                         
                         = 
                           
                         ⁢ 
                         
                           R 
                           U 
                         
                       
                     
                   
                   
                     
                       
                         = 
                           
                         ⁢ 
                         
                           
                             
                               p 
                               d 
                             
                             ⁢ 
                             
                               〈 
                               ψ 
                                
                             
                             ⁢ 
                             
                               O 
                               U 
                             
                             ⁢ 
                             
                                
                               
                                 ψ 
                                 U 
                               
                               〉 
                             
                           
                           + 
                           
                             
                               ( 
                               
                                 1 
                                 - 
                                 
                                   p 
                                   d 
                                 
                               
                               ) 
                             
                             ⁢ 
                             Tr 
                             ⁢ 
                             
                                 
                             
                             ⁢ 
                             
                               
                                 O 
                                 U 
                               
                               / 
                               
                                 2 
                                 N 
                               
                             
                           
                         
                       
                     
                   
                   
                     
                       
                         = 
                           
                         ⁢ 
                         
                           
                             
                               p 
                               d 
                             
                             ⁡ 
                             
                               ( 
                               
                                 
                                   V 
                                   U 
                                 
                                 - 
                                 
                                   N 
                                   U 
                                 
                               
                               ) 
                             
                           
                           + 
                           
                             N 
                             U 
                           
                         
                       
                     
                   
                 
               
               
                 
                   ( 
                   5 
                   ) 
                 
               
             
           
         
       
     
     In Equation (5), |ψ U    represents the state of the qubits after the random quantum circuit U is applied to an initial state of qubits, e.g., |ψ U   =U|ψ 0   , V U = ψ U |O U |ψ U   , R U =Trρ U O U , and N U =TrO U /2 n . 
     The system estimates a value of the polarization parameter p d  for each set of random quantum circuits (e.g., for each depth d) (step  206 ). The system estimates a value of the polarization parameter p d  for a respective set of random quantum circuits by performing a least mean squares minimization based on Equation (5). First, the system determines values of V U , N U  and R U  in Equation (5) for respective random quantum circuits U in the set of random quantum circuits. The system can determine values of V U  and N U  numerically, e.g., via V U =Σ z p U (z) z|O U |z  and N U =Σ z (z|O U |z /N, and a value for R U  experimentally. 
     The system can estimate R U =α(V U −N U )+N U  in Equation (5) experimentally by performing multiple measurements of the selected observable O U  to determine an estimate {circumflex over (R)} U . This can include repeatedly preparing a quantum system (register of qubits) in an initial state, applying the random circuit U to the quantum system prepared in the initial state to generate an evolved state of the quantum system, and measuring the observable with respect to the evolved state of the quantum system to obtain multiple measurement results that can be used to determine the estimate {circumflex over (R)} U , e.g., through averaging of the multiple measurement results. 
     For example, the action of a selected observable O U =Σ z O U (z)|z   z| maps each bit string or measurement outcome z to a real value O U (z). Each value O U (z) depends on the random circuit U, and the calculation of experimental values {O U (z j )} requires classical simulations of U, e.g., for a linear cross entropy observable Np U (z) where p U (z)=| z|U|O   2  if the initial state is |O , calculating the value p U (z j )=| z j |U|O | 2  for a specific bit string z j  measured in an experiment requires a simulation of U. For a set of M measurement results {z j } the estimate {circumflex over (R)} U  of R U  can be given by Equation (6) below, 
     
       
         
           
             
               
                 
                   
                     
                       R 
                       ^ 
                     
                     U 
                   
                   = 
                   
                     
                       1 
                       M 
                     
                     ⁢ 
                     
                       
                         ∑ 
                         
                           z 
                           j 
                         
                       
                       ⁢ 
                       
                         
                           O 
                           U 
                         
                         ⁡ 
                         
                           ( 
                           
                             z 
                             j 
                           
                           ) 
                         
                       
                     
                   
                 
               
               
                 
                   ( 
                   6 
                   ) 
                 
               
             
           
         
       
     
     which in turn gives Equation (7) below. 
     
       
         
           
             
               
                 
                   
                     R 
                     U 
                   
                   = 
                   
                     
                       
                         R 
                         ^ 
                       
                       U 
                     
                     + 
                     
                       O 
                       ⁡ 
                       
                         ( 
                         
                           1 
                           
                             M 
                           
                         
                         ) 
                       
                     
                   
                 
               
               
                 
                   ( 
                   7 
                   ) 
                 
               
             
           
         
       
     
     To obtain an estimate of the polarization parameter p d  for a respective set of random quantum circuits, the system performs the least mean squares minimization by minimizing a sum (over random circuits) of squared residuals, wherein each residual is given by setting Equation (5) equal to zero, i.e., each residual is given by p d (V U −N U )−({circumflex over (R)} U −N U ) (in words, each residual is given by i) the polarization parameter p d  for the respective set of random quantum circuits multiplied by the difference between V U  (the expectation value of the respective selected observable with respect to an ideal output state of the random quantum circuit) and N U  (the trace of the respective selected observable divided by the size of Hilbert space), and ii) the difference between {circumflex over (R)} U  (the estimated expectation value of an observable O U  with respect to the output ρ U  of an experimental noisy implementation of the random quantum circuit) and N U  (the trace of the respective selected observable divided by the size of Hilbert space)). That is, the system determines a minimum of 
     
       
         
           
             
               
                 
                   
                     LMS 
                     ⁡ 
                     
                       ( 
                       
                         p 
                         d 
                       
                       ) 
                     
                   
                   = 
                     
                   ⁢ 
                   
                     
                       1 
                       2 
                     
                     ⁢ 
                     
                       
                         ∑ 
                         
                           { 
                           U 
                           } 
                         
                       
                       ⁢ 
                       
                         
                           ( 
                           
                             
                               
                                 p 
                                 d 
                               
                               ⁡ 
                               
                                 ( 
                                 
                                   
                                     V 
                                     U 
                                   
                                   - 
                                   
                                     N 
                                     U 
                                   
                                 
                                 ) 
                               
                             
                             - 
                             
                               ( 
                               
                                 
                                   
                                     R 
                                     ^ 
                                   
                                   U 
                                 
                                 - 
                                 
                                   N 
                                   U 
                                 
                               
                               ) 
                             
                           
                           ) 
                         
                         2 
                       
                     
                   
                 
               
             
             
               
                 
                   = 
                     
                   ⁢ 
                   
                     
                       1 
                       2 
                     
                     ⁢ 
                     
                       
                         ∑ 
                         
                           { 
                           U 
                           } 
                         
                       
                       ⁢ 
                       
                         
                           ( 
                           
                             
                               
                                 p 
                                 d 
                               
                               ⁢ 
                               Δ 
                               ⁢ 
                               
                                   
                               
                               ⁢ 
                               
                                 V 
                                 U 
                               
                             
                             - 
                             
                               Δ 
                               ⁢ 
                               
                                 
                                   R 
                                   ^ 
                                 
                                 U 
                               
                             
                           
                           ) 
                         
                         2 
                       
                     
                   
                 
               
             
           
         
       
     
     where ΔV U =V U −N U  and Δ{circumflex over (R)} U ={circumflex over (R)} U −N U . The minimum of LMS(p d ) is then obtained using 
     
       
         
           
             
               
                 
                   
                     
                       ∂ 
                       
                         LMS 
                         ⁡ 
                         
                           ( 
                           
                             p 
                             d 
                           
                           ) 
                         
                       
                     
                     
                       ∂ 
                       
                         p 
                         d 
                       
                     
                   
                   = 
                     
                   ⁢ 
                   
                     
                       1 
                       2 
                     
                     ⁢ 
                     
                       
                         ∑ 
                         
                           { 
                           U 
                           } 
                         
                       
                       ⁢ 
                       
                         
                           ∂ 
                           
                             ∂ 
                             
                               p 
                               d 
                             
                           
                         
                         ⁢ 
                         
                           
                             ( 
                             
                               
                                 
                                   p 
                                   d 
                                 
                                 ⁢ 
                                 Δ 
                                 ⁢ 
                                 
                                     
                                 
                                 ⁢ 
                                 
                                   V 
                                   U 
                                 
                               
                               - 
                               
                                 Δ 
                                 ⁢ 
                                 
                                   
                                     R 
                                     ^ 
                                   
                                   U 
                                 
                               
                             
                             ⁢ 
                             
                                 
                             
                             ) 
                           
                           2 
                         
                       
                     
                   
                 
               
             
             
               
                 
                   = 
                     
                   ⁢ 
                   
                     
                       ∑ 
                       
                         { 
                         U 
                         } 
                       
                     
                     ⁢ 
                     
                       
                         ( 
                         
                           
                             
                               p 
                               d 
                             
                             ⁢ 
                             Δ 
                             ⁢ 
                             
                                 
                             
                             ⁢ 
                             
                               V 
                               U 
                             
                           
                           - 
                           
                             Δ 
                             ⁢ 
                             
                               
                                 R 
                                 ^ 
                               
                               U 
                             
                           
                         
                         ⁢ 
                         
                             
                         
                         ) 
                       
                       ⁢ 
                       Δ 
                       ⁢ 
                       
                           
                       
                       ⁢ 
                       
                         V 
                         U 
                       
                     
                   
                 
               
             
             
               
                 
                   = 
                     
                   ⁢ 
                   
                     
                       
                         p 
                         d 
                       
                       ⁢ 
                       
                         
                           ∑ 
                           
                             { 
                             U 
                             } 
                           
                         
                         ⁢ 
                         
                           Δ 
                           ⁢ 
                           
                               
                           
                           ⁢ 
                           
                             V 
                             U 
                             2 
                           
                         
                       
                     
                     - 
                     
                       
                         ∑ 
                         
                           { 
                           U 
                           } 
                         
                       
                       ⁢ 
                       
                         Δ 
                         ⁢ 
                         
                           
                             R 
                             ^ 
                           
                           U 
                         
                         ⁢ 
                         
                             
                         
                         ⁢ 
                         Δ 
                         ⁢ 
                         
                             
                         
                         ⁢ 
                         
                           V 
                           U 
                         
                       
                     
                   
                 
               
             
           
         
       
     
     That is, the system obtains the polarization p d  as 
     
       
         
           
             
               
                 
                   
                     p 
                     d 
                   
                   = 
                   
                     
                       
                         
                           ∑ 
                           U 
                         
                         ⁢ 
                         
                           Δ 
                           ⁢ 
                           
                             
                               R 
                               ^ 
                             
                             U 
                           
                           ⁢ 
                           
                               
                           
                           ⁢ 
                           Δ 
                           ⁢ 
                           
                               
                           
                           ⁢ 
                           
                             V 
                             U 
                           
                         
                       
                       
                         
                           ∑ 
                           U 
                         
                         ⁢ 
                         
                           Δ 
                           ⁢ 
                           
                               
                           
                           ⁢ 
                           
                             V 
                             U 
                             2 
                           
                         
                       
                     
                     . 
                   
                 
               
               
                 
                   ( 
                   8 
                   ) 
                 
               
             
           
         
       
     
     where ΔV U =V U −N U  and Δ{circumflex over (R)} U =R U −N U    
     The system processes the estimated polarization parameter values p d  to obtain an estimate of the value of the polarization parameter p of Equation (1) (step  208 ). For example, the system can fit the estimates p d  for different depths d as an exponential decay in d and extrapolate to obtain an estimate of p for d=1. Fitting the estimates this way distinguishes the polarization parameter p for the single application of the quantum circuit from state preparation and measurement errors (SPAM). More explicitly, SPAM errors can be modeled as a constant depolarizing fidelity S, independent of d, and fitting the exponential decay of Sp d  as a function of d enables the system to fit p independently of the SPAM errors. 
     The system can use the estimate of p for d=1 (the polarization per cycle) to determine the fidelity of the individual gate G n . For example, the system can obtain an estimate of the polarization p 1,n  for a single qubit gate in a circuit with n qubits from previous randomized benchmarking or cross-entropy benchmarking experiments. The system can then estimate a polarization per cycle p n  for the gate G n  as p/p 1,n   n . This polarization per cycle p n  can be converted into a measure of fidelity for the gate G n  using F=p n +(1−p n )/D, where D=2 n  represents the Hilbert space dimension. 
     In some implementations the system may further perform statistical tests to gather more information about the random circuit or the estimate of the fidelity parameter, as described in more detail below with reference to  FIG. 4 . 
     In some implementations the system may further determine one or more properties of the random circuit using the estimate of the fidelity parameter p and/or additional information about the quantum circuit obtained using the example process  400  described below with reference to  FIG. 4 . For example, the estimated value of the polarization parameter p or the corresponding fidelity may be used to determine the performance of the random circuit. As another example, the estimated fidelity may be used to (i) calibrate, (ii) validate, or (iii) benchmark quantum computing hardware implementing the quantum circuit. 
     In some implementations the system can determine one or more adjustments to quantum computing hardware using the estimate of the fidelity and/or additional information about the quantum circuit. For example, the system can determine adjustments to control parameters of a control model used by the quantum computing hardware to implement quantum operations to improve the fidelity of the quantum operations. The system can use the adjusted control model to implement the quantum operations with increased fidelity in future quantum computations. 
       FIG. 3  is a flow diagram of a second example process  300  for estimating the fidelity of a n-qubit quantum circuit. Example process  300  can be applied to estimate the fidelity of a quantum circuit that operates on an arbitrary number of qubits, e.g., for any n≥1, however it is particularly suitable for estimating the fidelity of quantum circuits that operate on a large number of qubits, e.g., n≥10. For convenience, the process  300  will be described as being performed by a system of one or more classical and/or quantum computing devices located in one or more locations. For example, the system  100  of  FIG. 1 , appropriately programmed in accordance with this specification, can perform the process  300 . 
     The system defines multiple quantum circuits (step  302 ). The defined quantum circuits have a same circuit depth d and operate on a same number of qubits n. Each defined quantum circuit includes one or more single-qubit gates chosen from a sufficiently random set and multiple multi-qubit quantum gates, e.g., multiple instances of a two qubit gate. For example, each of the quantum circuits may include d cycles of n randomly sampled single qubit gates, e.g., one per qubit, followed by multiple multi-qubit quantum logic gates acting on different qubits. For example, a quantum circuit with depth d=2 may include two cycles of n randomly sampled single qubit gates that each operate on a respective qubit followed by a multi qubit quantum gate. Due to the random sampling of single qubit gates, a quantum circuit of this form is herein referred to as a random circuit. 
     An output of an experimental (noisy) implementation of a random quantum circuit U defined at step  302  can be given by Equation (9) below. 
     
       
         
           
             
               
                 
                   
                     ρ 
                     U 
                   
                   = 
                   
                     
                       α 
                       ⁢ 
                       
                          
                         ψ 
                         〉 
                       
                       ⁢ 
                       
                         〈 
                         
                           ψ 
                           U 
                         
                          
                       
                     
                     + 
                     
                       
                         ( 
                         
                           1 
                           - 
                           α 
                         
                         ) 
                       
                       ⁢ 
                       
                         χ 
                         U 
                       
                     
                   
                 
               
               
                 
                   ( 
                   9 
                   ) 
                 
               
             
           
         
       
     
     In Equation (9), |ψ U    represents the state of the quantum system (register of qubits) after application of the random quantum circuit, α= ψ U |ρ U |ψ U    represents the random quantum circuit fidelity, and χ U  represents a density matrix representing an effect of errors in the experimental implementation of the random quantum circuit. In some implementations the output of the implementation of the random quantum circuit U may approximate a Haar random state or a Porter-Thomas distribution. For completeness it is noted that there is a small difference, of order 2 −n  between the fidelity α and the parameter p of Equation (1) above, which can be ignored for n&gt;&gt;1. 
     The system selects an observable O (step  304 ). The selected observable is an observable that depends on a particular instance of a random quantum circuit U, that is, O=O U . In some implementations the selected observable O U  can be chosen to be diagonal in the computational basis, e.g., to simplify obtaining an experimental estimation of an expectation value of the observable O U  with respect to the output of an experimental noisy implementation of the random circuit. 
     For example, in some implementations the system may select a linear cross entropy observable for the simulation of the quantum circuit. The linear cross entropy observable is given by: 
     
       
         
           
             
               
                 
                   
                     O 
                     U 
                     L 
                   
                   = 
                   
                     
                       ∑ 
                       z 
                     
                     ⁢ 
                     
                       N 
                       ⁢ 
                       
                           
                       
                       ⁢ 
                       
                         
                           p 
                           U 
                         
                         ⁡ 
                         
                           ( 
                           z 
                           ) 
                         
                       
                       ⁢ 
                       
                          
                         z 
                         〉 
                       
                       ⁢ 
                       
                         〈 
                         z 
                          
                       
                     
                   
                 
               
               
                 
                   ( 
                   10 
                   ) 
                 
               
             
           
         
       
     
     where N=2 n , p U (z) represents a probability that circuit U outputs a particular bit string z and |z  represents an output state corresponding to the particular bit string z. 
     As another example, in some implementations the system may select a heavy output generation score observable for the simulation of the quantum circuit. The heavy output generation score observable is given by: 
     
       
         
           
             
               
                 
                   
                     O 
                     U 
                     H 
                   
                   = 
                   
                     
                       ∑ 
                       z 
                     
                     ⁢ 
                     
                       1 
                       
                         
                           N 
                           ⁢ 
                           
                               
                           
                           ⁢ 
                           
                             
                               p 
                               U 
                             
                             ⁡ 
                             
                               ( 
                               z 
                               ) 
                             
                           
                         
                         ≥ 
                         
                           log 
                           ⁢ 
                           
                               
                           
                           ⁢ 
                           2 
                           ⁢ 
                           
                              
                             z 
                             〉 
                           
                           ⁢ 
                           
                             〈 
                             z 
                              
                           
                         
                       
                     
                   
                 
               
               
                 
                   ( 
                   11 
                   ) 
                 
               
             
           
         
       
     
     1 Np     U     (z)≥log 2  is equal to 1 if Np U (z)≥log 2 and is otherwise equal to 0, and |z  represents an output state corresponding to the particular bit string z. 
     Since the selected observable depends on a particular instance of a random quantum circuit (i.e., a respective random sampling of single qubit gates and circuit depth), the system defines a respective observable for each defined random quantum circuit. 
     The expectation value of the observable O U  with respect to the output ρ U  of an experimental noisy implementation of the random quantum circuit U can be given by Equation (12) below. 
         Trρ   U   O   U =α ψ U   |O   U |ψ U   +(1−α) Trχ   U   O   U   (12)
 
     In Equation (12), χ U  represents a density matrix representing the effect of errors in the experimental implementation of the random quantum circuit. 
     The selected observable O U  has the property that the expectation value of the selected observable with respect to the density matrix representing the effect of errors in the experimental implementation of the quantum circuit (i.e., Tr χ U O U , appearing in the second term of the right hand side of Equation (12)) obeys a concentration of measure about an expectation value of the selected observable. That is, the expectation value Tr χ U O U  gives 
     
       
         
           
             
               
                 
                   
                     Tr 
                     ⁢ 
                     
                         
                     
                     ⁢ 
                     
                       χ 
                       U 
                     
                     ⁢ 
                     
                       O 
                       U 
                     
                   
                   = 
                   
                     
                       
                         
                           Tr 
                           ⁢ 
                           
                               
                           
                           ⁢ 
                           
                             O 
                             U 
                           
                         
                         N 
                       
                       ± 
                       ϵ 
                     
                     = 
                     
                       
                         N 
                         U 
                       
                       ± 
                       ϵ 
                     
                   
                 
               
               
                 
                   ( 
                   13 
                   ) 
                 
               
             
           
         
       
     
     where 
     
       
         
           
             
               N 
               U 
             
             = 
             
               
                 Tr 
                 ⁢ 
                 
                     
                 
                 ⁢ 
                 
                   O 
                   U 
                 
               
               N 
             
           
         
       
     
     represents a typical value that is independent of χ U , N=2 n  represents the size of the corresponding Hilbert space, and E represents a correction. Verification of this property can be performed numerically by introducing a digital error and calculating a corresponding observable, or through analysis of the corresponding Pearson correlation coefficient between an ideal output distribution and the distribution with one digital error. 
     The system determines an estimate of the fidelity {circumflex over (α)} for each defined random quantum circuit (step  306 ). The system estimates the fidelity {circumflex over (α)} for a respective random quantum circuit by solving Equation (12) for the random quantum circuit. That is, the system estimates the expectation value Trρ U O U  (left hand side of Equation 12) of the selected observable O U  with respect to the output ρ U  of an experimental implementation of the random quantum circuit. 
     To estimate the expectation value Trρ U O U  for a respective circuit U, the system approximates the expectation value Trρ U O U  as a sum of N U =Tr O U /N (the trace of the selected observable  O U   =Tr O U  divided by N) added to the fidelity of the quantum circuit α multiplied by a difference between i) V U  (an expectation value of the selected observable with respect to an ideal output state of the quantum circuit  ψ U |O U |ψ U   ) and N U =Tr O U /N (the trace Tr O U  divided by N). That is, the system approximates 
     
       
         
           
             
               
                 
                   
                     
                       
                         
                           Tr 
                           ⁢ 
                           
                               
                           
                           ⁢ 
                           
                             ρ 
                             U 
                           
                           ⁢ 
                           
                             O 
                             U 
                           
                         
                         = 
                           
                         ⁢ 
                         
                           
                             R 
                             U 
                           
                           ≃ 
                           
                             
                               a 
                               ⁡ 
                               
                                 ( 
                                 
                                   
                                     〈 
                                     
                                       
                                         ψ 
                                         U 
                                       
                                       ⁢ 
                                       
                                          
                                         
                                           O 
                                           U 
                                         
                                          
                                       
                                       ⁢ 
                                       
                                         ψ 
                                         U 
                                       
                                     
                                     〉 
                                   
                                   - 
                                   
                                     Tr 
                                     ⁢ 
                                     
                                         
                                     
                                     ⁢ 
                                     
                                       
                                         O 
                                         U 
                                       
                                       / 
                                       N 
                                     
                                   
                                 
                                 ) 
                               
                             
                             + 
                             
                               Tr 
                               ⁢ 
                               
                                   
                               
                               ⁢ 
                               
                                 
                                   O 
                                   U 
                                 
                                 / 
                                 N 
                               
                             
                           
                         
                       
                     
                   
                   
                     
                       
                         = 
                           
                         ⁢ 
                         
                           
                             a 
                             ⁡ 
                             
                               ( 
                               
                                 
                                   V 
                                   U 
                                 
                                 - 
                                 
                                   N 
                                   U 
                                 
                               
                               ) 
                             
                           
                           + 
                           
                             N 
                             U 
                           
                         
                       
                     
                   
                 
               
               
                 
                   ( 
                   14 
                   ) 
                 
               
             
           
         
       
     
     by assuming that the correction ∈ tends to zero to determine an estimate of the fidelity of the quantum circuit {circumflex over (α)}. The assumption that the correction ∈ tends to zero can be verified numerically. For example, in a model where bit-flip (Pauli matrix σ x ) or phase-flip (Pauli matrix σ z ) errors after each gate are considered, it can be verified numerically that 
     
       
         
           
             
               〈 
               
                 
                   ψ 
                   0 
                 
                 ⁢ 
                 
                    
                   
                     
                       
                         ( 
                         
                           U 
                           
                             g 
                             , 
                             j 
                           
                           e 
                         
                         ) 
                       
                       † 
                     
                     ⁢ 
                     
                       O 
                       U 
                     
                     ⁢ 
                     
                       U 
                       
                         g 
                         , 
                         j 
                       
                       e 
                     
                   
                    
                 
                 ⁢ 
                 
                   ψ 
                   0 
                 
               
               〉 
             
             ≃ 
             
               
                 N 
                 U 
               
               ± 
               ϵ 
             
           
         
       
     
     where U g,j   e  represents a circuit obtained when adding σ j  after gate g. When the output |ψ U    of the random circuit U approximates a Haar random state or Porter-Thomas distribution, this assumption works well and a typical error can be expected to have a statistical fluctuation ∈=2 −n/2 . 
     The system can estimate R U  in Equation (14) experimentally by performing a plurality of measurements of the selected observable O U  to determine an estimate {circumflex over (R)} U . This can include repeatedly preparing a quantum system (register of qubits) in an initial state, applying the quantum circuit U to the quantum system prepared in the initial state to generate an evolved state of the quantum system, and measuring the observable with respect to the evolved state of the quantum system to obtain multiple measurement results that can be used to determine the estimate {circumflex over (R)} U , e.g., through averaging of the multiple measurement results. 
     For example, the action of a selected observable O U =Σ z O U (z)|z   z| maps each bit string or measurement outcome z to a real value O U (z). Each value O U (z) depends on the random circuit U, and the calculation of experimental values {O U (z j )} requires classical simulations of U. For a set of M measurement results {z j } the estimate of R U  can be given by 
     
       
         
           
             
               
                 R 
                 ^ 
               
               U 
             
             = 
             
               
                 1 
                 M 
               
               ⁢ 
               
                 
                   ∑ 
                   
                     z 
                     j 
                   
                 
                 ⁢ 
                 
                   
                     O 
                     U 
                   
                   ⁡ 
                   
                     ( 
                     
                       z 
                       j 
                     
                     ) 
                   
                 
               
             
           
         
       
     
     which in turn gives 
     
       
         
           
             
               
                 R 
                 U 
               
               = 
               
                 
                   
                     R 
                     ^ 
                   
                   U 
                 
                 + 
                 
                   O 
                   ⁡ 
                   
                     ( 
                     
                       1 
                       
                         M 
                       
                     
                     ) 
                   
                 
               
             
             , 
           
         
       
     
     as described above with reference to Equations (6) and (7). 
     The system can determine estimates {circumflex over (V)} U  and {circumflex over (R)} U  for V U  and N U  in Equation (14) numerically or analytically. For example, in some implementations the output state ρ U  given by Equation (9) above may approximate a Porter-Thomas distribution. In these implementations the values of V U  and N U  in Equation (14) can be determined analytically. Values of V U  and N U  in Equation (14) can be determined numerically by calculating V U = ψ U |O U |ψ U    and N U =Tr O U /N with classical simulations. 
     The system determines the estimate of the fidelity {circumflex over (α)} of the random quantum circuit U using the determined estimate {circumflex over (R)} U , {circumflex over (V)} U  and {circumflex over (N)} U . That is, the system solves for {circumflex over (α)} in Equation (14) using {circumflex over (R)} U , {circumflex over (V)} U  and {circumflex over (N)} U . The system can then determine an average of the determined estimates for each random quantum circuit to obtain an estimate of circuit fidelity at the circuit depth d and number of qubits n. 
     In some implementations the system may further perform statistical tests to gather more information about the quantum circuit or the estimation of the fidelity of the quantum circuit, as described in more detail below with reference to  FIG. 4 . 
     In some implementations the system may further determine one or more properties of the random quantum circuit using individual estimations of the fidelity of a random quantum circuit {circumflex over (α)}, an average estimate of fidelity and/or additional information about the random quantum circuit obtained using the example process  400  described below with reference to  FIG. 4 . For example, the estimated fidelity {circumflex over (α)} may be used to determine the performance of the random quantum circuit. As another example, the estimated fidelity may be used to (i) calibrate, (ii) validate, or (iii) benchmark quantum computing hardware implementing the quantum circuit. 
     In some implementations the system can determine one or more adjustments to quantum computing hardware using the determined fidelity estimates and/or additional information about the random quantum circuit. For example, the system can determine adjustments to control parameters of a control model used by the quantum computing hardware to implement quantum operations to improve the fidelity of the quantum operations. The system can use the adjusted control model to implement the quantum operations with increased fidelity in future quantum computations. 
       FIG. 4  is a flow diagram of an example process  400  for obtaining additional information about a quantum circuit. For example, example process  400  can be applied in conjunction with processes  200  and  300  described above. For convenience, the process  400  will be described as being performed by a system of one or more classical computing devices located in one or more locations. For example, the system  100  of  FIG. 1 , appropriately programmed in accordance with this specification, can perform the process  400 . 
     The system calculates a distribution of a random variable associated with the observable selected at step  204  or  304  of example processes  200  and  300  (step  402 ). 
     The system performs statistical tests using the calculated distribution of random variables associated with the selected observable to obtain additional statistical information about the quantum circuit (step  404 ). For example, the system can validate fidelities estimated using process  200  or  300  by performing a Kolmogorov-Smirnov test using experimental data, e.g., data obtained based on Equation (6), to reject the null hypothesis that the fidelity estimates are 0. As another example, the system can determine a Kolmogorov-Smirnov p-value for the cumulative distribution function of the experimental data given the estimate of the fidelity α. A large Kolmogorov-Smirnov p-value indicates that the assumptions of the model and the estimate of alpha are correct. 
     For example, one example observable that the system may select at step  204  or  304  of example process  200  or  300  is the cross entropy benchmarking observable given by Equation (15) below. 
     
       
         
           
             
               
                 
                   
                     O 
                     U 
                     X 
                   
                   = 
                   
                     
                       
                         ∑ 
                         z 
                       
                       ⁢ 
                       
                         log 
                         ⁢ 
                         N 
                         ⁢ 
                         
                           
                             p 
                             U 
                           
                           ⁡ 
                           
                             ( 
                             z 
                             ) 
                           
                         
                         ⁢ 
                         
                            
                           z 
                           〉 
                         
                         ⁢ 
                         
                           〈 
                           z 
                            
                         
                       
                     
                     = 
                     
                       
                         ∑ 
                         z 
                       
                       ⁢ 
                       
                         
                           Y 
                           ⁡ 
                           
                             ( 
                             z 
                             ) 
                           
                         
                         ⁢ 
                         
                            
                           z 
                           〉 
                         
                         ⁢ 
                         
                           〈 
                           z 
                            
                         
                       
                     
                   
                 
               
               
                 
                   ( 
                   15 
                   ) 
                 
               
             
           
         
       
     
     In Equation (15), N=2 n  where n represents the number of qubits on which the quantum circuit operates, p U (z) represents a probability that circuit U outputs a particular bit string z and |z  represents an output state corresponding to the particular bit string z. 
     For a noisy implementation of a given quantum circuit U, Pr U,α (Y≤s)=Σ z such that log Np     U     (z)≤s P α   U (Z) where P α   U  (z)= z|ρ U |z =αp U (z)+(1−α)/N. When sampling over random circuits, the distribution of the random variable Y(z)=log N p U (z) is F y (S)= P U,α (Y≤s)   U =e −e     s   (−e s α+e e     s   −1). Therefore the random variable Y over noisy random circuits has probability density e y−e     y   (α(e y −1)+1). The expectation value of this random variable is α−γ (where γ represents Euler&#39;s constant) which gives an estimator {circumflex over (α)}≃{circumflex over (R)} U   X +γ of fidelity α, where {circumflex over (R)} U   X  represents the expectation value of the observable O U   X  in Equation (15). The variance of the estimator {circumflex over (α)} is π 2 /6−α 2  and the standard deviation of the estimator {circumflex over (α)} with M measurements is 
     
       
         
           
             
               
                 
                   ( 
                   
                     
                       
                         π 
                         2 
                       
                       6 
                     
                     - 
                     
                       a 
                       2 
                     
                   
                   ) 
                 
                 / 
                 M 
               
             
             . 
           
         
       
     
     As another example, one example observable that the system may select at step  204  or  304  of example process  200  or  300  is the linear cross entropy observable given by Equation (16) below. 
     
       
         
           
             
               
                 
                   
                     O 
                     U 
                     L 
                   
                   = 
                   
                     
                       ∑ 
                       z 
                     
                     ⁢ 
                     
                       N 
                       ⁢ 
                       
                         
                           p 
                           U 
                         
                         ⁡ 
                         
                           ( 
                           z 
                           ) 
                         
                       
                       ⁢ 
                       
                          
                         z 
                         〉 
                       
                       ⁢ 
                       
                         〈 
                         z 
                          
                       
                     
                   
                 
               
               
                 
                   ( 
                   16 
                   ) 
                 
               
             
           
         
       
     
     The random variable X(z)=Np U (z) has distribution Pr U,α (X≤t)=Σ z 1 {Np     U     (z)≤t} P α   U  (z) and when sampling over noisy random circuits the distribution of X(z) is F x (s)= P U,α (X≤t)   U =∫ 0   t (αx+1−α)e −x dx. Therefore the random variable X over noisy random circuits has probability density (αx+1−α)e −x . The expectation value of this random variable is 1+α which gives an estimator {circumflex over (α)}={circumflex over (R)} U   L +1 of α, where {circumflex over (R)} U   L  represents the expectation value of the observable O U   L  in Equation (16). The variance of the random variable is 1+2α+α 2 , which gives a standard deviation of √{square root over ((1+2α+α 2 )/M)} for the estimator {circumflex over (α)} with M measurements—an improvement to the standard deviation obtained using the cross entropy benchmarking observable. 
     As another example, one example observable that the system may select at step  204  or  304  of example process  200  or  300  is the heavy output generation score observable given by Equation (17) below. 
     
       
         
           
             
               
                 
                   
                     O 
                     U 
                     H 
                   
                   = 
                   
                     
                       ∑ 
                       z 
                     
                     ⁢ 
                     
                       
                         1 
                         
                           
                             N 
                             ⁢ 
                             
                               
                                 p 
                                 U 
                               
                               ⁡ 
                               
                                 ( 
                                 z 
                                 ) 
                               
                             
                           
                           ≥ 
                           
                               
                           
                           ⁢ 
                           
                             log 
                             ⁢ 
                             
                                 
                             
                             ⁢ 
                             2 
                           
                         
                       
                       ⁢ 
                       
                          
                         z 
                         〉 
                       
                       ⁢ 
                       
                         〈 
                         z 
                          
                       
                     
                   
                 
               
               
                 
                   ( 
                   17 
                   ) 
                 
               
             
           
         
       
     
     The expectation value of this observable for an output of fidelity α is 
     
       
         
           
             
               R 
               U 
               H 
             
             = 
             
               
                 
                   ∫ 
                   
                     log 
                     ⁢ 
                     
                         
                     
                     ⁢ 
                     2 
                   
                   ∞ 
                 
                 ⁢ 
                 
                   
                     ( 
                     
                       
                         α 
                         ⁢ 
                         
                             
                         
                         ⁢ 
                         x 
                       
                       + 
                       1 
                       - 
                       α 
                     
                     ) 
                   
                   ⁢ 
                   
                     e 
                     
                       - 
                       x 
                     
                   
                   ⁢ 
                   dx 
                 
               
               = 
               
                 
                   1 
                   2 
                 
                 ⁢ 
                 
                   
                     ( 
                     
                       1 
                       + 
                       
                         α 
                         ⁢ 
                         
                             
                         
                         ⁢ 
                         log 
                         ⁢ 
                         
                             
                         
                         ⁢ 
                         2 
                       
                     
                     ) 
                   
                   . 
                 
               
             
           
         
       
     
     The corresponding estimator is {circumflex over (α)}=(2{circumflex over (R)} U   H −1)/log 2 where {circumflex over (R)} U   H  represents the expectation value of the observable O U   H  in Equation (17), and the variance is (log 2) −2 −α 2 . 
     Additional statistical information about the quantum circuit obtained via the statistical tests can also be used to determine properties of the quantum circuit, as described in step  208  and step  308  of processes  200  and  300 . 
     Implementations of the digital and/or quantum subject matter and the digital functional operations and quantum operations described in this specification can be implemented in digital electronic circuitry, suitable quantum circuitry or, more generally, quantum computational systems, in tangibly-embodied digital and/or quantum computer software or firmware, in digital and/or quantum computer hardware, including the structures disclosed in this specification and their structural equivalents, or in combinations of one or more of them. The term “quantum computational systems” may include, but is not limited to, quantum computers, quantum information processing systems, quantum cryptography systems, or quantum simulators. 
     Implementations of the digital and/or quantum subject matter described in this specification can be implemented as one or more digital and/or quantum computer programs, i.e., one or more modules of digital and/or quantum computer program instructions encoded on a tangible non-transitory storage medium for execution by, or to control the operation of, data processing apparatus. The digital and/or quantum computer storage medium can be a machine-readable storage device, a machine-readable storage substrate, a random or serial access memory device, one or more qubits, or a combination of one or more of them. Alternatively or in addition, the program instructions can be encoded on an artificially-generated propagated signal that is capable of encoding digital and/or quantum information, e.g., a machine-generated electrical, optical, or electromagnetic signal, that is generated to encode digital and/or quantum information for transmission to suitable receiver apparatus for execution by a data processing apparatus. 
     The terms quantum information and quantum data refer to information or data that is carried by, held or stored in quantum systems, where the smallest non-trivial system is a qubit, i.e., a system that defines the unit of quantum information. It is understood that the term “qubit” encompasses all quantum systems that may be suitably approximated as a two-level system in the corresponding context. Such quantum systems may include multi-level systems, e.g., with two or more levels. By way of example, such systems can include atoms, electrons, photons, ions or superconducting qubits. In many implementations the computational basis states are identified with the ground and first excited states, however it is understood that other setups where the computational states are identified with higher level excited states are possible. 
     The term “data processing apparatus” refers to digital and/or quantum data processing hardware and encompasses all kinds of apparatus, devices, and machines for processing digital and/or quantum data, including by way of example a programmable digital processor, a programmable quantum processor, a digital computer, a quantum computer, multiple digital and quantum processors or computers, and combinations thereof. The apparatus can also be, or further include, special purpose logic circuitry, e.g., an FPGA (field programmable gate array), an ASIC (application-specific integrated circuit), or a quantum simulator, i.e., a quantum data processing apparatus that is designed to simulate or produce information about a specific quantum system. In particular, a quantum simulator is a special purpose quantum computer that does not have the capability to perform universal quantum computation. The apparatus can optionally include, in addition to hardware, code that creates an execution environment for digital and/or quantum computer programs, e.g., code that constitutes processor firmware, a protocol stack, a database management system, an operating system, or a combination of one or more of them. 
     A digital computer program, which may also be referred to or described as a program, software, a software application, a module, a software module, a script, or code, can be written in any form of programming language, including compiled or interpreted languages, or declarative or procedural languages, and it can be deployed in any form, including as a stand-alone program or as a module, component, subroutine, or other unit suitable for use in a digital computing environment. A quantum computer program, which may also be referred to or described as a program, software, a software application, a module, a software module, a script, or code, can be written in any form of programming language, including compiled or interpreted languages, or declarative or procedural languages, and translated into a suitable quantum programming language, or can be written in a quantum programming language, e.g., QCL or Quipper. 
     A digital and/or quantum computer program may, but need not, correspond to a file in a file system. A program can be stored in a portion of a file that holds other programs or data, e.g., one or more scripts stored in a markup language document, in a single file dedicated to the program in question, or in multiple coordinated files, e.g., files that store one or more modules, sub-programs, or portions of code. A digital and/or quantum computer program can be deployed to be executed on one digital or one quantum computer or on multiple digital and/or quantum computers that are located at one site or distributed across multiple sites and interconnected by a digital and/or quantum data communication network. A quantum data communication network is understood to be a network that may transmit quantum data using quantum systems, e.g. qubits. Generally, a digital data communication network cannot transmit quantum data, however a quantum data communication network may transmit both quantum data and digital data. 
     The processes and logic flows described in this specification can be performed by one or more programmable digital and/or quantum computers, operating with one or more digital and/or quantum processors, as appropriate, executing one or more digital and/or quantum computer programs to perform functions by operating on input digital and quantum data and generating output. The processes and logic flows can also be performed by, and apparatus can also be implemented as, special purpose logic circuitry, e.g., an FPGA or an ASIC, or a quantum simulator, or by a combination of special purpose logic circuitry or quantum simulators and one or more programmed digital and/or quantum computers. 
     For a system of one or more digital and/or quantum computers to be “configured to” perform particular operations or actions means that the system has installed on it software, firmware, hardware, or a combination of them that in operation cause the system to perform the operations or actions. For one or more digital and/or quantum computer programs to be configured to perform particular operations or actions means that the one or more programs include instructions that, when executed by digital and/or quantum data processing apparatus, cause the apparatus to perform the operations or actions. A quantum computer may receive instructions from a digital computer that, when executed by the quantum computing apparatus, cause the apparatus to perform the operations or actions. 
     Digital and/or quantum computers suitable for the execution of a digital and/or quantum computer program can be based on general or special purpose digital and/or quantum processors or both, or any other kind of central digital and/or quantum processing unit. Generally, a central digital and/or quantum processing unit will receive instructions and digital and/or quantum data from a read-only memory, a random access memory, or quantum systems suitable for transmitting quantum data, e.g. photons, or combinations thereof. 
     The essential elements of a digital and/or quantum computer are a central processing unit for performing or executing instructions and one or more memory devices for storing instructions and digital and/or quantum data. The central processing unit and the memory can be supplemented by, or incorporated in, special purpose logic circuitry or quantum simulators. Generally, a digital and/or quantum computer will also include, or be operatively coupled to receive digital and/or quantum data from or transfer digital and/or quantum data to, or both, one or more mass storage devices for storing digital and/or quantum data, e.g., magnetic, magneto-optical disks, optical disks, or quantum systems suitable for storing quantum information. However, a digital and/or quantum computer need not have such devices. 
     Digital and/or quantum computer-readable media suitable for storing digital and/or quantum computer program instructions and digital and/or quantum data include all forms of non-volatile digital and/or quantum memory, media and memory devices, including by way of example semiconductor memory devices, e.g., EPROM, EEPROM, and flash memory devices; magnetic disks, e.g., internal hard disks or removable disks; magneto-optical disks; CD-ROM and DVD-ROM disks; and quantum systems, e.g., trapped atoms or electrons. It is understood that quantum memories are devices that can store quantum data for a long time with high fidelity and efficiency, e.g., light-matter interfaces where light is used for transmission and matter for storing and preserving the quantum features of quantum data such as superposition or quantum coherence. 
     Control of the various systems described in this specification, or portions of them, can be implemented in a digital and/or quantum computer program product that includes instructions that are stored on one or more non-transitory machine-readable storage media, and that are executable on one or more digital and/or quantum processing devices. The systems described in this specification, or portions of them, can each be implemented as an apparatus, method, or system that may include one or more digital and/or quantum processing devices and memory to store executable instructions to perform the operations described in this specification. 
     While this specification contains many specific implementation details, these should not be construed as limitations on the scope of what may be claimed, but rather as descriptions of features that may be specific to particular implementations. Certain features that are described in this specification in the context of separate implementations can also be implemented in combination in a single implementation. Conversely, various features that are described in the context of a single implementation can also be implemented in multiple implementations separately or in any suitable sub-combination. Moreover, although features may be described above as acting in certain combinations and even initially claimed as such, one or more features from a claimed combination can in some cases be excised from the combination, and the claimed combination may be directed to a sub-combination or variation of a sub-combination. 
     Similarly, while operations are depicted in the drawings in a particular order, this should not be understood as requiring that such operations be performed in the particular order shown or in sequential order, or that all illustrated operations be performed, to achieve desirable results. In certain circumstances, multitasking and parallel processing may be advantageous. Moreover, the separation of various system modules and components in the implementations described above should not be understood as requiring such separation in all implementations, and it should be understood that the described program components and systems can generally be integrated together in a single software product or packaged into multiple software products. 
     Particular implementations of the subject matter have been described. Other implementations are within the scope of the following claims. For example, the actions recited in the claims can be performed in a different order and still achieve desirable results. As one example, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some cases, multitasking and parallel processing may be advantageous.