SLIDE 1 Diagrammatic Methods for the Specification and Verification of Quantum Algorithms
William Zeng
Quantum Group Department of Computer Science University of Oxford Quantum Programming and Circuits Workshop IQC, University of Waterloo June, 2015 http://willzeng.com/shared/qcircuitworkshop.pdf
SLIDE 2 Introduction
◮ Problem: How can we best exploit the structure of quantum
mechanics?
Green et al. arXiv 1304.3390 Wecker & Svore arXiv:1402.4467
SLIDE 3 Introduction
◮ Problem: How can we best exploit the structure of quantum
mechanics?
◮ Quantum Circuits 2.0
σ
{0, 1}
1
√
|S| 1
√
|S| 1 √ 2
f
Green et al. arXiv 1304.3390 Wecker & Svore arXiv:1402.4467
SLIDE 4 Introduction
◮ Problem: How can we best exploit the structure of quantum
mechanics?
◮ Quantum Circuits 2.0
σ
{0, 1}
1
√
|S| 1
√
|S| 1 √ 2
⇒
f
Green et al. arXiv 1304.3390 Wecker & Svore arXiv:1402.4467
SLIDE 5 Introduction
Quantum Information
FHilb
represented by
Quantum Circuits
Selinger arXiv 0908.3347
SLIDE 6 Introduction
Quantum Information
FHilb
represented by
Quantum Circuits Abstract Process Theories
†-SMC †-compact categories
represented by generalize to
Categorical Diagrams
Selinger arXiv 0908.3347
SLIDE 7 Introduction
Quantum Information
FHilb
represented by
Quantum Circuits Abstract Process Theories
†-SMC †-compact categories
represented by generalize to
Categorical Diagrams
Selinger arXiv 0908.3347
SLIDE 8 Introduction
Quantum Information
FHilb
represented by
Quantum Circuits Abstract Process Theories
†-SMC †-compact categories
represented by generalize to
Categorical Diagrams
Selinger arXiv 0908.3347
SLIDE 9 Overview
◮ The Framework: Circuit Diagrams 2.0
◮ bases ∙ copying/deleting ∙ groups/representations ∙
complementarity ∙ oracles
SLIDE 10 Overview
◮ The Framework: Circuit Diagrams 2.0
◮ bases ∙ copying/deleting ∙ groups/representations ∙
complementarity ∙ oracles
◮ Example 1. Generalized Deutsch-Jozsa algorithm ◮ Example 2. The quantum GROUPHOMID algorithm
SLIDE 11 Overview
◮ The Framework: Circuit Diagrams 2.0
◮ bases ∙ copying/deleting ∙ groups/representations ∙
complementarity ∙ oracles
◮ Example 1. Generalized Deutsch-Jozsa algorithm ◮ Example 2. The quantum GROUPHOMID algorithm ◮ Overview of other results.
◮ algorithms ∙ locality ∙ foundations
◮ Outlook.
SLIDE 12
Quantum circuits 1.0
A category C is a set of systems A, B ∈ Ob(C) a set of processes f : A → B ∈ Arr(C)
SLIDE 13
Quantum circuits 1.0
A category C is a set of systems A, B ∈ Ob(C) a set of processes f : A → B ∈ Arr(C) f : A → B := B f A g ◦ f := C g B f A idA := A A
SLIDE 14
Quantum circuits 1.0
A category C is a set of systems A, B ∈ Ob(C) a set of processes f : A → B ∈ Arr(C) f : A → B := B f A g ◦ f := C g B f A idA := A A
These are sequential processes.
SLIDE 15 The framework
A monoidal category C has
- cat. tensor (− ⊗ −) : C × C → C
a unit object I ∈ Ob(C)
SLIDE 16 The framework
A monoidal category C has
- cat. tensor (− ⊗ −) : C × C → C
a unit object I ∈ Ob(C)
f ⊗ g := B f A D g C = B f A D g C idI :=
SLIDE 17 The framework
A monoidal category C has
- cat. tensor (− ⊗ −) : C × C → C
a unit object I ∈ Ob(C)
f ⊗ g := B f A D g C = B f A D g C idI :=
These are parallel processes.
SLIDE 18
- Sym. Mon. Cats. & quantum circuits
category B f A C g B f A A A monoidal category f ⊗ g := B f A D g C idI := states |ψ := A ψ symmetric monoidal categories B A B A
SLIDE 19
- Sym. Mon. Cats. & quantum circuits
category B f A C g B f A A A monoidal category f ⊗ g := B f A D g C idI := states |ψ := A ψ symmetric monoidal categories B A B A
Quantum Computation
◮ FHilb: Sym. Mon. Cat. ◮ Ob(FHilb) = f.d. Hilbert
Spaces
◮ Arr(FHilb) = linear maps ◮ ⊗ is the tensor product ◮ I = C ◮ States are |ψ : C → H
Abramsky & Coecke arXiv 0808.1023
SLIDE 20
- Sym. Mon. Cats. & quantum circuits
category B f A C g B f A A A monoidal category f ⊗ g := B f A D g C idI := states |ψ := A ψ symmetric monoidal categories B A B A
FHilb : Sym. Mon. Cat. Ob(FHilb) = f.d. Hilbert Spaces Arr(FHilb) = linear maps
SLIDE 21
- Sym. Mon. Cats. & quantum circuits
category B f A C g B f A A A monoidal category f ⊗ g := B f A D g C idI := states |ψ := A ψ symmetric monoidal categories B A B A
FHilb : Sym. Mon. Cat. Ob(FHilb) = f.d. Hilbert Spaces Arr(FHilb) = linear maps
/ U f |1 |0 H
1
H HN H2 H2 H2 f U
SLIDE 22 The dagger
A dagger functor † : C → C s.t.
= f (1) (g ◦ f)† = f † ◦ g† (2) id†
A = idH
(3) FHilb is a dagger category with the usual adjoint.
Abramsky & Coecke arXiv 0808.1023
SLIDE 23 The dagger
A dagger functor † : C → C A f B → B f A := B f † A
Abramsky & Coecke arXiv 0808.1023
SLIDE 24 The dagger
A dagger functor † : C → C A f B → B f A := B f † A Unitarity: f f = f f =
Abramsky & Coecke arXiv 0808.1023
SLIDE 25 The dagger
A dagger functor † : C → C A f B → B f A := B f † A On states: ψ
†
= ψ
Abramsky & Coecke arXiv 0808.1023
SLIDE 26 The dagger
A dagger functor † : C → C A f B → B f A := B f † A On states: ψ
†
= ψ |φ ◦ ψ| = φ|ψ = ψ φ This is a scalar φ|ψ : C → C or I → I in general and admits a generalized Born rule.
Abramsky & Coecke arXiv 0808.1023
SLIDE 27
Bases
A †-special Frobenius algebra ( A, , ) obeys: = = = = = = =
SLIDE 28
Bases
Given a finite set S, we use the following diagrams to represent the ‘copying’ and ‘deleting’ functions: S ∆ − → S × S S ǫ − → 1
SLIDE 29
Bases
Given a finite set S, we use the following diagrams to represent the ‘copying’ and ‘deleting’ functions: S ∆ − → S ⊗ S S ǫ − → C |s → |s ⊗ |s |s → 1 We treat these as linear maps acting on a free vector space, whose basis is S.
SLIDE 30
Bases
Given a finite set S, we use the following diagrams to represent the ‘copying’ and ‘deleting’ functions: S ∆ − → S ⊗ S S ǫ − → C |s → |s ⊗ |s |s → 1 We treat these as linear maps acting on a free vector space, whose basis is S. |s ⊗ |t → δs,t|s 1 →
s |s
SLIDE 31
Bases and Topology
These linear maps form a †-special commutative Frobenius algebra. Their composites are determined entirely by their connectivity, e.g.: =
SLIDE 32 Bases and Topology
These linear maps form a †-special commutative Frobenius algebra. Their composites are determined entirely by their connectivity, e.g.: =
◮ [Coecke et al. 0810.0812] †-(special) commutative Frobenius algebras
- n objects in FHilb are eqv. to orthogonal (orthonormal) bases.
◮ [Evans et al. 0909.4453] †-(special) commutative Frobenius algebras
- n objects in Rel are eqv. to groupoids.
SLIDE 33
Complementarity
◮ [Coecke & Duncan 0906.4725]: Two †-SCFA’s on the same object are
complementary when: d(A) =
SLIDE 34
Complementarity
◮ [Coecke & Duncan 0906.4725]: Two †-SCFA’s on the same object are
complementary when: d(A) =
◮ This is the Hopf law. Two complementary †-SCFA’s that also form a
bialgebra are called strongly complementary.
SLIDE 35 Strongly Complementary Bases
◮ [Kissinger et al. 1203.4988]: Strongly complementary observables in
FHilb are characterized by Abelian groups.
◮ Given a finite group G, its multiplication is:
m
G × G
m
− → G
SLIDE 36 Strongly Complementary Bases
◮ [Kissinger et al. 1203.4988]: Strongly complementary observables in
FHilb are characterized by Abelian groups.
◮ Given a finite group G, its multiplication is:
m
G ⊗ G
m
− → G We linearize this to obtain the group algebra multiplication.
SLIDE 37 Strongly Complementary Bases
◮ [Kissinger et al. 1203.4988]: Strongly complementary observables in
FHilb are characterized by Abelian groups.
◮ Given a finite group G, its multiplication is:
m
G ⊗ G
m
− → G We linearize this to obtain the group algebra multiplication.
◮ A one-dimensional representation G
ρ
− → C is:
ρ m
=
ρ ρ
It is copied by the multiplication vertex.
Vicary arXiv 1209.3917
SLIDE 38 Strongly Complementary Bases
◮ [Kissinger et al. 1203.4988]: Strongly complementary observables in
FHilb are characterized by Abelian groups.
◮ Given a finite group G, its multiplication is:
m
G ⊗ G
m
− → G We linearize this to obtain the group algebra multiplication.
◮ A one-dimensional representation G
ρ
− → C is:
ρ m
=
ρ ρ
The adjoint C
ρ
− → G is also copied on the lower legs.
Vicary arXiv 1209.3917
SLIDE 39
Strongly Complementary Bases
◮ [Kissinger et al. 1203.4988]: Strongly complementary observables in
FHilb are characterized by Abelian groups.
◮ [Gogioso & WZ]: Pairs of strongly complementary observables
correspond to Fourier transforms between their bases.*
SLIDE 40
Unitary Oracles
◮ From these can construct the internal structure of oracles:
|x |x |y |f(x) ⊕ y Oracle f
SLIDE 41
Unitary Oracles
◮ From these can construct the internal structure of oracles:
|x |x |y |f(x) ⊕ y Oracle f
◮ [WZ & Vicary 1406.1278]: For f to map between bases is a
self-conjugate comonoid homomorphism. Oracles with this abstract structure are unitary in general.
SLIDE 42
Ex 1. The Deutsch-Jozsa Algorithm
◮ Blackbox function f : {0, 1}N → {0, 1} is balanced when it
takes each possible value the same number of times 00 01 10 11 1
SLIDE 43
Ex 1. The Deutsch-Jozsa Algorithm
◮ Blackbox function f : {0, 1}N → {0, 1} is balanced when it
takes each possible value the same number of times 00 01 10 11 1
Definition (The Deutsch-Jozsa problem)
Given a blackbox function f promised to be either constant or balanced, identify which.
◮ Classically we require at most 2N−1 + 1 queries of f ◮ The quantum algorithm only requires a single query.
SLIDE 44 Ex 1. The Deutsch-Jozsa Algorithm
◮ Blackbox function f : {0, 1}N → {0, 1} is balanced when it
takes each possible value the same number of times 00 01 10 11 1
◮ Let σ be non-trivial irrep. of Z2 i.e. σ(0) = 1, σ(1) = −1.
balanced:
f σ
= 0 constant:
f
=
x
Vicary arXiv 1209.3917
SLIDE 45 Ex 1. The Deutsch-Jozsa Algorithm
σ {0, 1} Oracle
1
√
|S| 1
√
|S| 1 √ 2
f
Vicary arXiv 1209.3917
SLIDE 46 Ex 1. The Deutsch-Jozsa Algorithm
We can use our higher level description to decompose the algorithm: σ† {0, 1}
1
√
|S| 1
√
|S| 1 √ 2
f
m
Vicary arXiv 1209.3917
SLIDE 47 Ex 1. The Deutsch-Jozsa Algorithm
We can use our higher level description to decompose the algorithm: σ† {0, 1}
1
√
|S| 1
√
|S| 1 √ 2
Representation (1, −1) of Z2 f
m
Vicary arXiv 1209.3917
SLIDE 48 Ex 1. The Deutsch-Jozsa Algorithm
We can use our higher level description to decompose the algorithm: σ† {0, 1}
1
√
|S| 1
√
|S| 1 √ 2
Representation (1, −1) of Z2 Linear maps from set basis f
m
Vicary arXiv 1209.3917
SLIDE 49 Ex 1. The Deutsch-Jozsa Algorithm
We can use our higher level description to decompose the algorithm: σ† {0, 1}
1
√
|S| 1
√
|S| 1 √ 2
Representation (1, −1) of Z2 Linear maps from set basis Function f : S → {0, 1} f
m
Vicary arXiv 1209.3917
SLIDE 50 Ex 1. The Deutsch-Jozsa Algorithm
We can use our higher level description to decompose the algorithm: σ† {0, 1}
1
√
|S| 1
√
|S| 1 √ 2
Representation (1, −1) of Z2 Linear maps from set basis Function f : S → {0, 1} Multiplication operation on Z2 f
m
Vicary arXiv 1209.3917
SLIDE 51 Ex 1. The Deutsch-Jozsa Algorithm
We can use our higher level description to decompose the algorithm: σ† {0, 1}
1
√
|S| 1
√
|S| 1 √ 2
Representation (1, −1) of Z2 Linear maps from set basis Function f : S → {0, 1} Multiplication operation on Z2 Projection onto
s |s (measure X to be 0)
f
m
Vicary arXiv 1209.3917
SLIDE 52 Ex 1. The Deutsch-Jozsa Algorithm
Diagrammatic moves allow us to verify the algorithm in generality: σ† {0, 1}
1
√
|S| 1
√
|S| 1 √ 2
f
Vicary arXiv 1209.3917
SLIDE 53 Ex 1. The Deutsch-Jozsa Algorithm
Diagrammatic moves allow us to verify the algorithm in generality: σ† {0, 1}
1
√
|S| 1
√
|S| 1 √ 2
f
◮ Slide up σ†
Vicary arXiv 1209.3917
SLIDE 54 Ex 1. The Deutsch-Jozsa Algorithm
Diagrammatic moves allow us to verify the algorithm in generality: σ σ {0, 1}
1
√
|S| 1
√
|S| 1 √ 2
f
◮ Slide up σ† ◮ Pull σ† through the whitedot
Vicary arXiv 1209.3917
SLIDE 55 Ex 1. The Deutsch-Jozsa Algorithm
Diagrammatic moves allow us to verify the algorithm in generality: σ
1
√
|S| 1
√
|S|
f
◮ Slide up σ† ◮ Pull σ† through the whitedot ◮ Neglect the right-side system
Vicary arXiv 1209.3917
SLIDE 56 Ex 1. The Deutsch-Jozsa Algorithm
Diagrammatic moves allow us to verify the algorithm in generality: σ
1 |S|
f
◮ Slide up σ† ◮ Pull σ† through the whitedot ◮ Neglect the right-side system ◮ Topological contraction of blackdot
Vicary arXiv 1209.3917
SLIDE 57 Ex 1. The Deutsch-Jozsa Algorithm
σ
1 |S|
f Gives the amplitude for the input state
1
√
|S|
- s |s to be in the σ state
at measurement.
Vicary arXiv 1209.3917
SLIDE 58 Ex 1. The Deutsch-Jozsa Algorithm
σ
1 |S|
f Gives the amplitude for the input state
1
√
|S|
- s |s to be in the σ state
at measurement. What if f is balanced? σ f = 0 so the system is never measured in σ. What if f is constant? Then f = x ⇒ σ
1 |S|
f = x σ
1 |S|
= ±1 So the system is always measured in σ.
Vicary arXiv 1209.3917
SLIDE 59
Ex 1. Summary for Deutsch-Josza
◮ Verify: Abstractly verify the algorithm
SLIDE 60 Ex 1. Summary for Deutsch-Josza
◮ Verify: Abstractly verify the algorithm ◮ Generalize:
◮ Abstract definition for balanced generalizes [Høyer Phys. Rev. A
59, 3280 1999] and [Batty, Braunstein, Duncan 0412067]. See [Vicary 1209.3917].
SLIDE 61 Ex 1. Summary for Deutsch-Josza
◮ Verify: Abstractly verify the algorithm ◮ Generalize:
◮ Abstract definition for balanced generalizes [Høyer Phys. Rev. A
59, 3280 1999] and [Batty, Braunstein, Duncan 0412067]. See [Vicary 1209.3917].
◮ The algorithm can be executed with complementary rather than
strongly complementary observables
SLIDE 62 Ex 2. The GROUPHOMID Algorithm
◮ Given finite groups G and A where A is abelian, and a blackbox
function f : G → A promised to be a group homomorphism, identify f.
◮ Case: Let A be a cyclic group Zn.
f
G A
σ
1
√
|G|
ρ Prepare initial states Apply a unitary map Measure the left system
WZ & Vicary arXiv 1406.1278
SLIDE 63 Ex 2. The GROUPHOMID Algorithm
◮ Given finite groups G and A where A is abelian, and a blackbox
function f : G → A promised to be a group homomorphism, identify f.
◮ Case: Let A be a cyclic group Zn.
G A
f σ
1
√
|G|
ρ
WZ & Vicary arXiv 1406.1278
SLIDE 64 Ex 2. The GROUPHOMID Algorithm
◮ Given finite groups G and A where A is abelian, and a blackbox
function f : G → A promised to be a group homomorphism, identify f.
◮ Case: Let A be a cyclic group Zn.
G A
f σ ρ
1
√
|G|
ρ
◮ Pull ρ through whitedot
WZ & Vicary arXiv 1406.1278
SLIDE 65 Ex 2. The GROUPHOMID Algorithm
◮ Given finite groups G and A where A is abelian, and a blackbox
function f : G → A promised to be a group homomorphism, identify f.
◮ Case: Let A be a cyclic group Zn.
f
G A
σ ρ ρ
◮ Pull ρ through whitedot ◮ Contract set scalars
WZ & Vicary arXiv 1406.1278
SLIDE 66 Ex 2. The GROUPHOMID Algorithm
◮ Given finite groups G and A where A is abelian, and a blackbox
function f : G → A promised to be a group homomorphism, identify f.
◮ Case: Let A be a cyclic group Zn.
f
A G
σ ρ ρ
◮ Pull ρ through whitedot ◮ Contract set scalars ◮ Topological equivalence
WZ & Vicary arXiv 1406.1278
SLIDE 67 Ex 2. The GROUPHOMID Algorithm
◮ Given finite groups G and A where A is abelian, and a blackbox
function f : G → A promised to be a group homomorphism, identify f.
◮ Case: Let A be a cyclic group Zn.
f
A G
σ ρ ρ
◮ ρ ◦ f is an irrep. of G.
WZ & Vicary arXiv 1406.1278
SLIDE 68 Ex 2. The GROUPHOMID Algorithm
◮ Given finite groups G and A where A is abelian, and a blackbox
function f : G → A promised to be a group homomorphism, identify f.
◮ Case: Let A be a cyclic group Zn.
f
A G
σ ρ ρ
◮ ρ ◦ f is an irrep. of G. ◮ Choose ρ to be a faithful
representation of A.
WZ & Vicary arXiv 1406.1278
SLIDE 69 Ex 2. The GROUPHOMID Algorithm
◮ Given finite groups G and A where A is abelian, and a blackbox
function f : G → A promised to be a group homomorphism, identify f.
◮ Case: Let A be a cyclic group Zn.
f
A G
σ ρ ρ
◮ ρ ◦ f is an irrep. of G. ◮ Choose ρ to be a faithful
representation of A.
◮ Then measuring ρ ◦ f identifies f
(up to isomorphism)
WZ & Vicary arXiv 1406.1278
SLIDE 70 Ex 2. The GROUPHOMID Algorithm
◮ Given finite groups G and A where A is abelian, and a blackbox
function f : G → A promised to be a group homomorphism, identify f.
◮ Case: Let A be a cyclic group Zn.
f
A G
σ ρ ρ
◮ ρ ◦ f is an irrep. of G. ◮ Choose ρ to be a faithful
representation of A.
◮ Then measuring ρ ◦ f identifies f
(up to isomorphism)
◮ One-dimensional representations
are isomorphic only if they are equal.
WZ & Vicary arXiv 1406.1278
SLIDE 71 Ex 2. The GROUPHOMID Algorithm
The General Case: Homomorphism f : G → A
◮ We generalize with proof by induction via the Structure
- Theorem. A = Zp1 ⊕ ... ⊕ Zpk
◮ [WZ & Vicary 1406.1278] Given types, the quantum algorithm
can identify a group homomorphism in k oracle queries.
SLIDE 72 Ex 2. The GROUPHOMID Algorithm
The General Case: Homomorphism f : G → A
◮ We generalize with proof by induction via the Structure
- Theorem. A = Zp1 ⊕ ... ⊕ Zpk
◮ [WZ & Vicary 1406.1278] Given types, the quantum algorithm
can identify a group homomorphism in k oracle queries.
◮ Note that the quantum algorithm depends on the structure of A
while a classical algorithm will depend on the structure of G.
◮ Theorem [WZ] For large G this algorithm makes a quantum
- ptimal number of queries, while classical algorithms are lower
bounded by log |G|.
SLIDE 73 Quantum algorithms: old, generalized and new
σ† {0, 1} 1
1
1 √ 2 f s† σ† {0, 1} 1
1 √ 2 D f ρ (n) S 1
n |G| f Deutsch-Jozsa Single-shot Grover Hidden subgroup
Vicary arXiv 1209.3917 WZ & Vicary arXiv 1406.1278
SLIDE 74 Other results
◮ Automated graphical reasoning:
quantomatic.github.io
Kissinger arXiv:1203.0202 Dixon et al. arXiv 1007.3794
SLIDE 75
Other results
◮ Automated graphical reasoning:
quantomatic.github.io
◮ [Coecke & Abramsky 0808.1023]
Teleportation
SLIDE 76 Other results
◮ Automated graphical reasoning:
quantomatic.github.io
◮ [Coecke & Abramsky 0808.1023]
Teleportation
◮ [Zamdzhiev 2012, WZ & Gogioso
arXiv tmrw] Quantum Secret Sharing
◮ [Cohn-Gordon 2012] Quantum Bit
Commitment
a secret + − +
1
−
1
+
N
−
N
window of attack
SLIDE 77 Other results
◮ Automated graphical reasoning:
quantomatic.github.io
◮ [Coecke & Abramsky 0808.1023]
Teleportation
◮ [Zamdzhiev 2012, WZ & Gogioso
arXiv tmrw] Quantum Secret Sharing
◮ [Cohn-Gordon 2012] Quantum Bit
Commitment
◮ Connections to other theories in
†-SMC’s: [WZ & Coecke] DisCo NLP.
− − − → Mary ∈ N := N Mary f : N → N := M N f − − → likes ∈ N ⊗ S ⊗ N := N S N likes g ◦ f = N g N M f − − − → Mary ⊗ − − → likes := N Mary likes N S N
i
ii| := N N
Coecke et al. 1003.4394 Grefenstette & Sadrzadeh arXiv 1106.4058
SLIDE 78
Other results
◮ Automated graphical reasoning:
quantomatic.github.io
◮ [Coecke & Abramsky 0808.1023]
Teleportation
◮ [Zamdzhiev 2012, WZ & Gogioso
arXiv tmrw] Quantum Secret Sharing
◮ [Cohn-Gordon 2012] Quantum Bit
Commitment
◮ Connections to other theories in
†-SMC’s: [WZ & Coecke] DisCo NLP.
◮ [Kissinger et al. 1203.4988, WZ &
Gogioso arXiv tmrw] Foundations: Mermin Non-locality.
◮ [WZ 1503.05857] Models of quantum
algorithms in sets and relations. Outlook: Use this knowledge of quantum structure to better advantage in quantum programming.
SLIDE 79
Other results
◮ Automated graphical reasoning:
quantomatic.github.io
◮ [Coecke & Abramsky 0808.1023]
Teleportation
◮ [Zamdzhiev 2012, WZ & Gogioso
arXiv tmrw] Quantum Secret Sharing
◮ [Cohn-Gordon 2012] Quantum Bit
Commitment
◮ Connections to other theories in
†-SMC’s: [WZ & Coecke] DisCo NLP.
◮ [Kissinger et al. 1203.4988, WZ &
Gogioso arXiv tmrw] Foundations: Mermin Non-locality.
◮ [WZ 1503.05857] Models of quantum
algorithms in sets and relations. Outlook: Use this knowledge of quantum structure to better advantage in quantum programming.