# Patent

## Title
Method and system that produces non-stabilizer quantum states that are used in various quantum circuits and systems

## Abstract

The current application is directed to methods and quantum circuits that prepare qubits in specified non-stabilizer quantum states that can, in turn, be used for a variety of different purposes, including in a quantum-circuit implementation of an arbitrary single-qubit unitary quantum gate that imparts a specified, arbitrary rotation to the state-vector representation of the state of an input qubit. In certain implementations, the methods and systems consume multiple magic-state qubits in order to carry out probabilistic rotation operators to prepare qubits with state vectors having specified rotation angles with respect to a rotation axis. These qubits are used as resources input to various quantum circuits, including the quantum-circuit implementation of an arbitrary single-qubit unitary quantum gate.

## Background
TECHNICAL FIELD
The current application is directed to quantum computing and, in particular, to a method and system for producing specified non-stabilizer quantum states and for using the non-stabilizer quantum states to implement various types of quantum circuits and quantum systems.
BACKGROUND
Enormous advances have been made in digital computing over the past 70 years. Crude, high-energy-consuming, vacuum-tube-based computer systems developed in the 1940s have evolved into today's personal computers, work stations, servers, and high-end distributed computer systems, based on multi-core single-integrated-circuit processors, that economically provide processing speeds, data-storage capacities, and data-transfer bandwidths that were unimaginable even 20 years ago. However, digital computing appears to be bounded by certain physical and problem-domain constraints.
With regard to physical constraints, processing speeds and data-storage capacities are generally inversely related to the minimum sizes at which transistors and other circuit elements can be fabricated within integrated circuits. Much of the exponential growth observed in computational bandwidth for various classes of computer systems can be attributed to a corresponding decrease in feature sizes within integrated circuits. There are, however, fundamental physical limits, on the order of the sizes of complex molecules, past which feature sizes cannot be further decreased, and somewhat larger feature-size limitations past which further decreases in feature sizes can be obtained only by exponentially increasing integrated-circuit cost.
With regard to problem-domain constraints, while digital computers provide the basis for practical and cost-effective solutions of many types of computational problems, there are many types and classes of computational problems that appear incapable of being addressed efficiently by digital computer systems. Examples include accurate simulation of the quantum-mechanical behavior of large molecules and aggregations of molecules and a variety of traditional numerical and computational problems, including large-integer factoring and graph-isomorphism problems.
In 1982, Richard Feynman made a suggestion for a new type of computational system based on quantum-mechanical components. He suggested that quantum computers could more efficiently address certain classes of computational problems than digital computers and, in the case of computational problems in computational chemistry and physics, provide practical approaches to computational problems that are intractable using digital computer systems. Since that time, great progress has been made in developing the theoretical foundation for quantum computing and the first quantum computers have been implemented. Various computational problems have been identified that can be addressed more efficiently by quantum computers than by classical digital computers. However, significant research and development efforts continue to be applied in order to provide practical and cost-effective general-purpose quantum-computing systems for widespread use. As one example, significant theoretical efforts are currently being applied to identify practical and cost-effective implementations of quantum circuits.
SUMMARY
The current application is directed to methods and quantum circuits that prepare qubits in specified non-stabilizer quantum states that can, in turn, be used for a variety of different purposes, including in a quantum-circuit implementation of an arbitrary single-qubit unitary quantum gate that imparts a specified, arbitrary rotation to the state-vector representation of the state of an input qubit. In certain implementations, the methods and systems consume multiple magic-state qubits in order to carry out probabilistic rotation operators to prepare qubits with state vectors having specified rotation angles with respect to a rotation axis. These qubits are used as resources input to various quantum circuits, including the quantum-circuit implementation of an arbitrary single-qubit unitary quantum gate. Neither this section nor the sections which follow are intended to either limit the scope of the claims which follow or define the scope of those claims.



BRIEF DESCRIPTION OF THE DRAWINGS
FIG. 1 provides an architectural diagram for a generalized digital computer that may implement control components of a quantum computing system.
FIGS. 2A-D illustrate a quantum bit, referred to as a “qubit,” which is a fundamental data-storage unit of many quantum-computing systems.
FIG. 3 illustrates a quantum circuit comprising two quantum gates.
FIGS. 4A-F illustrate the rotations of qubit state vectors, illustrated using the Bloch-sphere convention, produced by various operators expressed as 2×2 matrices.
FIG. 5 illustrates what it means for U<H,T> to be everywhere dense in PSU(2).
FIG. 6 illustrates the magic-state distillation process.
FIGS. 7A-B illustrate the single-qubit Clifford group.
FIG. 8 illustrates one implementation of an arbitrary single-qubit unitary quantum gate.
FIGS. 9A-B each illustrate two portions of two planes inscribed within the Bloch sphere and an operation that rotates a vector |ψ from the xz Bloch-sphere plane to the xy Bloch-sphere plane.
FIGS. 10A-B illustrate two rotation circuits.
FIG. 11 illustrates implementation of the unitary quantum gate T using the z-rotation quantum circuit illustrated in FIG. 10.
FIG. 12 illustrates a quantum-circuit subsystem of a unitary-quantum-gate implementation that generates a qubit with a state vector lying within the xz plane of the Bloch sphere and having a specific θ angle with respect to the z axis.
FIG. 13A provides an alternative illustration of the quantum-circuit subsystem discussed above with reference to FIG. 12.
FIGS. 13B-C provide control-flow-diagram illustrations of a control program that controls the ladder-like quantum-circuit subsystem shown in FIGS. 12 and 13A.
FIG. 14 provides a table of rotation values, in radians, for the state vectors of a qubit produced by successful operation of each of stages i=0 through i=16 of the quantum-circuit subsystem discussed above with reference to FIG. 1.
FIG. 15 illustrates the rotation angles of the state vectors of the subject qubit produced by the quantum-circuit subsystem.
FIGS. 16-18 show quantum circuits for resource factories that prepare additional types of control qubits for the quantum-circuit subsystem discussed with reference to FIGS. 13A-C.
FIG. 19 illustrates the θ angles available from quantum-circuit subsystems based on FIGS. 12-13 and 16-18, using the illustration conventions of FIG. 15.
FIG. 20 provides a table of the θ angles of xz-Bloch-sphere plane state vectors, in radians, produced by the first nine stages of each of the various types of quantum-circuit subsystems discussed above.
FIGS. 21A-C illustrate two different implementations of the universal quantum gate discussed above with reference to FIG. 8.
FIGS. 22A-D provide control-flow diagrams that illustrate control of the universal quantum gate shown in FIG. 21.
FIGS. 23A-B show two implementations of the V3 quantum gate as a quantum circuit featuring elements of the above-discussed quantum circuits in previous subsections.



DETAILED DESCRIPTION
It should be noted, at the onset, that although the current application employs mathematical notation and control-flow diagrams, the current application is directed to physical and tangible quantum circuits, methods and systems for producing designs for quantum circuits that are stored in physical data-storage devices and systems, including optical disks within optical-disk drives, magnetic disks within magnetic-disk drives, electronic memories within computer systems, and other such physical, tangible data-storage devices, and to classical-computing control logic that executes within a classical computer to control operation of a quantum computer. These are physically instantiated devices and device-control subsystems.
In the current application, the methods and systems to which the current application is directed are described using block diagrams, control-flow diagrams, and mathematical expressions. As those familiar with modern science and technology well appreciate, a quantum gate, a classical-computing control program, and systems that carry out operations that produce state changes in qubits are physical and tangible systems that produce physical changes within subsystems and within their environments. Even the storage and retrieval of computer instructions and computer designs involve physical changes within the physical data-storage components of one or more systems. These physical changes, like all physical changes, can be described in terms of thermodynamic state variables, including enthalpy and entropy, and occur over time intervals. It is common to describe the control of physical processes, including the operation of computer systems, using mathematical expressions and/or actual computer code or pseudocode. However, these representations are employed to describe physical processes associated with physical changes within a computer system controlled by computer instructions as well as within other objects and systems that electronically communicate with the computer system.
The following discussion includes five different subsections: (1) Overview of Digital Computer Systems; (2) Overview of Quantum Computing; (3) A Quantum circuit that Produces Non-stabilizer Qubit States; (4) Implementation of a Universal Qubit Rotation Operator; and (5) V-gate Implementation. The final two subsections discuss the methods and systems to which the current application is directed. Those familiar with classical and quantum computing may wish to proceed to the final three subsections.
Overview of Digital Computer Systems
FIG. 1 provides an architectural diagram for a generalized digital computer that may implement control components of a quantum computing system. The computer system contains one or multiple central processing units (“CPUs”) 102-105, one or more electronic memories 108 interconnected with the CPUs by a CPU/memory-subsystem bus 110 or multiple busses, a first bridge 112 that interconnects the CPU/memory-subsystem bus 110 with additional busses 114 and 116 or other types of high-speed interconnection media, including multiple, high-speed serial interconnects. These busses or serial interconnections, in turn, connect the CPUs and memory with specialized processors, such as a graphics processor 118, and with one or more additional bridges 120, which are interconnected with high-speed serial links or with multiple controllers 122-127, such as controller 127, that provide access to various different types of mass-storage devices 128, electronic displays, input devices, and other such components, subcomponents, and computational resources. Digital computer systems store and manipulate information represented as binary numbers, or digits, of various lengths and are controlled by digitally encoded instructions stored in one or more memories and executed by one or more processors.
Overview of Quantum Computing
FIGS. 2A-D illustrate a quantum bit, referred to as a “qubit,” which is a fundamental data-storage unit of many quantum-computing systems. The qubit is a quantum-computing analog of a classical digital-computer-system bit. A classical bit is considered to occupy, at any given point in time, one of two possible states corresponding to the binary digits “0” and “1.” Of course, the classical bit is a high-level abstraction of a hardware implementation of the classical bit and, at the molecular level, the transistors and other circuit components and wiring that together compose a classical bit have an essentially infinite number of quantum-mechanical states. Nonetheless, the complex quantum-mechanical states of a hardware implementation of a classical bit fall into two discrete and measurable subspaces that, in the aggregate, correspond to two discrete and distinguishable macroscopic states corresponding to binary digits “0” and “1.”
By contrast, a qubit is implemented in hardware by tiny, physical components with quantum-mechanical characteristics that are generally contained within macroscopic subsystems. These tiny physical components can have an infinite number of different quantum-mechanical states. When the state of a qubit is physically measured, the measurement produces one of two different basis states |0 and |11. The quantum-mechanical state of a qubit is represented as a state vector that represents a superposition of the two states |0 and |1:

|ψ=α|0+β|1,

where α and β are complex numbers and |α|2+|β|2=1. The qubit state vector can be represented in vector notation as:





  
    
    ψ
    〉
  
  =
  
    
      [
      
        
          
            α
          
        
        
          
            β
          
        
      
      ]
    
    .
  




The choice of vector representations of the states |0 and |1  is somewhat arbitrary, but to facilitate mathematical operations, these two vectors are generally chosen to be orthonormal representations of eigenstates of a physical system, and are often assigned the vector representations:





  
    
      
      0
      〉
    
    =
    
      [
      
        
          
            1
          
        
        
          
            0
          
        
      
      ]
    
  
  ,
  
    

  
  ⁢
  
    
      
      1
      〉
    
    =
    
      
        [
        
          
            
              0
            
          
          
            
              1
            
          
        
        ]
      
      .
    
  




In the Dirac notation, | is referred to as the “ket” notation for vectors of an inner-product vector space. This inner-product vector space has a dual inner-product vector space, the vectors of which are represented by the Dirac bra notation |. The corresponding dual-inner-product vector space vectors for the above-discussed qubit state vectors are:

ψ|=[α*,β*],

0|=[1,0],

1|=[0,1],

where α* is the complex conjugate of α. The magnitude of a qubit state vector is computed as the square root of the inner product of the state vector and its corresponding dual state vector:





  
    
      
        
        
          
            
              〈
              ψ
              
            
            =
            
            ⁢
            
              
                〈
                
                  ψ
                  |
                  ψ
                
                〉
              
            
          
          ,
        
      
    
  
  
    
      
        
          =
          
          ⁢
          
            
              
                αα
                *
              
              +
              
                ββ
                *
              
            
          
        
        ,
      
    
  
  
    
      
        =
        
        ⁢
        1.
      
    
  




Thus, state vectors used to describe qubit states are normalized to have a magnitude of 1, which is indicated by the “normal” syllable of the term “orthonormal.” The “ortho” syllable refers to the fact that the state vectors |0 and |1 are chosen to be orthogonal, to simplify various operations, including taking inner products. Note that, by one convention, kets are represented by columns vectors and bras by row vectors. A complex row vector multiplied by a complex column vector, as in the above expression for the square root of the inner product of the state vector |ψ, produces a real number, while a column vector multiplied by a row vector produces a generally complex-valued matrix.

The quantum-mechanical state |ψ of a qubit is not directly observable by measurement. Instead, physical measurement operations are performed on a qubit to produce a measured state in a computational basis, such as the basis |0 or |1. The measurement operations can be represented as 2×2 matrices M0 and M1:




  
    
      M
      0
    
    =
    
      
        
          
          0
          〉
        
        ⁢
        
          〈
          0
          
        
      
      =
      
        [
        
          
            
              1
            
            
              0
            
          
          
            
              0
            
            
              0
            
          
        
        ]
      
    
  
  ,
  
    

  
  ⁢
  
    
      M
      1
    
    =
    
      
        
          
          1
          〉
        
        ⁢
        
          〈
          1
          
        
      
      =
      
        
          [
          
            
              
                0
              
              
                0
              
            
            
              
                0
              
              
                1
              
            
          
          ]
        
        .
      
    
  




The probability that a measurement of a qubit in state |ψ will return a state |10 or |1is obtained by the inner product:

pm=ψ|Mm†Mm|ψ,

where m is 0 or 1, corresponding to a measurement that produces |0or |1, respectively. For example, the probability p0 that a measurement of the state of a qubit in state |ψ produces |0 is obtained as:





  
    
      
        
          
            p
            0
          
          =
          
          ⁢
          
            〈
            
              ψ
              ⁢
              
                
                
                  
                    M
                    0
                    †
                  
                  ⁢
                  
                    M
                    0
                  
                
                
              
              ⁢
              ψ
            
            〉
          
        
        ,
      
    
  
  
    
      
        =
        
        ⁢
        
          
            
              [
              
                
                  α
                  *
                
                ,
                
                  β
                  *
                
              
              ]
            
            ⁡
            
              [
              
                
                  
                    1
                  
                  
                    0
                  
                
                
                  
                    0
                  
                  
                    0
                  
                
              
              ]
            
          
          ⁡
          
            [
            
              
                
                  α
                
              
              
                
                  β
                
              
            
            ]
          
        
      
    
  
  
    
      
        =
        
        ⁢
        
          αα
          *
        
      
    
  
  
    
      
        =
        
        ⁢
        
          
            
              
              α
              
            
            2
          
          .
        
      
    
  




By a similar computation:

p1=|β|2 

Thus, the squares of the magnitudes of the coefficients α and β in the expression |ψ=α|0+β|1 correspond to the probabilities that a measurement of a qubit in state |ψwill produce |0 and |1 , respectively.

FIG. 2A shows a unit sphere 202 centered within a Cartesian coordinate system with orthonormal spatial axes x 204, y 205, and z 206. The surface of this unit sphere represents possible qubit state vectors |ψ with unit modulus, analogous to the circle of an Argand diagram, discussed below, that represents complex numbers of unit modulus. FIG. 2B shows an arbitrary qubit state vector |ψ within the unit sphere shown in FIG. 2A. The vector of unit magnitude collinear with the positive z axis 208 is arbitrarily chosen to represent state vector |0 and the vector of unit magnitude co-linear with the negative z axis 210 is chosen to represent state vector |1 . Pairs of points at which a line passing through the origin intersects the unit sphere correspond to orthogonal state vectors. An arbitrary single-qubit state vector |ψ 212 is a linear combination of the two computational basis state vectors |0 and |1, as expressed by |ψ=α|0+β|1, and can thus be any vector that can be inscribed within the unit sphere, with the particular vector corresponding to |ψ depending on the values of coefficients α and β. The representation of the state of a qubit shown in FIG. 2B is referred to as a Bloch sphere.
FIG. 2C shows the Argand diagram frequently used to illustrate various ways to represent a complex number. The horizontal axis 220 represents the real numbers and the vertical axis 222 represents the imaginary numbers. The general expression for a complex number z is:

z=a+ib, 

where a and b are real numbers and i=√{square root over (−1)}. Because

a=r cos θ,

b=r sin θ,

as shown in FIG. 2C, the complex number z can be alternatively expressed in polar form as:





  
    
      
        
          z
          =
          
          ⁢
          
            r
            ⁡
            
              (
              
                
                  cos
                  ⁢
                  
                    
                  
                  ⁢
                  θ
                
                +
                
                  i
                  ⁢
                  
                    
                  
                  ⁢
                  sin
                  ⁢
                  
                    
                  
                  ⁢
                  θ
                
              
              )
            
          
        
        ,
      
    
  
  
    
      
        
          =
          
          ⁢
          
            r
            ⁢
            
              
            
            ⁢
            
              e
              
                i
                ⁢
                
                  
                
                ⁢
                θ
              
            
          
        
        ,
      
    
  
  
    
      
        =
        
        ⁢
        
          
            e
            iθ
          
          ⁢
          
            
          
          ⁢
          for
          ⁢
          
            
          
          ⁢
          
            
            r
            
          
        
      
    
  
  
    
      
        =
        
        ⁢
        1.
      
    
  




FIG. 2D shows a complete representation of the Bloch sphere for an arbitrary state vector |ψ. The state vector |ψ 230 can be specified with two angles θ 232 and φ234. Using the polar form for the complex coefficients α and β state vector |ψ can be expressed as:

|ψ=rαeiφα|0+rβeiφβ|1.

As previously discussed, the squares of the magnitudes of the coefficients α and β correspond to the probabilities that a measurement of a qubit in state |ψ will return state vectors |0 and |1 respectively. The state vector |ψ can be multiplied by an arbitrary complex number with unit modulus, eiγ, without changing the magnitudes of the squares of the coefficients α and β, as shown by:

eiγ|ψ=eiγrαeiφα|0+eiγrβeiφβ|1,

|eiγrαeiφα|2=eiγrαeiφαe−iγrαe−iφα=rα2=|α|2,

|eiγrβeiφβ|2=|β|2.

Thus, there is a global phase-shift degree of freedom in the expression of a state vector that does not affect the measurable properties associated with the state,

The state vector |ψ can alternately be expressed, using the Bloch-sphere angles shown in FIG. 2D, as:




  
    
    ψ
    〉
  
  =
  
    
      cos
      ⁢
      
        θ
        2
      
      ⁢
      
        
        0
        〉
      
    
    +
    
      
        e
        iφ
      
      ⁢
      sin
      ⁢
      
        θ
        2
      
      ⁢
      
        
          
          1
          〉
        
        .
      
    
  




A derivation of this expression from the previously presented expression |ψ=rαeiφα|0+rβeiφβ|1 for the state vector |ψ follows:




  
    
      
        
          
            
              
                e
                
                  
                    -
                    i
                  
                  ⁢
                  
                    
                  
                  ⁢
                  
                    φ
                    α
                  
                
              
              ⁢
              
                
                ψ
                〉
              
            
            =
            
            ⁢
            
              
                
                  e
                  
                    
                      -
                      i
                    
                    ⁢
                    
                      
                    
                    ⁢
                    
                      φ
                      α
                    
                  
                
                ⁢
                
                  r
                  α
                
                ⁢
                
                  e
                  
                    iφ
                    α
                  
                
                ⁢
                
                  
                  0
                  〉
                
              
              +
              
                
                  e
                  
                    iφ
                    α
                  
                
                ⁢
                
                  r
                  β
                
                ⁢
                
                  e
                  
                    i
                    ⁢
                    
                      
                    
                    ⁢
                    
                      φ
                      β
                    
                  
                
                ⁢
                
                  
                  1
                  〉
                
              
            
          
          ,
        
      
    
    
      
        
          =
          
          ⁢
          
            
              
                r
                α
              
              ⁢
              
                
                0
                〉
              
            
            +
            
              
                r
                β
              
              ⁢
              
                e
                
                  i
                  ⁡
                  
                    (
                    
                      
                        φ
                        β
                      
                      -
                      
                        φ
                        α
                      
                    
                    )
                  
                
              
              ⁢
              
                
                1
                〉
              
            
          
        
      
    
    
      
        
          
            =
            
            ⁢
            
              
                
                  r
                  α
                
                ⁢
                
                  
                  0
                  〉
                
              
              +
              
                
                  r
                  β
                
                ⁢
                
                  e
                  
                    i
                    ⁢
                    
                      
                    
                    ⁢
                    φ
                  
                
                ⁢
                
                  
                  1
                  〉
                
              
            
          
          ,
        
      
    
  




  
    
      
        
        ψ
        〉
      
      =
      
        
          
            r
            α
          
          ⁢
          
            
            0
            〉
          
        
        +
        
          
            r
            β
          
          ⁢
          
            e
            
              i
              ⁢
              
                
              
              ⁢
              φ
            
          
          ⁢
          
            
            1
            〉
          
        
      
    
    ,
    
      

    
    ⁢
    
      x
      =
      
        r
        ⁢
        
          
        
        ⁢
        sin
        ⁢
        
          
        
        ⁢
        
          θ
          ′
        
        ⁢
        cos
        ⁢
        
          
        
        ⁢
        φ
      
    
    ,
    
      

    
    ⁢
    
      y
      =
      
        r
        ⁢
        
          
        
        ⁢
        sin
        ⁢
        
          
        
        ⁢
        
          θ
          ′
        
        ⁢
        sin
        ⁢
        
          
        
        ⁢
        φ
      
    
    ,
    
      

    
    ⁢
    
      z
      =
      
        r
        ⁢
        
          
        
        ⁢
        cos
        ⁢
        
          
        
        ⁢
        
          θ
          ′
        
      
    
    ,
    
      

    
    ⁢
    
      r
      =
      1
    
    ,
    
      
        r
        α
      
      →
      z
    
    ,
    
      

    
    ⁢
    
      
        
          
          ψ
          〉
        
        ⁢
        cos
        ⁢
        
          
        
        ⁢
        
          θ
          ′
        
        ⁢
        
          
          0
          〉
        
      
      +
      
        
          e
          
            i
            ⁢
            
              
            
            ⁢
            φ
          
        
        ⁢
        
          
        
        ⁢
        sin
        ⁢
        
          
        
        ⁢
        
          θ
          ′
        
        ⁢
        
          
          1
          〉
        
      
    
    ,
    
      

    
    ⁢
    
      θ
      =
      
        2
        ⁢
        
          θ
          ′
        
      
    
    ,
    
      

    
    ⁢
    
      
        
        ψ
        〉
      
      =
      
        
          
            cos
            ⁡
            
              (
              
                θ
                2
              
              )
            
          
          ⁢
          
            
            0
            〉
          
        
        +
        
          
            e
            
              i
              ⁢
              
                
              
              ⁢
              φ
            
          
          ⁢
          
            sin
            ⁡
            
              (
              
                θ
                2
              
              )
            
          
          ⁢
          
            
              
              1
              〉
            
            .
          
        
      
    
  



The derivation uses a global phase factor to remove a phase coefficient from one of the terms and then employs spherical coordinate representations of the orthonormal axes x, y, and z as well as several substitutions to produce the final expression.

In the current discussion, a qubit is treated as a mathematical object with the above-described properties. However, these mathematically-described qubits correspond to actual physical hardware qubits that can be implemented using any of a number of different physical implementations, including trapped ions, optical cavities, and individual elementary particles, molecules, or aggregations of molecules that exhibit qubit behavior.
Various different primitive operations, corresponding to logic circuits in a digital computer and to computer instructions that control operation of logic circuits, can be performed on classical bits to produce classical bits with possibly altered state values. These primitive operations are referred to as “gates.” For example, when a signal corresponding to the state of a first bit is passed through a NOT gate and stored in a second classical bit, the state of the second classical bit is opposite from the state of the first classical bit. In fact, the NOT gate is the only fundamental, non-trivial, traditional, classical computing gate with a single-bit input and a single-bit output. By contrast, there are an infinite number of possible single-qubit quantum gates that change the state of a qubit. As can be seen in FIG. 2D, changing the state of a qubit changes the Block-sphere representation of the state. This change is generally viewed either as a rotation of the Block-sphere itself, generally resulting in a change of the basis vectors of the state vector, or is viewed as a rotation of the state vector within the Block sphere, generally resulting in a change of the coefficients of the state vector. Changing the state vector of a qubit is therefore referred to as a “rotation.” A rotation, state change, or single-qubit quantum-gate operation is represented mathematically by a unitary 2×2 matrix with complex elements:




  
    [
    
      
        
          a
        
        
          b
        
      
      
        
          
            -
            
              b
              *
            
          
        
        
          
            a
            *
          
        
      
    
    ]
  
  ,




where a and b are complex numbers and the notation “x*” indicates the complex conjugate of x. A unitary 2×2 matrix U with complex elements can be defined as a 2×2 matrix U with the following property:





  
    
      
        U
        †
      
      ⁢
      U
    
    =
    
      
        UU
        †
      
      =
      
        I
        =
        
          [
          
            
              
                1
              
              
                0
              
            
            
              
                0
              
              
                1
              
            
          
          ]
        
      
    
  
  ,
  
    
      where
      ⁢
      
        
      
      ⁢
      
        U
        †
      
    
    =
    
      
        [
        
          
            
              
                a
                *
              
            
            
              
                -
                b
              
            
          
          
            
              
                b
                *
              
            
            
              a
            
          
        
        ]
      
      .
    
  




The adjoint U† of a unitary matrix U is the complex-conjugate transpose of the unitary U and is the inverse of U, denoted U−1. The fact that multiplication of the adjoint unitary operation by the unitary operation, or vice versa, produces the identity operator Id, or identity matrix I, can be seen by:





  
    
      
        [
        
          
            
              
                a
                *
              
            
            
              
                -
                b
              
            
          
          
            
              
                b
                *
              
            
            
              a
            
          
        
        ]
      
      ⁡
      
        [
        
          
            
              a
            
            
              b
            
          
          
            
              
                -
                
                  b
                  *
                
              
            
            
              
                a
                *
              
            
          
        
        ]
      
    
    =
    
      
        [
        
          
            
              
                
                  
                    a
                    *
                  
                  ⁢
                  a
                
                +
                
                  bb
                  *
                
              
            
            
              
                
                  
                    a
                    *
                  
                  ⁢
                  b
                
                -
                
                  ba
                  *
                
              
            
          
          
            
              
                
                  ab
                  *
                
                -
                
                  ab
                  *
                
              
            
            
              
                
                  bb
                  *
                
                +
                
                  aa
                  *
                
              
            
          
        
        ]
      
      =
      
        [
        
          
            
              1
            
            
              0
            
          
          
            
              0
            
            
              1
            
          
        
        ]
      
    
  
  ,




since

a*a=bb*=|a|2+|b|2=1

Thus, the operation of a quantum gate on a qubit with state |ψ, |ψ is expressed in vector form as





  
    
      
      ψ
      〉
    
    =
    
      [
      
        
          
            α
          
        
        
          
            β
          
        
      
      ]
    
  
  ,




can be expressed as left-hand multiplication of the state vector by the unitary matrix corresponding to the unitary operation:





  
    
      [
      
        
          
            a
          
          
            b
          
        
        
          
            
              -
              
                b
                *
              
            
          
          
            
              a
              *
            
          
        
      
      ]
    
    ⁡
    
      [
      
        
          
            α
          
        
        
          
            β
          
        
      
      ]
    
  
  =
  
    
      [
      
        
          
            
              
                a
                ⁢
                
                  
                
                ⁢
                α
              
              +
              
                b
                ⁢
                
                  
                
                ⁢
                β
              
            
          
        
        
          
            
              
                
                  -
                  
                    b
                    *
                  
                
                ⁢
                α
              
              +
              
                
                  a
                  *
                
                ⁢
                β
              
            
          
        
      
      ]
    
    =
    
      
        [
        
          
            
              
                α
                ′
              
            
          
          
            
              
                β
                ′
              
            
          
        
        ]
      
      .
    
  




In the current discussion, quantum gates and quantum circuits are generally single-qubit quantum gates and quantum circuits, and therefore are assumed to have 2×2 complex matrix representations.

FIG. 3 illustrates a quantum circuit comprising two quantum gates. In FIG. 3, a qubit in a first state |ψ1, represented by the Bloch sphere 302, is transformed by unitary operation U 304 to a qubit in state |ψ2, as represented by Bloch sphere 306, which is, in turn, transformed by unitary operation V 308 to place the qubit in state |ψ3, as represented by Bloch sphere 310. This quantum circuit can be represented as the gate sequence UV which transforms the qubit as follows:




  
    
      U
      ⁢
      
        
        
          ψ
          1
        
        〉
      
    
    =
    
      
        
          
            
              
              
                ψ
                2
              
              〉
            
            ⁢
            
              

            
            [
            
              
                
                  
                    U
                    11
                  
                
                
                  
                    U
                    12
                  
                
              
              
                
                  
                    U
                    21
                  
                
                
                  
                    U
                    22
                  
                
              
            
            ]
          
          ⁡
          
            [
            
              
                
                  
                    α
                    1
                  
                
              
              
                
                  
                    β
                    1
                  
                
              
            
            ]
          
        
        →
        
          [
          
            
              
                
                  
                    
                      U
                      11
                    
                    ⁢
                    
                      α
                      1
                    
                  
                  +
                  
                    
                      U
                      12
                    
                    ⁢
                    
                      β
                      1
                    
                  
                
              
            
            
              
                
                  
                    
                      U
                      21
                    
                    ⁢
                    
                      α
                      1
                    
                  
                  +
                  
                    
                      U
                      22
                    
                    ⁢
                    
                      β
                      1
                    
                  
                
              
            
          
          ]
        
      
      =
      
        [
        
          
            
              
                α
                2
              
            
          
          
            
              
                β
                2
              
            
          
        
        ]
      
    
  
  ,
  
    

  
  ⁢
  
    
      V
      ⁢
      
        
        
          ψ
          2
        
        〉
      
    
    =
    
      
        
          
            
              
              
                ψ
                3
              
              〉
            
            ⁢
            
              

            
            [
            
              
                
                  
                    V
                    11
                  
                
                
                  
                    V
                    12
                  
                
              
              
                
                  
                    V
                    21
                  
                
                
                  
                    V
                    22
                  
                
              
            
            ]
          
          ⁡
          
            [
            
              
                
                  
                    α
                    2
                  
                
              
              
                
                  
                    β
                    2
                  
                
              
            
            ]
          
        
        →
        
          [
          
            
              
                
                  
                    
                      V
                      11
                    
                    ⁢
                    
                      α
                      2
                    
                  
                  +
                  
                    
                      V
                      12
                    
                    ⁢
                    
                      β
                      2
                    
                  
                
              
            
            
              
                
                  
                    
                      V
                      21
                    
                    ⁢
                    
                      α
                      2
                    
                  
                  +
                  
                    
                      V
                      22
                    
                    ⁢
                    
                      β
                      2
                    
                  
                
              
            
          
          ]
        
      
      =
      
        
          [
          
            
              
                
                  
                    
                      V
                      11
                    
                    ⁡
                    
                      (
                      
                        
                          
                            U
                            11
                          
                          ⁢
                          
                            α
                            1
                          
                        
                        +
                        
                          
                            U
                            12
                          
                          ⁢
                          
                            β
                            1
                          
                        
                      
                      )
                    
                  
                  +
                  
                    
                      V
                      12
                    
                    ⁡
                    
                      (
                      
                        
                          
                            U
                            21
                          
                          ⁢
                          
                            α
                            1
                          
                        
                        +
                        
                          
                            U
                            22
                          
                          ⁢
                          
                            β
                            1
                          
                        
                      
                      )
                    
                  
                
              
            
            
              
                
                  
                    
                      V
                      21
                    
                    ⁡
                    
                      (
                      
                        
                          
                            U
                            11
                          
                          ⁢
                          
                            α
                            1
                          
                        
                        +
                        
                          
                            U
                            12
                          
                          ⁢
                          
                            β
                            1
                          
                        
                      
                      )
                    
                  
                  +
                  
                    
                      V
                      22
                    
                    ⁡
                    
                      (
                      
                        
                          
                            U
                            21
                          
                          ⁢
                          
                            α
                            1
                          
                        
                        +
                        
                          
                            U
                            22
                          
                          ⁢
                          
                            β
                            1
                          
                        
                      
                      )
                    
                  
                
              
            
          
          ]
        
        =
        
          
            [
            
              
                
                  
                    α
                    3
                  
                
              
              
                
                  
                    β
                    3
                  
                
              
            
            ]
          
          .
        
      
    
  




Alternatively, one can multiply the two matrices representing operations U and V together to produce matrix W, and then left-hand multiply state vector |ψ1 by W to produce the same result:





  
    
      U
      ⁢
      
        
      
      ⁢
      V
      ⁢
      
        
      
      ⁢
      
        
          W
          ⁢
          
            

          
          [
          
            
              
                
                  U
                  11
                
              
              
                
                  U
                  12
                
              
            
            
              
                
                  U
                  21
                
              
              
                
                  U
                  22
                
              
            
          
          ]
        
        ⁡
        
          [
          
            
              
                
                  V
                  11
                
              
              
                
                  V
                  12
                
              
            
            
              
                
                  V
                  21
                
              
              
                
                  V
                  22
                
              
            
          
          ]
        
      
    
    =
    
      [
      
        
          
            
              
                
                  U
                  11
                
                ⁢
                
                  V
                  11
                
              
              +
              
                
                  U
                  12
                
                ⁢
                
                  V
                  21
                
              
            
          
          
            
              
                
                  U
                  11
                
                ⁢
                
                  V
                  12
                
              
              +
              
                
                  U
                  12
                
                ⁢
                
                  V
                  22
                
              
            
          
        
        
          
            
              
                
                  U
                  21
                
                ⁢
                
                  V
                  11
                
              
              +
              
                
                  U
                  22
                
                ⁢
                
                  V
                  21
                
              
            
          
          
            
              
                
                  U
                  21
                
                ⁢
                
                  V
                  12
                
              
              +
              
                
                  U
                  22
                
                ⁢
                
                  V
                  22
                
              
            
          
        
      
      ]
    
  
  ,
  
    

  
  ⁢
  
    
      W
      ⁢
      
        
        
          ψ
          1
        
        〉
      
      ⁢
      
        
          
            
            
              ψ
              3
            
            〉
          
          ⁢
          
            

          
          [
          
            
              
                
                  
                    
                      U
                      11
                    
                    ⁢
                    
                      V
                      11
                    
                  
                  +
                  
                    
                      U
                      12
                    
                    ⁢
                    
                      V
                      21
                    
                  
                
              
              
                
                  
                    
                      U
                      11
                    
                    ⁢
                    
                      V
                      12
                    
                  
                  +
                  
                    
                      U
                      12
                    
                    ⁢
                    
                      V
                      22
                    
                  
                
              
            
            
              
                
                  
                    
                      U
                      21
                    
                    ⁢
                    
                      V
                      11
                    
                  
                  +
                  
                    
                      U
                      22
                    
                    ⁢
                    
                      V
                      21
                    
                  
                
              
              
                
                  
                    
                      U
                      21
                    
                    ⁢
                    
                      V
                      12
                    
                  
                  +
                  
                    
                      U
                      22
                    
                    ⁢
                    
                      V
                      22
                    
                  
                
              
            
          
          ]
        
        ⁡
        
          [
          
            
              
                
                  α
                  1
                
              
            
            
              
                
                  β
                  1
                
              
            
          
          ]
        
      
    
    =
    
      
        [
        
          
            
              
                
                  
                    α
                    1
                  
                  ⁡
                  
                    (
                    
                      
                        
                          U
                          11
                        
                        ⁢
                        
                          V
                          11
                        
                      
                      +
                      
                        
                          U
                          12
                        
                        ⁢
                        
                          V
                          21
                        
                      
                    
                    )
                  
                
                +
                
                  
                    β
                    1
                  
                  ⁡
                  
                    (
                    
                      
                        
                          U
                          11
                        
                        ⁢
                        
                          V
                          12
                        
                      
                      +
                      
                        
                          U
                          12
                        
                        ⁢
                        
                          V
                          22
                        
                      
                    
                    )
                  
                
              
            
          
          
            
              
                
                  
                    α
                    1
                  
                  ⁡
                  
                    (
                    
                      
                        
                          U
                          21
                        
                        ⁢
                        
                          V
                          11
                        
                      
                      +
                      
                        
                          U
                          22
                        
                        ⁢
                        
                          V
                          21
                        
                      
                    
                    )
                  
                
                +
                
                  
                    β
                    1
                  
                  ⁡
                  
                    (
                    
                      
                        
                          U
                          21
                        
                        ⁢
                        
                          V
                          12
                        
                      
                      +
                      
                        
                          U
                          22
                        
                        ⁢
                        
                          V
                          22
                        
                      
                    
                    )
                  
                
              
            
          
        
        ]
      
      =
      
        
          [
          
            
              
                
                  α
                  3
                
              
            
            
              
                
                  β
                  3
                
              
            
          
          ]
        
        .
      
    
  




A quantum circuit can therefore be specified as a sequence of quantum gates in which the quantum gates are symbolically represented or, equivalently, numerically represented. There are several ways to look at a quantum circuit. One can, as discussed above, multiply the matrices corresponding to the component quantum gates together in the order specified by the symbol sequence to produce a final, resultant, 2×2 complex matrix that represents the same state change, in a single operation or quantum gate, corresponding to the state change produced by sequential application of the quantum gates specified in the original symbol sequence. A quantum circuit can be viewed as a design for an actual hardware circuit in a quantum computer, where the hardware circuit needs to perform the operation specified by the single-gate representation of the quantum circuit, or can be viewed as a quantum-computing program, in which operations corresponding to the sequence of quantum gates represented by the symbol sequence are applied to a qubit in order to produce a final qubit state.
The term “quantum circuit” is thus somewhat interchangeable with the term “quantum gate,” as a quantum circuit can be expressed as a resultant unitary operator. However, symbolically represented quantum circuits are useful in quantum circuit design for many reasons. In many cases, it is difficult to design and implement arbitrary physical quantum gates, but far easier to design and implement certain standard quantum gates, several of which are shown below. Error detection and correction is often needed for fault-tolerant quantum computing, but, in many cases, error-detection-and-correction methods have been worked out and are available for only certain well-known standard quantum gates. Designing and implementing quantum circuits as sequences of the well-known standard quantum gates provides a design and implementation to which error detection and error correction can be applied.
The matrix representations of a number of quantum gates, including the gates corresponding to single-qubit operators H, T, S, X, Y, and Z, are provided below:




  
    H
    =
    
      
        1
        
          2
        
      
      ⁡
      
        [
        
          
            
              1
            
            
              1
            
          
          
            
              1
            
            
              
                -
                1
              
            
          
        
        ]
      
    
  
  ,
  
    

  
  ⁢
  
    T
    =
    
      [
      
        
          
            1
          
          
            0
          
        
        
          
            0
          
          
            
              e
              
                i
                ⁢
                
                  π
                  4
                
              
            
          
        
      
      ]
    
  
  ,
  
    

  
  ⁢
  
    S
    =
    
      
        [
        
          
            
              1
            
            
              0
            
          
          
            
              0
            
            
              i
            
          
        
        ]
      
      =
      TT
    
  
  ,
  
    

  
  ⁢
  
    X
    =
    
      [
      
        
          
            0
          
          
            1
          
        
        
          
            1
          
          
            0
          
        
      
      ]
    
  
  ,
  
    

  
  ⁢
  
    Y
    =
    
      [
      
        
          
            0
          
          
            
              -
              i
            
          
        
        
          
            i
          
          
            0
          
        
      
      ]
    
  
  ,
  
    

  
  ⁢
  
    Z
    =
    
      
        [
        
          
            
              1
            
            
              0
            
          
          
            
              0
            
            
              
                -
                1
              
            
          
        
        ]
      
      .
    
  




Multiplying quantum gate H by itself generates the identity matrix I or, equivalently, the Id operation:





  HH
  =
  
    
      
        
          1
          2
        
        ⁡
        
          [
          
            
              
                1
              
              
                1
              
            
            
              
                1
              
              
                
                  -
                  1
                
              
            
          
          ]
        
      
      ⁡
      
        [
        
          
            
              1
            
            
              1
            
          
          
            
              1
            
            
              
                -
                1
              
            
          
        
        ]
      
    
    =
    
      
        
          1
          2
        
        ⁡
        
          [
          
            
              
                2
              
              
                0
              
            
            
              
                0
              
              
                2
              
            
          
          ]
        
      
      =
      
        
          [
          
            
              
                1
              
              
                0
              
            
            
              
                0
              
              
                1
              
            
          
          ]
        
        =
        
          I
          .
        
      
    
  




The number of times that a quantum gate or operator is multiplied by itself to generate the identity operation Id is the algebraic order of the quantum gate. Thus, the algebraic order of quantum gate H is 2. The algebraic order of the quantum gate T is 8:





  TTTTTTTT
  =
  
    
      [
      
        
          
            1
          
          
            0
          
        
        
          
            0
          
          
            1
          
        
      
      ]
    
    .
  




All of the possible 2×2 unitary matrices corresponding to rotations of state vectors in dual inner-product spaces defined by two orthonormal basis vectors form an infinite group referred to as U(2). The group is infinite because the 2×2 unitary matrices are defined in terms of two complex numbers, of which there are an infinite number of pairs that meet the above-discussed constraints for rotation matrices. There are an infinite number of global phase-rotation matrices, or operators, that are members of U(2). These global phase-rotation matrices, or operators, form an infinite subgroup of U(2) that is referred to as GPh:



  
    
      GPh
      =
      
        
          [
          
            
              [
              
                
                  
                    
                      e
                      iα
                    
                  
                  
                    0
                  
                
                
                  
                    0
                  
                  
                    
                      e
                      iα
                    
                  
                
              
              ]
            
            ,
            
              [
              
                
                  
                    
                      e
                      iβ
                    
                  
                  
                    0
                  
                
                
                  
                    0
                  
                  
                    
                      e
                      iβ
                    
                  
                
              
              ]
            
            ,
            
              [
              
                
                  
                    
                      e
                      iγ
                    
                  
                  
                    0
                  
                
                
                  
                    0
                  
                  
                    
                      e
                      iγ
                    
                  
                
              
              ]
            
            ,
            ...
          
          ⁢
          
            
          
          ]
        
        ⁢
        where
      
    
    ⁢
    
      
    
  




  
    α
    ,
    β
    ,
    γ
    ,
    
      ...
      ⁢
      
        
      
      ∈
      
        R
        .
      
    
  



The infinite group U(2) can be factored by the subgroup GPh to generate the infinite group PSU(2), where PSU(2) is U(2) modulo GPh:





  
    
      U
      ⁡
      
        (
        2
        )
      
    
    =
    
      [
      
        ...
        ⁢
        
          
        
        ⁢
        
          e
          
            iφ
            a
          
        
        ⁢
        
          U
          j
        
        ⁢
        
          
        
        ⁢
        ...
        ⁢
        
          
        
        ⁢
        
          e
          
            iφ
            b
          
        
        ⁢
        
          U
          j
        
        ⁢
        
          
        
        ⁢
        ...
        ⁢
        
          
        
        ⁢
        
          e
          
            iφ
            c
          
        
        ⁢
        
          U
          j
        
        ⁢
        
          
        
        ⁢
        ...
        ⁢
        
          
        
        ⁢
        
          e
          
            iφ
            a
          
        
        ⁢
        
          U
          k
        
        ⁢
        
          
        
        ⁢
        ...
        ⁢
        
          
        
        ⁢
        
          e
          
            iφ
            b
          
        
        ⁢
        
          U
          k
        
        ⁢
        
          
        
        ⁢
        ...
        ⁢
        
          
        
        ⁢
        
          e
          
            iφ
            c
          
        
        ⁢
        
          U
          k
        
        ⁢
        
          
        
        ⁢
        ...
        ⁢
        
          
        
        ⁢
        
          e
          
            iφ
            a
          
        
        ⁢
        
          U
          l
        
        ⁢
        
          
        
        ⁢
        ...
        ⁢
        
          
        
        ⁢
        
          e
          
            iφ
            b
          
        
        ⁢
        
          U
          l
        
        ⁢
        
          
        
        ⁢
        ...
      
      ]
    
  
  ,
  
    

  
  ⁢
  
    
      
        U
        ⁡
        
          (
          2
          )
        
      
      GPh
    
    =
    
      
        [
        
          ...
          ⁢
          
            
          
          ⁢
          
            U
            j
          
          ⁢
          
            
          
          ⁢
          ...
          ⁢
          
            
          
          ⁢
          
            U
            k
          
          ⁢
          
            
          
          ⁢
          ...
          ⁢
          
            
          
          ⁢
          
            U
            l
          
          ⁢
          
            
          
          ⁢
          ...
        
        ]
      
      =
      
        PSU
        ⁡
        
          (
          2
          )
        
      
    
  
  ,




where a, b, c, j, k, and l are integer indexes. The trace of a matrix is the sum of the diagonal elements of the matrix. The traces of all members of U(2) that map to a particular member of PSU(2) by the modulo operation with respect to GPh are identical:




  
    
      tr
      ⁡
      
        (
        
          
            [
            
              
                
                  
                    e
                    iφ
                  
                
                
                  0
                
              
              
                
                  0
                
                
                  
                    e
                    iφ
                  
                
              
            
            ]
          
          ⁡
          
            [
            
              
                
                  a
                
                
                  b
                
              
              
                
                  
                    -
                    
                      b
                      *
                    
                  
                
                
                  
                    a
                    *
                  
                
              
            
            ]
          
        
        )
      
    
    =
    
      
        
          e
          iφ
        
        ⁢
        
          tr
          ⁡
          
            (
            
              [
              
                
                  
                    a
                  
                  
                    b
                  
                
                
                  
                    
                      -
                      
                        b
                        *
                      
                    
                  
                  
                    
                      a
                      *
                    
                  
                
              
              ]
            
            )
          
        
      
      =
      
        tr
        ⁡
        
          (
          
            [
            
              
                
                  a
                
                
                  b
                
              
              
                
                  
                    -
                    
                      b
                      *
                    
                  
                
                
                  
                    a
                    *
                  
                
              
            
            ]
          
          )
        
      
    
  




  
    
      since
      ⁢
      
        
      
      ⁢
      
        
        
          e
          iφ
        
        
      
    
    =
    1.
  



FIGS. 4A-F illustrate the rotations of qubit state vectors, illustrated using the Bloch-sphere convention, produced by various operators expressed as 2×2 matrices. FIGS. 4A-C illustrate the Pauli operations X, Y, and Z. In FIG. 4A, an initial qubit state vector |ψ 402 is operated on by the Pauli operator X to produce the rotated state vector X|ψ 404. This rotation is a rotation about the Bloch-sphere x axis. In FIG. 4A, the circle 406 inscribed within the Bloch sphere 408 describes all possible rotations about the x axis of the original state vector |ψ 402. The particular rotation corresponding to the X operator is a rotation of π radians about the x axis. Thus, the head of the original state vector |ψ 402 can be viewed, as indicated by small arrows, such as small arrow 410, as following the circle to the point 412 corresponding to the rotated state vector X|ψ. A line in the plane of the circle connecting the original position of the original state vector |ψ with the position of the rotated stated vector X|ψ414 passes through the x axis at point 416. Note that both |ψ and X|ψ are unit vectors with heads coincident with the surface of the Bloch sphere. Using the same illustration conventions used in FIG. 4A, FIGS. 4B and 4C illustrate the Pauli Y and Z operators operating on an initial state vector |ψ to generate a rotated state vector Y|ψ and Z|ψ, respectively, which are π-radian rotations about the y and z axes. As shown in FIGS. 4A-C, the X, Y, and Z operators may be expressed as operators, 2×2 matrices, or by the rotation notations Rx(π), Ry(π), and Rz(π). The rotations Rx(θ), Ry(θ), and Rz(θ) may be equivalently designated as X(θ), Y(θ), Z(θ), respectively.
FIG. 4D illustrates the rotation produced by the T operator. The T operator, or T gate, produces a rotation of




  π
  4




radians about the z axis 420. FIG. 4E shows the rotation produced by the S operator or S gate, which is a rotation of





  π
  2




radians about the z axis. Because S=TT, the z rotation produced by the S gate is





  
    
      R
      z
    
    ⁡
    
      (
      
        π
        2
      
      )
    
  
  =
  
    
      
        R
        z
      
      ⁡
      
        (
        
          π
          4
        
        )
      
    
    ⁢
    
      
        R
        z
      
      ⁡
      
        (
        
          π
          4
        
        )
      
    
  




(422 in FIG. 4E). Finally, FIG. 4F shows the rotation produced by the Hadamard operator H. As shown in FIG. 4F, the H operator can be obtained from a first rotation of





  π
  2




radians about the z axis 430, a rotation of





  π
  2




radians about the x axis 432, and then another rotation of





  π
  2




radians about the z axis 434. Note that the rotation operators, like the equivalent 2×2 matrix operators, are applied right to left.

It is well known that the group of symbolic representations of quantum circuits generated by the quantum-gate basis <H,T>, where H and T are two of the quantum-gate operators discussed above, is everywhere dense in PSU(2). The infinite group of symbolic representations of quantum circuits generated by the basis <H,T> is:




  
    
      〈
      
        H
        ,
        T
      
      〉
    
    →
    
      [
      
        
          
            
              T
              ,
              TT
              ,
              TH
              ,
              TTT
              ,
              TTH
              ,
              THT
              ,
              THH
              ,
              ...
              ⁢
              
                
              
              ,
            
          
        
        
          
            
              H
              ,
              HT
              ,
              HH
              ,
              HTT
              ,
              HTH
              ,
              HHT
              ,
              HHH
              ,
              ...
            
          
        
      
      ]
    
  
  =
  
    
      U
      
        〈
        
          H
          ,
          T
        
        〉
      
    
    .
  




FIG. 5 illustrates what it means for U<H,T> to be everywhere dense in PSU(2). In FIG. 5, a number of points representing elements of PSU(2), such as point 506, are shown distributed within an operator space. The group U<H,T> is a subset of PSU(2). Considering any arbitrary member or members of PSU(2), such as the two members of PSU(2) represented by points 508 and 510, and constructing a ball of radius ε>0 about the selected members of PSU(2), as represented in plane projection by dashed circles 512 and 514, it is guaranteed that members of U<H,T> can be found within each ball, such as U<H,T> members 516-520, regardless of the magnitude of ε. In some cases, the selected member of PSU(2) may also be a member of U<H,T>, but, in all cases, a member of U<H,T> can be found nearby. Thus, for any unitary circuit u in PSU(2) and for any distance-metric value ε>0, there exists a circuit u′ in U<H,T> such that the distance between u′ and u is less than ε. In other words, any quantum circuit in PSU(2) can be approximated as closely as desired by a corresponding quantum circuit generated only from H and T quantum gates. The quantum circuits in U<H,T> can be expressed and represented as sequences of H and T symbols. Various different distance metrics for the distance between quantum circuits U′ and U can be used, such as the metric:

dist(U′,U)=√{square root over ((2−|tr(U′·U†)|)/2)},

where U† is the adjoint, or complex-conjugate transpose, of U.

It is generally a difficult problem to implement an arbitrary quantum circuit U selected from PSU(2). However, the fact that an arbitrary quantum gate U can be approximated, to any desired level of approximation, by a quantum circuit U′ selected from U<H,T> provides a direction for automating the determination of practically implementable and efficient quantum circuits.
As discussed above, the state of a qubit can be expressed as a state vector within the Bloch sphere. Another representation of the state of the qubit is referred to as the density matrix for the qubit. The density matrix ρ for a qubit in state |ψ=a|0+b|1 can be constructed by:




  
    
      
        
          ρ
          =
          
          ⁢
          
            
              
              ψ
              〉
            
            ⁢
            
              
            
            ⁢
            
              〈
              ψ
              
            
          
        
        ,
      
    
  
  
    
      
        
          =
          
          ⁢
          
            
              [
              
                
                  
                    a
                  
                
                
                  
                    b
                  
                
              
              ]
            
            ⁡
            
              [
              
                
                  a
                  *
                
                ,
                
                  b
                  *
                
              
              ]
            
          
        
        ,
      
    
  
  
    
      
        
          =
          
          ⁢
          
            [
            
              
                
                  
                    aa
                    *
                  
                
                
                  
                    ab
                    *
                  
                
              
              
                
                  
                    ba
                    *
                  
                
                
                  
                    bb
                    *
                  
                
              
            
            ]
          
        
        ,
      
    
  
  
    
      
        =
        
        ⁢
        
          
            [
            
              
                
                  
                    
                      
                      a
                      
                    
                    2
                  
                
                
                  
                    ab
                    *
                  
                
              
              
                
                  
                    ba
                    *
                  
                
                
                  
                    
                      
                      b
                      
                    
                    2
                  
                
              
            
            ]
          
          .
        
      
    
  




In the density matrix for a state vector, the probabilities associated with each basis vector appear along the diagonal.

An operator, such as the operator H, when applied to a qubit state, may generate the same state multiplied by a complex number. For example:

H|H=a|H, 

where |H is a state; and

a is a complex number.
In this case, |H is referred to as an eigenstate of the operator H and the complex number a is referred to as the corresponding eigenvalue of the operator H. The eigenstate of the operator H with eigenvalue a=1 is:




  
    
    H
    〉
  
  =
  
    
      cos
      ⁢
      
        π
        8
      
      ⁢
      
        
        0
        〉
      
    
    +
    
      sin
      ⁢
      
        π
        8
      
      ⁢
      
        
          
          1
          〉
        
        .
      
    
  




In certain cases, in implementing quantum circuits, it is desirable to prepare a qubit with a state vector equal to |H. In other words, an implementation may require a qubit in state |H as input to a quantum circuit, where the qubit in state |H is referred to as a “resource state.” In the general case, a qubit can be prepared with a state vector only approximately equal to a desired eigenstate. The fidelity of a prepared state with respect to the eigenstate |H, FH, is obtained from the density matrix p representation of the qubit by:

FH(ρ)=.

The fidelity with respect to eigenstate |H is 1 for a qubit in state |H:

FH()=1.

For a qubit that is not in eigenstate |H, but is instead in a state |{tilde over (H)} that is displaced by a displacement angle from |H that represents noise, the fidelity is within the range [0,1) or:

0≦FH()<1.

The error probability or discrepancy between a qubit in state |{tilde over (H)} with respect to eigenstate |H is then:

1−FH().

Alternatively, the error probability or discrepancy between a qubit in state |{tilde over (H)} with respect to eigenstate |H can be considered to be the angular displacement between the two state vectors used to represent states |{tilde over (H)} and |H.

The Pauli group P1 on one qubit is defined to include elements represented by the 2×2 Pauli and identity matrices together with the multiplicative factors ±1 and ±i:

P1={±X,±iX,±Y,±iY,±Z,±iZ,±I,±iI}. 

The Pauli group  on n qubits is defined to be all n-fold tensor products of the elements of P1. The n-qubit Clifford group consists of the unitary operators that normalize the Pauli group :

Clifford group={UεU(2n)|σεUσU+ε}/U(1),

where group U(1) includes complex-number elements and is included in U(2). The phrase “Clifford operation” refers to any quantum operation that can be implemented using Clifford unitaries, where Clifford unitaries are elements of the Clifford group, together with preparation and measurement in the standard basis. States that can be prepared with Clifford operations are known as “stabilizer states.”

The eigenstate |H is not a stabilizer state, because it is stabilized by the Hadamard gate rather than by a tensor product of Pauli gates. Clifford operations together with preparation and measurement in the standard basis cannot therefore be used to prepare a qubit in state |H. However, there is a well-known process, known as magic-state distillation, that can be implemented with Clifford gates to produce qubits with high fidelities with respect to the non-stabilizer state |H. States such as |H, which can be distilled by this process, are referred to as “magic states.”
FIG. 6 illustrates the magic-state distillation process. In FIG. 6, an implementation of the magic-state distillation process 602, referred to as a “magic-state distillery,” receives, as input, a number m of input qubits 604 in noisy states |{tilde over (H)}. These noisy states |{tilde over (H)} may differ from one another, but are characterized as having error probabilities or angular displacements with respect to the magic state |H less than e1:

1−FH()≦e1.

The magic-state distillery outputs a number n of qubits 606 in states |H′, where:

1−FH()≦e2,

e2<e1.

FIGS. 7A-B illustrate the single-qubit Clifford group. FIG. 7A shows, in tabular form, the elements of the single-qubit Clifford group using the notation Gx, where x is an integer in {0, 1, . . . , 23}, paired with symbolic representations in the <H,S> basis. FIG. 7B provides a group-multiplication table for the single-qubit Clifford group. Group multiplication of any two elements Gx and Gy of the single-qubit Clifford group generates an element of the single-qubit Clifford group according to the multiplication rules shown in FIG. 7B.
A Quantum Circuit that Produces Non-Stabilizer Qubit States
The current subsection is directed to the production of non-stabilizer qubit states by a ladder-like quantum-circuit subsystem and represents one family of quantum circuits to which the current application is directed. As discussed above, determining a fault-tolerant implementation for an arbitrary quantum gate U in U(2) is, in general, a computationally difficult task. Various approximation methods are currently employed. The current application discloses a new approach that provides significant advantages, as an example of an application of non-stabilizer qubit states prepared by the quantum-circuit subsystem, discussed in the current subsection.
FIG. 8 illustrates one implementation of an arbitrary single-qubit unitary quantum gate. The unitary quantum gate 802 receives, as input, a qubit in state |ψ 804 and produces, as output, a qubit in state U|ψ 806, where U is any desired unitary operator. The unitary quantum gate, in one implementation, includes quantum circuitry 808 that involves a finite number of Clifford gates that consume qubits in prepared states, alternatively referred to as “resource states.” The consumption of resource states by the quantum circuitry 808 is referred to as “online” processing, and the number of resource states consumed is referred to as the “online cost” of the unitary quantum gate. The resource states are prepared by resource-state factories (“RSFs”) 812-818 that consume magic-state qubits produced by magic-state distilleries 820 and 822, referred to as “offline” processing, with the number of magic-state qubits consumed referred to as the “offline cost.” In certain implementations, the resource states are qubits with states |Hi), produced by ladder-like-quantum-circuit-subsystem RSFs 812-815, and the magic-state qubits produced by the magic-state distilleries each have states close to state |H. Various alternative implementations may adjust the relative proportion of online cost to offline cost by moving a portion of the online processing to offline processing. Implementation details are provided below.
FIGS. 9A-B each illustrate two portions of two planes inscribed within the Bloch sphere and an operation that rotates a vector |ψ from the xz Bloch-sphere plane to the xy Bloch-sphere plane. The shaded plane portion 902 represents the xz Bloch-sphere plane. A state vector |ψ 904 is shown lying within this plane. Shaded plane portion 906 represents the xy plane within the Bloch sphere. The vector |ψ in the xz plane 904 with Bloch-sphere angles θ and φ=0 can be rotated to lie within the xy plane with Bloch-sphere angles




  
    θ
    ′
  
  =
  
    π
    2
  




and





  
    φ
    ′
  
  =
  
    
      π
      2
    
    -
    
      θ
      ⁢
      
        
      
      ⁢
      908
    
  




by the combination of operators HSHX. Thus, given a quantum-circuit subsystem that generates qubits with state vectors lying in the xz-plane, a straightforward combination of Clifford gates can be used to rotate the xz-plane vectors into corresponding vectors within the xy plane. The rotation is, of course, reversible. Furthermore, a combination of three rotations about any two non-colinear Bloch-sphere vectors, such as vectors coincident with two different spatial axes, can be used to rotate a given state vector into any arbitrary target state vector.

The unitary operation corresponding to the combination of unitary quantum gates HSHX is, up to a global phase factor:




  
    
      
        
          HSHX
          =
          
          ⁢
          
            
              
                
                  1
                  
                    2
                  
                
                ⁡
                
                  [
                  
                    
                      
                        1
                      
                      
                        1
                      
                    
                    
                      
                        1
                      
                      
                        
                          -
                          1
                        
                      
                    
                  
                  ]
                
              
              ⁡
              
                [
                
                  
                    
                      1
                    
                    
                      0
                    
                  
                  
                    
                      0
                    
                    
                      i
                    
                  
                
                ]
              
            
            ⁢
            
              
                
                  1
                  
                    2
                  
                
                ⁡
                
                  [
                  
                    
                      
                        1
                      
                      
                        1
                      
                    
                    
                      
                        1
                      
                      
                        
                          -
                          1
                        
                      
                    
                  
                  ]
                
              
              ⁡
              
                [
                
                  
                    
                      0
                    
                    
                      1
                    
                  
                  
                    
                      1
                    
                    
                      0
                    
                  
                
                ]
              
            
          
        
        ,
      
    
  
  
    
      
        
          =
          
          ⁢
          
            
              1
              
                2
              
            
            ⁢
            
              
                e
                
                  
                    -
                    i
                  
                  ⁢
                  
                    π
                    4
                  
                
              
              ⁡
              
                [
                
                  
                    
                      1
                    
                    
                      i
                    
                  
                  
                    
                      i
                    
                    
                      1
                    
                  
                
                ]
              
            
          
        
        ,
      
    
  
  
    
      
        ≅
        
        ⁢
        
          
            
              1
              
                2
              
            
            ⁡
            
              [
              
                
                  
                    1
                  
                  
                    i
                  
                
                
                  
                    i
                  
                  
                    1
                  
                
              
              ]
            
          
          .
        
      
    
  




Given a qubit with a state or rotation lying in the xz plane with a Bloch-sphere angle θ:





  
    
      
      ψ
      〉
    
    =
    
      [
      
        
          
            cos
          
          
            
              θ
              2
            
          
        
        
          
            sin
          
          
            
              θ
              2
            
          
        
      
      ]
    
  
  ,




the HSHX operator can be applied to the qubit in state |Ψ to rotate the qubit into the xy plane, where equivalence is up to a global phase factor:





  
    
      
        
          
            HSHX
            ⁢
            
              
              ψ
              〉
            
          
          =
          
          ⁢
          
            
              
                1
                
                  2
                
              
              ⁡
              
                [
                
                  
                    
                      1
                    
                    
                      i
                    
                  
                  
                    
                      i
                    
                    
                      1
                    
                  
                
                ]
              
            
            ⁡
            
              [
              
                
                  
                    cos
                  
                  
                    
                      θ
                      2
                    
                  
                
                
                  
                    sin
                  
                  
                    
                      θ
                      2
                    
                  
                
              
              ]
            
          
        
        ,
      
    
  
  
    
      
        =
        
        ⁢
        
          
            
              1
              
                2
              
            
            ⁡
            
              [
              
                
                  
                    1
                  
                
                
                  
                    
                      e
                      
                        i
                        ⁡
                        
                          (
                          
                            
                              π
                              2
                            
                            -
                            θ
                          
                          )
                        
                      
                    
                  
                
              
              ]
            
          
          .
        
      
    
  




Application of the HSHX operator to the magic state vector |H, HSHX|H, can be expressed as:





  
    HSHX
    ⁢
    
      
      H
      〉
    
  
  =
  
    
      1
      
        2
      
    
    ⁢
    
      
        (
        
          
            
            0
            〉
          
          +
          
            
              e
              
                
                  i
                  ⁢
                  
                    π
                    4
                  
                
                ⁢
                
                  
                
              
            
            ⁢
            
              
              1
              〉
            
          
        
        )
      
      .
    
  




Thus, HSHX|H lies within the xy Bloch-sphere plane, orthogonal to the z spatial axis.

FIG. 9B uses the same illustration conventions used in FIG. 9A to illustrate the operator HS†. The shaded plane portion 912 represents the xz Bloch-sphere plane. A state vector |ψ 914 is shown lying within this plane. Shaded plane portion 916 represents the xy plane within the Bloch sphere. The vector |ψ in the xz plane 914 with Bloch-sphere angles θ and φ=0 can be rotated to lie within the xy plane with Bloch-sphere angles




  
    θ
    ′
  
  =
  
    π
    2
  




and φ′=θ by the combination of operators HS†.

The unitary operation corresponding to the combination of unitary quantum gates HS† is:




  
    
      
        
          
            
              HS
              †
            
            =
            
            ⁢
            
              
                
                  1
                  
                    2
                  
                
                ⁡
                
                  [
                  
                    
                      
                        1
                      
                      
                        1
                      
                    
                    
                      
                        1
                      
                      
                        
                          -
                          1
                        
                      
                    
                  
                  ]
                
              
              ⁡
              
                [
                
                  
                    
                      1
                    
                    
                      0
                    
                  
                  
                    
                      0
                    
                    
                      
                        -
                        i
                      
                    
                  
                
                ]
              
            
          
          ,
        
      
    
    
      
        
          =
          
          ⁢
          
            
              
                1
                
                  2
                
              
              ⁡
              
                [
                
                  
                    
                      1
                    
                    
                      
                        -
                        i
                      
                    
                  
                  
                    
                      1
                    
                    
                      i
                    
                  
                
                ]
              
            
            .
          
        
      
    
  
  .




Given a qubit with a state or rotation lying in the xz plane with a Bloch-sphere angle θ:





  
    
      
      ψ
      〉
    
    =
    
      [
      
        
          
            cos
          
          
            
              θ
              2
            
          
        
        
          
            sin
          
          
            
              θ
              2
            
          
        
      
      ]
    
  
  ,




the HS† operator can be applied to the qubit in state |ψ to rotate the qubit into the xy plane, and is given, up to a global phase factor, by:





  
    
      
        
          
            
              HS
              †
            
            ⁢
            
              
              ψ
              〉
            
          
          =
          
          ⁢
          
            
              
                1
                
                  2
                
              
              ⁡
              
                [
                
                  
                    
                      1
                    
                    
                      
                        -
                        i
                      
                    
                  
                  
                    
                      1
                    
                    
                      i
                    
                  
                
                ]
              
            
            ⁡
            
              [
              
                
                  
                    cos
                  
                  
                    
                      θ
                      2
                    
                  
                
                
                  
                    sin
                  
                  
                    
                      θ
                      2
                    
                  
                
              
              ]
            
          
        
        ,
      
    
  
  
    
      
        =
        
        ⁢
        
          
            
              1
              
                2
              
            
            ⁡
            
              [
              
                
                  
                    1
                  
                
                
                  
                    
                      e
                      
                        i
                        ⁢
                        
                          
                        
                        ⁢
                        θ
                      
                    
                  
                
              
              ]
            
          
          .
        
      
    
  




Application of the HS† operator to the magic state vector |H, HS†|H, can be expressed as:





  
    
      HS
      †
    
    ⁢
    
      
      H
      〉
    
  
  =
  
    
      1
      
        2
      
    
    ⁢
    
      
        (
        
          
            
            0
            〉
          
          +
          
            
              e
              
                
                  i
                  ⁢
                  
                    π
                    4
                  
                
                ⁢
                
                  
                
              
            
            ⁢
            
              
              1
              〉
            
          
        
        )
      
      .
    
  




Thus, HS†|H lies within the xy Bloch-sphere plane, orthogonal to the z spatial axis.

FIGS. 10A-B illustrate two rotation circuits. FIG. 10A illustrates a two-qubit quantum circuit that rotates the state vector of an input qubit about the z axis. The inputs to the quantum circuit include a first qubit, referred to as the “control qubit,” with a state vector lying in the xy Bloch-sphere plane with an angle φ 1002. A second input qubit, referred to as the “subject qubit,” has the arbitrary state |ψ 1004. The two-qubit state of the two input qubits, indicated by a vertical dashed line and the following expression, can be expressed as the tensor product of the single-qubit states of the two input qubits:

|Z(φ)|ψ=a|00+b|01+aeiφ|10+beiφ|11.

The symbols 1006-1008 together represent a two-qubit controlled-NOT gate, expressible in matrix form as:





  
    (
    
      
        
          1
        
        
          0
        
        
          0
        
        
          0
        
      
      
        
          0
        
        
          1
        
        
          0
        
        
          0
        
      
      
        
          0
        
        
          0
        
        
          0
        
        
          1
        
      
      
        
          0
        
        
          0
        
        
          1
        
        
          0
        
      
    
    )
  
  .




When the state of the subject qubit is |0, the state of the control qubit is unaffected by the X-gate portion of the controlled-NOT gate, also referred to as a “CNOT gate.” However, when the state of the subject qubit is |1, the state of the control qubit is inverted, either from |0 to |1 or from |1 to |0. After the two qubits pass through the controlled-NOT gate, the two-qubit state of the circuit is:

CNOT|Z(φ)|ψ=a|00+b|11+aeiφ|10+beiφ|01.

The state of the control qubit is measured by measurement operator 1012, producing either |0 or |1 1014, where m is equal to 0 or 1. The subject qubit is output 1016. As shown in FIG. 10A, when the state of the control qubit is measured to be |0, the state of the subject qubit is rotated by the angle φ about the z axis with respect to the input state of the lower qubit 1018. When the state of the control qubit is measured to be |1, the output state of the subject qubit is rotated about the z axis by an angle −φ with respect to the input state of the lower qubit 1020. The z-rotation quantum circuit shown in FIG. 10 is thus probabilistic, producing one of two different rotations about the z spatial axis of angles φ and −φ.

The quantum circuit illustrated in FIG. 10A is easily modified to produce rotations about the x spatial axis. FIG. 10B illustrates a two-qubit quantum circuit that rotates the state vector of an input qubit about the x axis. Gate 1006-1008 in FIG. 10A is changed to a controlled-Z gate 1020, rather than the controlled-X (controlled-NOT) gate in FIG. 10A, to produce rotations about the x spatial axis.
FIG. 11 illustrates implementation of the unitary quantum gate T using the z-rotation quantum circuit illustrated in FIG. 10A. As shown in FIG. 11, the z-rotation quantum circuit with control qubit in the state HSHX|H or HS†|H and subject qubit in the state |ψ 1102 is equivalent to a quantum gate 1104 that carries out either the T or the inverse T operation. The inverse T operation, T−1, is identical to the adjoint T operation, T†, where the matrix corresponding to T† is the complex-conjugate transpose of the matrix corresponding to T. When measurement of the control qubit returns 0, the gate has carried out a T rotation 1106 and when measurement of the control qubit returns 1, the gate has carried out a T−1 rotation 1108. Because S=TT, when m=1, the output of unitary quantum gate 1104 can be corrected to a T rotation by rotating the output qubit by application of the S operator to the T−1 rotated output qubit.
FIG. 12 illustrates a quantum-circuit subsystem of a unitary-quantum-gate implementation that generates a qubit with a state vector lying within the xz plane of the Bloch sphere and having a specific θ angle with respect to the z axis. The central quantum wire 1202 of the quantum-circuit subsystem represents a subject qubit that is operated on by successive stages of the quantum-circuit subsystem to produce an output qubit with a state vector lying in the xz plane of the Bloch sphere having a specified Bloch-sphere θ angle. In other words, the quantum-circuit subsystem outputs a qubit having a specified Bloch-sphere θ angle and a Bloch-sphere φ angle equal to 0. The HSHX or HS† operator can then be applied to the qubit to generate a qubit lying in the xy Bloch-sphere plane with a specified φ angle with respect to the x spatial axis. Because input magic-state qubits are noisy, the output qubit lies within an error cone with central axis equal to the target state vector and with the apex angle of the error cone representing a maximum displacement error multiplied by 2. The fidelity of the state of output qubit with respect to the target state is thus dependent on the error probability or angular displacement of the input magic-state qubits.
Note that FIG. 12 provides a simplified representation of the quantum-circuit subsystem. As discussed in greater detail, below, each stage of the quantum-circuit subsystem is probabilistic, and outputs the subject qubit with one of two possible rotations. For simplicity of illustration, FIG. 12 assumes a single output from each stage. As discussed below, when an undesired rotation is carried out by a given stage, the undesired rotation can be ameliorated by dynamically adding a stage to the quantum-circuit subsystem.
Note that a quantum wire within a quantum circuit represents a time line for a particular qubit rather than a conductive path, as in the case of classical electrical circuits. Quantum wire 1202 represents a time line along which an input qubit is successively subjected to operations corresponding to the operations carried out by successive stages of the quantum-circuit subsystem. As one example, the qubit may be located within a very tiny volume within a quantum computer and operated on by laser light of specific frequencies and durations. In alternative types of quantum computers, the operations may constitute controlled inputs of other types of electromagnetic radiation. In still other types of quantum computers, the operations or quantum gates may correspond to optical elements through which photons pass. It should also be noted that, in general, quantum computers and the currently described universal-rotation gate may include classical-computer control components that control the types and sequences of operations applied to qubits in quantum circuits. In the quantum-circuit subsystem shown in FIG. 12, for example, the number of stages may be determined dynamically by the control program that controls operation of the quantum-circuit subsystem.
Each stage of the quantum-circuit subsystem, such as stage 1203, passes the subject qubit corresponding to the central quantum wire 1202 and a magic-state qubit through a controlled-NOT gate followed by measurement of the resulting state of the magic-state qubit. In this respect, each stage is similar to the rotation quantum circuits discussed above with reference to FIGS. 10A-B. The subject qubit initially occupies the magic state |H0. Following the controlled-NOT operation in stage 0, the subject qubit occupies one of two states |H−1, when m=1, and |H1, when m=0. In FIG. 12, it is assumed that the subject qubit is output from stage i in state |Hi+1. In the case that the subject qubit is output from stage i in state |Hi−1, stage i is repeated, by the control program. The number of stages of the particular quantum-circuit subsystem is dynamically determined by a control component to be the number of stages necessary to rotate the subject qubit state vector into an error cone about a target state vector lying in the xz plane of the Bloch sphere. The probabilities of the measurement gate returning the two values of m are not 0.5, but are instead significantly biased towards the m=0 measurement. Should the state of the subject qubit become H−1, the quantum-circuit subsystem can be restarted with a new pair of input qubits in the |H0 states. Ellipses 1204 and 1206 indicate that an arbitrary number of stages may be included in the quantum-circuit subsystem. Note that the input qubits with state |H0 1208-1214 are provided by the above-discussed offline resources, such as magic-state distilleries.
FIG. 13A provides an alternative illustration of the quantum-circuit subsystem discussed above with reference to FIG. 12. In FIG. 13, rectangles, such as rectangle 1302, represent the stages of the quantum-circuit subsystem, each containing a controlled-NOT gate and a measurement gate. The subject qubit advances from a first stage i, such as stage 1302, to a second stage i+1, such as stage 1304, with a probability equal to the probability of measurement of m=0 in stage i, pi,0, such as probability p0,0 1306 for stage 0. When the stage succeeds or, in other words, when measurement within the stage yields the value m=0, stage i outputs the subject qubit in state |Hi+1. When a stage i fails, then stage i−1 is repeated. Stage i fails with the probability pi,1.
As discussed below, the rotation angles corresponding to each of a series of successive stages within the quantum-circuit subsystem have specific values for each type of quantum-circuit subsystem. Thus, a particular type of quantum-circuit subsystem k can provide θ rotations selected from a set of θ rotations characteristic of the particular type of quantum-circuit subsystem. In other words, a quantum-circuit subsystem k can produce any of a set of θ rotations {θ1k, θ2k, θ3k, . . . } where the subscript i for an element in the set represents output from successful application of stage i−1 of the quantum-circuit subsystem and the superscript k indicates the particular quantum-circuit subsystem.
FIGS. 13B-C provide control-flow-diagram illustrations of a control program that controls the ladder-like quantum-circuit subsystem shown in FIGS. 12 and 13A. In step 1310, the control program “ladder” receives the desired state index i and arranges to obtain the subject qubit on which successive rotations are to be performed as well as an initial control qubit. In the example quantum-circuit subsystem in FIG. 12, both the subject qubit and the control qubit input to the first stage are qubits in state |H0. As discussed below, the control qubit may have other states and may be obtained from resource-state factories that prepare the control qubit from two or more magic states. In the case that i is 0, as determined in step 1312, the subject qubit is returned without further processing, in step 1314. Otherwise, the control qubit is applied to the first stage of the quantum-circuit subsystem along with the subject qubit in step 1316. When measurement of the state of the control qubit, following the controlled-NOT operation, returns m=0, as determined in step 1318, then the index i is decremented and a local variable stage is set to 1, in step 1320. Following step 1320, if index i is now equal to 0, as determined in step 1322, then the subject qubit is returned without further processing. Otherwise, the routine “recursive ladder” is called, in step 1324, in order to carry out subsequent stages of the ladder-like quantum-circuit subsystem. When the measured value m is not equal to 0, as determined in step 1318, then the routine “ladder” is called again in step 1326.
FIG. 13C provides a control-flow diagram for the routine “recursive ladder,” called in step 1324 of FIG. 13B. This routine carries out the operations corresponding to all but the first stage of the ladder-like quantum-circuit subsystem. In step 1330, the routine “recursive ladder” receives three arguments: (1) i, the index of the desired rotation; (2) j, the number of stages yet to be applied to the subject qubit; and (3) stage, the current stage of the ladder-like quantum-circuit subsystem. In step 1332, the routine “recursive ladder” applies the subject qubit and a magic-state control qubit to the stage circuitry. When, following operation of the controlled-NOT gate, measurement of the state of the control qubit returns m=0, as determined in step 1334, the variable j is decremented and the variable stage is incremented in step 1336. When j is now 0, as deter wined in step 1338, the subject qubit is returned without further processing. Otherwise, the routine “recursive ladder” is recursively called in step 1340. When the measured value is not 0, as determined in step 1334, then, in step 1342, j is incremented and the variable stage is decremented. When the current value stored in the local variable stage is now less than 1, as determined in step 1344, the routine “ladder” is called in step 1346 in order to restart the quantum-circuit subsystem. Otherwise, the routine “recursive ladder” is called in step 1340.
Next, expressions for stage 0 and stage 1 of the quantum-circuit subsystem, discussed above with reference to FIGS. 12 and 13, are provided, following with expressions for a generalized stage i. In the following, θ0 is defined as:




  
    θ
    0
  
  =
  
    π
    8
  




and the eigenstate |H0 is defined to be |H or, in other words:





  
    
    
      H
      0
    
    〉
  
  =
  
    
      
        cos
        ⁢
        
          
        
        ⁢
        
          θ
          0
        
        ⁢
        
          
          0
          〉
        
      
      +
      
        sin
        ⁢
        
          
        
        ⁢
        
          θ
          0
        
        ⁢
        
          
          1
          〉
        
      
    
    =
    
      
        cos
        ⁢
        
          
            2
            ⁢
            
              
            
            ⁢
            
              θ
              0
            
          
          2
        
        ⁢
        
          
          0
          〉
        
      
      +
      
        sin
        ⁢
        
          
            2
            ⁢
            
              
            
            ⁢
            
              θ
              0
            
          
          2
        
        ⁢
        
          
            
            1
            〉
          
          .
        
      
    
  




The second of the above expressions emphasizes the fact that the Bloch-sphere θ value for eigenstate |H0 is





  π
  4




because the basis-vector coefficients corresponding to the θ angle in the Bloch sphere are expressed as





  
    θ
    2
  
  .




Thus, eigenstate |H0 has a Bloch-sphere θ angle of





  
    π
    4
  
  .




The two-qubit input state for stage 0 of the quantum-circuit subsystem is, therefore:





  
    
      
        
          
            
              
                
                  
                    
                      
                        
                          
                            
                              
                                
                                  
                                  
                                    H
                                    0
                                  
                                  〉
                                
                                
                              
                              ⁢
                              
                                H
                                0
                              
                            
                            〉
                          
                          =
                          
                          ⁢
                          
                            cos
                            ⁢
                            
                              
                            
                            ⁢
                            
                              θ
                              0
                            
                            ⁢
                            
                              |
                            
                            ⁢
                            0
                          
                        
                        〉
                      
                      +
                      
                        sin
                        ⁢
                        
                          
                        
                        ⁢
                        
                          θ
                          0
                        
                        ⁢
                        
                          |
                        
                        ⁢
                        1
                      
                    
                    〉
                  
                  ⊗
                  cos
                
                ⁢
                
                  
                
                ⁢
                
                  θ
                  0
                
                ⁢
                
                  |
                
                ⁢
                0
              
              〉
            
            +
            
              sin
              ⁢
              
                
              
              ⁢
              
                θ
                0
              
              ⁢
              
                |
              
              ⁢
              1
            
          
          〉
        
        ,
      
    
  
  
    
      
        
          
            
              
                
                  
                    =
                    
                    ⁢
                    
                      
                        cos
                        2
                      
                      ⁢
                      
                        θ
                        0
                      
                      ⁢
                      
                        |
                      
                      ⁢
                      00
                    
                  
                  〉
                
                +
                
                  cos
                  ⁢
                  
                    
                  
                  ⁢
                  
                    θ
                    0
                  
                  ⁢
                  sin
                  ⁢
                  
                    
                  
                  ⁢
                  
                    θ
                    0
                  
                  ⁢
                  
                    |
                  
                  ⁢
                  01
                
              
              〉
            
            +
            
              sin
              ⁢
              
                
              
              ⁢
              
                θ
                0
              
              ⁢
              cos
              ⁢
              
                
              
              ⁢
              
                θ
                0
              
              ⁢
              
                |
              
              ⁢
              10
            
          
          〉
        
        +
      
    
  
  
    
      
        
          
          ⁢
          
            
              sin
              2
            
            ⁢
            
              θ
              0
            
            ⁢
            
              |
            
            ⁢
            11
          
          〉
        
        ,
      
    
  
  
    
      
        
          
            
              
                
                  
                    
                      =
                      
                      ⁢
                      
                        
                          cos
                          2
                        
                        ⁢
                        
                          θ
                          0
                        
                        ⁢
                        
                          |
                        
                        ⁢
                        00
                      
                    
                    〉
                  
                  +
                  
                    cos
                    ⁢
                    
                      
                    
                    ⁢
                    
                      θ
                      0
                    
                    ⁢
                    sin
                    ⁢
                    
                      
                    
                    ⁢
                    
                      
                        θ
                        0
                      
                      (
                      
                        
                          |
                        
                        ⁢
                        01
                      
                      〉
                    
                  
                  +
                  
                    
                      |
                    
                    ⁢
                    10
                  
                
                〉
              
              )
            
            +
            
              
                sin
                2
              
              ⁢
              
                θ
                0
              
              ⁢
              
                |
              
              ⁢
              11
            
          
          〉
        
        .
      
    
  




Note that the left-hand |H0 corresponds to the upper qubit and the right-hand |H0corresponds to the subject qubit that is rotated by successive stages of the quantum-circuit subsystem. Following the controlled-NOT gate of stage 0, with the controlled-NOT gate represented by operator Λ(X), the two-qubit state within stage 0 prior to the measurement operator is:

Λ(X)|H0|H0=cos2 θ0|00+cos θ0 sin θ0(|10+|11)+sin2θ0|01.

As can be seen by comparing the two-qubit state prior to and after the controlled-NOT gate, the controlled-NOT gate flips the first binary number in the expression for the 2-qubit basis vector when the second binary number is 1. Following the measurement gate in the first stage, the state of the subject qubit is:





  
    
      
        |
      
      ⁢
      
        H
        1
      
    
    〉
  
  =
  
    {
    
      
        
          
            
              m
              =
              0
            
            ,
          
        
        
          
            
              
                
                  
                    
                      (
                      
                        1
                        
                          
                            
                              cos
                              4
                            
                            ⁢
                            
                              θ
                              0
                            
                          
                          +
                          
                            
                              sin
                              4
                            
                            ⁢
                            
                              θ
                              0
                            
                          
                        
                      
                      )
                    
                    ⁢
                    
                      (
                      
                        
                          cos
                          2
                        
                        ⁢
                        
                          θ
                          0
                        
                        ⁢
                        
                          |
                        
                        ⁢
                        0
                      
                      〉
                    
                  
                  +
                  
                    
                      sin
                      2
                    
                    ⁢
                    
                      θ
                      0
                    
                    ⁢
                    
                      |
                    
                    ⁢
                    1
                  
                
                〉
              
              )
            
            ,
          
        
      
      
        
          
            
              m
              =
              1
            
            ,
          
        
        
          
            
              
                
                  
                    
                      1
                      
                        2
                      
                    
                    ⁢
                    
                      |
                    
                    ⁢
                    0
                  
                  〉
                
                +
                
                  
                    1
                    
                      2
                    
                  
                  ⁢
                  
                    |
                  
                  ⁢
                  1
                
              
              〉
            
            .
          
        
      
    
  




The expression for the m=0 state can be simplified by defining the angle θ1 so that:





  
    
      
        
          
            
              
                
                  cos
                  ⁢
                  
                    
                  
                  ⁢
                  
                    θ
                    1
                  
                  ⁢
                  
                    |
                  
                  ⁢
                  0
                
                〉
              
              +
              
                sin
                ⁢
                
                  
                
                ⁢
                
                  θ
                  1
                
                ⁢
                
                  |
                
                ⁢
                1
              
            
            〉
          
          =
          
            
              
                
                  cos
                  2
                
                ⁢
                
                  θ
                  0
                
              
              
                
                  
                    cos
                    4
                  
                  ⁢
                  
                    θ
                    0
                  
                
                +
                
                  
                    sin
                    4
                  
                  ⁢
                  
                    θ
                    0
                  
                
              
            
            ⁢
            
              |
            
            ⁢
            0
          
        
        〉
      
      +
      
        
          
            
              sin
              2
            
            ⁢
            
              θ
              0
            
          
          
            
              
                cos
                4
              
              ⁢
              
                θ
                0
              
            
            +
            
              
                sin
                4
              
              ⁢
              
                θ
                0
              
            
          
        
        ⁢
        
          |
        
        ⁢
        1
      
    
    〉
  
  .




An expression for θ1 in terms of θ0 is obtained by:





  
    
      cos
      ⁢
      
        
      
      ⁢
      
        θ
        1
      
    
    
      sin
      ⁢
      
        
      
      ⁢
      
        θ
        1
      
    
  
  =
  
    
      cot
      ⁡
      
        (
        
          θ
          1
        
        )
      
    
    =
    
      
        
          
            
              cos
              2
            
            ⁢
            
              θ
              0
            
          
          
            
              
                cos
                4
              
              ⁢
              
                θ
                0
              
            
            +
            
              
                sin
                4
              
              ⁢
              
                θ
                0
              
            
          
        
        
          
            
              sin
              2
            
            ⁢
            
              θ
              0
            
          
          
            
              
                cos
                4
              
              ⁢
              
                θ
                0
              
            
            +
            
              
                sin
                4
              
              ⁢
              
                θ
                0
              
            
          
        
      
      =
      
        
          
            
              cos
              2
            
            ⁢
            
              θ
              0
            
          
          
            
              sin
              2
            
            ⁢
            
              θ
              0
            
          
        
        =
        
          
            cot
            2
          
          ⁢
          
            
              θ
              0
            
            .
          
        
      
    
  




The above expression can be used to generate the target rotation θ1 form θ0. Thus, when stage 0 succeeds or, in other words, when m=0 in stage 0, then the subject qubit output from stage 0 has state |H1:

|H1=cos θ1|0=sin θ1|1.

The probabilities for success and failure of stage 0 are computed to be:

p0,0=cos4 θ0+sin4 θ0=0.75,

p0,1=1−p0,0=0.25.

Next, similar expressions are derived for stage 1 of the quantum-circuit subsystem discussed above with reference to FIGS. 12 and 13:




  
    
      
        
          
            
              
                
                  
                    
                      
                        
                          
                            
                              
                                
                                  
                                    
                                      
                                        
                                          
                                            
                                              |
                                            
                                            ⁢
                                            
                                              H
                                              0
                                            
                                          
                                          〉
                                        
                                        ⁢
                                        
                                          |
                                        
                                        ⁢
                                        
                                          H
                                          1
                                        
                                      
                                      〉
                                    
                                    =
                                    
                                      cos
                                      ⁢
                                      
                                        
                                      
                                      ⁢
                                      
                                        θ
                                        0
                                      
                                      ⁢
                                      cos
                                      ⁢
                                      
                                        
                                      
                                      ⁢
                                      
                                        θ
                                        1
                                      
                                      ⁢
                                      
                                        |
                                      
                                      ⁢
                                      00
                                    
                                  
                                  〉
                                
                                +
                                
                                  cos
                                  ⁢
                                  
                                    
                                  
                                  ⁢
                                  
                                    θ
                                    0
                                  
                                  ⁢
                                  sin
                                  ⁢
                                  
                                    
                                  
                                  ⁢
                                  
                                    θ
                                    1
                                  
                                  ⁢
                                  
                                    |
                                  
                                  ⁢
                                  01
                                
                              
                              〉
                            
                            +
                            
                              sin
                              ⁢
                              
                                
                              
                              ⁢
                              
                                θ
                                0
                              
                              ⁢
                              cos
                              ⁢
                              
                                
                              
                              ⁢
                              
                                θ
                                1
                              
                              ⁢
                              
                                |
                              
                              ⁢
                              10
                            
                          
                          〉
                        
                        +
                        
                          sin
                          ⁢
                          
                            
                          
                          ⁢
                          
                            θ
                            0
                          
                          ⁢
                          sin
                          ⁢
                          
                            
                          
                          ⁢
                          
                            θ
                            1
                          
                          ⁢
                          
                            |
                          
                          ⁢
                          11
                        
                      
                      〉
                    
                    ,
                    
                      

                    
                    ⁢
                    
                      
                    
                    ⁢
                    
                      
                        
                          
                            
                              
                                
                                  
                                    
                                      
                                        
                                          
                                            
                                              Λ
                                              ⁡
                                              
                                                (
                                                X
                                                )
                                              
                                            
                                            ⁢
                                            
                                              |
                                            
                                            ⁢
                                            
                                              H
                                              0
                                            
                                          
                                          〉
                                        
                                        ⁢
                                        
                                          |
                                        
                                        ⁢
                                        
                                          H
                                          1
                                        
                                      
                                      〉
                                    
                                    =
                                    
                                    ⁢
                                    
                                      cos
                                      ⁢
                                      
                                        
                                      
                                      ⁢
                                      
                                        θ
                                        0
                                      
                                      ⁢
                                      cos
                                      ⁢
                                      
                                        
                                      
                                      ⁢
                                      
                                        θ
                                        1
                                      
                                      ⁢
                                      
                                        |
                                      
                                      ⁢
                                      00
                                    
                                  
                                  〉
                                
                                +
                                
                                  sin
                                  ⁢
                                  
                                    
                                  
                                  ⁢
                                  
                                    θ
                                    0
                                  
                                  ⁢
                                  sin
                                  ⁢
                                  
                                    
                                  
                                  ⁢
                                  
                                    θ
                                    1
                                  
                                  ⁢
                                  
                                    |
                                  
                                  ⁢
                                  01
                                
                              
                              〉
                            
                            +
                          
                        
                      
                      
                        
                          
                            
                              
                                
                                  
                                  ⁢
                                  
                                    sin
                                    ⁢
                                    
                                      
                                    
                                    ⁢
                                    
                                      θ
                                      0
                                    
                                    ⁢
                                    cos
                                    ⁢
                                    
                                      
                                    
                                    ⁢
                                    
                                      θ
                                      1
                                    
                                    ⁢
                                    
                                      |
                                    
                                    ⁢
                                    10
                                  
                                  〉
                                
                                +
                                
                                  cos
                                  ⁢
                                  
                                    
                                  
                                  ⁢
                                  
                                    θ
                                    0
                                  
                                  ⁢
                                  sin
                                  ⁢
                                  
                                    
                                  
                                  ⁢
                                  
                                    θ
                                    1
                                  
                                  ⁢
                                  
                                    |
                                  
                                  ⁢
                                  11
                                
                              
                              〉
                            
                            ,
                          
                        
                      
                      
                        
                          
                            =
                            
                            ⁢
                            
                              {
                              
                                
                                  
                                    
                                      
                                        m
                                        =
                                        0
                                      
                                      ,
                                    
                                  
                                  
                                    
                                      
                                        
                                          
                                            
                                              cos
                                              ⁢
                                              
                                                
                                              
                                              ⁢
                                              
                                                θ
                                                0
                                              
                                              ⁢
                                              cos
                                              ⁢
                                              
                                                
                                              
                                              ⁢
                                              
                                                θ
                                                1
                                              
                                              ⁢
                                              
                                                |
                                              
                                              ⁢
                                              0
                                            
                                            〉
                                          
                                          +
                                          
                                            sin
                                            ⁢
                                            
                                              
                                            
                                            ⁢
                                            
                                              θ
                                              0
                                            
                                            ⁢
                                            sin
                                            ⁢
                                            
                                              
                                            
                                            ⁢
                                            
                                              θ
                                              1
                                            
                                            ⁢
                                            
                                              |
                                            
                                            ⁢
                                            1
                                          
                                        
                                        〉
                                      
                                      ,
                                    
                                  
                                
                                
                                  
                                    
                                      
                                        m
                                        =
                                        1
                                      
                                      ,
                                    
                                  
                                  
                                    
                                      
                                        
                                          
                                            
                                              sin
                                              ⁢
                                              
                                                
                                              
                                              ⁢
                                              
                                                θ
                                                0
                                              
                                              ⁢
                                              cos
                                              ⁢
                                              
                                                
                                              
                                              ⁢
                                              
                                                θ
                                                1
                                              
                                              ⁢
                                              
                                                |
                                              
                                              ⁢
                                              0
                                            
                                            〉
                                          
                                          +
                                          
                                            cos
                                            ⁢
                                            
                                              
                                            
                                            ⁢
                                            
                                              θ
                                              0
                                            
                                            ⁢
                                            sin
                                            ⁢
                                            
                                              
                                            
                                            ⁢
                                            
                                              θ
                                              1
                                            
                                            ⁢
                                            
                                              |
                                            
                                            ⁢
                                            1
                                          
                                        
                                        〉
                                      
                                      ,
                                    
                                  
                                
                              
                            
                          
                        
                      
                    
                  
                  ⁢
                  
                    

                  
                  ⁢
                  
                    
                  
                  ⁢
                  
                    
                      define
                      ⁢
                      
                        
                      
                      ⁢
                      
                        θ
                        2
                      
                    
                    ,
                    
                      

                    
                    ⁢
                    
                      
                        so
                        ⁢
                        
                          
                        
                        ⁢
                        that
                        ⁢
                        
                          
                        
                        ⁢
                        cos
                        ⁢
                        
                          
                        
                        ⁢
                        
                          θ
                          2
                        
                      
                      |
                      0
                    
                  
                
                〉
              
              +
              
                sin
                ⁢
                
                  
                
                ⁢
                
                  θ
                  2
                
                ⁢
                
                  |
                
                ⁢
                1
              
            
            〉
          
          =
          
            
              
                cos
                ⁢
                
                  
                
                ⁢
                
                  θ
                  0
                
                ⁢
                cos
                ⁢
                
                  
                
                ⁢
                
                  θ
                  1
                
              
              
                
                  
                    (
                    
                      cos
                      ⁢
                      
                        
                      
                      ⁢
                      
                        θ
                        0
                      
                      ⁢
                      cos
                      ⁢
                      
                        
                      
                      ⁢
                      
                        θ
                        1
                      
                    
                    )
                  
                  2
                
                +
                
                  
                    (
                    
                      sin
                      ⁢
                      
                        
                      
                      ⁢
                      
                        θ
                        0
                      
                      ⁢
                      sin
                      ⁢
                      
                        
                      
                      ⁢
                      
                        θ
                        1
                      
                    
                    )
                  
                  2
                
              
            
            |
            0
          
        
        〉
      
      +
      
        
          
            sin
            ⁢
            
              
            
            ⁢
            
              θ
              0
            
            ⁢
            sin
            ⁢
            
              
            
            ⁢
            
              θ
              1
            
          
          
            
              
                (
                
                  cos
                  ⁢
                  
                    
                  
                  ⁢
                  
                    θ
                    0
                  
                  ⁢
                  cos
                  ⁢
                  
                    
                  
                  ⁢
                  
                    θ
                    1
                  
                
                )
              
              2
            
            +
            
              
                (
                
                  sin
                  ⁢
                  
                    
                  
                  ⁢
                  
                    θ
                    0
                  
                  ⁢
                  sin
                  ⁢
                  
                    
                  
                  ⁢
                  
                    θ
                    1
                  
                
                )
              
              2
            
          
        
        ⁢
        
          |
        
        ⁢
        1
      
    
    〉
  
  ,
  
    

  
  ⁢
  
    
      
        cos
        ⁢
        
          
        
        ⁢
        
          θ
          2
        
      
      
        sin
        ⁢
        
          
        
        ⁢
        
          θ
          2
        
      
    
    =
    
      
        cot
        ⁢
        
          
        
        ⁢
        
          θ
          2
        
      
      =
      
        
          
            cos
            ⁢
            
              
            
            ⁢
            
              θ
              0
            
            ⁢
            cos
            ⁢
            
              
            
            ⁢
            
              θ
              1
            
          
          
            sin
            ⁢
            
              
            
            ⁢
            
              θ
              0
            
            ⁢
            sin
            ⁢
            
              
            
            ⁢
            
              θ
              1
            
          
        
        =
        
          
            
              (
              
                
                  cos
                  ⁢
                  
                    
                  
                  ⁢
                  
                    θ
                    0
                  
                
                
                  sin
                  ⁢
                  
                    
                  
                  ⁢
                  
                    θ
                    0
                  
                
              
              )
            
            ⁢
            
              (
              
                
                  cos
                  ⁢
                  
                    
                  
                  ⁢
                  
                    θ
                    1
                  
                
                
                  sin
                  ⁢
                  
                    
                  
                  ⁢
                  
                    θ
                    1
                  
                
              
              )
            
          
          =
          
            
              
                
                  cos
                  ⁢
                  
                    
                  
                  ⁢
                  
                    θ
                    0
                  
                
                
                  sin
                  ⁢
                  
                    
                  
                  ⁢
                  
                    θ
                    0
                  
                
              
              ⁢
              
                
                  
                    (
                    
                      cos
                      ⁢
                      
                        
                      
                      ⁢
                      
                        θ
                        0
                      
                    
                    )
                  
                  2
                
                
                  
                    (
                    
                      sin
                      ⁢
                      
                        
                      
                      ⁢
                      
                        θ
                        0
                      
                    
                    )
                  
                  2
                
              
            
            =
            
              
                
                  cos
                  3
                
                ⁢
                
                  θ
                  0
                
              
              
                
                  sin
                  3
                
                ⁢
                
                  θ
                  0
                
              
            
          
        
      
    
  
  ,
  
    

  
  ⁢
  
    
  
  ⁢
  
    
      cot
      ⁢
      
        
      
      ⁢
      
        θ
        2
      
    
    =
    
      
        cot
        
          2
          +
          1
        
      
      ⁢
      
        θ
        0
      
    
  
  ,
  
    

  
  ⁢
  
    
  
  ⁢
  
    
      p
      
        1
        ,
        0
      
    
    =
    .8266
  
  ,
  
    

  
  ⁢
  
    
  
  ⁢
  
    
      p
      
        1
        ,
        1
      
    
    =
    
      .1734
      .
    
  




Finally, general expressions for stage i are provided:



  
    
      
        
          
            
              
                
                  
                    
                      
                        
                          
                            
                              
                                
                                  
                                    
                                      
                                        
                                      
                                      ⁢
                                      
                                        
                                          |
                                        
                                        ⁢
                                        
                                          H
                                          i
                                        
                                      
                                      〉
                                    
                                    =
                                    
                                      cos
                                      ⁢
                                      
                                        
                                      
                                      ⁢
                                      
                                        θ
                                        i
                                      
                                      ⁢
                                      
                                        |
                                      
                                      ⁢
                                      0
                                    
                                  
                                  〉
                                
                                +
                                
                                  sin
                                  ⁢
                                  
                                    
                                  
                                  ⁢
                                  
                                    θ
                                    i
                                  
                                  ⁢
                                  
                                    |
                                  
                                  ⁢
                                  1
                                
                              
                              〉
                            
                            ,
                            
                              

                            
                            ⁢
                            
                              
                            
                            ⁢
                            
                              
                                cot
                                ⁢
                                
                                  
                                
                                ⁢
                                
                                  θ
                                  i
                                
                              
                              =
                              
                                
                                  cot
                                  
                                    i
                                    +
                                    1
                                  
                                
                                ⁢
                                
                                  θ
                                  0
                                
                              
                            
                            ,
                            
                              

                            
                            ⁢
                            
                              
                                |
                              
                              ⁢
                              
                                H
                                0
                              
                            
                          
                          〉
                        
                        ⁢
                        
                          |
                        
                        ⁢
                        
                          H
                          i
                        
                      
                      〉
                    
                    =
                    
                      cos
                      ⁢
                      
                        
                      
                      ⁢
                      
                        θ
                        0
                      
                      ⁢
                      cos
                      ⁢
                      
                        
                      
                      ⁢
                      
                        θ
                        i
                      
                      ⁢
                      
                        |
                      
                      ⁢
                      00
                    
                  
                  〉
                
                +
                
                  sin
                  ⁢
                  
                    
                  
                  ⁢
                  
                    θ
                    0
                  
                  ⁢
                  sin
                  ⁢
                  
                    
                  
                  ⁢
                  
                    θ
                    i
                  
                  ⁢
                  
                    |
                  
                  ⁢
                  11
                
              
              〉
            
            +
            
              cos
              ⁢
              
                
              
              ⁢
              
                θ
                0
              
              ⁢
              sin
              ⁢
              
                
              
              ⁢
              
                θ
                i
              
              ⁢
              
                |
              
              ⁢
              01
            
          
          〉
        
        +
        
          sin
          ⁢
          
            
          
          ⁢
          
            θ
            0
          
          ⁢
          cos
          ⁢
          
            
          
          ⁢
          
            θ
            i
          
          ⁢
          
            |
          
          ⁢
          10
        
      
      〉
    
    ,
    
      

    
    ⁢
    
      
    
    ⁢
    
      
        
          
            
              
                
                  
                    
                      
                        
                          
                            
                              Λ
                              ⁡
                              
                                (
                                X
                                )
                              
                            
                            ⁢
                            
                              |
                            
                            ⁢
                            
                              H
                              0
                            
                          
                          〉
                        
                        ⁢
                        
                          |
                        
                        ⁢
                        
                          H
                          i
                        
                      
                      〉
                    
                    =
                    
                    ⁢
                    
                      cos
                      ⁢
                      
                        
                      
                      ⁢
                      
                        θ
                        0
                      
                      ⁢
                      cos
                      ⁢
                      
                        
                      
                      ⁢
                      
                        θ
                        i
                      
                      ⁢
                      
                        |
                      
                      ⁢
                      00
                    
                  
                  〉
                
                +
                
                  sin
                  ⁢
                  
                    
                  
                  ⁢
                  
                    θ
                    0
                  
                  ⁢
                  sin
                  ⁢
                  
                    
                  
                  ⁢
                  
                    θ
                    i
                  
                  ⁢
                  
                    |
                  
                  ⁢
                  10
                
              
              〉
            
            +
          
        
      
      
        
          
            
              
                
                  
                  ⁢
                  
                    cos
                    ⁢
                    
                      
                    
                    ⁢
                    
                      θ
                      0
                    
                    ⁢
                    sin
                    ⁢
                    
                      
                    
                    ⁢
                    
                      θ
                      i
                    
                    ⁢
                    
                      |
                    
                    ⁢
                    01
                  
                  〉
                
                +
                
                  sin
                  ⁢
                  
                    
                  
                  ⁢
                  
                    θ
                    0
                  
                  ⁢
                  cos
                  ⁢
                  
                    
                  
                  ⁢
                  
                    θ
                    i
                  
                  ⁢
                  
                    |
                  
                  ⁢
                  11
                
              
              〉
            
            ,
          
        
      
      
        
          
            =
            
            ⁢
            
              {
              
                
                  
                    
                      
                        m
                        =
                        0
                      
                      ,
                    
                  
                  
                    
                      
                        
                          
                            
                              (
                              
                                cos
                                ⁢
                                
                                  
                                
                                ⁢
                                
                                  θ
                                  ′
                                
                                ⁢
                                
                                  |
                                
                                ⁢
                                0
                              
                              〉
                            
                            +
                            
                              sin
                              ⁢
                              
                                
                              
                              ⁢
                              
                                θ
                                ′
                              
                              ⁢
                              
                                |
                              
                              ⁢
                              1
                            
                          
                          〉
                        
                        )
                      
                      ,
                    
                  
                
                
                  
                    
                      
                        m
                        =
                        1
                      
                      ,
                    
                  
                  
                    
                      
                        
                          
                            
                              (
                              
                                cos
                                ⁢
                                
                                  
                                
                                ⁢
                                
                                  θ
                                  ′′
                                
                                ⁢
                                
                                  |
                                
                                ⁢
                                0
                              
                              〉
                            
                            +
                            
                              sin
                              ⁢
                              
                                
                              
                              ⁢
                              
                                θ
                                ′′
                              
                              ⁢
                              
                                |
                              
                              ⁢
                              1
                            
                          
                          〉
                        
                        )
                      
                      ,
                    
                  
                
              
            
          
        
      
      
        
          
            =
            
            ⁢
            
              {
              
                
                  
                    
                      
                        m
                        =
                        0
                      
                      ,
                    
                  
                  
                    
                      
                        
                          
                            |
                          
                          ⁢
                          
                            H
                            
                              i
                              +
                              1
                            
                          
                        
                        〉
                      
                      ,
                    
                  
                
                
                  
                    
                      
                        m
                        =
                        1
                      
                      ,
                    
                  
                  
                    
                      
                        
                          
                            |
                          
                          ⁢
                          
                            H
                            
                              i
                              -
                              1
                            
                          
                        
                        〉
                      
                      ,
                    
                  
                
              
            
          
        
      
    
  




  
    
      
    
    ⁢
    where
  




  
    
      
    
    ⁢
    
      
        
          cot
          ⁢
          
            
          
          ⁢
          
            θ
            ′
          
        
        =
        
          
            cot
            ⁢
            
              
            
            ⁢
            
              θ
              i
            
            ⁢
            cot
            ⁢
            
              
            
            ⁢
            
              θ
              0
            
          
          =
          
            
              
                cot
                
                  i
                  +
                  2
                
              
              ⁢
              
                θ
                0
              
            
            =
            
              cot
              ⁢
              
                
              
              ⁢
              
                θ
                
                  i
                  +
                  1
                
              
            
          
        
      
      ,
      
        

      
      ⁢
      
        
      
      ⁢
      
        
          cot
          ⁢
          
            
          
          ⁢
          
            θ
            ′′
          
        
        =
        
          
            cot
            ⁢
            
              
            
            ⁢
            
              θ
              i
            
            ⁢
            tan
            ⁢
            
              
            
            ⁢
            
              θ
              0
            
          
          =
          
            
              
                cot
                i
              
              ⁢
              
                θ
                0
              
            
            =
            
              
                cot
                ⁢
                
                  
                
                ⁢
                
                  
                    θ
                    
                      i
                      -
                      1
                    
                  
                  .
                  
                    

                  
                  ⁢
                  
                    
                  
                  ⁢
                  
                    p
                    
                      i
                      ,
                      0
                    
                  
                
              
              =
              
                
                  
                    cos
                    2
                  
                  ⁢
                  
                    θ
                    i
                  
                  ⁢
                  
                    cos
                    2
                  
                  ⁢
                  
                    θ
                    0
                  
                
                +
                
                  
                    sin
                    2
                  
                  ⁢
                  
                    θ
                    i
                  
                  ⁢
                  
                    sin
                    2
                  
                  ⁢
                  
                    
                      θ
                      0
                    
                    .
                  
                
              
            
          
        
      
    
  



The probability of success for stage i, pi,0, ranges from 3⁄4, for the first stage, up to a value approaching





  
    cos
    2
  
  ⁢
  
    
      π
      8
    
    .
  




The expression cot θ′=cot θi cot θ0=coti+2 θ0 can be used to compute the set of target rotation angles that can be produced by the quantum-circuit subsystem. Note that, as a result of pi,0−pi,1≧0.5, there is a favorable probability, at each stage i of the quantum circuit, or proceeding to the next highest state |Hi, with the probability of forward progress increasing with increasing i.

FIG. 14 provides a table of rotation values, in radians, for the state vectors of a qubit produced by successful operation of each of stages i=0 through i=16 of the quantum-circuit subsystem discussed above with reference to FIG. 1. The rotation angles of the state vectors of the subject qubit produced by the quantum-circuit subsystem are illustrated in FIG. 15. In FIG. 15, the rotation angles of the state vectors produced by successive stages of the above-discussed quantum-circuit subsystem can be seen to decrease geometrically.
The quantum-circuit subsystem discussed above with reference to FIGS. 12 and 13 is but one of many different related subsystems that can be devised to generate qubits with state vectors lying in the xz Bloch-sphere plane with particular target θ values. FIGS. 16-18 show quantum circuits for resource factories that prepare additional types of subject qubits for the quantum-circuit subsystem discussed with reference to FIGS. 13A-C. When applied, as subject qubits, to the quantum-circuit subsystem discussed with reference to FIGS. 13A-C, additional sets of characteristic rotations {θ12, θ22, θ32, . . . }, {θ13, θ23, θ33, . . . }, {θ14, θ24, θ34, . . . } are produced. The quantum circuit illustrated in FIG. 16 generates the state |Ψ00 with probability 0.320, where state |Ψ00 can be expressed as:




  
    
      
        
          
            
              
                |
              
              ⁢
              
                Ψ
                0
                0
              
            
            〉
          
          =
          
            cos
            ⁢
            
              
            
            ⁢
            
              φ
              0
              0
            
            ⁢
            
              |0
            
          
        
        〉
      
      +
      
        sin
        ⁢
        
          
        
        ⁢
        
          φ
          0
          0
        
        ⁢
        
          |
        
        ⁢
        1
      
    
    〉
  
  ,
  
    

  
  ⁢
  
    
      φ
      0
      0
    
    =
    
      
        
          π
          2
        
        -
        
          
            cot
            
              -
              1
            
          
          (
          
            
              2
              +
              
                3
                ⁢
                
                  2
                
              
            
            
              6
              +
              
                5
                ⁢
                
                  2
                
              
            
          
          )
        
      
      ≈
      
        0.446
        .
      
    
  




The quantum circuit shown in FIG. 17 produces the state |Ψ01 with a probability of 0.232, expressed as:





  
    
      
        
          
            
              
                |
              
              ⁢
              
                Ψ
                0
                1
              
            
            〉
          
          =
          
            cos
            ⁢
            
              
            
            ⁢
            
              φ
              0
              1
            
            ⁢
            
              |0
            
          
        
        〉
      
      +
      
        sin
        ⁢
        
          
        
        ⁢
        
          φ
          0
          1
        
        ⁢
        
          |
        
        ⁢
        1
      
    
    〉
  
  ,
  
    

  
  ⁢
  
    
      φ
      0
      1
    
    =
    
      
        
          π
          2
        
        -
        
          
            cot
            
              -
              1
            
          
          (
          
            
              2
              ⁢
              
                2
              
            
            
              3
              +
              
                2
              
            
          
          )
        
      
      ≈
      
        0.570
        .
      
    
  




The quantum circuit shown in FIG. 18 produces the state |Ψ02 with a probability of 0.344, expressed as:





  
    
      
        
          
            
              
                |
              
              ⁢
              
                Ψ
                0
                2
              
            
            〉
          
          =
          
            cos
            ⁢
            
              
            
            ⁢
            
              φ
              0
              2
            
            ⁢
            
              |0
            
          
        
        〉
      
      +
      
        sin
        ⁢
        
          
        
        ⁢
        
          φ
          0
          2
        
        ⁢
        
          |
        
        ⁢
        1
      
    
    〉
  
  ,
  
    

  
  ⁢
  
    
      φ
      0
      2
    
    =
    
      
        
          π
          2
        
        -
        
          
            cot
            
              -
              1
            
          
          (
          
            7
            
              6
              ⁢
              
                2
              
            
          
          )
        
      
      ≈
      
        0.690
        .
      
    
  




The resource states |Ψ00, |Ψ01, and |Ψ02, when used as the subject-qubit input to the first stage of the ladder-like quantum-circuit subsystem, prepare qubits with additional xz-Bloch-sphere-plane rotations selected from the additional sets of rotations {θ12, θ22, θ32, . . . }, {θ13, θ23, θ33, . . . }, and {θ14, θ24, θ34, . . . }, respectively. Use of the different resource states |H0, |Ψ00, |Ψ01, and |Ψ02 as the subject qubit for the first stage of the ladder-like quantum-circuit subsystem illustrated in FIG. 13 essentially generates four different quantum-circuit subsystems 1, 2, 3, and 4.

FIG. 19 illustrates the θ angles available from quantum-circuit subsystems based on FIGS. 12-13 and 16-18, using the illustration conventions of FIG. 15. FIG. 20 provides a table of the θ angles of xz-Bloch-sphere-plane state vectors, in radians, produced by the first nine stages of each of the various types of quantum-circuit subsystems discussed above. Additional types of ladder-like quantum-circuit subsystems that employ stages that carry out different operations on the subject qubit are also possible. Again, the qubit states produced by these quantum-circuit subsystems provide a large number of non-stabilizer states that can be used as resources in a variety of different applications. In the next subsection, one such application is described.
Implementation of a Universal Qubit Rotation Operator
FIGS. 21A-C illustrate two different implementations of the universal quantum gate discussed above with reference to FIG. 8. FIGS. 21A-B employ similar illustration conventions to those used in FIG. 8, but include additional implementation details. As previously shown in FIG. 8, the inputs to the universal quantum gate include a subject qubit in state |ψ 2102 as well as indications of a desired gate operation to perform, U, and a desired maximum error, ε 2104. The universal gate outputs U|ψ. In both the implementation shown in FIG. 21A and the implementation shown in FIG. 21B, the universal gate features a classical control component 2110, described below with reference to FIGS. 22A-D. In both figures, a dashed horizontal line, 2112 in FIG. 21A and 2114 in FIG. 21B, indicate a division between online processing and offline processing within the implementation. Both implementations include a source of standard-state qubits 2116 which are provided to two magic-state distilleries 2118 and 2120. Magic-state qubits are provided by the magic-state distilleries, in both implementations, to first-level resource-state factories 2124-2126 which prepare resource states |Ψ00, |Ψ01, and |Ψ02, respectively. The |Ψ00 factory 2125 also receives |+ states from source 2116, where the |+ state is expressed as:




  
    
      
        
          
            
              
                |
              
              +
            
            〉
          
          =
          
            
              1
              
                2
              
            
            ⁢
            
              |
            
            ⁢
            0
          
        
        〉
      
      +
      
        
          1
          
            2
          
        
        ⁢
        
          |
        
        ⁢
        1
      
    
    〉
  
  .




The magic-state distilleries 2118-2120 additionally provide magic states to the second-level resource factories 2130-2133 which are ladder-like quantum-circuit subsystems of types k=1-4 discussed above with reference to FIGS. 12-13C and 16-18. These factories produce xy-block-sphere-plane qubits in states |Hi. The resource states produced by the second-level resource-state factories 2130-2133 are used as control bits for z rotation and x-rotation quantum circuits discussed above with reference to FIGS. 10A-B. In the implementation shown in FIG. 21A, the z-rotation and x-rotation circuits 2140-2146 apply rotations directly to the input subject qubit. A series of minor rotations that include minor rotations carried out by z-rotation circuits 2140 and 2142 implement a first major z rotation 2150, a second series of minor x rotations that include x rotations carried out by z-rotation circuits 2143 and 2144 produce a second major x rotation 2152, and a third series of z rotations that include z rotations carried out by z-rotation circuits 2145-2146 carry out a second z rotation 2154. As discussed above, the three major rotations 2150, 2152, and 2154, in turn, carry out the U unitary-quantum-gate operation on the input subject qubit.
By contrast, in the second implementation of the universal quantum circuit shown in FIG. 21B, there is a third level of resource-state factories 2160-2165, each a z rotation circuit, such as that shown in FIG. 10A, that prepares a control qubit |Z(φ) in the xy block-sphere plane. These |Z(φ) control qubits are, in turn, used to control higher-level z rotation and x-rotation circuits 2170-2172.
Thus, comparing the implementation shown in FIG. 21A to that shown in FIG. 21B, the implementation in FIG. 21B has moved the online processing related to minor rotations, in the implementation shown in FIG. 21A, to offline resource factories 2160-2165. However, as discussed in greater detail below, the rotation quantum circuits 2170-2172 in the implementation shown in FIG. 21B are still probabilistic, and each of these rotation circuits may involve application of multiple rotation operations.
In FIGS. 21A-B, the many occurrences of ellipses, such as ellipsis 2180 in FIG. 21A, are used to indicate that additional resource-state factories may be included in alternative implementations. Other ellipses, such as ellipsis 2182 in FIG. 21A, indicate that certain quantum circuits are probabilistic and the number of applications in a circuit may vary, depending on the outcome of each application. It should also be noted that the second-level resource factories 2130-2133 may include, in both implementations, a final application of the HSHX or HS† gate, discussed above, in order to rotate a qubit with a state vector lying in the xz block-sphere plane into the xy block-sphere plane.
FIG. 21C shows an implementation of the rotation circuit 2170 in FIG. 21B. In a first stage 2186, a control qubit (Z(φ) 2188 and the subject qubit 2189 are input to a controlled-NOT gate followed by measurement of the state of the control qubit 2190. When measurement produces m=0, determined by logic step 2192, then a successful rotation has been carried out and the subject qubit has the desired state 2194. Otherwise, a second stage 2196 is applied to the subject qubit with a control qubit 2197 in state |Z(2φ). In other words, when the first stage fails, the subject qubit has been rotated by φ in the opposite direction from the desired direction, as a result of which a rotation of 2φ is now needed. When the second stage succeeds, as determined in logic step 2198, then the subject qubit has the desired state 2199 and, otherwise, an additional stage is applied. Therefore, as shown in FIG. 21B, each major rotation circuit 2170-2172 may consume multiple resource states produced by the third-level resource-state factories 2160-2165. FIG. 21C shows a z-rotation circuit. The x-rotation circuit 2171 includes a controlled-Z gate rather than a controlled-NOT gate.
FIGS. 22A-D provide control-flow-diagram illustrations of the classical control for the two different implementations of the universal gate shown in FIGS. 21A-B. FIGS. 22A-B illustrate the classical control for the first implementation of the universal gate shown in FIG. 21A. FIG. 22A shows a control-flow diagram for the routine “U-gate control.” In step 2202, the routine “U-gate control” receives a target U, a specified maximum error ε, and the subject qubit in state |Ψ. In step 2204, the routine “U-gate control” computes the angles for the major z and x rotations. In step 2206, the routine “U-gate control” computes maximum error bounds εa, εb, and εc for the three major rotations. Then, in steps 2208-2210, the routine “U-gate control” calls a subroutine “rotate” to carry out the three major rotations RZ(a), RX(b), and RZ(c) on the subject qubit.
FIG. 22B provides a control-flow diagram that illustrates the subroutine “rotate” called in steps 2208-2210 in FIG. 22A. In step 2212, the routine “rotate” receives the subject qubit q, the desired rotation angle φ, an indication of the rotation axis for the rotation r, the error bound for the rotation ε, and an indication of the rotation already applied α. In step 2214, the routine “rotate” selects a rotation θi closest to the current desired rotation angle φ−α. In step 2216, the routine “rotate” selects an appropriate resource-state factory to produce the control qubit |Hi for the rotation θi and uses the selected factory to generate the control qubit in state |Hi. The |Hi states include |H0, |Ψ00, |Ψ01, and |Ψ02 and the various states produced by applying qubits in these states as subject qubits to the ladder-like quantum subsystem discussed with reference to FIGS. 12 and 13A. When the desired rotation is a z rotation, as determined from the input parameter r, in step 2218, a z-rotation quantum circuit is applied to the subject qubit using the resource-state |Hi as the control qubit in step 2220. Otherwise, an x-rotation is applied in a similar step 2222. Following the application of the rotation circuitry, illustrated above in FIG. 10A or FIG. 10B, when the measurement in the rotation circuitry produces the value m=0, as determined in step 2224, the rotation succeeded and the variable α is updated, in step 2226, to indicate the present rotational state of the subject qubit. When the magnitude of the difference between the desired rotation angle φ and the current rotation angle α is less than ε, as determined in step 2228, then the desired rotation is achieved and the routine “rotate” returns. Otherwise, the routine “rotate” is again called in step 2230 to apply an additional minor rotation to the subject qubit in order to rotate the subject qubit closer to the desired rotation angle φ. When m does not equal 0, as determined in step 2224, then the applied rotation is opposite to that desired, and a is updated accordingly in step 2232 prior to again calling the routine “rotate” in step 2230. Although the rotation circuitry is probabilistic, the probability of achieving a useful rotation that places the subject qubit closer to the desired rotation φ quickly rises to near certainty with successive applications of the rotation circuitry.
FIGS. 22C-D illustrate, using control-flow diagrams, the classical control for the implementation of the universal gate shown in FIG. 21B. The initial steps 2240-2242 are identical to the first steps of the routine “U-gate control” illustrated in FIG. 22A. The final three steps 2244-2246 of the routine “U-gate control 2” call the routine “rotate 2” rather than the routine “rotate” called in steps 2208-2210 of the routine “U-gate control.”
FIG. 22D provides a control-flow diagram for the routine “rotate 2” called in steps 2244-2246 of FIG. 22C. Step 2250 is identical to step 2212 of the routine “rotate.” In step 2252, the routine “rotate2” determines whether there is an ancillary qubit with the rotation φ−α for the rotation axis r currently available from a third-level resource-state factory. When not, then, in step 2254, the routine “rotate” is called to control a third-level resource-state factory to produce the desired ancillary qubit with the desired rotation. In addition, an asynchronous call may be made to an additional resource-state factory, when one is available, to prepare an ancillary qubit with the rotation angle 2(φ−α) in case that the next-attempted rotation fails. When the desired rotation is about the z axis, as determined from the input parameter r in step 2258, the rotation is attempted by applying a z-rotation quantum circuit, in step 2260, using the Z(φ) ancillary qubit as a control bit. Otherwise, in step 2262, an x-rotation is attempted. When, following the attempted rotation, the measured value m is equal to 0, as determined in step 2264, the rotation has succeeded and the qubit is in the desired state. Otherwise, α is updated to reflect an unsuccessful rotation in step 2266 and the routine “rotate 2” is again called in step 2268.
V-Gate Implementation
The V3 gate is of increasing interest in quantum computing because the V basis provides advantages in approximating unitary quantum gates. The ladder-like quantum-circuit subsystem and T-gate implementation discussed in preceding subsections can be used to implement the V3 gate. The V3 gate can be described as:



  
    
      
        
          
            
              V
              3
            
            =
            
            ⁢
            
              
                I
                +
                
                  2
                  ⁢
                  iZ
                
              
              
                5
              
            
          
          ,
        
      
    
    
      
        
          =
          
          ⁢
          
            
              1
              
                5
              
            
            ⁡
            
              [
              
                
                  
                    
                      1
                      +
                      
                        2
                        ⁢
                        i
                      
                    
                  
                  
                    0
                  
                
                
                  
                    0
                  
                  
                    
                      1
                      -
                      
                        2
                        ⁢
                        i
                      
                    
                  
                
              
              ]
            
          
        
      
    
    
      
        
          
            =
            
            ⁢
            
              
                
                  1
                  +
                  
                    2
                    ⁢
                    i
                  
                
                
                  5
                
              
              ⁡
              
                [
                
                  
                    
                      1
                    
                    
                      0
                    
                  
                  
                    
                      0
                    
                    
                      
                        e
                        
                          i
                          ⁢
                          
                            
                          
                          ⁢
                          θ
                        
                      
                    
                  
                
                ]
              
            
          
          ,
        
      
    
  




  
    
      where
      ⁢
      
        
      
      ⁢
      
        e
        
          i
          ⁢
          
            
          
          ⁢
          θ
        
      
    
    =
    
      
        
          cos
          ⁢
          
            
          
          ⁢
          θ
        
        +
        
          i
          ⁢
          
            
          
          ⁢
          sin
          ⁢
          
            
          
          ⁢
          θ
        
      
      =
      
        
          -
          
            3
            5
          
        
        -
        
          i
          ⁢
          
            
              4
              5
            
            .
          
        
      
    
  



This allows the calculation of the rotation about the z axis produced by the V3 gate by:




  θ
  =
  
    
      
        cos
        
          -
          1
        
      
      ⁡
      
        (
        
          -
          
            3
            5
          
        
        )
      
    
    =
    
      
        
          sin
          
            -
            1
          
        
        ⁡
        
          (
          
            -
            
              4
              5
            
          
          )
        
      
      =
      
        4.069
        ⁢
        
          
        
        ⁢
        
          radians
          .
        
      
    
  




The angle θ can be expressed in terms of an angle θ′ by:




  
    θ
    =
    
      
        θ
        ′
      
      +
      π
    
  
  ,
  
    

  
  ⁢
  
    
      θ
      ′
    
    =
    
      
        
          cos
          
            -
            1
          
        
        ⁡
        
          (
          
            3
            5
          
          )
        
      
      .
    
  




It turns out that θ′ is related to the rotation angle 2θ2 produced by the second stage of the first ladder-like quantum-circuit subsystem, discussed above with reference to FIGS. 12 and 13A:




  
    θ
    ′
  
  =
  
    
      2
      ⁢
      
        θ
        2
      
    
    +
    
      
        π
        4
      
      .
    
  




Therefore, the rotation about the z axis produced by the V3 gate can be expressed in terms of θ′ as follows:





  
    
      
        
          
            Z
            ⁡
            
              (
              θ
              )
            
          
          =
          
          ⁢
          
            
              Z
              ⁡
              
                (
                π
                )
              
            
            ⁢
            
              Z
              ⁡
              
                (
                
                  θ
                  ′
                
                )
              
            
          
        
        ,
      
    
  
  
    
      
        =
        
        ⁢
        
          
            Z
            ⁡
            
              (
              π
              )
            
          
          ⁢
          
            Z
            ⁡
            
              (
              
                2
                ⁢
                
                  θ
                  2
                
              
              )
            
          
          ⁢
          
            
              Z
              ⁡
              
                (
                
                  π
                  4
                
                )
              
            
            .
          
        
      
    
  




Defining an angle θ′′ as:





  
    
      θ
      ′′
    
    =
    
      
        π
        2
      
      -
      
        2
        ⁢
        
          θ
          2
        
      
    
  
  ,




the angle 2 θ2, can be expressed as:





  
    2
    ⁢
    
      θ
      2
    
  
  =
  
    
      π
      2
    
    -
    
      
        θ
        ′′
      
      .
    
  




Thus, the rotation about the z axis produced by the V3 gate can be expressed as:





  
    
      
        
          
            Z
            ⁡
            
              (
              θ
              )
            
          
          =
          
          ⁢
          
            
              Z
              ⁡
              
                (
                π
                )
              
            
            ⁢
            
              Z
              ⁡
              
                (
                
                  π
                  4
                
                )
              
            
            ⁢
            
              Z
              ⁡
              
                (
                
                  2
                  ⁢
                  
                    θ
                    2
                  
                
                )
              
            
          
        
        ,
      
    
  
  
    
      
        
          =
          
          ⁢
          
            
              Z
              ⁡
              
                (
                π
                )
              
            
            ⁢
            
              Z
              ⁡
              
                (
                
                  π
                  4
                
                )
              
            
            ⁢
            
              Z
              ⁡
              
                (
                
                  π
                  2
                
                )
              
            
            ⁢
            
              Z
              ⁡
              
                (
                
                  -
                  
                    θ
                    ′′
                  
                
                )
              
            
          
        
        ,
      
    
  
  
    
      
        =
        
        ⁢
        
          
            Z
            ⁡
            
              (
              
                -
                
                  π
                  2
                
              
              )
            
          
          ⁢
          
            Z
            ⁡
            
              (
              
                π
                4
              
              )
            
          
          ⁢
          
            
              Z
              ⁡
              
                (
                
                  -
                  
                    θ
                    ′′
                  
                
                )
              
            
            .
          
        
      
    
  




HSHX|H2 species a z rotation of




  
    π
    2
  
  -
  
    2
    ⁢
    
      θ
      2
    
  




when used as a control bit for the z-rotation circuit. HSHX|H2 also specifies a z rotation of





  
    
      -
      
        π
        2
      
    
    +
    
      2
      ⁢
      
        θ
        2
      
    
  
  ,




since the z-rotation circuit is probabilistic and implements θ′′ when the measurement returns m=0 and −θ′′ when the measurement returns m=1, with a probability of 0.5 for each of the two possible results. Thus, the rotation about the z axis produced by the V3 gate can be expressed in terms of θ′′ as:





  
    
      
        
          
            Z
            ⁡
            
              (
              θ
              )
            
          
          =
          
          ⁢
          
            
              Z
              ⁡
              
                (
                
                  -
                  
                    θ
                    ′′
                  
                
                )
              
            
            ⁢
            T
            ⁢
            
              
            
            ⁢
            
              S
              †
            
          
        
        ,
      
    
  
  
    
      
        =
        
        ⁢
        
          
            T
            †
          
          ⁢
          
            
              Z
              ⁡
              
                (
                
                  -
                  
                    θ
                    ′′
                  
                
                )
              
            
            .
          
        
      
    
  




These operations commute, so they may be applied in any order. Alternatively, in order to achieve a z rotation of θ, a V3 gate may first carry out a z rotation of 2θ2, followed by z rotations of π and





  
    π
    4
  
  ,




as noted above.

HS†|H2 specifies a z rotation of 2θ2 when used as the control bit for a z-rotation circuit. When the measurement following a z rotation using HS†|H2 as the control bit returns m=0, a rotation of 2θ2 has been carried out. The rotation about the z axis produced by the V3 gate can be alternatively expressed as:




  
    
      
        
          
            Z
            ⁡
            
              (
              θ
              )
            
          
          =
          
          ⁢
          
            
              Z
              ⁡
              
                (
                π
                )
              
            
            ⁢
            
              TZ
              ⁡
              
                (
                
                  2
                  ⁢
                  
                    θ
                    2
                  
                
                )
              
            
          
        
        ,
      
    
  
  
    
      
        =
        
        ⁢
        
          
            Z
            ⁡
            
              (
              
                -
                
                  π
                  4
                
              
              )
            
          
          ⁢
          
            Z
            ⁡
            
              (
              
                -
                
                  π
                  2
                
              
              )
            
          
          ⁢
          
            Z
            ⁡
            
              (
              
                2
                ⁢
                
                  θ
                  2
                
              
              )
            
          
        
      
    
  
  
    
      
        =
        
        ⁢
        
          
            T
            †
          
          ⁢
          
            S
            †
          
          ⁢
          
            
              Z
              ⁡
              
                (
                
                  2
                  ⁢
                  
                    θ
                    2
                  
                
                )
              
            
            .
          
        
      
    
  




These operations also commute and can therefore be applied in any order.

FIG. 23A shows a first implementation of the V3 quantum gate as a quantum circuit featuring elements of the above-discussed quantum circuits in previous subsections. Two stages of the ladder-like quantum-circuit subsystem discussed with reference to FIGS. 12 and 13A, including stage 0 (2302) and stage 1 (2304), produce state |H2, to which the HSHX operator is applied, by gate 2305, to produce a control qubit for rotating a subject qubit by




  
    -
    
      π
      2
    
  
  +
  
    2
    ⁢
    
      θ
      2
    
  




in the z-rotation circuit element 2306, with the rotation





  
    -
    
      π
      2
    
  
  +
  
    2
    ⁢
    
      θ
      2
    
  




produced when the measurement returns m=1. Then, the rotated subject qubit is rotated by





  -
  
    π
    4
  




by a T†-gate element 2308. Of course, the V3-gate implementation is probabilistic. The measured state value m in each measurement operation may produce either 0 or 1, as discussed above. The proper V3 z rotation is produced only in the case that all of the measured values in shown in FIG. 23 are obtained. Otherwise, either one or more additional operations may need to be applied, as in the above-discussed ladder-like quantum-circuit subsystems and z-rotation circuits, or the circuit may need to be retried. For example, a conditional application of an S† gate 2309 when m=0, as measured in the final T†-gate 2308, deterministically corrects the output qubit to the desired state.

FIG. 23B shows a second implementation of the V3 quantum gate as a quantum circuit featuring elements of the above-discussed quantum circuits in previous subsections. This implementation is similar to the implementation shown in FIG. 23A, with the exception of an HS† gate 2310 instead of the HSHX gate (2305 in FIG. 23A), use of the measurement m=0 in the z-rotation circuit 2311, an additional S† gate 2312, and use of HS†|H0 2313 as input to the T† gate. As with the quantum circuit shown in FIG. 23A, the m=0 outcome of the final T†-gate 2314 is corrected by application of an S† gate 2316.
There are two additional V gates, V1 and V2, that, together with the V3 gate, can be used as a universal basis for quantum circuits:




  
    
      
        
          
            
              
                
                  V
                  1
                
                =
                
                ⁢
                
                  
                    I
                    +
                    
                      2
                      ⁢
                      iX
                    
                  
                  
                    5
                  
                
              
              ,
            
          
        
        
          
            
              
                =
                
                ⁢
                
                  
                    1
                    
                      5
                    
                  
                  ⁡
                  
                    [
                    
                      
                        
                          1
                        
                        
                          
                            2
                            ⁢
                            i
                          
                        
                      
                      
                        
                          
                            2
                            ⁢
                            i
                          
                        
                        
                          1
                        
                      
                    
                    ]
                  
                
              
              ,
            
          
        
      
    
    
      
        
      
    
  
  
    
      
        
          
            
              
                
                  V
                  2
                
                =
                
                ⁢
                
                  
                    I
                    +
                    
                      2
                      ⁢
                      iX
                    
                  
                  
                    5
                  
                
              
              ,
            
          
        
        
          
            
              =
              
              ⁢
              
                
                  
                    1
                    
                      5
                    
                  
                  ⁡
                  
                    [
                    
                      
                        
                          1
                        
                        
                          2
                        
                      
                      
                        
                          
                            -
                            2
                          
                        
                        
                          1
                        
                      
                    
                    ]
                  
                
                .
              
            
          
        
      
    
    
      
        
      
    
  




These gates can be implemented from the V3 gate by Clifford operations:

V1=HV3H, 

V2=SHV3HS†.

Thus, the above described implementations of the V3 gate, along with the above Clifford-group transformations of V3 to V1 and V2, provide a universal quantum-circuit basis.

Although the present invention has been described in terms of particular embodiments, it is not intended that the invention be limited to these embodiments. Modifications within the spirit of the invention will be apparent to those skilled in the art. For example, specific quantum gates that apply specific rotations U to input qubits may be implemented by carrying out pre-computed major rotations. As discussed above, a variety of different types of ladder-like quantum-circuit subsystems may be used to produce qubits with state vectors lying in a Block-sphere plane having various different φ angles about a perpendicular rotation axis in addition to the four different ladder-like quantum-circuit subsystems disclosed above. While the currently described subsystems prepare qubits with state vectors in the xz plane, which are then rotated into the xy plane, subsystems that prepare qubits with state vectors in other planes may be alternatively employed. Implementations of target quantum circuits may employ various different numbers and types of resource-state factories and magic-state distilleries.
It is appreciated that the previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present disclosure. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the disclosure. Thus, the present disclosure is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

## Claims

1. A quantum-circuit subsystem that prepares a subject qubit in a non-stabilizer state represented by a state vector lying in the same plane as the state vector representing an initial, input state of the subject qubit, the quantum-circuit subsystem comprising:
one or more stages, each stage i including
a stagei control-qubit input,
a stagei subject-qubit input,
a stagei measurement output that outputs a measurement of an input control qubit following at least one internal two-qubit controlled-gate operation, and
a stagei subject-qubit output that outputs the subject qubit following the at least one internal two-qubit controlled-gate operation; and

a controller that monitors the measurements output from the measurement output of successive stages of the quantum-circuit subsystem to determine a number of stages to apply to the subject qubit in order to rotate the state vector of the subject qubit to a specified rotation angle within the plane.

2. The quantum-circuit subsystem of claim 1 wherein the subject qubit input to a first stage of the quantum-circuit subsystem has a state selected from among the states:
H0=cos θ0|0+sin θ0|1 where the rotation angle





  
    
      θ
      0
    
    =
    
      π
      8
    
  
  ;
  
    
    
      Ψ
      0
      0
    
    〉
  
  ;
  
    
    
      Ψ
      0
      1
    
    〉
  
  ;
  
    and
    ⁢
    
      
    
    ⁢
    
      
        
        
          Ψ
          0
          2
        
        〉
      
      .

3. The quantum-circuit subsystem of claim 1 wherein the control qubit input to each stage of the quantum-circuit subsystem has the state |H0.

4. The quantum-circuit subsystem of claim 1 wherein each stage further comprises:
a controlled-NOT gate; and
a measurement gate that measures the state of the control qubit following the at least one internal two-qubit controlled-gate operation and outputs an indication m of the measured state to the measurement output.

5. The quantum-circuit subsystem of claim 4 wherein, when the measurement gate returns an indication m=0 indicating that the control qubit is measured to be in a state |0, the subject qubit is in a state |Hi+1, with the state-vector representing the state |Hi+1 having a rotation angle θi+1.

6. The quantum-circuit subsystem of claim 5 wherein, when the measurement gate returns an indication m=1 indicating that the control qubit is measured to be in a state |1, the subject qubit is in a state |Gi−1, with the state-vector representing the state |Hi−1 having a rotation angle θi−1.

7. The quantum-circuit subsystem of claim 6 wherein the measurement gate returns an indication m=0 with a probability p greater than or equal to 0.75 and returns an indication m=1 with a probability p less than or equal to 0.25 at each stage.

8. The quantum-circuit subsystem of claim 1 wherein the subject qubit output from a stagei subject-qubit output is input to a stagei+1 subject-qubit input.

9. The quantum-circuit subsystem of claim 8 wherein, after application of a next stage i of the quantum-circuit subsystem to a subject qubit input to the stage i in state |Hi, when the measurement gate of the stage returns an indication m=0 indicating that the control qubit is measured to be in a state |0, the subject qubit is in state |Hi+1 and has a rotation angle θi+1k characteristic of the subject qubit input to the first stage of the quantum-circuit subsystem, k, and of the stage i.

10. The quantum-circuit subsystem of claim 9 wherein the controller:
initially determines a number of stages j to apply to the subject qubit in order to rotate the state vector of the subject qubit to a specified rotation angle; and
while j is greater than 0,
applies a next stage to the subject qubit,
when the measurement value m output after applying the next stage is 0, decrements j, and
when the measurement value m output after applying the next stage is 1, increments j.

11. A method that prepares a subject qubit in a non-stabilizer state represented by a state vector lying in the same plane as the state vector representing an initial input state of the subject qubit, the method comprising:
by a controller for a quantum circuit in which the subject qubit is located, initially determining a number of stages i to apply to the subject qubit in order to rotate the state vector of the subject qubit to a specified rotation angle, each stage i including a stagei control-qubit input, a stagei subject-qubit input, a stagei measurement output that outputs a measurement of an input control qubit following at least one internal two-qubit controlled-gate operation, and a stagei subject-qubit output that outputs the subject qubit following the at least one internal two-qubit controlled-gate operation; and
while i is greater than 0,
with the quantum circuit, applying a next stage to the subject qubit and a control qubit,
when a measurement value m output by the next stage is 0, indicating that the control qubit is measured by the stage to be in state |0, decrementing i, and
when the measurement value m output by the next stage is 1, indicating that the control qubit is measured by the stage to be in state |1, incrementing i.

12. The method of claim 11 wherein each stage includes:
application of a controlled-NOT gate to the subject qubit and a control qubit; and
application of a measurement gate that measures the state of the control qubit following application of the controlled-NOT gate to the subject qubit and the control qubit.

13. The method of claim 12 wherein a first stage is applied to the subject qubit in a state selected from among the states: |H0; |Ψ00; |Ψ01; and |Ψ02.

14. The method of claim 12, wherein the control qubit input to each stage of the quantum-circuit subsystem has the state




  
    
    
      H
      0
    
    〉
  
  =
  
    
      
        cos
        ⁢
        
          
        
        ⁢
        
          θ
          0
        
        ⁢
        
          
          0
          〉
        
      
      +
      
        sin
        ⁢
        
          
        
        ⁢
        
          θ
          0
        
        ⁢
        
          
          1
          〉
        
        ⁢
        
          
        
        ⁢
        where
        ⁢
        
          
        
        ⁢
        
          θ
          0
        
      
    
    =
    
      
        π
        8
      
      .

15. The method of claim 12 wherein, after application of a next stage to a subject qubit input to the stage in state |Hi, when the measurement gate of the stage returns an indication m=0 indicating that the control qubit is measured to be in a state |0, the subject qubit is in state |Hi+1 and has a rotation angle θi+1k characteristic of the state of control qubit input to the first stage of the quantum-circuit subsystem, k, and of the stage i.

16. A single-qubit quantum circuit that carries out a unitary rotation operator U on a subject qubit input to the single-qubit quantum gate, the single-qubit quantum gate comprising:
a source of standard-state and magic-state qubits;
one or more quantum-circuit-subsystem resource-state factories that each produces, from two or more qubits selected from among standard-state and magic-state qubits, a control qubit; and
two or more rotation quantum circuits that each applies a rotation, specified by an input control qubit, to the subject qubit; and
a controller that controls the one or more quantum-circuit-subsystem resource-state factories to prepare control qubits input to the two or more rotation quantum circuits in order to apply three major rotations with respect to two non-parallel rotation axes to the subject qubit which together carry out the rotation corresponding to the unitary rotation operator U.

17. The single-qubit quantum circuit of claim 16 further including one or more first-level resource-state factories that each produces, from two or more qubits selected from among standard-state and magic-state qubits, a control qubit input to one or more of the quantum-circuit-subsystem resource-state factories.

18. The single-qubit quantum circuit of claim 16 further including one or more third-level resource-state factories that each produces, from a subject qubit selected from among standard-state and magic-state qubits and a control qubit prepared by one of the one or more quantum-circuit-subsystem resource-state factories, a control qubit input to one or more of the two or more rotation quantum circuits.

19. The single-qubit quantum circuit of claim 16 wherein each of the one or more quantum-circuit-subsystem resource-state factories further comprises a number of stages, each stage comprising:
a two-qubit controlled-NOT gate; and
a measurement gate.

20. The single-qubit quantum circuit of claim 16 wherein each of the two or more rotation quantum circuits further comprises:
one of a two-qubit controlled-NOT gate and a two-qubit controlled-Z gate; and
a measurement gate.