Path Detection: A Quantum Algorithmic Primitive
Shelby Kimmel
Middlebury College
Based on work with Stacey Jeffery: arXiv: 1704.00765 (Quantum vol 1 p 26) Michael Jarret, Stacey Jeffery, Alvaro Piedrafita, arXiv:1804.10591 (ESA 2018) Kai DeLorenzo, Teal Witter, arXiv:1904.05995 (TQC 2019) Primitives!
• Quantum algorithmic primitives 1. Widely applicable 2. Can be used in a black box manner (with easily analyzable behavior) Primitives!
• Quantum algorithmic primitives 1. Widely applicable 2. Can be used in a black box manner (with easily analyzable behavior)
– Ex: Searching unordered list of � items – Classically, takes Ω(�) time – Quantumly, takes �( �) time Primitives!
• Quantum algorithmic primitives 1. Widely applicable 2. Can be used in a black box manner (with easily analyzable behavior)
– Ex: Searching unordered list of � items – Classically, takes Ω(�) time – Quantumly, takes �( �) time
Good primitive: ��-connectivity Outline:
A. Introduction to st-connectivity B. st-connectivity makes a good algorithmic primitive 1. Widely applicable 2. Easy to analyze Outline:
A. Introduction to st-connectivity B. st-connectivity makes a good algorithmic primitive 1. Widely applicable 2. Easy to analyze
Applications: • Read-once Boolean formulas (query optimal) [JK] • Total connectivity (query optimal) [JJKP] • Cycle detection (query optimal) [DKW] • Even length cycle detection [DKW] • Bipartiteness (query optimal) [DKW] • Directed st-connectivity (query optimal) (Beigi et al ‘19) • Directed smallest cycle (query optimal) (Beigi et al ‘19) Outline:
Applications: • Topological sort (Beigi et al ‘19) • Connected components (Beigi et al ‘19) • Strongly connected components (Beigi et al ‘19) • k-cycle at vertex v (Beigi et al ‘19) • st-connectivity (Reichardt, Belovs ‘12) ��-connectivity
�
�� − ������������: is there a path from � to �?
� ��-connectivity
�
�� − ������������: is there a path from � to �?
� Input to Algorithm
Bit String:
� � … � Input to Algorithm
Bit String:
� � … � 1 0 1 Input to Algorithm
Skeleton � Bit String: 1 2 Graph 3 � � � 3 1 2 3 � Input to Algorithm
Skeleton � Bit String: 1 2 Graph 3 � � � 3 1 1 0 1 2 3 � Input to Algorithm
Skeleton � Bit String: 1 2 Graph 3 � � � 3 1 0 0 1 2 3 � Input to Algorithm
Skeleton � Bit String: 1 2 Graph 3 � � � 3 1 1 2 • Bit string initially hidden, can query 3 value of string at each bit. � Input to Algorithm
�! � � = � � + �" Skeleton � Bit String: 1 2 Graph 3 � � � 3 1 1 2 • Bit string initially hidden, can query 3 value of string at each bit. � Algorithm
Skeleton � 1 2 Graph 3
3 1 2 Q. Algorithm to Ye s / N o 3 Solve connectivity �
� for Bit String:
� � � Outline:
A. Introduction to st-connectivity B. st-connectivity makes a good algorithmic primitive 1. Widely applicable 2. Easy to analyze Cycle Detection
Is there a cycle?
Ye s Cycle Detection
Is there a cycle?
No Cycle Detection
Is there a cycle? 1 Input to Cycle Detection: 2 5 3 • Skeleton graph • Hidden bit string 4 � � � � �
� = 1 ↔edge � is present Cycle Detection
Is there a cycle through edge 1? 1 2 5 3
4 Cycle Detection
Is there a cycle through edge 1? 1 2 5 3
4 There is a cycle through Edge 1 iff • Edge 1 is present • Path between the endpoints of Edge 1 not using Edge 1 Cycle Detection
Is there a cycle through edge 1? � 1 1 Edge 1 is present 2 5 3
4 2 5 There is a cycle through 4 Path between Edge 1 iff the endpoints • Edge 1 is present 3 of Edge 1 not • Path between the � using Edge 1 endpoints of Edge 1 not using Edge 1 Cycle Detection
Is there a cycle? 1 2 5 3
4 There is a cycle if there is a cycle through some edge Cycle Detection
� Is there a cycle? 1 4 5 1 2 3 1 2 5 3 2 5 1 5 1 5 3 3 2 2 4 4 1 4 4 4 There is a cycle if 5 3 2 3 there is a cycle through some edge � Boolean Formulas �
�(�) � � � � ⋀
⋁ � �#$ � 1 � ⋀ ⋀ ⋀ � �
⋁ ⋁ � �# �% �& �' � 0 0 1 0 �( �) �* �+ �, 0 1 0 1 1 Outline:
A. Introduction to st-connectivity B. st-connectivity makes a good algorithmic primitive 1. Widely applicable 2. Easy to analyze Algorithm Analysis:
Space Complexity: � log(# ����� �� �������� ����ℎ) Algorithm Analysis:
Query Complexity:
• Bit string initially unknown • Minimum # of oracle uses to determine w.h.p. on worst input Algorithm Analysis:
Query Complexity:
• Bit string initially unknown • Minimum # of oracle uses to determine w.h.p. on worst input ≈
Time Complexity Algorithm Analysis:
Query Complexity:
� max � , � max � , �
Effective resistance Effective capacitance Algorithm Analysis:
Query Complexity:
� max � , � max � , �
Effective resistance Effective capacitance [Belovs, [Jarret, Jeffery, Kimmel, Reichardt, ’12] Piedrafita, ’18] Effective Resistance
1 unit of flow �
� 1 unit of flow Effective Resistance
1 unit of flow � Valid flow: 1 0 • 1 unit in at � • 1 unit out at � � 1 − � • At all other nodes, zero net flow 1 � 1 unit of flow Effective Resistance
1 unit of flow � Flow energy: 1 0 ���� �� ���� � 1 − �
1 � 1 unit of flow Effective Resistance
1 unit of flow � Flow energy: 1 0 ���� �� ���� � 1 − �
Effective Resistance: � , (�) • Smallest energy of any valid 1 flow from � to � on �. � 1 unit of flow Effective Resistance
1 unit of flow � Flow energy: 1 0 ���� �� ���� 1/2 1/2
Effective Resistance: � , (�) • Smallest energy of any valid 1 flow from � to � on �. � 1 unit of flow Algorithm Analysis:
Query Complexity:
� max � , � max � , �
Effective resistance Effective capacitance Effective Capacitance
� Generalized cut: 1 • 1 at � 1 • 0 at � 1 • Difference is 0 across edge
� 0 � Effective Capacitance
Potential energy: � 1 ��� ���������� 1 1
� 0 � Effective Capacitance
Potential energy: � 1 ��� ���������� 1 1
Effective Capacitance: � (�) , 2/3 • Smallest potential energy of any valid generalized cut 0 � between � and � on �. Algorithm Analysis:
Query Complexity:
� max � , � max � , �
Effective resistance Effective capacitance Example
Cycle Detection � max � , � max � , �
� 1 5 2 3 4 1 2 5 5 1 3 1 3 2 5 2 4 1 4 4 5 4 3 2 3
� Example
Cycle Detection � max � , � max � , �
� 1 5 2 3 4 1 2 5 5 1 3 1 3 2 5 2 4 1 4 4 5 4 3 2 3
� Example
Cycle Detection � max � , � max � , �
� 1 5 2 3 4 1 2 5 5 1 3 1 3 2 5 2 4 1 4 4 5 4 3 2 3
� • k parallel paths of length k Length k cycle • 1/� flow on each path • Effective resistance is 1 Example
Cycle Detection � max � , � max � , �
� 1 5 2 3 4 1 2 5 5 1 3 1 3 2 5 2 4 1 4 4 5 4 3 2 3
�
Multiple cycles Effective resistance is < 1 Example
Cycle Detection � max � , � max � , �
� 1 5 2 3 4 1 2 5 5 1 3 1 3 2 5 2 4 1 4 4 5 4 3 2 3
� Example
Cycle Detection � max � , � max � , �
� % • � � subgraphs 1 5 2 3 4 corresponding to non- 1 2 5 5 1 3 1 present edges: cut at top 3 2 5 2 • � � 4 1 subgraphs 4 4 5 4 corresponding to present 3 2 3 edges, cut could have � �(�%) edges in cut Example
Cycle Detection � max � , � max � , �