Quantum tagshttps://gitcode.net/paddlepaddle/Quantum/-/tags2021-09-30T10:10:09+08:00https://gitcode.net/paddlepaddle/Quantum/-/tags/v2.4.0v2.4.0<h1 data-sourcepos="1:1-1:14" dir="auto">
<a id="user-content-release-note" class="anchor" href="#release-note" aria-hidden="true"></a>Release Note</h1>
<h2 data-sourcepos="3:1-3:15" dir="auto">
<a id="user-content-improvements" class="anchor" href="#improvements" aria-hidden="true"></a>Improvements</h2>
<ul data-sourcepos="5:1-6:0" dir="auto">
<li data-sourcepos="5:1-6:0">Accelerated circuit executions, providing 2-4 times speed-up compared to the previous version. Specifically, over 10 times speed-up for specific quantum neural network models.</li>
</ul>
<h2 data-sourcepos="7:1-7:15" dir="auto">
<a id="user-content-new-features" class="anchor" href="#new-features" aria-hidden="true"></a>New Features</h2>
<ul data-sourcepos="9:1-19:0" dir="auto">
<li data-sourcepos="9:1-12:83">
<code>paddle_quantum.gate</code>:
<ul data-sourcepos="10:3-12:83">
<li data-sourcepos="10:3-10:185">
<code>Gate</code> is now a child class of <code>paddle_quantum.channel.Channel</code>, and hence inherits most functionalities from the <code>channel</code> module, such as its Choi representation <code>Gate.choi_repr</code>.</li>
<li data-sourcepos="11:3-11:89">New module <code>matrix</code>: provides user access to the matrices of gates in Paddle Quantum.</li>
<li data-sourcepos="12:3-12:83">New gate <code>ParamOracle</code>: provides user access to customized parameterized gates.</li>
</ul>
</li>
<li data-sourcepos="13:1-14:92">
<code>paddle_quantum.qinfo</code>:
<ul data-sourcepos="14:3-14:92">
<li data-sourcepos="14:3-14:92">New function <code>pauli_str_convertor</code>: Concatenate the input observable with coefficient 1.</li>
</ul>
</li>
<li data-sourcepos="15:1-16:101">
<code>paddle_quantum.loss.ExpecVal</code>:
<ul data-sourcepos="16:3-16:101">
<li data-sourcepos="16:3-16:101">Now <code>ExpecVal.forward()</code> can return the decomposed expectation value by setting <code>decompose=True</code>.</li>
</ul>
</li>
<li data-sourcepos="17:1-19:0">
<code>paddle_quantum.state.State</code>:
<ul data-sourcepos="18:3-19:0">
<li data-sourcepos="18:3-19:0">Now <code>State.measure()</code> can record the result in each shot by setting <code>record=True</code>.</li>
</ul>
</li>
</ul>
<h2 data-sourcepos="20:1-20:19" dir="auto">
<a id="user-content-new-applications" class="anchor" href="#new-applications" aria-hidden="true"></a>New Applications</h2>
<p data-sourcepos="22:1-22:108" dir="auto">New applications have been added in the <strong>Q</strong>uantum <strong>A</strong>pplication <strong>M</strong>odel <strong>L</strong>ibrary (QAML) as follows.</p>
<ol data-sourcepos="24:1-30:0" dir="auto">
<li data-sourcepos="24:1-24:84"><a href="/paddlepaddle/Quantum/-/blob/master/./applications/credit_risk_analysis/introduction_en.ipynb">Credit Risk Analysis</a></li>
<li data-sourcepos="25:1-25:90"><a href="/paddlepaddle/Quantum/-/blob/master/./applications/deuteron_binding_energy/introduction_en.ipynb">Deuteron Binding Energy</a></li>
<li data-sourcepos="26:1-26:102"><a href="/paddlepaddle/Quantum/-/blob/master/./applications/handwritten_digits_generation/introduction_en.ipynb">Handwritten Digits Generation</a></li>
<li data-sourcepos="27:1-27:86"><a href="/paddlepaddle/Quantum/-/blob/master/./applications/intent_classification/introduction_en.ipynb">Intent Classification</a></li>
<li data-sourcepos="28:1-28:77"><a href="/paddlepaddle/Quantum/-/blob/master/./applications/power_flow/introduction_en.ipynb">Power Flow Optimization</a></li>
<li data-sourcepos="29:1-30:0"><a href="/paddlepaddle/Quantum/-/blob/master/./applications/random_number/introduction_en.ipynb">Random Number Generation</a></li>
</ol>
<h2 data-sourcepos="31:1-31:16" dir="auto">
<a id="user-content-new-tutorials" class="anchor" href="#new-tutorials" aria-hidden="true"></a>New Tutorials</h2>
<p data-sourcepos="33:1-33:160" dir="auto">More tutorials are introduced in Paddle Quantum 2.4.0, to offer suggested usages in common scenarios of quantum research. These tutorials are listed as follows:</p>
<ol data-sourcepos="35:1-41:0" dir="auto">
<li data-sourcepos="35:1-35:91"><a href="/paddlepaddle/Quantum/-/blob/master/./introduction/PaddleQuantum_Ansatz_EN.ipynb">Construction and Manipulation of Circuit</a></li>
<li data-sourcepos="36:1-36:78"><a href="/paddlepaddle/Quantum/-/blob/master/./introduction/PaddleQuantum_Custom_EN.ipynb">Customized Gate and Channel</a></li>
<li data-sourcepos="37:1-37:81"><a href="/paddlepaddle/Quantum/-/blob/master/./introduction/PaddleQuantum_Hamiltonian_EN.ipynb">Generation of Hamiltonian</a></li>
<li data-sourcepos="38:1-38:87"><a href="/paddlepaddle/Quantum/-/blob/master/./introduction/PaddleQuantum_Linalg_and_Qinfo_EN.ipynb">Common Algebraic Functions</a></li>
<li data-sourcepos="39:1-39:64"><a href="/paddlepaddle/Quantum/-/blob/master/./introduction/PaddleQuantum_State_EN.ipynb">Usage of State</a></li>
<li data-sourcepos="40:1-41:0"><a href="/paddlepaddle/Quantum/-/blob/master/./introduction/PaddleQuantum_Training_EN.ipynb">Construction and Training of QNNs</a></li>
</ol>
<h2 data-sourcepos="42:1-42:12" dir="auto">
<a id="user-content-bug-fixes" class="anchor" href="#bug-fixes" aria-hidden="true"></a>Bug Fixes</h2>
<ul data-sourcepos="44:1-46:0" dir="auto">
<li data-sourcepos="44:1-44:64">Fix some typos and mistakes in the tutorials and the API docs.</li>
<li data-sourcepos="45:1-46:0">Strengthen the overall stability of Paddle Quantum.</li>
</ul>
<h2 data-sourcepos="47:1-47:15" dir="auto">
<a id="user-content-dependencies" class="anchor" href="#dependencies" aria-hidden="true"></a>Dependencies</h2>
<ul data-sourcepos="49:1-49:27" dir="auto">
<li data-sourcepos="49:1-49:27">
<code>paddlenlp</code>: newly added.</li>
</ul>2023-04-26T13:31:21+08:00Quleafquantum@baidu.comhttps://gitcode.net/paddlepaddle/Quantum/-/tags/v2.3.0v2.3.0<h1 data-sourcepos="1:1-1:14" dir="auto">
<a id="user-content-release-note" class="anchor" href="#release-note" aria-hidden="true"></a>Release Note</h1>
<h2 data-sourcepos="3:1-3:15" dir="auto">
<a id="user-content-new-features" class="anchor" href="#new-features" aria-hidden="true"></a>New Features</h2>
<ul data-sourcepos="5:1-25:0" dir="auto">
<li data-sourcepos="5:1-8:193">
<code>paddle_quantum.channel</code>:
<ul data-sourcepos="6:3-8:193">
<li data-sourcepos="6:3-6:123">New module <code>paddle_quantum.channel.representation</code>: A library of representations of quantum channels in Paddle Quantum.</li>
<li data-sourcepos="7:3-7:131">New channel <code>GeneralizedDepolarizing</code> and its interface in <code>paddle_quantum.ansatz.Circuit</code>: A generalized depolarizing channel.</li>
<li data-sourcepos="8:3-8:193">New member properties <code>choi_oper, kraus_oper, stinespring_oper</code> of <code>Channel</code>: Provide user accesses to the Choi, Kraus and Stinespring representations of class <code>Channel</code> and its subclasses.</li>
</ul>
</li>
<li data-sourcepos="9:1-13:108">
<code>paddle_quantum.linalg</code>:
<ul data-sourcepos="10:3-13:108">
<li data-sourcepos="10:3-10:98">New function <code>is_positive</code>: Check whether the input matrix is a positive semi-definite matrix.</li>
<li data-sourcepos="11:3-11:66">New function <code>pauli_basis_generation</code>: Generate a Pauli basis.</li>
<li data-sourcepos="12:3-12:86">New function <code>pauli_decomposition</code>: Decompose the input matrix by the Pauli basis.</li>
<li data-sourcepos="13:3-13:108">New function <code>subsystem_decomposition</code>: Decompose the input matrix by two given bases in two subsystems.</li>
</ul>
</li>
<li data-sourcepos="14:1-17:64">New module <code>paddle_quantum.model</code>: Provides integrated features such as training of quantum neural networks (QNN), prediction using the trained models, and convenient accesses to the optimizers and the schedulers of Paddle Paddle.
<ul data-sourcepos="15:3-17:64">
<li data-sourcepos="15:3-15:63">
<code>OptModel</code>: The class for the optimization-based QNN model.</li>
<li data-sourcepos="16:3-16:64">
<code>LearningModel</code>: The class for the learning-based QNN model.</li>
<li data-sourcepos="17:3-17:64">
<code>EncodingModel</code>: The class for the encoding-based QNN model.</li>
</ul>
</li>
<li data-sourcepos="18:1-25:0">
<code>paddle_quantum.qinfo</code>:
<ul data-sourcepos="19:3-25:0">
<li data-sourcepos="19:3-19:80">New function <code>is_choi</code>: Check whether a quantum operator is a Choi operator.</li>
<li data-sourcepos="20:3-20:88">New function <code>permute_systems</code>: Permute the quantum systems based on a permute list.</li>
<li data-sourcepos="21:3-21:184">New function <code>channel_repr_convert</code>: Provide transformations among Choi, Kraus and Stinespring representations of a channel. PS: substitute the original function <code>channel_convert</code>.</li>
<li data-sourcepos="22:3-22:61">New function <code>random_channel</code>: Generate a random channel.</li>
<li data-sourcepos="23:3-23:91">New function <code>grover_generation</code>: Generate a Grover operator based on the oracle given.</li>
<li data-sourcepos="24:3-25:0">New function <code>qft_generation</code>: Generate a unitary matrix for the circuit of quantum Fourier transform.</li>
</ul>
</li>
</ul>
<h2 data-sourcepos="26:1-26:25" dir="auto">
<a id="user-content-built-in-model-library" class="anchor" href="#built-in-model-library" aria-hidden="true"></a>Built-in model library</h2>
<p data-sourcepos="28:1-28:228" dir="auto">Paddle Quantum now provides the built-in QNN model and the other quantum algorithms. The users can use these models and algorithms to implement the quantum applications quickly. The built-in models and algorithms are as follows.</p>
<ul data-sourcepos="30:1-35:0" dir="auto">
<li data-sourcepos="30:1-30:112">
<code>biocomputing</code>: Provides the protein folding algorithms based on protein lattice model and CVaR loss function.</li>
<li data-sourcepos="31:1-31:124">
<code>data_analysis</code>: Provides the variational quantum regression (VQR) and the variational quantum linear solver (VQLS) model.</li>
<li data-sourcepos="32:1-32:108">
<code>finance</code>: Provides the quantum option pricing algorithm and the quantum portfolio optimization algorithm.</li>
<li data-sourcepos="33:1-33:362">
<code>qchem</code>: Provides native support for molecular construction and interfaces to external quantum chemistry packages (Molecule, PySCFDriver), add more powerful quantum chemistry ansatz (UCC, HartreeFock), provides support for defining fermionic quantum state (WaveFunction), and add more tools for estimating molecular properties (symmetric_rdm1e, dipole_moment).</li>
<li data-sourcepos="34:1-35:0">
<code>qml</code>: Provides the quantum neural network for medical image classification (QNNMIC), the quantum neural network for quality detection (QNNQD), the quantum self-attention neural network (QSANN), and the variational shadow quantum learning (VSQL) model.</li>
</ul>
<h2 data-sourcepos="36:1-36:19" dir="auto">
<a id="user-content-new-applications" class="anchor" href="#new-applications" aria-hidden="true"></a>New applications</h2>
<p data-sourcepos="38:1-38:170" dir="auto">The <strong>Q</strong>uantum <strong>A</strong>pplication <strong>M</strong>odel <strong>L</strong>ibrary (QAML) is newly added in Paddle Quantum in this release. The applications currently included in QAML are as follows.</p>
<ol data-sourcepos="40:1-50:0" dir="auto">
<li data-sourcepos="40:1-40:110"><a href="/paddlepaddle/Quantum/-/blob/master/./applications/handwritten_digits_classification/introduction_en.ipynb">Handwritten digits classification</a></li>
<li data-sourcepos="41:1-41:120"><a href="/paddlepaddle/Quantum/-/blob/master/./applications/lithium_ion_battery/introduction_en.ipynb">Molecular ground state energy & dipole moment calculation</a></li>
<li data-sourcepos="42:1-42:82"><a href="/paddlepaddle/Quantum/-/blob/master/./applications/text_classification/introduction_en.ipynb">Text classification</a></li>
<li data-sourcepos="43:1-43:74"><a href="/paddlepaddle/Quantum/-/blob/master/./applications/protein_folding/introduction_en.ipynb">Protein folding</a></li>
<li data-sourcepos="44:1-44:100"><a href="/paddlepaddle/Quantum/-/blob/master/./applications/medical_image_classification/introduction_en.ipynb">Medical image classification</a></li>
<li data-sourcepos="45:1-45:78"><a href="/paddlepaddle/Quantum/-/blob/master/./applications/quality_detection/introduction_en.ipynb">Quality detection</a></li>
<li data-sourcepos="46:1-46:72"><a href="/paddlepaddle/Quantum/-/blob/master/./applications/option_pricing/introduction_en.ipynb">Option pricing</a></li>
<li data-sourcepos="47:1-47:96"><a href="/paddlepaddle/Quantum/-/blob/master/./applications/portfolio_optimization/introduction_en.ipynb">Quantum portfolio optimization</a></li>
<li data-sourcepos="48:1-48:64"><a href="/paddlepaddle/Quantum/-/blob/master/./applications/regression/introduction_en.ipynb">Regression</a></li>
<li data-sourcepos="49:1-50:0"><a href="/paddlepaddle/Quantum/-/blob/master/./applications/linear_solver/introduction_en.ipynb">Quantum linear equation solver</a></li>
</ol>
<h2 data-sourcepos="51:1-51:12" dir="auto">
<a id="user-content-bug-fixes" class="anchor" href="#bug-fixes" aria-hidden="true"></a>Bug Fixes</h2>
<ul data-sourcepos="53:1-54:0" dir="auto">
<li data-sourcepos="53:1-54:0">Fix some typo and mistakes in the tutorials and the API docs.</li>
</ul>
<h2 data-sourcepos="55:1-55:15" dir="auto">
<a id="user-content-improvements" class="anchor" href="#improvements" aria-hidden="true"></a>Improvements</h2>
<ul data-sourcepos="57:1-58:0" dir="auto">
<li data-sourcepos="57:1-58:0">The qchem tutorials has been updated to fit new APIs.</li>
</ul>
<h2 data-sourcepos="59:1-59:15" dir="auto">
<a id="user-content-dependencies" class="anchor" href="#dependencies" aria-hidden="true"></a>Dependencies</h2>
<ul data-sourcepos="61:1-61:34" dir="auto">
<li data-sourcepos="61:1-61:34">
<code>imbalanced-learn</code>: newly added.</li>
</ul>2023-04-26T13:31:23+08:00Quleafquantum@baidu.comhttps://gitcode.net/paddlepaddle/Quantum/-/tags/v2.2.2v2.2.2<h1 data-sourcepos="1:1-1:14" dir="auto">
<a id="user-content-release-note" class="anchor" href="#release-note" aria-hidden="true"></a>Release Note</h1>
<h2 data-sourcepos="3:1-3:15" dir="auto">
<a id="user-content-new-features" class="anchor" href="#new-features" aria-hidden="true"></a>New Features</h2>
<ul data-sourcepos="5:1-26:0" dir="auto">
<li data-sourcepos="5:1-6:104">
<code>paddle_quantum.ansatz.Circuit</code>:
<ul data-sourcepos="6:3-6:104">
<li data-sourcepos="6:3-6:104">New member function <code>plot</code>: now we can plot the circuit using <a href="https://matplotlib.org/" rel="nofollow noreferrer noopener" target="_blank">matplotlib</a>.</li>
</ul>
</li>
<li data-sourcepos="7:1-9:42">
<code>paddle_quantum.gate</code>:
<ul data-sourcepos="8:3-9:42">
<li data-sourcepos="8:3-8:42">New Gate <code>Sdg</code>: dagger of the <em>S</em> gate</li>
<li data-sourcepos="9:3-9:42">New Gate <code>Tdg</code>: dagger of the <em>T</em> gate</li>
</ul>
</li>
<li data-sourcepos="10:1-10:185">New Gate member <code>gate_info</code>: contains the necessary information for the <code>Gate</code> class. You can revise this member to adjust the appearance of a particular gate class in <code>Circuit.plot</code>.</li>
<li data-sourcepos="11:1-14:84">
<code>paddle_quantum.channel</code>:
<ul data-sourcepos="12:3-14:84">
<li data-sourcepos="12:3-12:70">New Channel <code>MixedUnitaryChannel</code>: a random mixed unitary channel.</li>
<li data-sourcepos="13:3-13:185">Kraus operator of the <code>Depolarizing</code> channel is revised for consistency with the representation in <a href="https://en.wikipedia.org/wiki/Quantum_Computation_and_Quantum_Information" rel="nofollow noreferrer noopener" target="_blank">QCQI</a>.</li>
<li data-sourcepos="14:3-14:84">New Channel <code>ChoiRepr</code>: a general quantum channel under the Choi representation.</li>
</ul>
</li>
<li data-sourcepos="15:1-15:90">New Channel <code>StringspringRepr</code>: a general quantum channel under the Choi representation.</li>
<li data-sourcepos="16:1-22:94">
<code>paddle_quantum.state</code>:
<ul data-sourcepos="17:3-22:94">
<li data-sourcepos="17:3-20:70">
<code>paddle_quantum.state.State</code>:
<ul data-sourcepos="18:5-20:70">
<li data-sourcepos="18:5-18:81">New member function <code>normalize</code>: provide the ability to be self-normalized.</li>
<li data-sourcepos="19:5-19:107">New member function <code>evolve</code>: provide the ability of self-evolution for a given Hamiltonian and time.</li>
<li data-sourcepos="20:5-20:70">New member function <code>kron</code>: Kronecker product for <code>State</code> class.</li>
</ul>
</li>
<li data-sourcepos="21:3-21:90">New function <code>is_state_vector</code>: verify whether the input data is a legal state vector.</li>
<li data-sourcepos="22:3-22:94">New function <code>is_density_matrix</code>: verify whether the input data is a legal density matrix.</li>
</ul>
</li>
<li data-sourcepos="23:1-23:94">New operation <code>@</code>: matrix multiplication for <code>State</code> class (under <code>density_matrix</code> backend).</li>
<li data-sourcepos="24:1-24:186">
<code>paddle_quantum.qpp</code>: new module, providing a systematic set of tools for <a href="https://arxiv.org/abs/2209.14278" rel="nofollow noreferrer noopener" target="_blank">quantum phase processing</a>. See the corresponding tutorial for more details.</li>
<li data-sourcepos="25:1-26:0">
<code>paddle_quantum.qml</code>: new module that includes models in the domain of QML. Currently it contains the <a href="https://ojs.aaai.org/index.php/AAAI/article/view/17016" rel="nofollow noreferrer noopener" target="_blank">VSQL (Variational Shadow Quantum Learning)</a> model and related functionals.</li>
</ul>
<h2 data-sourcepos="27:1-27:15" dir="auto">
<a id="user-content-improvements" class="anchor" href="#improvements" aria-hidden="true"></a>Improvements</h2>
<ul data-sourcepos="29:1-33:0" dir="auto">
<li data-sourcepos="29:1-29:136">
<code>paddle_quantum.linalg</code>: inputs of functions are now compatible with <code>paddle_quantum.state.State</code>, <code>paddle.Tensor</code>and <code>numpy.ndarray</code>.</li>
<li data-sourcepos="30:1-31:113">
<code>paddle_quantum.qinfo</code>:
<ul data-sourcepos="31:3-31:113">
<li data-sourcepos="31:3-31:113">Inputs of functions are now compatible with <code>paddle_quantum.state.State</code>, <code>paddle.Tensor</code>and <code>numpy.ndarray</code>.</li>
</ul>
</li>
<li data-sourcepos="32:1-33:0">Rewrite the logic of <code>partial_trace</code>, <code>partial_trace_discontiguous</code> and <code>partial_transpose</code> using tensor contraction, significantly improving the performance of these three functions.</li>
</ul>
<h2 data-sourcepos="34:1-34:16" dir="auto">
<a id="user-content-new-tutorials" class="anchor" href="#new-tutorials" aria-hidden="true"></a>New Tutorials</h2>
<h3 data-sourcepos="36:1-36:16" dir="auto">
<a id="user-content-introduction" class="anchor" href="#introduction" aria-hidden="true"></a>Introduction</h3>
<ul data-sourcepos="38:1-39:0" dir="auto">
<li data-sourcepos="38:1-39:0">Add the introduction part for the resolution of version conflict happened when using QuLeaf to connect the quantum computer.</li>
</ul>
<h3 data-sourcepos="40:1-40:20" dir="auto">
<a id="user-content-machine-learning" class="anchor" href="#machine-learning" aria-hidden="true"></a>Machine Learning</h3>
<ul data-sourcepos="42:1-43:0" dir="auto">
<li data-sourcepos="42:1-43:0">Add the tutorial <em>Variational quantum amplitude estimation</em> which implements single-qubit variational quantum amplitude estimation (VQAE).</li>
</ul>
<h3 data-sourcepos="44:1-44:22" dir="auto">
<a id="user-content-quantum-simulation" class="anchor" href="#quantum-simulation" aria-hidden="true"></a>Quantum Simulation</h3>
<ul data-sourcepos="46:1-49:0" dir="auto">
<li data-sourcepos="46:1-46:172">Add the tutorial <em>Hamiltonian Simulation with qDRIFT</em> which introduces a random method named quantum stochastic drift protocol (qDRIFT) which is based on product formula.</li>
<li data-sourcepos="47:1-47:200">Add the tutorial <em>Quantum Phase Processing</em> which provides access to the eigenphases of the target unitary, allowing phase transformation or extraction to be done in an efficient and precise manner.</li>
<li data-sourcepos="48:1-49:0">Add the tutorial <em>Variational Quantum Metrology</em> which introduces a variational method to search an optimal Ramsey interferometer for estimating the unknown parameters.</li>
</ul>
<h2 data-sourcepos="50:1-50:12" dir="auto">
<a id="user-content-bug-fixes" class="anchor" href="#bug-fixes" aria-hidden="true"></a>Bug Fixes</h2>
<ul data-sourcepos="52:1-54:0" dir="auto">
<li data-sourcepos="52:1-52:108">Fix the bug in the <code>paddle_quantum.ansatz.vans</code> module caused by the implementation of the parameter gate.</li>
<li data-sourcepos="53:1-54:0">Fix some typo and mistakes in the tutorials and the API docs.</li>
</ul>
<h2 data-sourcepos="55:1-55:15" dir="auto">
<a id="user-content-dependencies" class="anchor" href="#dependencies" aria-hidden="true"></a>Dependencies</h2>
<ul data-sourcepos="57:1-59:43" dir="auto">
<li data-sourcepos="57:1-57:23">
<code>cvxpy</code>: newly added.</li>
<li data-sourcepos="58:1-58:22">
<code>rich</code>: newly added.</li>
<li data-sourcepos="59:1-59:43">
<code>scipy</code>: remove the version restrictions.</li>
</ul>2022-12-08T07:20:11+08:00Quleafquantum@baidu.comhttps://gitcode.net/paddlepaddle/Quantum/-/tags/v2.2.1v2.2.1<h1 data-sourcepos="1:1-1:14" dir="auto">
<a id="user-content-release-note" class="anchor" href="#release-note" aria-hidden="true"></a>Release Note</h1>
<h2 data-sourcepos="3:1-3:15" dir="auto">
<a id="user-content-new-features" class="anchor" href="#new-features" aria-hidden="true"></a>New Features</h2>
<ul data-sourcepos="5:1-24:0" dir="auto">
<li data-sourcepos="5:1-8:77">
<code>paddle_quantum.ansatz</code>:
<ul data-sourcepos="6:3-8:77">
<li data-sourcepos="6:3-6:56">New member <code>depth</code>: return the depth of the circuit.</li>
<li data-sourcepos="7:3-7:74">New member function <code>transfer_static</code>: make the circuit not trainable.</li>
<li data-sourcepos="8:3-8:77">New member function <code>collapse</code>: add <code>Collapse</code> operator into the circuit.</li>
</ul>
</li>
<li data-sourcepos="9:1-12:67">
<code>paddle_quantum.gate</code>:
<ul data-sourcepos="10:3-12:67">
<li data-sourcepos="10:3-10:130">New base gate <code>ParamGate</code>: base class for all parameterized gates, responsible for functions designed for parameterized gates.</li>
<li data-sourcepos="11:3-11:228">New member <code>gate_name</code> and member function <code>gate_history_generation</code>: by simply defining <code>gate_name</code> or overloading <code>gate_history_generation</code>, now <code>Circuit.gate_history</code> can read the gate history of your self-designed Gates.</li>
<li data-sourcepos="12:3-12:67">New Gate <code>QAOALayerWeighted</code>: QAOA driving layers with weights.</li>
</ul>
</li>
<li data-sourcepos="13:1-14:77">
<code>paddle_quantum.operator</code>:
<ul data-sourcepos="14:3-14:77">
<li data-sourcepos="14:3-14:77">New operator <code>Collapse</code>: support (partially) collapse for quantum states.</li>
</ul>
</li>
<li data-sourcepos="15:1-17:70">
<code>paddle_quantum.qsvt</code>: new module, providing tools for Chebyshev-based QSP & QSVT.
<ul data-sourcepos="16:3-17:70">
<li data-sourcepos="16:3-16:87">New class <code>ScalarQSP</code>: class for circuit and matrix generation in single-qubit QSP.</li>
<li data-sourcepos="17:3-17:70">New class <code>QSVT</code>: class for circuit and matrix generation in QSVT.</li>
</ul>
</li>
<li data-sourcepos="18:1-19:166">
<code>paddle_quantum.state</code>:
<ul data-sourcepos="19:3-19:166">
<li data-sourcepos="19:3-19:166">In <code>state_vector</code> backend, class <code>State</code> now can call its member properties <code>State.ket</code> and <code>State.bra</code> corresponding to ket and bra representations of the state.</li>
</ul>
</li>
<li data-sourcepos="20:1-24:0">
<code>paddle_quantum.qinfo</code>:
<ul data-sourcepos="21:3-24:0">
<li data-sourcepos="21:3-21:60">Now support inputs for both <code>paddle.Tensor</code> and <code>State</code>.</li>
<li data-sourcepos="22:3-22:62">New function <code>tensor_product</code>: <code>State</code> version of <code>Nkron</code>.</li>
<li data-sourcepos="23:3-24:0">
<code>partial_trace</code> now support the <code>state_vector</code> backend.</li>
</ul>
</li>
</ul>
<h3 data-sourcepos="25:1-25:42" dir="auto">
<a id="user-content-new-convention-for-parameterized-gates" class="anchor" href="#new-convention-for-parameterized-gates" aria-hidden="true"></a>New Convention for Parameterized Gates</h3>
<p data-sourcepos="27:1-27:47" dir="auto">If the dtype of input <code>param</code> of <code>ParamGate</code> is</p>
<ul data-sourcepos="29:1-33:0" dir="auto">
<li data-sourcepos="29:1-29:66">
<code>None</code>, then <code>ParamGate</code> will create its own (random) parameter.</li>
<li data-sourcepos="30:1-30:113">
<code>ParamBase</code> (generated by <code>paddle.create_parameter</code>), then <code>ParamGate</code> will treat <code>param</code> as its own parameter.</li>
<li data-sourcepos="31:1-31:170">
<code>paddle.Tensor</code> but not <code>ParamBase</code>, then <code>ParamGate</code> will treat <code>param</code> as a fixed input, even when <code>param</code> is trainable (i.e. when <code>param.stop_gradient</code> is <code>False</code>).</li>
<li data-sourcepos="32:1-33:0">
<code>float</code> or <code>Iterable[float]</code>, then <code>ParamGate</code> will treat <code>param</code> as a fixed input.</li>
</ul>
<h2 data-sourcepos="34:1-34:15" dir="auto">
<a id="user-content-new-tutorial" class="anchor" href="#new-tutorial" aria-hidden="true"></a>New Tutorial</h2>
<h3 data-sourcepos="36:1-36:22" dir="auto">
<a id="user-content-quantum-simulation" class="anchor" href="#quantum-simulation" aria-hidden="true"></a>Quantum Simulation</h3>
<ul data-sourcepos="38:1-39:0" dir="auto">
<li data-sourcepos="38:1-39:0">Add the tutorial <em>Quantum Signal Processing and Quantum Singular Value Transformation</em>, which presents a brief but systematic illustration of QSP and QSVT.</li>
</ul>
<h3 data-sourcepos="40:1-40:20" dir="auto">
<a id="user-content-machine-learning" class="anchor" href="#machine-learning" aria-hidden="true"></a>Machine Learning</h3>
<ul data-sourcepos="42:1-44:0" dir="auto">
<li data-sourcepos="42:1-42:175">Add the tutorial <em>Data Encoding Analysis</em>, which analyzes the effect of the width and depth of data encoding circuits on quantum states from the view of quantum information.</li>
<li data-sourcepos="43:1-44:0">Add the tutorial <em>Quantum Neural Network Approximating Functions</em>, which demonstrates how to use single-qubit QNNs to approximate any (scalable) square-integrable functions.</li>
</ul>
<h2 data-sourcepos="45:1-45:12" dir="auto">
<a id="user-content-bug-fixes" class="anchor" href="#bug-fixes" aria-hidden="true"></a>Bug Fixes</h2>
<ul data-sourcepos="47:1-52:0" dir="auto">
<li data-sourcepos="47:1-47:31">Fix bug in the <code>vans</code> module.</li>
<li data-sourcepos="48:1-48:59">Fix some typo and mistakes in the tutorials and api docs.</li>
<li data-sourcepos="49:1-49:52">Fix bug which cannot set the quleaf token rightly.</li>
<li data-sourcepos="50:1-50:79">Fix bug when the circuit has no trainable parameters in the <code>quleaf</code> backend.</li>
<li data-sourcepos="51:1-52:0">Fix bug in the <code>CSWAP</code> class and the <code>Toffoli</code> class.</li>
</ul>
<h2 data-sourcepos="53:1-53:15" dir="auto">
<a id="user-content-dependencies" class="anchor" href="#dependencies" aria-hidden="true"></a>Dependencies</h2>
<ul data-sourcepos="55:1-57:39" dir="auto">
<li data-sourcepos="55:1-55:38">
<code>paddlepaddle</code>: <code>2.2.0</code> to <code>2.3.0</code>.</li>
<li data-sourcepos="56:1-56:32">
<code>scipy</code>: no less than <code>1.8.1</code>.</li>
<li data-sourcepos="57:1-57:39">
<code>protobuf</code>: no greater than <code>3.20.1</code>.</li>
</ul>2022-09-20T14:13:56+08:00Quleafquantum@baidu.comhttps://gitcode.net/paddlepaddle/Quantum/-/tags/v2.2.0v2.2.0<h1 dir="auto">
<a id="user-content-release-note" class="anchor" href="#release-note" aria-hidden="true"></a>Release Note</h1>
<h2 dir="auto">
<a id="user-content-breaking-change" class="anchor" href="#breaking-change" aria-hidden="true"></a>Breaking Change</h2>
<p dir="auto">We have made an incompatible upgrade to the code architecture, and the new version's structure and usage can be found in our <a href="https://qml.baidu.com/tutorials/overview.html" rel="nofollow noreferrer noopener" target="_blank">tutorials</a>, <a href="https://qml.baidu.com/api/introduction.html" rel="nofollow noreferrer noopener" target="_blank">API documentation</a>, and <a href="https://github.com/PaddlePaddle/Quantum" rel="nofollow noreferrer noopener" target="_blank">the source code</a>.</p>
<h2 dir="auto">
<a id="user-content-new-features" class="anchor" href="#new-features" aria-hidden="true"></a>New Features</h2>
<ul dir="auto">
<li>We now support connecting to a real quantum computer via <a href="https://github.com/baidu/QCompute" rel="nofollow noreferrer noopener" target="_blank">QuLeaf</a>, using <code>paddle_quantum.set_backend('quleaf')</code> to select QuLeaf as the backend.</li>
<li>We now support using <code>set_backend()</code> to switch to different backends.</li>
<li>We now support using the state fidelity and trace distance as the loss function to optimize.</li>
<li>We now support using an oracle gate in a quantum circuit.</li>
<li>Add the <code>VAns</code> feature, which can build shallower ansatzes by automatically inserting and removing gates during the optimization.</li>
<li>Add the UCCSD ansatz, which is frequently used in quantum chemistry.</li>
<li>Add the <code>OneBodyDensityMatrix</code> class for measureing the one-body density matrix from a quantum state.</li>
</ul>
<h2 dir="auto">
<a id="user-content-new-tutorials" class="anchor" href="#new-tutorials" aria-hidden="true"></a>New Tutorials</h2>
<h3 dir="auto">
<a id="user-content-qnn-research" class="anchor" href="#qnn-research" aria-hidden="true"></a>QNN Research</h3>
<ul dir="auto">
<li>Add the tutorial <em>VAns - Variable Ansatz</em>, which presents a variable structure algorithm to build shallower ansatzes by automatically inserting and removing gates during the optimization.</li>
<li>Temporarily remove the tutorial <em>Calculating Gradient Using Quantum Circuit</em>. It will be reworked and released after the relevant features have been refactored.</li>
</ul>
<h2 dir="auto">
<a id="user-content-introduction" class="anchor" href="#introduction" aria-hidden="true"></a>Introduction</h2>
<ul dir="auto">
<li>Improve the tutorial <em>Quantum Chemistry in Paddle Quantum's qchem</em> by adding the introduction to the new features.</li>
<li>Temporarily remove the tutorial <em>Frequently Used Functions in Paddle Quantum</em>, which will be reworked and released soon.</li>
</ul>
<h2 dir="auto">
<a id="user-content-dependencies" class="anchor" href="#dependencies" aria-hidden="true"></a>Dependencies</h2>
<ul dir="auto">
<li>
<code>qcompute</code>: newly added.</li>
<li>
<code>interval</code>: removed.</li>
<li>
<code>scikit-learn</code>: newly added.</li>
<li>
<code>opencv-python</code>: newly added.</li>
</ul>2022-05-20T04:15:29+08:00Quleafquantum@baidu.comhttps://gitcode.net/paddlepaddle/Quantum/-/tags/v2.1.3v2.1.3<h1 data-sourcepos="1:1-1:14" dir="auto">
<a id="user-content-release-note" class="anchor" href="#release-note" aria-hidden="true"></a>Release Note</h1>
<h2 data-sourcepos="3:1-3:15" dir="auto">
<a id="user-content-new-features" class="anchor" href="#new-features" aria-hidden="true"></a>New Features</h2>
<ul data-sourcepos="5:1-12:0" dir="auto">
<li data-sourcepos="5:1-5:102">Add the <code>schmidt_decompose()</code> function, which computes the Schmidt decomposition of a quantum state.</li>
<li data-sourcepos="6:1-6:147">Add the <code>paddle_quantum.dataset</code> module, which provides the quantum version of common datasets, such as the MNIST dataset, the Iris dataset, etc.</li>
<li data-sourcepos="7:1-7:143">Add the <code>QuantumFisher</code> and the <code>ClassicalFisher</code> classes, which compute the quantum Fisher information and the classical Fisher information.</li>
<li data-sourcepos="8:1-8:120">Add the <code>expand()</code> method in the <code>UAnsatz</code> class, which dynamically expands the number of qubits in a quantum circuit.</li>
<li data-sourcepos="9:1-9:110">Add the <code>plot_density_matrix_graph()</code> function in <code>paddle_quantum.utils</code>, which visualizes a density matrix.</li>
<li data-sourcepos="10:1-10:169">Add the <code>plot_multi_qubits_state_in_bloch_sphere()</code> function in <code>paddle_quantum.utils</code>, which plots independent systems with multiple qubit states on the Bloch sphere.</li>
<li data-sourcepos="11:1-12:0">Add the <code>image_to_density_matrix()</code> function to encode an image as a quantum state.</li>
</ul>
<h3 data-sourcepos="13:1-13:21" dir="auto">
<a id="user-content-quantum-chemistry" class="anchor" href="#quantum-chemistry" aria-hidden="true"></a>Quantum Chemistry</h3>
<ul data-sourcepos="15:1-17:0" dir="auto">
<li data-sourcepos="15:1-15:273">Add the <code>run_chem()</code> function in <code>paddle_quantum.qchem</code> which could use <code>"hardware efficient"</code> ansatz and <code>"hartree fock"</code> ansatz to calculate ground state energy for a given molecule. For details, please refer to our updated introduction to the quantum chemistry module.</li>
<li data-sourcepos="16:1-17:0">Add the <code>QModel</code> class which could be used to define a customized variational ansatz for quantum chemistry calculation. For details, please refer to our updated introduction to the quantum chemistry module.</li>
</ul>
<h2 data-sourcepos="18:1-18:16" dir="auto">
<a id="user-content-new-tutorials" class="anchor" href="#new-tutorials" aria-hidden="true"></a>New Tutorials</h2>
<h3 data-sourcepos="20:1-20:16" dir="auto">
<a id="user-content-introduction" class="anchor" href="#introduction" aria-hidden="true"></a>Introduction</h3>
<ul data-sourcepos="22:1-24:0" dir="auto">
<li data-sourcepos="22:1-22:168">Add the tutorial <em>Quantum Chemistry in Paddle Quantum's qchem</em>, which explains how to use our upgraded quantum chemistry module to do ground state energy calculation.</li>
<li data-sourcepos="23:1-24:0">Add the tutorial <em>Frequently Used Functions in Paddle Quantum</em>, which lists some frequently used functions in Paddle Quantum.</li>
</ul>
<h3 data-sourcepos="25:1-25:16" dir="auto">
<a id="user-content-qnn-research" class="anchor" href="#qnn-research" aria-hidden="true"></a>QNN Research</h3>
<ul data-sourcepos="27:1-28:0" dir="auto">
<li data-sourcepos="27:1-28:0">Add the tutorial <em>Quantum Fisher Information</em>, which briefly introduces the concepts of the classical and quantum Fisher information, along with their applications in quantum machine learning, and shows how to compute them with Paddle Quantum.</li>
</ul>
<h3 data-sourcepos="29:1-29:22" dir="auto">
<a id="user-content-quantum-simulation" class="anchor" href="#quantum-simulation" aria-hidden="true"></a>Quantum Simulation</h3>
<ul data-sourcepos="31:1-32:0" dir="auto">
<li data-sourcepos="31:1-32:0">Add the tutorial <em>Distributed Variational Quantum Eigensolver Based on Schmidt Decomposition</em>, which demonstrates how to implement a distributed quantum algorithm using Paddle Quantum.</li>
</ul>
<h2 data-sourcepos="33:1-33:15" dir="auto">
<a id="user-content-improvements" class="anchor" href="#improvements" aria-hidden="true"></a>Improvements</h2>
<ul data-sourcepos="35:1-41:0" dir="auto">
<li data-sourcepos="35:1-35:57">Improve the simulator performance in state_vector mode.</li>
<li data-sourcepos="36:1-36:62">Update the introduction tutorial, including some typo fixes.</li>
<li data-sourcepos="37:1-37:64">The <code>partial_trace_discontiguous()</code> function is now available.</li>
<li data-sourcepos="38:1-38:108">The <code>construct_h_matrix()</code> method in the <code>Hamiltonian</code> class now supports specifying the number of qubits.</li>
<li data-sourcepos="39:1-39:150">Enhance the performance of the Hamiltonian simulation experimentally, referring to the paper <em>Optimal quantum circuits for general two-qubit gates</em>.</li>
<li data-sourcepos="40:1-41:0">Upgrade some tutorials with the latest code features.</li>
</ul>
<h2 data-sourcepos="42:1-42:12" dir="auto">
<a id="user-content-bug-fixes" class="anchor" href="#bug-fixes" aria-hidden="true"></a>Bug Fixes</h2>
<ul data-sourcepos="44:1-50:0" dir="auto">
<li data-sourcepos="44:1-44:111">Fix the bug in the <code>von_neumann_entropy()</code> function. Now it skips eigenvalue zero in the calculation process.</li>
<li data-sourcepos="45:1-45:108">Fix the bug in the <code>update_param()</code> method which is caused by the incompatible update of the PaddlePaddle.</li>
<li data-sourcepos="46:1-46:53">Fix the plot error in MAXCUT and DC-QAOA tutorials.</li>
<li data-sourcepos="47:1-47:64">Fix the bug in the <code>get_1d_heisenberg_hamiltonian()</code> function.</li>
<li data-sourcepos="48:1-48:47">Fix typos in the docs of <code>cy</code> and <code>cz</code> gates.</li>
<li data-sourcepos="49:1-50:0">Fix some typos in tutorials.</li>
</ul>
<h2 data-sourcepos="51:1-51:15" dir="auto">
<a id="user-content-dependencies" class="anchor" href="#dependencies" aria-hidden="true"></a>Dependencies</h2>
<ul data-sourcepos="53:1-56:0" dir="auto">
<li data-sourcepos="53:1-53:54">
<code>paddlepaddle</code>: updated from <code>>=2.1.2</code> to <code>>=2.2.0</code>.</li>
<li data-sourcepos="54:1-54:29">
<code>openfermion</code>: newly added.</li>
<li data-sourcepos="55:1-56:0">
<code>pyscf</code>: newly added for Linux and macOS platforms.</li>
</ul>2021-12-11T06:31:49+08:00Quleafquantum@baidu.comhttps://gitcode.net/paddlepaddle/Quantum/-/tags/v2.1.2v2.1.2<h1 data-sourcepos="1:1-1:14" dir="auto">
<a id="user-content-release-note" class="anchor" href="#release-note" aria-hidden="true"></a>Release Note</h1>
<h2 data-sourcepos="3:1-3:14" dir="auto">
<a id="user-content-new-modules" class="anchor" href="#new-modules" aria-hidden="true"></a>New Modules</h2>
<h3 data-sourcepos="5:1-5:28" dir="auto">
<a id="user-content-quantum-chemistry-module" class="anchor" href="#quantum-chemistry-module" aria-hidden="true"></a>Quantum chemistry module</h3>
<p data-sourcepos="7:1-7:289" dir="auto">Add the quantum chemistry module <code>paddle_quantum.qchem</code>. This module, depending on <code>Psi4</code> and <code>OpenFermion</code>, can construct Hamiltonian applicable to quantum computers from chemical molecular structure and supports most platforms. To use the <code>qchem</code> module, please refer to the README file.</p>
<h3 data-sourcepos="9:1-9:36" dir="auto">
<a id="user-content-time-evolution-simulation-module" class="anchor" href="#time-evolution-simulation-module" aria-hidden="true"></a>Time evolution simulation module</h3>
<p data-sourcepos="11:1-11:426" dir="auto">Add the module <code>paddle_quantum.trotter</code> for constructing circuits that simulate the time evolution of quantum systems. Arbitrarily high order Trotter-Suzuki circuits are provided as a built-in function <code>construct_trotter_circuit()</code>. Additionally, users can design custom time evolution circuits with user-specified permutation and coefficients. For more detailed usage, please refer to our tutorials on Hamiltonian simulation.</p>
<h3 data-sourcepos="13:1-13:48" dir="auto">
<a id="user-content-measurement-based-quantum-computation-module" class="anchor" href="#measurement-based-quantum-computation-module" aria-hidden="true"></a>Measurement-based quantum computation module</h3>
<p data-sourcepos="15:1-15:344" dir="auto">Add the measurement-based quantum computation (MBQC) module <code>paddle_quantum.mbqc</code>. It supports the simulation of universal quantum computing with the MBQC model. Unlike the conventional quantum circuit model, MBQC has its unique way of computing and thus common circuit simulation tools cannot be directly used for the simulation of this model.</p>
<p data-sourcepos="17:1-17:220" dir="auto">Along with this new module, we also provide some examples and tutorials. The provided examples are QAOA (Quantum Approximate Optimization Algorithm), VQSVD (Variational Quantum Singular Value Decomposition), and QKernel.</p>
<h2 data-sourcepos="19:1-19:16" dir="auto">
<a id="user-content-new-tutorials" class="anchor" href="#new-tutorials" aria-hidden="true"></a>New Tutorials</h2>
<h3 data-sourcepos="21:1-21:21" dir="auto">
<a id="user-content-quantum-chemistry" class="anchor" href="#quantum-chemistry" aria-hidden="true"></a>Quantum chemistry</h3>
<ul data-sourcepos="23:1-24:0" dir="auto">
<li data-sourcepos="23:1-24:0">Add the tutorial <em>Building Molecular Hamiltonian</em> under the <code>quantum_simulation</code> folder, which explains how to obtain a Hamiltonian from a molecular structure.</li>
</ul>
<h3 data-sourcepos="25:1-25:20" dir="auto">
<a id="user-content-classical-shadow" class="anchor" href="#classical-shadow" aria-hidden="true"></a>Classical shadow</h3>
<ul data-sourcepos="27:1-29:0" dir="auto">
<li data-sourcepos="27:1-27:176">Add the tutorial <em>The Classical Shadow of Unknown Quantum States</em> under the <code>quantum_simulation</code> folder, which introduces the concept of classical shadow and its application.</li>
<li data-sourcepos="28:1-29:0">Add the tutorial <em>Estimation of Quantum State Properties Based on the Classical Shadow</em> under the <code>quantum_simulation</code> folder, which shows how to estimate the expectation value of an observable using classical shadow.</li>
</ul>
<h3 data-sourcepos="30:1-30:26" dir="auto">
<a id="user-content-hamiltonian-simulation" class="anchor" href="#hamiltonian-simulation" aria-hidden="true"></a>Hamiltonian simulation</h3>
<ul data-sourcepos="32:1-34:0" dir="auto">
<li data-sourcepos="32:1-32:191">Add the tutorial <em>Hamiltonian Simulation with Product Formula</em> under the <code>quantum_simulation</code> folder, which shows how to perform digital quantum simulations based on Suzuki product formula.</li>
<li data-sourcepos="33:1-34:0">Add the tutorial <em>Simulate the Spin Dynamics on a Heisenberg Chain</em> under the <code>quantum_simulation</code> folder, which demonstrates how to simulate the time evolution of a one-dimensional Heisenberg chain using both the built-in Trotter-Suzuki circuit and the custom time evolution circuits in Paddle Quantum.</li>
</ul>
<h3 data-sourcepos="35:1-35:22" dir="auto">
<a id="user-content-qnn-expressibility" class="anchor" href="#qnn-expressibility" aria-hidden="true"></a>QNN expressibility</h3>
<ul data-sourcepos="37:1-38:0" dir="auto">
<li data-sourcepos="37:1-38:0">Add the tutorial <em>Expressibility of Quantum Neural Network</em> under the <code>qun_research</code> folder, which introduces a method for quantitatively analyzing the expressibility of quantum neural networks and evaluates the expressibility of quantum neural network templates provided by Paddle Quantum at different depths.</li>
</ul>
<h3 data-sourcepos="39:1-39:21" dir="auto">
<a id="user-content-quantum-compiling" class="anchor" href="#quantum-compiling" aria-hidden="true"></a>Quantum compiling</h3>
<ul data-sourcepos="41:1-42:0" dir="auto">
<li data-sourcepos="41:1-42:0">Add the tutorial <em>Variational Quantum Circuit Compiling</em> under the <code>qnn_research</code> folder, which shows a process of simulating an unknown unitary operator by optimizing a parameterized quantum circuit.</li>
</ul>
<h3 data-sourcepos="43:1-43:41" dir="auto">
<a id="user-content-measurement-based-quantum-computation" class="anchor" href="#measurement-based-quantum-computation" aria-hidden="true"></a>Measurement-based quantum computation</h3>
<ul data-sourcepos="45:1-48:0" dir="auto">
<li data-sourcepos="45:1-45:111">Add the tutorial <em>MBQC Quick Start Guide</em> under the <code>mbqc</code> folder, which explains the basic concepts of MBQC.</li>
<li data-sourcepos="46:1-46:172">Add the tutorial <em>Measurement-based Quantum Approximate Optimization Algorithm</em> under the <code>mbqc</code> folder, which shows how to implement the QAOA algorithm in the MBQC mode.</li>
<li data-sourcepos="47:1-48:0">Add the tutorial <em>Polynomial Unconstrained Boolean Optimization Problem in MBQC</em> under the <code>mbqc</code> folder, which shows how to solve the max-cut problem and a specific PUBO problem using the QAOA algorithm in the MBQC mode.</li>
</ul>
<p data-sourcepos="49:1-49:363" dir="auto">In addition to these new tutorials, we update the Quick Start manual to include how to draw and display a Bloch sphere using functions <code>plot_state_in_bloch_sphere()</code> and <code>plot_rotation_in_bloch_sphere()</code> from the module <code>paddle_quantum.utils</code>. The tutorial <em>Variational Quantum Eigensolver</em> is also updated to making use of the new <code>paddle_quantum.qchem</code> module.</p>2021-09-30T10:10:09+08:00Quleafquantum@baidu.comhttps://gitcode.net/paddlepaddle/Quantum/-/tags/v2.1.1v2.1.1<h1 data-sourcepos="1:1-1:14" dir="auto">
<a id="user-content-release-note" class="anchor" href="#release-note" aria-hidden="true"></a>Release Note</h1>
<h2 data-sourcepos="3:1-3:15" dir="auto">
<a id="user-content-new-features" class="anchor" href="#new-features" aria-hidden="true"></a>New Features</h2>
<h3 data-sourcepos="5:1-5:22" dir="auto">
<a id="user-content-more-quantum-gates" class="anchor" href="#more-quantum-gates" aria-hidden="true"></a>More quantum gates</h3>
<ul data-sourcepos="7:1-9:0" dir="auto">
<li data-sourcepos="7:1-7:112">Add controlled gates <code>cswap()</code>, <code>cy()</code>, <code>cz()</code>, <code>crx()</code>, <code>cyy()</code>, <code>crz()</code>, and <code>ccx()</code> in the <code>UAnsatz</code> class.</li>
<li data-sourcepos="8:1-9:0">Add the S dagger gate <code>sdg()</code> and the T dagger gate <code>tdg()</code> in the <code>UAnsatz</code> class</li>
</ul>
<h3 data-sourcepos="10:1-10:24" dir="auto">
<a id="user-content-gradient-calculation" class="anchor" href="#gradient-calculation" aria-hidden="true"></a>Gradient calculation</h3>
<ul data-sourcepos="12:1-15:0" dir="auto">
<li data-sourcepos="12:1-12:355">Add the <code>ExpecVal</code> class in <code>paddle_quantum.expecval</code>, which is a PaddlePaddle Python operator for calculating the expectation value of an observable w.r.t the quantum state output by a quantum circuit. It supports the computation of the gradient w.r.t. the circuit's parameters either through the finite difference method or the parameter-shift method.</li>
<li data-sourcepos="13:1-13:249">Add the <code>paddle_quantum.optimizer</code> module for using SciPy optimizers to train a circuit, including <code>ConjugateGradient</code>, <code>NewtonCG</code>, <code>Powell</code>, <code>SLSQP</code>, and <code>CustomOptimizer</code>. The <code>CustomOptimizer</code> class is a base class for all the other optimizers.</li>
<li data-sourcepos="14:1-15:0">Add <code>finite_difference_gradient()</code>, <code>param_shift_gradient()</code>, and <code>linear_combinations_gradient()</code> in the <code>UAnsatz</code> class for computing the gradient of the expectation of an observable w.r.t. the parameters in a circuit.</li>
</ul>
<h3 data-sourcepos="16:1-16:15" dir="auto">
<a id="user-content-hamiltonian" class="anchor" href="#hamiltonian" aria-hidden="true"></a>Hamiltonian</h3>
<p data-sourcepos="18:1-18:119" dir="auto">Add the <code>Hamiltonian</code> class in <code>paddle_quantum.utils</code> for processing Hamiltonian. The main functions of this class are:</p>
<ul data-sourcepos="20:1-24:0" dir="auto">
<li data-sourcepos="20:1-20:46">Construct a Hamiltonian from a Pauli string;</li>
<li data-sourcepos="21:1-21:50">Get the matrix corresponding to the Hamiltonian;</li>
<li data-sourcepos="22:1-22:56">Get the Pauli string corresponding to the Hamiltonian;</li>
<li data-sourcepos="23:1-24:0">Addition, subtraction and scalar multiplication.</li>
</ul>
<h3 data-sourcepos="25:1-25:20" dir="auto">
<a id="user-content-classical-shadow" class="anchor" href="#classical-shadow" aria-hidden="true"></a>Classical shadow</h3>
<ul data-sourcepos="27:1-29:0" dir="auto">
<li data-sourcepos="27:1-27:88">Add <code>shadow_sample()</code> in <code>paddle_quantum.shadow</code> for sampling local Pauli measurement.</li>
<li data-sourcepos="28:1-29:0">Add <code>shadow_trace()</code> in the <code>UAnsatz</code> class for estimating the expectation value of an observable through classical shadows.</li>
</ul>
<h3 data-sourcepos="30:1-30:19" dir="auto">
<a id="user-content-quantum-finance" class="anchor" href="#quantum-finance" aria-hidden="true"></a>Quantum finance</h3>
<ul data-sourcepos="32:1-33:0" dir="auto">
<li data-sourcepos="32:1-33:0">Add the <code>paddle_quantum.finance</code> module for handling some finance optimization problems.</li>
</ul>
<h3 data-sourcepos="34:1-34:18" dir="auto">
<a id="user-content-other-features" class="anchor" href="#other-features" aria-hidden="true"></a>Other features</h3>
<ul data-sourcepos="36:1-41:0" dir="auto">
<li data-sourcepos="36:1-36:85">Add <code>swap_test()</code> in <code>paddle_quantum.circuit</code> for constructing a swap test circuit.</li>
<li data-sourcepos="37:1-37:75">Add <code>reset_state()</code> in the <code>UAnsatz</code> class for resetting a partial state.</li>
<li data-sourcepos="38:1-38:136">Update <code>basis_encoding()</code>, <code>amplitude_encoding()</code>, and <code>angle_encoding()</code> to support encoding classical data to partial quantum state.</li>
<li data-sourcepos="39:1-39:101">Update <code>vec()</code> in <code>paddle_quantum.state</code> to support generating arbitrary computational basis state.</li>
<li data-sourcepos="40:1-41:0">Add <code>plot_state_in_bloch_sphere()</code> and <code>plot_rotation_in_bloch_sphere()</code> in <code>paddle_quantum.utils</code> for drawing a Bloch sphere.</li>
</ul>
<h2 data-sourcepos="42:1-42:16" dir="auto">
<a id="user-content-new-tutorials" class="anchor" href="#new-tutorials" aria-hidden="true"></a>New Tutorials</h2>
<h3 data-sourcepos="44:1-44:24" dir="auto">
<a id="user-content-gradient-calculation-1" class="anchor" href="#gradient-calculation-1" aria-hidden="true"></a>Gradient calculation</h3>
<ul data-sourcepos="46:1-47:0" dir="auto">
<li data-sourcepos="46:1-47:0">Add the tutorial <em>Calculating Gradient Using Quantum Circuit</em> under the <code>qnn_research</code> folder, which explains how to calculate gradient with quantum circuits and then use PaddlePaddle's or SciPy's optimizers to train an ansatz.</li>
</ul>
<h3 data-sourcepos="48:1-48:19" dir="auto">
<a id="user-content-quantum-finance-1" class="anchor" href="#quantum-finance-1" aria-hidden="true"></a>Quantum finance</h3>
<ul data-sourcepos="50:1-51:0" dir="auto">
<li data-sourcepos="50:1-51:0">Add three tutorials on <em>Arbitrage Opportunity Optimization</em>, <em>Portfolio Optimization</em>, and <em>Portfolio Diversification</em> under the <code>combinatorial_optimization</code> folder, which use the new <code>paddle_quantum.finance</code> module to solve these problems with quantum optimization algorithms.</li>
</ul>
<h2 data-sourcepos="52:1-52:10" dir="auto">
<a id="user-content-bug-fix" class="anchor" href="#bug-fix" aria-hidden="true"></a>Bug Fix</h2>
<ul data-sourcepos="54:1-54:55" dir="auto">
<li data-sourcepos="54:1-54:55">Fix the bug of <code>t()</code> gate in <code>paddle_quantum.locc</code>.</li>
</ul>2021-09-30T10:10:11+08:00QuLeafquantum@baidu.comhttps://gitcode.net/paddlepaddle/Quantum/-/tags/v2.1.0v2.1.0<h1 data-sourcepos="1:1-1:14" dir="auto">
<a id="user-content-release-note" class="anchor" href="#release-note" aria-hidden="true"></a>Release Note</h1>
<h2 data-sourcepos="3:1-3:12" dir="auto">
<a id="user-content-tutorials" class="anchor" href="#tutorials" aria-hidden="true"></a>Tutorials</h2>
<ul data-sourcepos="5:1-18:0" dir="auto">
<li data-sourcepos="5:1-11:0">
<p data-sourcepos="5:3-5:68">Reorganize tutorials according to applications and research areas:</p>
<ul data-sourcepos="6:3-11:0">
<li data-sourcepos="6:3-6:30">Combinatorial Optimization</li>
<li data-sourcepos="7:3-7:11">LOCCNet</li>
<li data-sourcepos="8:3-8:20">Machine Learning</li>
<li data-sourcepos="9:3-9:16">QNN Research</li>
<li data-sourcepos="10:3-11:0">Quantum Simulation</li>
</ul>
</li>
<li data-sourcepos="12:1-18:0">
<p data-sourcepos="12:3-12:25">Add five new tutorials:</p>
<ul data-sourcepos="13:3-18:0">
<li data-sourcepos="13:3-13:43">Large-scale QAOA via Divide-and-Conquer</li>
<li data-sourcepos="14:3-14:47">Encoding Classical Data into Quantum States</li>
<li data-sourcepos="15:3-15:31">Travelling Salesman Problem</li>
<li data-sourcepos="16:3-16:26">Quantum Kernel Methods</li>
<li data-sourcepos="17:3-18:0">Variational Shadow Quantum Learning</li>
</ul>
</li>
</ul>
<h2 data-sourcepos="19:1-19:15" dir="auto">
<a id="user-content-new-features" class="anchor" href="#new-features" aria-hidden="true"></a>New Features</h2>
<ul data-sourcepos="21:1-24:85" dir="auto">
<li data-sourcepos="21:1-21:70">Add two new types of noise models: <code>reset</code> and <code>thermal_relaxation</code>.</li>
<li data-sourcepos="22:1-22:269">Add four kinds of encoding methods, such that classical data can be encoded into quantum data via encoding functions: <code>basis_encoding</code>, <code>amplitude_encoding</code>, <code>angle_encoding</code>, <code>iqp_encoding</code>. For more information about encoding, please refer to our encoding tutorial.</li>
<li data-sourcepos="23:1-23:140">Add three two-qubit parameterized gates: <code>rxx</code>, <code>ryy</code>, <code>rzz</code> and two-qubit Mølmer–Sørensen gate (the native gate on ion-trap systems).</li>
<li data-sourcepos="24:1-24:85">Add circuit drawer. The quantum circuit could be printed directly via <code>print(cir)</code>.</li>
</ul>2021-09-30T10:10:18+08:00Quleafquantum@baidu.comhttps://gitcode.net/paddlepaddle/Quantum/-/tags/v2.0.1v2.0.1Paddle Quantum 2.0.1<h1 data-sourcepos="1:1-1:14" dir="auto">
<a id="user-content-release-note" class="anchor" href="#release-note" aria-hidden="true"></a>Release Note</h1>
<h2 data-sourcepos="3:1-3:14" dir="auto">
<a id="user-content-noise-model" class="anchor" href="#noise-model" aria-hidden="true"></a>Noise model</h2>
<p data-sourcepos="5:1-5:299" dir="auto">Paddle Quantum now supports noise model, including <code>amplitude_damping</code>, <code>generalized_amplitude_damping</code>, <code>phase_damping</code>, <code>bit_flip</code>, <code>phase_flip</code>, <code>bit_phase_flip</code>, <code>depolarizing</code>, <code>pauli_channel</code>, <code>customized_channel</code>. The noise model could efficiently simulate quantum channels by Paddle Quantum.</p>
<p data-sourcepos="7:1-7:157" dir="auto">You can refer to <a href="https://qml.baidu.com/tutorials/simulating-noisy-quantum-circuits-with-paddle-quantum.html" rel="nofollow noreferrer noopener" target="_blank">this tutorial</a> to learn how to use this module.</p>
<h2 data-sourcepos="9:1-9:15" dir="auto">
<a id="user-content-new-features" class="anchor" href="#new-features" aria-hidden="true"></a>New features</h2>
<ul data-sourcepos="11:1-12:253" dir="auto">
<li data-sourcepos="11:1-11:165">
<a href="https://qml.baidu.com/api/paddle_quantum.state.html#paddle_quantum.state.GHZ_state" rel="nofollow noreferrer noopener" target="_blank"><code>GHZ_state</code></a>: Now you can generate the GHZ-state directly with Paddle Quantum.</li>
<li data-sourcepos="12:1-12:253">
<a href="https://qml.baidu.com/api/paddle_quantum.circuit.uansatz.html#paddle_quantum.circuit.UAnsatz.linear_entangled_layer" rel="nofollow noreferrer noopener" target="_blank"><code>linear_entangled_layer</code></a>: The entangled layer consisting of Ry gates, Rz gates, and CNOT gates, which only connect to its neighbors.</li>
</ul>2021-09-30T10:10:21+08:00Quleafquantum@baidu.comhttps://gitcode.net/paddlepaddle/Quantum/-/tags/v2.0.0v2.0.0<h1 data-sourcepos="1:1-1:14" dir="auto">
<a id="user-content-release-note" class="anchor" href="#release-note" aria-hidden="true"></a>Release Note</h1>
<p data-sourcepos="3:1-3:97" dir="auto">The main update is the adaption to PaddlePaddle 2.0 with an improved model efficiency up to 40%.</p>
<blockquote data-sourcepos="5:1-5:47" dir="auto">
<p data-sourcepos="5:3-5:47">The version of paddlepaddle should be 2.0.1+.</p>
</blockquote>
<p data-sourcepos="7:1-7:243" dir="auto">Since there are many changes in PaddlePaddle 2.0, we need to adapt to it. The detailed change of API can be browsed in <a href="https://www.paddlepaddle.org.cn/documentation/docs/zh/guides/09_others_information/api_mapping_cn.html" rel="nofollow noreferrer noopener" target="_blank">API mapping table</a>.</p>
<h2 data-sourcepos="9:1-9:34" dir="auto">
<a id="user-content-common-paddlepaddle-api-update" class="anchor" href="#common-paddlepaddle-api-update" aria-hidden="true"></a>Common PaddlePaddle API Update</h2>
<ol data-sourcepos="11:1-18:0" dir="auto">
<li data-sourcepos="11:1-11:52">Change <code>paddle.fluid.Layer</code> to <code>paddle.nn.Layer</code>.</li>
<li data-sourcepos="12:1-12:67">Change <code>paddle.fluid.dygraph.to_variable</code> to <code>paddle.to_tensor</code>.</li>
<li data-sourcepos="13:1-13:80">Change <code>paddle.fluid.initializer.Uniform</code> to <code>paddle.nn.initializer.Uniform</code>.</li>
<li data-sourcepos="14:1-14:76">Change <code>paddle.fluid.optimizer.AdamOptimizer</code> to <code>paddle.optimizer.Adam</code>.</li>
<li data-sourcepos="15:1-15:112">
<code>with fluid.dygraph.gurad():</code> can be currently removed. PaddlePaddle is run in dynamic graph mode by default.</li>
<li data-sourcepos="16:1-16:96">After back-propagation, it is recommended to use <code>optimizer.clear_grad()</code> to clear gradients.</li>
<li data-sourcepos="17:1-18:0">PaddlePaddle now only supports global random seed, which can be set with <code>paddle.seed(seed_number)</code>.</li>
</ol>
<h2 data-sourcepos="19:1-19:31" dir="auto">
<a id="user-content-the-change-of-complex-module" class="anchor" href="#the-change-of-complex-module" aria-hidden="true"></a>The change of complex module</h2>
<p data-sourcepos="21:1-21:112" dir="auto">The complex module has been optimized in PaddlePaddle 2.0. The API of the complex module also has been changed.</p>
<ol data-sourcepos="23:1-25:51" dir="auto">
<li data-sourcepos="23:1-23:33">The real part: <code>paddle.real()</code>
</li>
<li data-sourcepos="24:1-24:38">The imaginary part: <code>paddle.imag()</code>
</li>
<li data-sourcepos="25:1-25:51">The conjugate of complex tensor: <code>paddle.conj()</code>
</li>
</ol>2021-09-30T10:10:27+08:00Quleafquantum@baidu.comhttps://gitcode.net/paddlepaddle/Quantum/-/tags/v1.2.0v1.2.0<h1 data-sourcepos="1:1-1:14" dir="auto">
<a id="user-content-release-note" class="anchor" href="#release-note" aria-hidden="true"></a>Release Note</h1>
<ul data-sourcepos="2:1-5:0" dir="auto">
<li data-sourcepos="2:1-2:139">Add a new module LOCCNet. With this module, Paddle Quantum can now efficiently simulate distributed quantum information processing tasks.</li>
<li data-sourcepos="3:1-3:60">Add 6 tutorials on QML for quantum information processing.</li>
<li data-sourcepos="4:1-5:0">Add useful functions for quantum information.</li>
</ul>
<p data-sourcepos="6:1-6:63" dir="auto">Check out more details at <a href="https://qml.baidu.com" rel="nofollow noreferrer noopener" target="_blank">our website</a>!</p>2021-09-30T10:10:30+08:00Quleafquantum@baidu.comhttps://gitcode.net/paddlepaddle/Quantum/-/tags/v1.1.1v1.1.1<h1 data-sourcepos="1:1-1:14" dir="auto">
<a id="user-content-release-note" class="anchor" href="#release-note" aria-hidden="true"></a>Release Note</h1>
<ul data-sourcepos="2:1-5:21" dir="auto">
<li data-sourcepos="2:1-2:36">English version of Paddle Quantum</li>
<li data-sourcepos="3:1-3:61">Website of Paddle Quantum is now available at qml.baidu.com</li>
<li data-sourcepos="4:1-4:26">Optimize some functions</li>
<li data-sourcepos="5:1-5:21">Support pip install</li>
</ul>2021-09-30T10:10:38+08:00Quleafquantum@baidu.comhttps://gitcode.net/paddlepaddle/Quantum/-/tags/v1.1.0v1.1.0<h1 data-sourcepos="1:1-1:14" dir="auto">
<a id="user-content-release-note" class="anchor" href="#release-note" aria-hidden="true"></a>Release Note</h1>
<ul data-sourcepos="3:1-6:32" dir="auto">
<li data-sourcepos="3:1-3:40">Add self-innovated quantum simulators.</li>
<li data-sourcepos="4:1-4:65">More templates of quantum neural networks and useful functions.</li>
<li data-sourcepos="5:1-5:24">Tutorial for GPU mode.</li>
<li data-sourcepos="6:1-6:32">Add 5 tutorials of QML models.</li>
</ul>2021-09-30T10:10:41+08:00Quleafquantum@baidu.comhttps://gitcode.net/paddlepaddle/Quantum/-/tags/v1.0.0v1.0.0<h1 data-sourcepos="1:1-1:14" dir="auto">
<a id="user-content-release-note" class="anchor" href="#release-note" aria-hidden="true"></a>Release Note</h1>
<p data-sourcepos="3:1-3:97" dir="auto">Paddle Quantum is a quantum machine learning (QML) toolkit developed based on Baidu PaddlePaddle.</p>2021-09-30T10:10:41+08:00liushusenliushusen@baidu.com