From 6f30e0cf41ea918480ddece92753a662b0e895f1 Mon Sep 17 00:00:00 2001 From: Shuhei Ishida Date: Wed, 6 Nov 2024 17:40:53 -0800 Subject: [PATCH 1/4] update old model --- ...ll_functions_for_knowledge_retrieval.ipynb | 102 ++++++------------ 1 file changed, 31 insertions(+), 71 deletions(-) diff --git a/examples/How_to_call_functions_for_knowledge_retrieval.ipynb b/examples/How_to_call_functions_for_knowledge_retrieval.ipynb index 200c87dded..b7ccccb083 100644 --- a/examples/How_to_call_functions_for_knowledge_retrieval.ipynb +++ b/examples/How_to_call_functions_for_knowledge_retrieval.ipynb @@ -71,7 +71,7 @@ "from tqdm import tqdm\n", "from termcolor import colored\n", "\n", - "GPT_MODEL = \"gpt-3.5-turbo-0613\"\n", + "GPT_MODEL = \"gpt-3.5-turbo\"\n", "EMBEDDING_MODEL = \"text-embedding-ada-002\"\n", "client = OpenAI()" ] @@ -192,10 +192,10 @@ { "data": { "text/plain": [ - "{'title': 'Quantum types: going beyond qubits and quantum gates',\n", - " 'summary': 'Quantum computing is a growing field with significant potential applications.\\nLearning how to code quantum programs means understanding how qubits work and\\nlearning to use quantum gates. This is analogous to creating classical\\nalgorithms using logic gates and bits. Even after learning all concepts, it is\\ndifficult to create new algorithms, which hinders the acceptance of quantum\\nprogramming by most developers. This article outlines the need for higher-level\\nabstractions and proposes some of them in a developer-friendly programming\\nlanguage called Rhyme. The new quantum types are extensions of classical types,\\nincluding bits, integers, floats, characters, arrays, and strings. We show how\\nto use such types with code snippets.',\n", - " 'article_url': 'http://arxiv.org/abs/2401.15073v1',\n", - " 'pdf_url': 'http://arxiv.org/pdf/2401.15073v1'}" + "{'title': 'Hierarchy of degenerate stationary states in a boundary-driven dipole-conserving spin chain',\n", + " 'summary': 'Kinetically constrained spin chains serve as a prototype for structured\\nergodicity breaking in isolated quantum systems. We show that such a system\\nexhibits a hierarchy of degenerate steady states when driven by incoherent pump\\nand loss at the boundary. By tuning the relative pump and loss and how local\\nthe constraints are, one can stabilize mixed steady states, noiseless\\nsubsystems, and various decoherence-free subspaces, all of which preserve large\\namounts of information. We also find that a dipole-conserving bulk suppresses\\ncurrent in steady state. These exact results based on the flow in Hilbert space\\nhold regardless of the specific Hamiltonian or drive mechanism. Our findings\\nshow that a competition of kinetic constraints and local drives can induce\\ndifferent forms of ergodicity breaking in open systems, which should be\\naccessible in quantum simulators.',\n", + " 'article_url': 'http://arxiv.org/abs/2411.03309v1',\n", + " 'pdf_url': 'http://arxiv.org/pdf/2411.03309v1'}" ] }, "execution_count": 6, @@ -368,7 +368,7 @@ "name": "stderr", "output_type": "stream", "text": [ - "100%|██████████| 6/6 [00:06<00:00, 1.08s/it]\n" + "100%|██████████| 6/6 [00:02<00:00, 2.31it/s]\n" ] }, { @@ -395,24 +395,19 @@ "output_type": "stream", "text": [ "Core Argument:\n", - "- The academic paper explores the connection between the transverse field Ising (TFI) model and the ϕ4 model, highlighting the analogy between topological solitary waves in the ϕ4 model and the effect of the transverse field on spin flips in the TFI model.\n", - "- The study reveals regimes of memory/loss of memory and coherence/decoherence in the classical ϕ4 model subjected to periodic perturbations, which are essential in annealing phenomena.\n", - "- The exploration of the analogy between lower-dimensional linear quantum systems and higher-dimensional classical nonlinear systems can lead to a deeper understanding of information processing in these systems.\n", + "- The paper introduces ShadowGPT, a novel approach for solving quantum many-body problems by learning from randomized measurement data collected from quantum experiments.\n", + "- The model, a generative pretrained transformer (GPT), is trained on simulated classical shadow data of ground states of quantum Hamiltonians obtained through randomized Pauli measurements.\n", + "- The approach aims to build a classical predictive model for solving quantum many-body problems by learning from quantum experimental data.\n", "\n", "Evidence:\n", - "- The authors analyze the dynamics and relaxation of weakly coupled ϕ4 chains through numerical simulations, observing kink and breather excitations and investigating the structural phase transition associated with the double well potential.\n", - "- The critical temperature (Tc) approaches zero as the inter-chain coupling strength (C⊥) approaches zero, but there is a finite Tc for C⊥>0.\n", - "- The spectral function shows peaks corresponding to particle motion across the double-well potential at higher temperatures and oscillations in a single well at lower temperatures.\n", - "- The soft-mode frequency (ωs) decreases as temperature approaches Ts, the dynamical crossover temperature.\n", - "- The relaxation process of the average displacement (QD) is controlled by spatially extended vibrations and large kink densities.\n", - "- The mean domain size (⟨DS⟩) exhibits an algebraic decay for finite C⊥>0.\n", - "- The probability of larger domain sizes is higher before a kick compared to after a kick for C⊥>0.\n", + "- Data collection involves simulating a quantum device on a classical computer to prepare ground states of a Hamiltonian and gather classical shadows through randomized Pauli measurements.\n", + "- The model architecture employs a transformer architecture to process classical shadow data and predict measurement outcomes.\n", + "- The methodology is demonstrated on two well-understood test Hamiltonians, providing a benchmark for model performance and potential experimental validation in quantum platforms.\n", "\n", "Conclusions:\n", - "- The authors suggest further exploration of the crossover between decoherence and finite coherence in periodic-kick strength space.\n", - "- They propose extending the study to different kick profiles, introducing kink defects, and studying weakly-coupled chains in higher dimensions.\n", - "- Recognizing similarities between classical nonlinear equations and quantum linear ones in information processing is important.\n", - "- Future research directions include investigating the dynamics of quantum annealing, measurement and memory in the periodically driven complex Ginzburg-Landau equation, and the behavior of solitons and domain walls in various systems.\n" + "- The model demonstrates accurate predictions for ground state energy, correlation functions, and entanglement entropy for the transverse-field Ising model and the cluster-Ising model.\n", + "- The results show promising potential for utilizing quantum experimental data in solving quantum many-body problems and building foundational models for AI-for-Quantum applications.\n", + "- The paper highlights the potential of combining quantum data with classical machine learning to address complex quantum many-body challenges.\n" ] } ], @@ -637,21 +632,9 @@ { "data": { "text/markdown": [ - "PPO (Proximal Policy Optimization) is a reinforcement learning algorithm that aims to find the optimal policy for an agent by optimizing the policy parameters in an iterative manner. Here are a few papers that discuss PPO in more detail:\n", + "I found a paper titled \"Spontaneous Flows and Quantum Analogies in Heterogeneous Active Nematic Films\" which discusses incorporating heterogeneity into models of active nematics. The study explores the spontaneous flow transition for an active nematic film with heterogeneous activity, identifying how variations in activity can affect the flow properties. The findings have implications for biological processes such as bacterial growth and tissue development. \n", "\n", - "1. Title: \"Proximal Policy Optimization Algorithms\"\n", - " Article URL: [arxiv.org/abs/1707.06347v2](http://arxiv.org/abs/1707.06347v2)\n", - " Summary: This paper introduces two algorithms, PPO (Proximal Policy Optimization) and TRPO (Trust Region Policy Optimization), that address the issue of sample efficiency and stability in reinforcement learning. PPO uses a surrogate objective function that makes smaller updates to the policy parameters, resulting in more stable and efficient learning.\n", - "\n", - "2. Title: \"Emergence of Locomotion Behaviours in Rich Environments with PPO\"\n", - " Article URL: [arxiv.org/abs/1707.02286v3](http://arxiv.org/abs/1707.02286v3)\n", - " Summary: This paper explores the use of PPO in training agents to learn locomotion behaviors in complex and dynamic environments. The authors demonstrate the effectiveness of PPO in learning a variety of locomotion skills, such as walking, jumping, and climbing.\n", - "\n", - "3. Title: \"Proximal Policy Optimization for Multi-Agent Systems\"\n", - " Article URL: [arxiv.org/abs/2006.14171v2](http://arxiv.org/abs/2006.14171v2)\n", - " Summary: This paper extends PPO to the domain of multi-agent systems, where multiple agents interact and learn together. The authors propose a decentralized version of PPO that allows each agent to update its policy independently based on its local observations, resulting in more scalable and efficient learning in multi-agent environments.\n", - "\n", - "These papers provide detailed explanations of the PPO algorithm, its advantages, and its applications in different scenarios. Reading them can give you a deeper understanding of how PPO reinforcement learning works." + "[Read more](http://arxiv.org/abs/2411.03306v1)" ], "text/plain": [ "" @@ -683,47 +666,16 @@ "output_type": "stream", "text": [ "Function generation requested, calling function\n", - "Finding and reading paper\n", - "Chunking text from paper\n", - "Summarizing each chunk of text\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "100%|██████████| 6/6 [00:07<00:00, 1.19s/it]\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Summarizing into overall summary\n" + "Getting search results\n", + "Got search results, summarizing content\n" ] }, { "data": { "text/markdown": [ - "Core Argument:\n", - "- The academic paper explores the connection between the transverse field Ising (TFI) model and the ϕ4 model, highlighting the analogy between the coupling of topological solitary waves in the ϕ4 model and the effect of the transverse field on spin flips in the TFI model.\n", - "- The study reveals regimes of memory/loss of memory and coherence/decoherence in the classical ϕ4 model subjected to periodic perturbations, which are essential in annealing phenomena.\n", - "- The exploration of the analogy between lower-dimensional linear quantum systems and higher-dimensional classical nonlinear systems can lead to a deeper understanding of information processing in these systems.\n", + "I found a paper titled \"ShadowGPT: Learning to Solve Quantum Many-Body Problems from Randomized Measurements\" which proposes a novel approach for solving quantum many-body problems. The model, ShadowGPT, is a generative pretrained transformer trained on simulated classical shadow data of ground states of quantum Hamiltonians obtained through randomized Pauli measurements. It can predict various ground state properties across the Hamiltonian parameter space, demonstrating effectiveness on models like the transverse-field Ising model and the $\\mathbb{Z}_2 \\times \\mathbb{Z}_2$ cluster-Ising model.\n", "\n", - "Evidence:\n", - "- The authors analyze the dynamics and relaxation of weakly coupled ϕ4 chains through numerical simulations, studying the behavior of kink and breather excitations and the structural phase transition associated with the double well potential.\n", - "- The critical temperature (Tc) approaches zero as the inter-chain coupling strength (C⊥) approaches zero, but there is a finite Tc for C⊥>0.\n", - "- The spectral function shows peaks corresponding to particle motion across the double-well potential at higher temperatures and oscillations in a single well at lower temperatures.\n", - "- The soft-mode frequency (ωs) decreases as temperature approaches Ts, the dynamical crossover temperature.\n", - "- The relaxation process of the average displacement (QD) is controlled by spatially extended vibrations and large kink densities.\n", - "- The mean domain size (⟨DS⟩) exhibits an algebraic decay for finite C⊥>0.\n", - "- The probability of larger domain sizes is higher before a kick compared to after a kick for C⊥>0.\n", - "\n", - "Conclusions:\n", - "- The study of weakly-coupled classical ϕ4 chains provides insights into quantum annealing architectures and the role of topological excitations in these systems.\n", - "- The equilibration of the system is faster for higher kick strengths, and the mean domain size increases with higher final temperatures.\n", - "- Further exploration of the crossover between decoherence and finite coherence in periodic-kick strength space is suggested.\n", - "- The paper highlights the importance of recognizing similarities between classical nonlinear equations and quantum linear ones in information processing and suggests future research directions in this area." + "[Read more](http://arxiv.org/abs/2411.03285v1)" ], "text/plain": [ "" @@ -744,11 +696,19 @@ ")\n", "display(Markdown(updated_response.choices[0].message.content))\n" ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "905a345a", + "metadata": {}, + "outputs": [], + "source": [] } ], "metadata": { "kernelspec": { - "display_name": "Python 3", + "display_name": "openai-cookbook", "language": "python", "name": "python3" }, @@ -762,7 +722,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.12.1" + "version": "3.12.7" } }, "nbformat": 4, From 145c0f4d18e992df545813774992eccefed761f3 Mon Sep 17 00:00:00 2001 From: Shuhei Ishida Date: Wed, 6 Nov 2024 18:27:41 -0800 Subject: [PATCH 2/4] update registry.yml and authors.yml --- authors.yaml | 5 +++++ registry.yaml | 1 + 2 files changed, 6 insertions(+) diff --git a/authors.yaml b/authors.yaml index 9a57771b7e..250bef394f 100644 --- a/authors.yaml +++ b/authors.yaml @@ -192,3 +192,8 @@ gbergengruen: name: "Guillermo Bergengruen" website: "https://github.com/gbergengruen" avatar: "https://avatars.githubusercontent.com/u/140010883" + +ishida-openai: + name: "Shuhei Ishida" + website: "https://www.linkedin.com/in/shuhei-i/" + avatar: "https://avatars.githubusercontent.com/u/186007001" diff --git a/registry.yaml b/registry.yaml index 229c09d779..0f7ba116b0 100644 --- a/registry.yaml +++ b/registry.yaml @@ -153,6 +153,7 @@ date: 2023-06-14 authors: - colin-openai + - ishida-openai tags: - completions - functions From 7ce6aa2b6502b8a10b4267c4cab585f7d14b4103 Mon Sep 17 00:00:00 2001 From: Shuhei Ishida Date: Fri, 8 Nov 2024 09:47:13 -0800 Subject: [PATCH 3/4] update model --- ...ll_functions_for_knowledge_retrieval.ipynb | 170 +++--------------- 1 file changed, 24 insertions(+), 146 deletions(-) diff --git a/examples/How_to_call_functions_for_knowledge_retrieval.ipynb b/examples/How_to_call_functions_for_knowledge_retrieval.ipynb index b7ccccb083..2829403aa5 100644 --- a/examples/How_to_call_functions_for_knowledge_retrieval.ipynb +++ b/examples/How_to_call_functions_for_knowledge_retrieval.ipynb @@ -27,7 +27,7 @@ }, { "cell_type": "code", - "execution_count": 1, + "execution_count": null, "id": "80e71f33", "metadata": { "pycharm": { @@ -49,7 +49,7 @@ }, { "cell_type": "code", - "execution_count": 2, + "execution_count": null, "id": "dab872c5", "metadata": {}, "outputs": [], @@ -71,7 +71,7 @@ "from tqdm import tqdm\n", "from termcolor import colored\n", "\n", - "GPT_MODEL = \"gpt-3.5-turbo\"\n", + "GPT_MODEL = \"gpt-4o-mini\"\n", "EMBEDDING_MODEL = \"text-embedding-ada-002\"\n", "client = OpenAI()" ] @@ -91,18 +91,10 @@ }, { "cell_type": "code", - "execution_count": 3, + "execution_count": null, "id": "2de5d32d", "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Directory './data/papers' already exists.\n" - ] - } - ], + "outputs": [], "source": [ "directory = './data/papers'\n", "\n", @@ -118,7 +110,7 @@ }, { "cell_type": "code", - "execution_count": 4, + "execution_count": null, "id": "ae5cb7a1", "metadata": {}, "outputs": [], @@ -134,7 +126,7 @@ }, { "cell_type": "code", - "execution_count": 5, + "execution_count": null, "id": "57217b9d", "metadata": {}, "outputs": [], @@ -185,24 +177,10 @@ }, { "cell_type": "code", - "execution_count": 6, + "execution_count": null, "id": "dda02bdb", "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "{'title': 'Hierarchy of degenerate stationary states in a boundary-driven dipole-conserving spin chain',\n", - " 'summary': 'Kinetically constrained spin chains serve as a prototype for structured\\nergodicity breaking in isolated quantum systems. We show that such a system\\nexhibits a hierarchy of degenerate steady states when driven by incoherent pump\\nand loss at the boundary. By tuning the relative pump and loss and how local\\nthe constraints are, one can stabilize mixed steady states, noiseless\\nsubsystems, and various decoherence-free subspaces, all of which preserve large\\namounts of information. We also find that a dipole-conserving bulk suppresses\\ncurrent in steady state. These exact results based on the flow in Hilbert space\\nhold regardless of the specific Hamiltonian or drive mechanism. Our findings\\nshow that a competition of kinetic constraints and local drives can induce\\ndifferent forms of ergodicity breaking in open systems, which should be\\naccessible in quantum simulators.',\n", - " 'article_url': 'http://arxiv.org/abs/2411.03309v1',\n", - " 'pdf_url': 'http://arxiv.org/pdf/2411.03309v1'}" - ] - }, - "execution_count": 6, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ "# Test that the search is working\n", "result_output = get_articles(\"ppo reinforcement learning\")\n", @@ -211,7 +189,7 @@ }, { "cell_type": "code", - "execution_count": 7, + "execution_count": null, "id": "11675627", "metadata": {}, "outputs": [], @@ -236,7 +214,7 @@ }, { "cell_type": "code", - "execution_count": 8, + "execution_count": null, "id": "7211df2c", "metadata": {}, "outputs": [], @@ -352,33 +330,10 @@ }, { "cell_type": "code", - "execution_count": 9, + "execution_count": null, "id": "898b94d4", "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Chunking text from paper\n", - "Summarizing each chunk of text\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "100%|██████████| 6/6 [00:02<00:00, 2.31it/s]\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Summarizing into overall summary\n" - ] - } - ], + "outputs": [], "source": [ "# Test the summarize_text function works\n", "chat_test_response = summarize_text(\"PPO reinforcement learning sequence generation\")\n" @@ -386,31 +341,10 @@ }, { "cell_type": "code", - "execution_count": 10, + "execution_count": null, "id": "c715f60d", "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Core Argument:\n", - "- The paper introduces ShadowGPT, a novel approach for solving quantum many-body problems by learning from randomized measurement data collected from quantum experiments.\n", - "- The model, a generative pretrained transformer (GPT), is trained on simulated classical shadow data of ground states of quantum Hamiltonians obtained through randomized Pauli measurements.\n", - "- The approach aims to build a classical predictive model for solving quantum many-body problems by learning from quantum experimental data.\n", - "\n", - "Evidence:\n", - "- Data collection involves simulating a quantum device on a classical computer to prepare ground states of a Hamiltonian and gather classical shadows through randomized Pauli measurements.\n", - "- The model architecture employs a transformer architecture to process classical shadow data and predict measurement outcomes.\n", - "- The methodology is demonstrated on two well-understood test Hamiltonians, providing a benchmark for model performance and potential experimental validation in quantum platforms.\n", - "\n", - "Conclusions:\n", - "- The model demonstrates accurate predictions for ground state energy, correlation functions, and entanglement entropy for the transverse-field Ising model and the cluster-Ising model.\n", - "- The results show promising potential for utilizing quantum experimental data in solving quantum many-body problems and building foundational models for AI-for-Quantum applications.\n", - "- The paper highlights the potential of combining quantum data with classical machine learning to address complex quantum many-body challenges.\n" - ] - } - ], + "outputs": [], "source": [ "print(chat_test_response.choices[0].message.content)\n" ] @@ -428,7 +362,7 @@ }, { "cell_type": "code", - "execution_count": 11, + "execution_count": null, "id": "77a6fb4f", "metadata": {}, "outputs": [], @@ -450,7 +384,7 @@ }, { "cell_type": "code", - "execution_count": 12, + "execution_count": null, "id": "73f7672d", "metadata": {}, "outputs": [], @@ -481,7 +415,7 @@ }, { "cell_type": "code", - "execution_count": 13, + "execution_count": null, "id": "978b7877", "metadata": {}, "outputs": [], @@ -526,7 +460,7 @@ }, { "cell_type": "code", - "execution_count": 14, + "execution_count": null, "id": "0c88ae15", "metadata": {}, "outputs": [], @@ -600,7 +534,7 @@ }, { "cell_type": "code", - "execution_count": 15, + "execution_count": null, "id": "c39a1d80", "metadata": {}, "outputs": [], @@ -616,34 +550,10 @@ }, { "cell_type": "code", - "execution_count": 16, + "execution_count": null, "id": "253fd0f7", "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Function generation requested, calling function\n", - "Getting search results\n", - "Got search results, summarizing content\n" - ] - }, - { - "data": { - "text/markdown": [ - "I found a paper titled \"Spontaneous Flows and Quantum Analogies in Heterogeneous Active Nematic Films\" which discusses incorporating heterogeneity into models of active nematics. The study explores the spontaneous flow transition for an active nematic film with heterogeneous activity, identifying how variations in activity can affect the flow properties. The findings have implications for biological processes such as bacterial growth and tissue development. \n", - "\n", - "[Read more](http://arxiv.org/abs/2411.03306v1)" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], + "outputs": [], "source": [ "# Add a user message\n", "paper_conversation.add_message(\"user\", \"Hi, how does PPO reinforcement learning work?\")\n", @@ -657,34 +567,10 @@ }, { "cell_type": "code", - "execution_count": 17, + "execution_count": null, "id": "3ca3e18a", "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Function generation requested, calling function\n", - "Getting search results\n", - "Got search results, summarizing content\n" - ] - }, - { - "data": { - "text/markdown": [ - "I found a paper titled \"ShadowGPT: Learning to Solve Quantum Many-Body Problems from Randomized Measurements\" which proposes a novel approach for solving quantum many-body problems. The model, ShadowGPT, is a generative pretrained transformer trained on simulated classical shadow data of ground states of quantum Hamiltonians obtained through randomized Pauli measurements. It can predict various ground state properties across the Hamiltonian parameter space, demonstrating effectiveness on models like the transverse-field Ising model and the $\\mathbb{Z}_2 \\times \\mathbb{Z}_2$ cluster-Ising model.\n", - "\n", - "[Read more](http://arxiv.org/abs/2411.03285v1)" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], + "outputs": [], "source": [ "# Add another user message to induce our system to use the second tool\n", "paper_conversation.add_message(\n", @@ -696,14 +582,6 @@ ")\n", "display(Markdown(updated_response.choices[0].message.content))\n" ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "905a345a", - "metadata": {}, - "outputs": [], - "source": [] } ], "metadata": { From aea7b09e1947613e1d5451681636be5048dd5f07 Mon Sep 17 00:00:00 2001 From: Shuhei Ishida Date: Fri, 8 Nov 2024 09:49:01 -0800 Subject: [PATCH 4/4] update model --- ...ll_functions_for_knowledge_retrieval.ipynb | 173 +++++++++++++++--- 1 file changed, 150 insertions(+), 23 deletions(-) diff --git a/examples/How_to_call_functions_for_knowledge_retrieval.ipynb b/examples/How_to_call_functions_for_knowledge_retrieval.ipynb index 2829403aa5..b438f81094 100644 --- a/examples/How_to_call_functions_for_knowledge_retrieval.ipynb +++ b/examples/How_to_call_functions_for_knowledge_retrieval.ipynb @@ -27,7 +27,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 1, "id": "80e71f33", "metadata": { "pycharm": { @@ -49,7 +49,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 2, "id": "dab872c5", "metadata": {}, "outputs": [], @@ -91,10 +91,18 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 3, "id": "2de5d32d", "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Directory './data/papers' already exists.\n" + ] + } + ], "source": [ "directory = './data/papers'\n", "\n", @@ -110,7 +118,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 4, "id": "ae5cb7a1", "metadata": {}, "outputs": [], @@ -126,7 +134,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 5, "id": "57217b9d", "metadata": {}, "outputs": [], @@ -177,10 +185,24 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 6, "id": "dda02bdb", "metadata": {}, - "outputs": [], + "outputs": [ + { + "data": { + "text/plain": [ + "{'title': 'Long-range entanglement from spontaneous non-onsite symmetry breaking',\n", + " 'summary': \"We explore the states of matter arising from the spontaneous symmetry\\nbreaking (SSB) of $\\\\mathbb{Z}_2$ non-onsite symmetries. In one spatial\\ndimension, we construct a frustration-free lattice model exhibiting SSB of a\\nnon-onsite symmetry, which features the coexistence of two ground states with\\ndistinct symmetry-protected topological (SPT) orders. We analytically prove the\\ntwo-fold ground-state degeneracy and the existence of a finite energy gap.\\nFixing the symmetry sector yields a long-range entangled ground state that\\nfeatures long-range correlations among non-invertible charged operators. We\\nalso present a constant-depth measurement-feedback protocol to prepare such a\\nstate with a constant success probability in the thermodynamic limit, which may\\nbe of independent interest. Under a symmetric deformation, the SSB persists up\\nto a critical point, beyond which a gapless phase characterized by a conformal\\nfield theory emerges. In two spatial dimensions, the SSB of 1-form non-onsite\\nsymmetries leads to a long-range entangled state (SPT soup) - a condensate of\\n1d SPT along any closed loops. On a torus, there are four such locally\\nindistinguishable states that exhibit algebraic correlations between local\\noperators, which we derived via a mapping to the critical $O(2)$ loop model.\\nThis provides an intriguing example of `topological quantum criticality'. Our\\nwork reveals the exotic features of SSB of non-onsite symmetries, which may lie\\nbeyond the framework of topological holography (SymTFT).\",\n", + " 'article_url': 'http://arxiv.org/abs/2411.05004v1',\n", + " 'pdf_url': 'http://arxiv.org/pdf/2411.05004v1'}" + ] + }, + "execution_count": 6, + "metadata": {}, + "output_type": "execute_result" + } + ], "source": [ "# Test that the search is working\n", "result_output = get_articles(\"ppo reinforcement learning\")\n", @@ -189,7 +211,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 7, "id": "11675627", "metadata": {}, "outputs": [], @@ -214,7 +236,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 8, "id": "7211df2c", "metadata": {}, "outputs": [], @@ -330,10 +352,33 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 9, "id": "898b94d4", "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Chunking text from paper\n", + "Summarizing each chunk of text\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "100%|██████████| 18/18 [00:13<00:00, 1.37it/s]\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Summarizing into overall summary\n" + ] + } + ], "source": [ "# Test the summarize_text function works\n", "chat_test_response = summarize_text(\"PPO reinforcement learning sequence generation\")\n" @@ -341,10 +386,32 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 10, "id": "c715f60d", "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "### Core Argument\n", + "- The paper presents a novel approach to quantum error correction (QEC) through the development of topological stabilizer codes based on continuous variable (CV) systems.\n", + "- It introduces a family of two-dimensional topological stabilizer codes that leverage boson condensation, generalizing existing models and addressing limitations in current QEC codes.\n", + "\n", + "### Evidence\n", + "- **Topological Stabilizer Codes**: The authors construct codes that utilize continuous variable degrees of freedom, extending models like homological rotor codes and the toric-GKP code.\n", + "- **Boson Condensation**: The codes are derived from a parent stabilizer code based on Rgauge theory, demonstrating the creation of a broad class of topological CV stabilizer codes.\n", + "- **Anyons and Theories**: The codes are characterized by anyon theories from U(1) 2n×U(1)−2m Chern-Simons theories, some of which are non-chiral and do not support gapped boundaries, indicating their unique properties.\n", + "- **Hamiltonian Analysis**: The paper examines Hamiltonians associated with these codes, revealing that they can transition from a gapless to a gapped spectrum through quadratic perturbations.\n", + "- **Scalability**: The research emphasizes the potential for scalable QEC codes that are intrinsic to CV systems, which is crucial for reducing logical error rates in complex quantum computations.\n", + "\n", + "### Conclusions\n", + "- The introduction of topological stabilizer codes based on continuous variables represents a significant advancement in the field of quantum error correction, providing a framework for developing fault-tolerant codes that can protect against logical errors.\n", + "- The findings suggest that these codes may not be realizable through traditional concatenation methods, indicating the potential for new classes of QEC codes that are fundamentally different from existing finite-dimensional systems.\n", + "- Future research directions include exploring many-body generalizations of quantum codes and the practical implementation of these theoretical models in experimental platforms, such as superconducting qubits.\n" + ] + } + ], "source": [ "print(chat_test_response.choices[0].message.content)\n" ] @@ -362,7 +429,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 11, "id": "77a6fb4f", "metadata": {}, "outputs": [], @@ -384,7 +451,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 12, "id": "73f7672d", "metadata": {}, "outputs": [], @@ -415,7 +482,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 13, "id": "978b7877", "metadata": {}, "outputs": [], @@ -460,7 +527,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 14, "id": "0c88ae15", "metadata": {}, "outputs": [], @@ -534,7 +601,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 15, "id": "c39a1d80", "metadata": {}, "outputs": [], @@ -550,10 +617,44 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 16, "id": "253fd0f7", "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Function generation requested, calling function\n", + "Getting search results\n", + "Got search results, summarizing content\n" + ] + }, + { + "data": { + "text/markdown": [ + "It looks like none of the listed papers directly address Proximal Policy Optimization (PPO) in reinforcement learning. However, if you are looking for a summary of how PPO works, I can provide that information based on general knowledge.\n", + "\n", + "PPO is a popular reinforcement learning algorithm that seeks to optimize an agent's policy in a way that is both effective and stable. The key ideas behind PPO include:\n", + "\n", + "1. **Clipping Objective**: PPO modifies the objective function using a clipped surrogate objective. This avoids excessively large updates, which can destabilize training. The clipped objective restricts how much the probability ratio between the new and old policies can differ, allowing for better control over policy updates.\n", + "\n", + "2. **Policy Gradient**: PPO uses policy gradient methods, where the focus is on directly adjusting the policy based on the agent's performance after taking actions in the environment.\n", + "\n", + "3. **Multiple Epochs**: PPO often utilizes multiple epochs of training on the same batch of data, which improves sample efficiency as it allows the agent to learn from the same data multiple times.\n", + "\n", + "4. **Generalized Advantage Estimation (GAE)**: To reduce the variance of the policy gradient estimates, PPO frequently employs GAE, which provides a more stable estimate of returns.\n", + "\n", + "If you have specific questions about reinforcement learning or want references to further reading, feel free to ask!" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], "source": [ "# Add a user message\n", "paper_conversation.add_message(\"user\", \"Hi, how does PPO reinforcement learning work?\")\n", @@ -567,10 +668,36 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 17, "id": "3ca3e18a", "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Function generation requested, calling function\n", + "Getting search results\n", + "Got search results, summarizing content\n" + ] + }, + { + "data": { + "text/markdown": [ + "It seems that I couldn't find any specific paper that discusses \"PPO sequence generation.\" If you meant a particular paper on PPO in reinforcement learning, please provide its title or broad topic. Alternatively, if you want to know about PPO in the context of generating sequences or trajectories, I can provide a detailed explanation based on existing knowledge in reinforcement learning.\n", + "\n", + "If you are referring to a specific recent study, I recommend checking relevant platforms like arXiv or Google Scholar for the latest publications on PPO and sequence generation.\n", + "\n", + "Let me know how you'd like to proceed!" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], "source": [ "# Add another user message to induce our system to use the second tool\n", "paper_conversation.add_message(\n",