The Quantum Divide An Algebraic Foundation for Advances in - - PowerPoint PPT Presentation

the quantum divide an algebraic foundation for
SMART_READER_LITE
LIVE PREVIEW

The Quantum Divide An Algebraic Foundation for Advances in - - PowerPoint PPT Presentation

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


slide-1
SLIDE 1

An Algebraic Foundation for Quantum Programming Languages

Andrew Petersen & Mark Oskin Department of Computer Science The University of Washington

The Quantum Divide

Advances in Quantum Hardware

  • 7-bit computers created
  • Silicon devices proposed
  • Solid-state bits entangled
  • Photons teleported

Stagnation in Quantum Software

  • Few new algorithms

discovered

  • Little discussion of

higher level languages

What is the Problem?

  • No more quantum algorithms exist…?
  • We’re just not smart enough…?
  • No representation developed for computing

– Traditional notations describe physical systems

  • Dirac notation: describes system state
  • Matrix notation: represents system evolution

– Enabling computation requires more

  • Assist in guiding systems to “interesting” states
  • Support reasoning about system evolution

Objective

Develop an alternative notation for quantum computing

  • Representation: dealing with groups of bits is hard

– Ensure operations are insensitive to state space size – Introduce shorthand for common entangled states – Facilitate computation on large, highly entangled states

  • Reasoning: interesting states are difficult to identify

– Identify quantum properties explicitly – Define operations by the quantum properties they induce – Favor local transformations over global ones

  • Not a language … yet
slide-2
SLIDE 2

Qubits: Quantum Bits

Bits and qubits both have two states: 0 and 1

  • Superposition:

A qubit may be in both states simultaneously

  • Phase:

A qubit may have a negative quantity of a state

  • Entanglement:

Multiple qubits may share a single state

Dirac Notation: a Qubit |q> = α|0> + β|1>

Superposition Probability Amplitude State

Matrix Notation: a Qubit

Probability Amplitude for State 0

⎥ ⎦ ⎤ ⎢ ⎣ ⎡ β α

Probability Amplitude for State 1

Representing Qubit Systems

⎥ ⎥ ⎥ ⎥ ⎦ ⎤ ⎢ ⎢ ⎢ ⎢ ⎣ ⎡ δ χ β α

|p,q> = α|00> + β|01> + χ|10> + δ|11>

Amplitude for 00 Amplitude for 01 Amplitude for 10 Amplitude for 11

slide-3
SLIDE 3

The New Algebra: a Qubit

1

q q q

k β

χ α + =

Name Weight State Superposition Unit of Phase

The New Algebra: Operators

  • Superposition: +

– Identity exists: xy + 0 = xy – Inverses exist: xy + (-1) xy = 0

  • Association: *

– Identity exists: 1 xy = xy xy = xy – xy xz = 0 for y ≠z

  • Other axioms hold for both operators

– Associativity and commutativity of + and * – Distributivity of * over +

1

q q +

1 0 q

p

Association and Entanglement

Unentangled (a) Entangled (b)

) (

1 1

p p q q p q p + = + ⎥ ⎥ ⎥ ⎥ ⎦ ⎤ ⎢ ⎢ ⎢ ⎢ ⎣ ⎡ 1 1 2 1 ⎥ ⎥ ⎥ ⎥ ⎦ ⎤ ⎢ ⎢ ⎢ ⎢ ⎣ ⎡ 1 1 2 1

q p q p q p |

1 1

= +

Unentangled (a) Entangled (b)

00 01 10 11

Distributivity reveals the lack of entanglement.

Weight and Phase in the Algebra

  • Concepts of weight and phase separated

– Weights are positive real values – Phases are complex values

  • State probabilities are easy to compute

1 2

3 1 q q q

n

χ + =

slide-4
SLIDE 4

Phase and Interference

  • Fundamental unit of phase χ introduced

– Phase is manipulated in discrete increments – –

  • Addition simulates phase interactions

1 1

2 ) ) 1 ( ( ) ( q q q q q q = − + + + =

1 , 1

2 * 2 2

= = − =

n n

χ χ χ

n

i k k

e

2 / * π

χ ≡

Matrix Notation: Procedures

Procedures are represented as matrices

  • Larger state spaces require larger matrices
  • The effect of the matrix may not be apparent

⎥ ⎦ ⎤ ⎢ ⎣ ⎡ − = 1 1 1 1 H

⎥ ⎥ ⎥ ⎥ ⎦ ⎤ ⎢ ⎢ ⎢ ⎢ ⎣ ⎡ − = 1 1 1 1 1 1 1 1

1

H ⎥ ⎥ ⎥ ⎥ ⎦ ⎤ ⎢ ⎢ ⎢ ⎢ ⎣ ⎡ − − = 1 1 1 1 1 1 1 1

2

H

The New Algebra: Procedures

newstate

  • ldstate

definition parameters name ⇒ →

  • n

) ( || :

1 1 newpattern

  • ldpattern

definition ≡

Computation is performed via pattern matching: A procedure has four parts:

... || :

2 2 newpattern

  • ldpattern

Example: The Hadamard Gate

→ ) ( p Hadamard

1 1 1

: || : p p p p p p − +

Name Parameter Definition Initial State Transformed State

slide-5
SLIDE 5

Computation in the New Algebra

  • 1. Consolidate

Associate the states of all arguments

  • 2. Match

Find affected patterns and replace them

  • 3. Simplify

1 1 1

: || : ) ( p p p p p p p H − + →

1 1

q p q p

  • n

+

1 1 1

) ( ) ( q p p q p p − + + ⇒

Example: Controlled Not

  • Expressions can contain wild-cards
  • Patterns can call other procedures

1 1 1 1

: || : ) ( ) ( : || : ) , ( p p p p p Not q Not p q p q p q p q p CNot

x x x x

→ →

An Example: EPR Pairs

In matrix notation:

q p q p q p q p p

  • n

q p CNot p p p

  • n

p H q q qubit p qubit p | ) ( ) , ( ) (

1 1 1 1

= + ⇒ + + ⇒ ⇒ ⇒

⎥ ⎥ ⎥ ⎥ ⎦ ⎤ ⎢ ⎢ ⎢ ⎢ ⎣ ⎡ = ⎟ ⎟ ⎟ ⎟ ⎟ ⎠ ⎞ ⎜ ⎜ ⎜ ⎜ ⎜ ⎝ ⎛ ⎥ ⎥ ⎥ ⎥ ⎦ ⎤ ⎢ ⎢ ⎢ ⎢ ⎣ ⎡ ⎥ ⎥ ⎥ ⎥ ⎦ ⎤ ⎢ ⎢ ⎢ ⎢ ⎣ ⎡ ⎥ ⎥ ⎥ ⎥ ⎦ ⎤ ⎢ ⎢ ⎢ ⎢ ⎣ ⎡ = ⎥ ⎦ ⎤ ⎢ ⎣ ⎡ ⊗ ⎥ ⎦ ⎤ ⎢ ⎣ ⎡ ⎥ ⎦ ⎤ ⎢ ⎣ ⎡ ⎥ ⎦ ⎤ ⎢ ⎣ ⎡ = ⎥ ⎦ ⎤ ⎢ ⎣ ⎡ ⎥ ⎦ ⎤ ⎢ ⎣ ⎡ − ⎥ ⎦ ⎤ ⎢ ⎣ ⎡ ⎥ ⎦ ⎤ ⎢ ⎣ ⎡ 1 1 2 1 1 1 2 1 1 1 1 1 1 1 2 1 1 1 1 2 1 1 , 1 1 2 1 1 1 1 1 1 2 1 1 , 1

In the algebra:

Universality and Illegal States

The algebra is complete and expressive

– All legal operations can be defined (Boykin et al.) – All legal states can be expressed – Illegal states cannot be reached using legal gates

1 1 1 1 1 1 1

n

: || : ) ( ) ( : || : ) , ( : || : ) ( q q q q q T q Not p q p q p q p q p CNot q q q q q q q H

x x x x

2 −

2

→ → − + → χ

slide-6
SLIDE 6

Negation

Represents all states not present

x U x

x −

=

1 1 1

q p q p q p y p x + + = =

1 1

q p y p x = =

1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

t r q p t r q p t r q p t r q p t r q p t r q p t r q p t r q p t r q p t r q p t r q p t r q p t r q p t r q p t r q p z + + + + + + + + + + + + + + =

1 1

t r q p z =

Computing on Negations

Computation may be performed directly

  • 1. Add all the cases of the gate being applied
  • 2. Apply the gate to the negated state
  • 3. Subtract the result from 2) from 1)

1 1

) ( q p

  • n

p H

1 1 1 1 1

2 2 q p q p q p q p q p q p + = + − + = ) ))( ( ) ((

1 1 1

q q p p p p + − + + ⇒

1 1

) ( q p p − −

Example: Grover’s Algorithm

  • Fast search algorithm
  • The desired solution is designated with a hat
  • An Oracle is required

– Adds a negative phase to the desired solutions

  • A PhaseFlip operation is needed

– Adds a negative phase to all non-zero states

Example: Grover Iteration

) ... ( ) 1 ( ) ... ))( 1 ( 2 ( ) 1 ( ) ... ( 2 } ) ( { ˆ ) 1 ( ˆ ˆ ) ( { ) ˆ ˆ 1 ] [ (

1 1 ˆ 1

p p r p p r U r p p p H p forall p r U p r p p Oracle p r p as n p ation GroverIter

n n n P n n i i P

+ − + − = + − ⇒ + − = − ⇒ +

slide-7
SLIDE 7

Example: Grover Iteration

p r r p r p r U r p H p forall U r p p r p p r p p r p PhaseFlip

n n n P n i i P n n n n n

ˆ ) 2 1 2 ( ˆ ) 2 1 1 ( } ˆ ) 1 ( 2 )) 1 ( 2 2 ( } ) ( { ) 1 ( ) ... ))( 1 ( 2 2 ( ) ... ( ) 1 ( ) ... ))( 1 ( 2 ( ) (

1 1 ˆ 1 1 1 − −

+ − + + + − → + + + − ⇒ + + + − = + + + − ⇒

Summary

  • Explicit indicators of quantum properties

– Superposition operator + – Basic unit of phase χ – Entanglement via distributivity

  • Support for computing on large systems

– Size-independent procedures – Focus on local transformations

  • Methods for reasoning about entangled states

– Symmetric entanglement operator | – Computation on negations

Future Work

  • Reasoning about phase is still difficult

– 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

Questions?

slide-8
SLIDE 8

Previous Work

  • Quantum circuits (Deutsch, Yao)

Circuit representation with state annotations

  • QCL (Ömer)

Imperative language based on defining matrices

  • qGCL (Sanders and Zuliani)

Probabilistic language featuring a refinement calculus

  • Quantum C++ (Bertelli)

C++ with quantum operations defined as data structures

  • Block-QPL (Selinger)

A functional, graph-based computational model

Grover’s Algorithm

) 1 (2 , ˆ ˆ } ) 1 (2 , ˆ ˆ ) 1 (2 , ˆ ˆ } ˆ ) 2 1 2 ( ˆ ) 2 1 1 ( ) ( { 1) n ( 1 ˆ ˆ ) )...( ( } : || : ) ( { ... ] [ { ) (

n n n 1 1 1 1 1 1 1 1

− > → − > ⇒ − > + ⇒ + − + + + − → + = + = = + + ⇒ − + → ⇒

− −

r p r p r p r p Measure(p) r p r p p r r p r p ation GroverIter to i for p p U p p p p p p p p p p p H p forall p p n p qubit n val Grover

n n p n n i i i i i i i i n

M M