The Quantum Divide An Algebraic Foundation for Advances in Stagnation in Quantum Programming Languages Quantum Software Quantum Hardware Andrew Petersen & • Few new algorithms • 7-bit computers created discovered • Silicon devices proposed Mark Oskin • Little discussion of • Solid-state bits entangled Department of Computer Science higher level languages • Photons teleported The University of Washington What is the Problem? Objective Develop an alternative notation for quantum computing • No more quantum algorithms exist…? • We’re just not smart enough…? • Representation: dealing with groups of bits is hard • No representation developed for computing – Ensure operations are insensitive to state space size – Introduce shorthand for common entangled states – Traditional notations describe physical systems – Facilitate computation on large, highly entangled states • Dirac notation: describes system state • Reasoning: interesting states are difficult to identify • Matrix notation: represents system evolution – Identify quantum properties explicitly – Enabling computation requires more – Define operations by the quantum properties they induce • Assist in guiding systems to “interesting” states – Favor local transformations over global ones • Support reasoning about system evolution • Not a language … yet
Qubits: Quantum Bits Dirac Notation: a Qubit Bits and qubits both have two states: 0 and 1 Probability Amplitude State • Superposition: A qubit may be in both states simultaneously |q> = α |0> + β |1> • Phase: A qubit may have a negative quantity of a state • Entanglement: Multiple qubits may share a single state Superposition Matrix Notation: a Qubit Representing Qubit Systems |p,q> = α |00> + β |01> + χ |10> + δ |11> Probability Amplitude for State 0 α ⎡ ⎤ α ⎡ ⎤ Amplitude for 00 ⎢ ⎥ ⎢ ⎥ β Amplitude for 01 ⎢ ⎥ β ⎣ ⎦ ⎢ χ ⎥ Amplitude for 10 ⎢ ⎥ δ Amplitude for 11 ⎣ ⎦ Probability Amplitude for State 1
The New Algebra: a Qubit The New Algebra: Operators • Superposition: + + 0 1 Superposition State q q – Identity exists: x y + 0 = x y – Inverses exist: x y + (-1) x y = 0 k β = α + χ 0 1 • Association: * 0 q q q q 1 p – Identity exists: 1 x y = x y x y = x y – x y x z = 0 for y ≠ z • Other axioms hold for both operators Unit of Phase – Associativity and commutativity of + and * – Distributivity of * over + Name Weight Association and Entanglement Weight and Phase in the Algebra Distributivity reveals the lack of entanglement. • Concepts of weight and phase separated – Weights are positive real values ⎡ ⎤ + = + 1 0 0 1 0 0 0 1 ⎡ ⎤ ( ) 1 00 p q p q q p p ⎢ ⎥ ⎢ ⎥ – Phases are complex values 0 01 0 1 1 ⎢ ⎥ Unentangled ⎢ ⎥ (a) ⎢ ⎥ ⎢ ⎥ 10 0 1 2 2 ⎢ ⎥ ⎢ ⎥ • State probabilities are easy to compute 11 1 0 ⎣ ⎦ ⎣ ⎦ + = 0 0 1 1 | p q p q p q = + χ n 0 2 1 1 3 Unentangled Entangled q q q (a) (b) Entangled (b)
Phase and Interference Matrix Notation: Procedures Procedures are represented as matrices • Fundamental unit of phase χ introduced • Larger state spaces require larger matrices – Phase is manipulated in discrete increments • The effect of the matrix may not be apparent χ ≡ * π n / 2 k k i e – χ n = − χ = χ n = 2 0 2 * 2 1 , 1 – ⎡ ⎤ 1 0 1 0 ⎡ ⎤ 1 1 0 0 ⎢ ⎥ ⎢ ⎥ • Addition simulates phase interactions ⎡ ⎤ 0 1 0 1 − 1 1 1 1 0 0 ⎢ ⎥ ⎢ ⎥ = = = H H H ⎢ ⎥ = + + + − = ⎢ ⎥ 0 1 0 1 0 1 ( ) ( ( 1 ) ) 2 2 ⎢ ⎥ − 1 0 1 0 0 0 1 1 q q q q q q 1 1 ⎣ ⎦ ⎢ ⎥ ⎢ ⎥ − 0 1 0 1 − ⎣ ⎦ 0 0 1 1 ⎣ ⎦ The New Algebra: Procedures Example: The Hadamard Gate Name Parameter Definition A procedure has four parts: → ( ) name parameters definition → ( p ) + − 0 0 1 1 0 1 Hadamard : || : ⇒ p p p p p p on oldstate newstate Computation is performed via pattern matching: Initial State Transformed State definition ≡ : || oldpattern 1 newpattern 1 : || ... oldpattern 2 newpattern 2
Computation in the New Algebra Example: Controlled Not → + − 0 0 1 1 0 1 ( ) : || : H p p p p p p p → 0 0 1 1 x x x x ( , ) : || : ( ) CNot p q p q p q p q p Not q + 0 0 1 1 on p q p q ⇒ + + − 0 1 0 0 1 1 ( ) ( ) p p q p p q → 0 1 1 0 ( ) : || : Not p p p p p 1. Consolidate Associate the states of all arguments • Expressions can contain wild-cards 2. Match • Patterns can call other procedures Find affected patterns and replace them 3. Simplify An Example: EPR Pairs Universality and Illegal States In the algebra: In matrix notation: → + − 0 0 1 1 0 1 ( ) : || : H q q q q q q q ⎡ ⎤ ⎡ ⎤ 1 1 ⇒ 0 , qubit p p ⎢ ⎥ ⎢ ⎥ → 0 0 1 1 ( , ) x : x || x : ( x ) 0 0 ⎣ ⎦ ⎣ ⎦ CNot p q p q p q p q p Not q ⇒ 0 qubit q q ⎡ ⎤ ⎡ ⎤ ⎡ ⎤ ⎡ ⎤ 1 1 1 1 1 1 1 = − 2 2 n , → χ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ 0 0 1 1 ( ) : || : − T q q q q q 1 1 0 1 0 2 ⎣ ⎦ ⎣ ⎦ 2 ⎣ ⎦ ⎣ ⎦ ⎡ 1 ⎤ ⇒ + ⎢ ⎥ 0 0 1 ( ) The algebra is complete and expressive H p on p p p ⎡ ⎤ ⎡ ⎤ 1 1 0 1 1 ⎢ ⎥ ⊗ = ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ 2 ⎣ 1 ⎦ ⎣ 0 ⎦ 2 1 – All legal operations can be defined (Boykin et al.) ⎢ ⎥ ⎣ 0 ⎦ – All legal states can be expressed + 0 1 0 ( , ) ( ) ⎛ ⎞ CNot p q on p p q ⎡ ⎤ ⎡ ⎤ ⎡ ⎤ 1 0 0 0 1 1 ⎜ ⎟ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ – Illegal states cannot be reached using legal gates ⎜ ⎟ 0 1 0 0 0 0 1 1 ⇒ + = ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ 0 0 1 1 | = p q p q p q ⎜ ⎟ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ 0 0 0 1 1 0 2 2 ⎜ ⎟ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎜ ⎟ 0 0 1 0 0 1 ⎣ ⎦ ⎣ ⎦ ⎣ ⎦ ⎝ ⎠
Negation Computing on Negations x − = Computation may be performed directly x U x 1. Add all the cases of the gate being applied Represents all states not present 2. Apply the gate to the negated state = = 0 1 3. Subtract the result from 2) from 1) x p x p 1 1 ( ) H p on p q − p − ⇒ + + − + 0 1 1 0 1 0 1 0 1 (( ) ( ))( ) ( ) = + + 0 0 0 1 1 1 = p q 1 0 p p p p q q y p q p q p q y p q = + − + 0 0 0 1 0 1 1 1 2 2 p q p q p q p q = 0 0 0 0 + 0 0 0 1 + 0 0 1 0 + 0 0 1 1 + z p q r t p q r t p q r t p q r t z = 1 0 0 1 0 1 0 0 + 0 1 0 1 + 0 1 1 0 + 0 1 1 1 + = + 0 0 1 0 p q r t p q r t p q r t p q r t p q r t p q p q 1 0 0 0 + 1 0 1 0 + 1 0 1 1 + 1 1 0 0 + p q r t p q r t p q r t p q r t 1 1 0 1 + 1 1 1 0 + 1 1 1 1 p q r t p q r t p q r t Example: Grover’s Algorithm Example: Grover Iteration + ˆ ˆ ( [ ] 1 ) { GroverIter ation p n as p r p • Fast search algorithm ⇒ − = − + ˆ ˆ P ˆ ( ) ( 1 ) Oracle p p r p U r p • The desired solution is designated with a hat { • An Oracle is required forall p i ( ) – Adds a negative phase to the desired solutions H p i • A PhaseFlip operation is needed ˆ ⇒ − + 0 0 } 2 n ( ... ) ( 1 ) P p p r U 1 n – Adds a negative phase to all non-zero states = − + − + 0 0 0 0 n ( 2 ( 1 ))( ... ) ( 1 ) ( ... ) r p p r p p 1 1 n n
Example: Grover Iteration Summary ⇒ − + + + 0 0 0 0 ( ) ( 2 n ( 1 ))( ... ) ( 1 ) ( ... ) • Explicit indicators of quantum properties PhaseFlip p r p p r p p 1 1 n n – Superposition operator + ˆ = − + + + 0 0 ( 2 n 2 ( 1 ))( ... ) ( 1 ) P r p p r U – Basic unit of phase χ 1 n – Entanglement via distributivity • Support for computing on large systems { forall p i – Size-independent procedures ( ) H p i – Focus on local transformations ⇒ − + + + ˆ } ( 2 n 2 ( 1 )) P 2 n ( 1 ) • Methods for reasoning about entangled states r U r p + + – Symmetric entanglement operator | 1 1 r r → − + + − ˆ ˆ } ( 1 ) ( 2 ) p r p – Computation on negations − − 1 1 n n 2 2 Future Work • Reasoning about phase is still difficult Questions? – A compact representation for complex phases is needed – Weight and phase interactions may be further formalized • Types could be used to enforce constraints – Separate quantum and classical types would properly restrict interactions – Linear types would prevent copying of state • User studies will indicate problem areas • Our final goal is a language implementation
Recommend
More recommend