Package: qcompute-qsvt
Copyright (c) 2022 Institute for Quantum Computing, Baidu Inc. All Rights Reserved.About QSVT ToolkitQSVTtoolkit is aQuantumSingularValueTransformation toolkit based onQComputeand developed by theInstitute for Quantum ComputingatBaidu Research. It aims to implement quantum simulation and other algorithms on quantum devices or simulators more conveniently. Currently, it includes three main modules:Quantum Singular Value Transformation(QSVT) is used for implementing singular value transformations of quantum operations, whose input and output are both block-encodings of quantum operations.Symmetric Quantum Signal Processing(SQSP) is used for encoding such transformation functions and completing such quantum circuits in QSVT. SQSP is introduced for implementing the encoding step more effectively.Hamiltonian Simulationis one of the most significant applications for QSVT, and even quantum computing. It provides functions to generate quantum circuits for time evolution operators of Hamiltonians.QSVT toolkit is based onQCompute, a Python-based open-source quantum computing platform SDK also developed byInstitute for Quantum Computing. It provides a full-stack programming experience for senior users via hybrid quantum programming language features and high-performance simulators. You can install QCompute viapypi. When you install QSVT toolkit, the dependency QCompute will be automatically installed. Please refer to QCompute's officialOpen Sourcepage for more details.InstallationCreate Python EnvironmentWe recommend using Anaconda as the development environment management tool for Python3. Anaconda supports multiple mainstream operating systems (Windows, macOS, and Linux). It provides Scipy, Numpy, Matplotlib, and many other scientific computing and drawing packages. Conda, a virtual environment manager, can be used to install and update the latest Python packages. Here we give simple instructions on how to use conda to create and manage virtual environments.First, open the command line (Terminal) interface: Windows users can enterAnaconda Prompt; macOS users can use the key combinationcommand + spaceand then enterTerminal.After opening the Terminal window, entercondacreate--nameqsvt_envpython=3.9to create a Python 3.9 environment namedqsvt_env. With the following command, we can activate the virtual environment created,condaactivateqsvt_envFor more detailed instructions on conda, please refer to theOfficial Tutorial.Install QSVT ToolkitQSVT toolkit is compatible with 64-bit Python 3.9, on Linux, macOS (10.14 or later) and Windows. We recommend installing it withpip. After Activating the conda environment, then enterpipinstallqcompute-qsvtThis will install the QSVT toolkit binaries as well as the QSVT toolkit package.For those using an older version of QSVT toolkit, update by installing with the--upgradeflag. The new version includes additional features and bug fixes.Run ExamplesNow, you can try to write a simple program to check whether QSVT toolkit has been successfully installed. For example, run the following program,importnumpyasnpfromQComputeimport*fromqcompute_qsvt.Application.HamiltonianSimulationimportfunc_HS_QSVTfunc_HS_QSVT(list_str_Pauli_rep=[(1,'X0X1'),(1,'X0Z1'),(1,'Z0X1'),(1,'Z0Z1')],num_qubit_sys=2,float_tau=-np.pi/8,float_epsilon=1e-6,circ_output=False)we will operate a time evolution operator on initial state $|00\rangle$ for Hamiltonian $X\otimes X + X\otimes Z + Z\otimes X + Z\otimes Z$ and time $-\pi/8$ with precision1e-6, and then measure such final state.Note that more examples are provided in thesource codes,tutorialsandAPI documentation. You can get started from there.TutorialsQSVT toolkit providesquick startfor using the Hamiltonian Simulation module, as well as abrief introductionto the theories for users to learn and get started. The current content of the following tutorial is organized as follows, and it is recommended that beginners read and study in order:Brief IntroductionQuantum Signal ProcessingBlock-Encoding and Linear Combination of Unitary OperationsQuantum Eigenvalue and Singular Value TransformationHamiltonian SimulationWe will supply more detailed and comprehensive tutorials in the future.API DocumentationFor those who are looking for explanation on the python classes and functions in QSVT toolkit, please refer to ourAPI documentation.FeedbacksUsers are encouraged to contact us via emailquantum@baidu.comwith general questions, unfixed bugs, and potential improvements. We hope to make QSVT toolkit better together with the community!Research based on QSVT ToolkitWe encourage researchers and developers to use QSVT toolkit to explore quantum algorithms. If your work uses QSVT toolkit, please feel free to send us a notice viaquantum@baidu.comand cite us with the following BibTeX:@misc{QSVT,title={{Quantum Sigular Value Transformation toolkit in Baidu Quantum Platform}},year={2022},url={https://quantum-hub.baidu.com/qsvt/}}ChangelogThe changelog of this project can be found inCHANGELOG.md.Copyright and LicenseQSVT toolkit usesApache-2.0 license.