{"id":18,"date":"2023-04-14T17:12:29","date_gmt":"2023-04-14T17:12:29","guid":{"rendered":"https:\/\/torchquantum.mit.edu\/?page_id=18"},"modified":"2023-04-14T17:29:19","modified_gmt":"2023-04-14T17:29:19","slug":"home","status":"publish","type":"page","link":"https:\/\/torchquantum.mit.edu\/","title":{"rendered":"Home"},"content":{"rendered":"<h3 align=\"center\">A PyTorch Library for Quantum Simulation and Quantum Machine Learning<\/h3>\n<p align=\"center\">Faster, Scalable, Easy Debugging, Easy Deployment on Real Machine<\/p>\n<p align=\"center\"><a href=\"https:\/\/github.com\/mit-han-lab\/torchquantum\/blob\/master\/LICENSE\"><br \/>\n<img decoding=\"async\" src=\"https:\/\/img.shields.io\/github\/license\/mit-han-lab\/torchquantum\" alt=\"MIT License\" \/><\/a><a href=\"https:\/\/torchquantum.readthedocs.io\/\"><img decoding=\"async\" src=\"https:\/\/img.shields.io\/readthedocs\/torchquantum\/main\" alt=\"Documentation\" \/><\/a><a href=\"https:\/\/join.slack.com\/t\/torchquantum\/shared_invite\/zt-1ghuf283a-OtP4mCPJREd~367VX~TaQQ\"><img decoding=\"async\" src=\"https:\/\/img.shields.io\/badge\/slack-chat-2eb67d.svg?logo=slack\" alt=\"Chat @ Slack\" \/><\/a><a href=\"https:\/\/qmlsys.hanruiwang.me\"><img decoding=\"async\" src=\"https:\/\/img.shields.io\/discourse\/status?server=https%3A%2F%2Fqmlsys.hanruiwang.me%2F\" alt=\"Forum\" \/><\/a><a href=\"https:\/\/qmlsys.mit.edu\"><img decoding=\"async\" src=\"https:\/\/img.shields.io\/website?up_message=qmlsys&amp;url=https%3A%2F%2Fqmlsys.mit.edu\" alt=\"Website\" \/><\/a><a href=\"https:\/\/pypi.org\/project\/torchquantum\/\"><img decoding=\"async\" src=\"https:\/\/img.shields.io\/pypi\/v\/torchquantum\" alt=\"Pypi\" \/><br \/>\n<\/a><\/p>\n<p>&nbsp;<\/p>\n<h1 id=\"-welcome\">\ud83d\udc4b Welcome<\/h1>\n<h4 id=\"what-it-is-doing\">What it is doing<\/h4>\n<p>Quantum simulation framework based on PyTorch. It supports statevector simulation and pulse simulation (coming soon) on GPUs. It can scale up to the simulation of 30+ qubits with multiple GPUs.<\/p>\n<h4 id=\"who-will-benefit\">Who will benefit<\/h4>\n<p>Researchers on quantum algorithm design, parameterized quantum circuit training, quantum optimal control, quantum machine learning, quantum neural networks.<\/p>\n<h4 id=\"differences-from-qiskit-pennylane\">Differences from Qiskit\/Pennylane<\/h4>\n<p>Dynamic computation graph, automatic gradient computation, fast GPU support, batch model tersorized processing.<\/p>\n<h2 id=\"news\">News<\/h2>\n<ul>\n<li>v0.1.7 Available!<\/li>\n<li>Join our <a href=\"https:\/\/join.slack.com\/t\/torchquantum\/shared_invite\/zt-1ghuf283a-OtP4mCPJREd~367VX~TaQQ\">Slack<\/a> for real time support!<\/li>\n<li>Welcome to contribute! Please contact us or post in the <a href=\"https:\/\/qmlsys.hanruiwang.me\">forum<\/a> if you want to have new examples implemented by TorchQuantum or any other questions.<\/li>\n<li>Qmlsys website goes online: <a href=\"https:\/\/qmlsys.mit.edu\">qmlsys.mit.edu<\/a> and <a href=\"https:\/\/torchquantum.org\">torchquantum.org<\/a><\/li>\n<\/ul>\n<h2 id=\"features\">Features<\/h2>\n<ul>\n<li>Easy construction and simulation of quantum circuits in <strong>PyTorch<\/strong><\/li>\n<li><strong>Dynamic computation graph<\/strong> for easy debugging<\/li>\n<li><strong>Gradient support<\/strong> via autograd<\/li>\n<li><strong>Batch mode<\/strong> inference and training on <strong>CPU\/GPU<\/strong><\/li>\n<li>Easy <strong>deployment on real quantum devices<\/strong> such as IBMQ<\/li>\n<li><strong>Easy hybrid classical-quantum<\/strong> model construction<\/li>\n<li>(coming soon) <strong>pulse-level simulation<\/strong><\/li>\n<\/ul>\n<h2 id=\"installation\">Installation<\/h2>\n<pre><code class=\"lang-bash\">git <span class=\"hljs-keyword\">clone<\/span> <span class=\"hljs-title\">https<\/span>:\/\/github.com\/mit-han-lab\/torchquantum.git\r\ncd torchquantum\r\npip install --editable .\r\n<\/code><\/pre>\n<h2 id=\"basic-usage\">Basic Usage<\/h2>\n<pre><code class=\"lang-python\"><span class=\"hljs-keyword\">import<\/span> torchquantum <span class=\"hljs-keyword\">as<\/span> tq\r\n<span class=\"hljs-keyword\">import<\/span> torchquantum.functional <span class=\"hljs-keyword\">as<\/span> tqf\r\n\r\nqdev = tq.QuantumDevice(n_wires=<span class=\"hljs-number\">2<\/span>, bsz=<span class=\"hljs-number\">5<\/span>, device=<span class=\"hljs-string\">\"cpu\"<\/span>, record_op=<span class=\"hljs-keyword\">True<\/span>) <span class=\"hljs-comment\"># use device='cuda' for GPU<\/span>\r\n\r\n<span class=\"hljs-comment\"># use qdev.op<\/span>\r\nqdev.h(wires=<span class=\"hljs-number\">0<\/span>)\r\nqdev.cnot(wires=[<span class=\"hljs-number\">0<\/span>, <span class=\"hljs-number\">1<\/span>])\r\n\r\n<span class=\"hljs-comment\"># use tqf<\/span>\r\ntqf.h(qdev, wires=<span class=\"hljs-number\">1<\/span>)\r\ntqf.x(qdev, wires=<span class=\"hljs-number\">1<\/span>)\r\n\r\n<span class=\"hljs-comment\"># use tq.Operator<\/span>\r\nop = tq.RX(has_params=<span class=\"hljs-keyword\">True<\/span>, trainable=<span class=\"hljs-keyword\">True<\/span>, init_params=<span class=\"hljs-number\">0.5<\/span>)\r\nop(qdev, wires=<span class=\"hljs-number\">0<\/span>)\r\n\r\n<span class=\"hljs-comment\"># print the current state (dynamic computation graph supported)<\/span>\r\nprint(qdev)\r\n\r\n<span class=\"hljs-comment\"># obtain the qasm string<\/span>\r\n<span class=\"hljs-keyword\">from<\/span> torchquantum.plugins <span class=\"hljs-keyword\">import<\/span> op_history2qasm\r\nprint(op_history2qasm(qdev.n_wires, qdev.op_history))\r\n\r\n<span class=\"hljs-comment\"># measure the state on z basis<\/span>\r\nprint(tq.measure(qdev, n_shots=<span class=\"hljs-number\">1024<\/span>))\r\n\r\n<span class=\"hljs-comment\"># obtain the expval on a observable by stochastic sampling (doable on simulator and real quantum hardware)<\/span>\r\n<span class=\"hljs-keyword\">from<\/span> torchquantum.measurement <span class=\"hljs-keyword\">import<\/span> expval_joint_sampling\r\nexpval_sampling = expval_joint_sampling(qdev, <span class=\"hljs-string\">'ZX'<\/span>, n_shots=<span class=\"hljs-number\">1024<\/span>)\r\nprint(expval_sampling)\r\n\r\n<span class=\"hljs-comment\"># obtain the expval on a observable by analytical computation (only doable on classical simulator)<\/span>\r\n<span class=\"hljs-keyword\">from<\/span> torchquantum.measurement <span class=\"hljs-keyword\">import<\/span> expval_joint_analytical\r\nexpval = expval_joint_analytical(qdev, <span class=\"hljs-string\">'ZX'<\/span>)\r\nprint(expval)\r\n\r\n<span class=\"hljs-comment\"># obtain gradients of expval w.r.t. trainable parameters<\/span>\r\nexpval[<span class=\"hljs-number\">0<\/span>].backward()\r\nprint(op.params.grad)\r\n\r\n\r\n<span class=\"hljs-comment\"># Apply gates to qdev with tq.QuantumModule<\/span>\r\nops = [\r\n    {<span class=\"hljs-string\">'name'<\/span>: <span class=\"hljs-string\">'hadamard'<\/span>, <span class=\"hljs-string\">'wires'<\/span>: <span class=\"hljs-number\">0<\/span>}, \r\n    {<span class=\"hljs-string\">'name'<\/span>: <span class=\"hljs-string\">'cnot'<\/span>, <span class=\"hljs-string\">'wires'<\/span>: [<span class=\"hljs-number\">0<\/span>, <span class=\"hljs-number\">1<\/span>]},\r\n    {<span class=\"hljs-string\">'name'<\/span>: <span class=\"hljs-string\">'rx'<\/span>, <span class=\"hljs-string\">'wires'<\/span>: <span class=\"hljs-number\">0<\/span>, <span class=\"hljs-string\">'params'<\/span>: <span class=\"hljs-number\">0.5<\/span>, <span class=\"hljs-string\">'trainable'<\/span>: <span class=\"hljs-keyword\">True<\/span>},\r\n    {<span class=\"hljs-string\">'name'<\/span>: <span class=\"hljs-string\">'u3'<\/span>, <span class=\"hljs-string\">'wires'<\/span>: <span class=\"hljs-number\">0<\/span>, <span class=\"hljs-string\">'params'<\/span>: [<span class=\"hljs-number\">0.1<\/span>, <span class=\"hljs-number\">0.2<\/span>, <span class=\"hljs-number\">0.3<\/span>], <span class=\"hljs-string\">'trainable'<\/span>: <span class=\"hljs-keyword\">True<\/span>},\r\n    {<span class=\"hljs-string\">'name'<\/span>: <span class=\"hljs-string\">'h'<\/span>, <span class=\"hljs-string\">'wires'<\/span>: <span class=\"hljs-number\">1<\/span>, <span class=\"hljs-string\">'inverse'<\/span>: <span class=\"hljs-keyword\">True<\/span>}\r\n]\r\n\r\nqmodule = tq.QuantumModule.from_op_history(ops)\r\nqmodule(qdev)\r\n<\/code><\/pre>\n<p><!-- ## Basic Usage 2 ```python import torchquantum as tq import torchquantum.functional as tqf x = tq.QuantumDevice(n_wires=2) tqf.hadamard(x, wires=0) tqf.x(x, wires=1) tqf.cnot(x, wires=[0, 1]) # print the current state (dynamic computation graph supported) print(x.states) # obtain the classical bitstring distribution print(tq.measure(x, n_shots=2048)) ``` --><\/p>\n<h2 id=\"guide-to-the-examples\">Guide to the examples<\/h2>\n<p>We also prepare many example and tutorials using TorchQuantum.<\/p>\n<p>For <strong>beginning level<\/strong>, you may check <a href=\"examples\/simple_mnist\">QNN for MNIST<\/a>, <a href=\"examples\/quanvolution\">Quantum Convolution (Quanvolution)<\/a> and <a href=\"examples\/quantum_kernel_method\">Quantum Kernel Method<\/a>, and <a href=\"examples\/regression\">Quantum Regression<\/a>.<\/p>\n<p>For <strong>intermediate level<\/strong>, you may check <a href=\"examples\/amplitude_encoding_mnist\">Amplitude Encoding for MNIST<\/a>, <a href=\"examples\/clifford_qnn\">Clifford gate QNN<\/a>, <a href=\"examples\/save_load_example\">Save and Load QNN models<\/a>, <a href=\"examples\/PauliSumOp\">PauliSum Operation<\/a>, <a href=\"examples\/converter_tq_qiskit\">How to convert tq to Qiskit<\/a>.<\/p>\n<p>For <strong>expert<\/strong>, you may check <a href=\"examples\/param_shift_onchip_training\">Parameter Shift on-chip Training<\/a>, <a href=\"examples\/gradient_pruning\">VQA Gradient Pruning<\/a>, <a href=\"examples\/simple_vqe\">VQE<\/a>, <a href=\"examples\/train_state_prep\">VQA for State Prepration<\/a>, <a href=\"examples\/qaoa\">QAOA (Quantum Approximate Optimization Algorithm)<\/a>.<\/p>\n<h2 id=\"usage\">Usage<\/h2>\n<p>Construct parameterized quantum circuit models as simple as constructing a normal pytorch model.<\/p>\n<pre><code class=\"lang-python\"><span class=\"hljs-keyword\">import<\/span> torch.nn <span class=\"hljs-keyword\">as<\/span> nn\r\n<span class=\"hljs-keyword\">import<\/span> torch.nn.functional <span class=\"hljs-keyword\">as<\/span> F\r\n<span class=\"hljs-keyword\">import<\/span> torchquantum <span class=\"hljs-keyword\">as<\/span> tq\r\n<span class=\"hljs-keyword\">import<\/span> torchquantum.functional <span class=\"hljs-keyword\">as<\/span> tqf\r\n<span class=\"hljs-class\">\r\n<span class=\"hljs-keyword\">class<\/span> <span class=\"hljs-type\">QFCModel<\/span>(<span class=\"hljs-title\">nn<\/span>.<span class=\"hljs-type\">Module<\/span>):\r\n  def __init__(<span class=\"hljs-title\">self<\/span>):\r\n    super().__init__()\r\n    self.n_wires = 4\r\n    self.measure = tq.<span class=\"hljs-type\">MeasureAll<\/span>(<span class=\"hljs-title\">tq<\/span>.<span class=\"hljs-type\">PauliZ<\/span>)\r\n\r\n    self.encoder_gates = [tqf.rx] * 4 + [tqf.ry] * 4 + \\\r\n                         [tqf.rz] * 4 + [tqf.rx] * 4\r\n    self.rx0 = tq.<span class=\"hljs-type\">RX<\/span>(<span class=\"hljs-title\">has_params<\/span>=<span class=\"hljs-type\">True<\/span>, <span class=\"hljs-title\">trainable<\/span>=<span class=\"hljs-type\">True<\/span>)\r\n    self.ry0 = tq.<span class=\"hljs-type\">RY<\/span>(<span class=\"hljs-title\">has_params<\/span>=<span class=\"hljs-type\">True<\/span>, <span class=\"hljs-title\">trainable<\/span>=<span class=\"hljs-type\">True<\/span>)\r\n    self.rz0 = tq.<span class=\"hljs-type\">RZ<\/span>(<span class=\"hljs-title\">has_params<\/span>=<span class=\"hljs-type\">True<\/span>, <span class=\"hljs-title\">trainable<\/span>=<span class=\"hljs-type\">True<\/span>)\r\n    self.crx0 = tq.<span class=\"hljs-type\">CRX<\/span>(<span class=\"hljs-title\">has_params<\/span>=<span class=\"hljs-type\">True<\/span>, <span class=\"hljs-title\">trainable<\/span>=<span class=\"hljs-type\">True<\/span>)\r\n\r\n  def forward(<span class=\"hljs-title\">self<\/span>, <span class=\"hljs-title\">x<\/span>):\r\n    bsz = x.shape[0]\r\n    # down-sample the image\r\n    x = <span class=\"hljs-type\">F<\/span>.avg_pool2d(<span class=\"hljs-title\">x<\/span>, 6).view(<span class=\"hljs-title\">bsz<\/span>, 16)\r\n\r\n    # create a quantum device to run the gates\r\n    qdev = tq.<span class=\"hljs-type\">QuantumDevice<\/span>(<span class=\"hljs-title\">n_wires<\/span>=<span class=\"hljs-title\">self<\/span>.<span class=\"hljs-title\">n_wires<\/span>, <span class=\"hljs-title\">bsz<\/span>=<span class=\"hljs-title\">bsz<\/span>, <span class=\"hljs-title\">device<\/span>=<span class=\"hljs-title\">x<\/span>.<span class=\"hljs-title\">device<\/span>)\r\n\r\n    # encode the classical image to quantum domain\r\n    for k, gate in enumerate(<span class=\"hljs-title\">self<\/span>.<span class=\"hljs-title\">encoder_gates<\/span>):\r\n      gate(<span class=\"hljs-title\">qdev<\/span>, <span class=\"hljs-title\">wires<\/span>=<span class=\"hljs-title\">k<\/span> % <span class=\"hljs-title\">self<\/span>.<span class=\"hljs-title\">n_wires<\/span>, <span class=\"hljs-title\">params<\/span>=<span class=\"hljs-title\">x<\/span>[:, <span class=\"hljs-title\">k<\/span>])\r\n\r\n    # add some trainable gates (<span class=\"hljs-title\">need<\/span> <span class=\"hljs-title\">to<\/span> <span class=\"hljs-title\">instantiate<\/span> <span class=\"hljs-title\">ahead<\/span> <span class=\"hljs-title\">of<\/span> <span class=\"hljs-title\">time<\/span>)\r\n    self.rx0(<span class=\"hljs-title\">qdev<\/span>, <span class=\"hljs-title\">wires<\/span>=0)\r\n    self.ry0(<span class=\"hljs-title\">qdev<\/span>, <span class=\"hljs-title\">wires<\/span>=1)\r\n    self.rz0(<span class=\"hljs-title\">qdev<\/span>, <span class=\"hljs-title\">wires<\/span>=3)\r\n    self.crx0(<span class=\"hljs-title\">qdev<\/span>, <span class=\"hljs-title\">wires<\/span>=[0, 2])\r\n\r\n    # add some more non-parameterized gates (<span class=\"hljs-title\">add<\/span> <span class=\"hljs-title\">on<\/span>-<span class=\"hljs-title\">the<\/span>-<span class=\"hljs-title\">fly<\/span>)\r\n    qdev.h(<span class=\"hljs-title\">wires<\/span>=3)\r\n    qdev.sx(<span class=\"hljs-title\">wires<\/span>=2)\r\n    qdev.cnot(<span class=\"hljs-title\">wires<\/span>=[3, 0])\r\n    qdev.qubitunitary(<span class=\"hljs-title\">wires<\/span>=[1, 2], <span class=\"hljs-title\">params<\/span>=[[1, 0, 0, 0],\r\n                                            [0, 1, 0, 0],\r\n                                            [0, 0, 0, 1<span class=\"hljs-title\">j<\/span>],\r\n                                            [0, 0, -1<span class=\"hljs-title\">j<\/span>, 0]])\r\n\r\n    # perform measurement to get expectations (<span class=\"hljs-title\">back<\/span> <span class=\"hljs-title\">to<\/span> <span class=\"hljs-title\">classical<\/span> <span class=\"hljs-title\">domain<\/span>)\r\n    x = self.measure(<span class=\"hljs-title\">qdev<\/span>).reshape(<span class=\"hljs-title\">bsz<\/span>, 2, 2)\r\n\r\n    # classification\r\n    x = x.sum(-1).squeeze()\r\n    x = <span class=\"hljs-type\">F<\/span>.log_softmax(<span class=\"hljs-title\">x<\/span>, <span class=\"hljs-title\">dim<\/span>=1)\r\n\r\n    return x<\/span>\r\n<\/code><\/pre>\n<h2 id=\"vqe-example\">VQE Example<\/h2>\n<p>Train a quantum circuit to perform VQE task.<br \/>\nQuito quantum computer as in <a href=\".\/examples\/simple_vqe\/simple_vqe.py\">simple_vqe.py<\/a><br \/>\nscript:<\/p>\n<pre><code class=\"lang-python\"><span class=\"hljs-keyword\">cd<\/span> examples\/simple_vqe\r\n<span class=\"hljs-keyword\">python<\/span> simple_vqe.<span class=\"hljs-keyword\">py<\/span>\r\n<\/code><\/pre>\n<h2 id=\"mnist-example\">MNIST Example<\/h2>\n<p>Train a quantum circuit to perform MNIST classification task and deploy on the real IBM<br \/>\nQuito quantum computer as in <a href=\".\/examples\/simple_mnist\/mnist_example_no_binding.py\">mnist_example.py<\/a><br \/>\nscript:<\/p>\n<pre><code class=\"lang-python\"><span class=\"hljs-keyword\">cd<\/span> examples\/simple_mnist\r\n<span class=\"hljs-keyword\">python<\/span> mnist_example.<span class=\"hljs-keyword\">py<\/span>\r\n<\/code><\/pre>\n<h2 id=\"files\">Files<\/h2>\n<table>\n<thead>\n<tr>\n<th>File<\/th>\n<th>Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>devices.py<\/td>\n<td>QuantumDevice class which stores the statevector<\/td>\n<\/tr>\n<tr>\n<td>encoding.py<\/td>\n<td>Encoding layers to encode classical values to quantum domain<\/td>\n<\/tr>\n<tr>\n<td>functional.py<\/td>\n<td>Quantum gate functions<\/td>\n<\/tr>\n<tr>\n<td>operators.py<\/td>\n<td>Quantum gate classes<\/td>\n<\/tr>\n<tr>\n<td>layers.py<\/td>\n<td>Layer templates such as RandomLayer<\/td>\n<\/tr>\n<tr>\n<td>measure.py<\/td>\n<td>Measurement of quantum states to get classical values<\/td>\n<\/tr>\n<tr>\n<td>graph.py<\/td>\n<td>Quantum gate graph used in static mode<\/td>\n<\/tr>\n<tr>\n<td>super_layer.py<\/td>\n<td>Layer templates for SuperCircuits<\/td>\n<\/tr>\n<tr>\n<td>plugins\/qiskit*<\/td>\n<td>Convertors and processors for easy deployment on IBMQ<\/td>\n<\/tr>\n<tr>\n<td>examples\/<\/td>\n<td>More examples for training QML and VQE models<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2 id=\"coding-style\">Coding Style<\/h2>\n<p>torchquantum uses pre-commit hooks to ensure Python style consistency and prevent common mistakes in its codebase.<\/p>\n<p>To enable it pre-commit hooks please reproduce:<\/p>\n<pre><code class=\"lang-bash\">pip <span class=\"hljs-keyword\">install<\/span> pre-<span class=\"hljs-keyword\">commit<\/span>\r\npre-<span class=\"hljs-keyword\">commit<\/span> <span class=\"hljs-keyword\">install<\/span>\r\n<\/code><\/pre>\n<h2 id=\"papers-using-torchquantum\">Papers using TorchQuantum<\/h2>\n<ul>\n<li>[HPCA&#8217;22] <a href=\"https:\/\/arxiv.org\/abs\/2107.10845\">Wang et al., &#8220;QuantumNAS: Noise-Adaptive Search for Robust Quantum Circuits&#8221;<\/a><\/li>\n<li>[DAC&#8217;22] <a href=\"https:\/\/arxiv.org\/abs\/2110.11331\">Wang et al., &#8220;QuantumNAT: Quantum Noise-Aware Training with Noise Injection, Quantization and Normalization&#8221;<\/a><\/li>\n<li>[DAC&#8217;22] <a href=\"https:\/\/arxiv.org\/abs\/2202.13239\">Wang et al., &#8220;QOC: Quantum On-Chip Training with Parameter Shift and Gradient Pruning&#8221;<\/a><\/li>\n<li>[QCE&#8217;22] <a href=\"https:\/\/arxiv.org\/abs\/2203.17267\">Liang et al., &#8220;Variational Quantum Pulse Learning&#8221;<\/a><\/li>\n<li>[ICCAD&#8217;22] <a href=\"https:\/\/arxiv.org\/abs\/2207.01578\">Hu et al., &#8220;Quantum Neural Network Compression&#8221;<\/a><\/li>\n<li>[ICCAD&#8217;22] <a href=\"https:\/\/arxiv.org\/abs\/2210.16724\">Wang et al., &#8220;QuEst: Graph Transformer for Quantum Circuit Reliability Estimation&#8221;<\/a><\/li>\n<li>[ICML Workshop] <a href=\"https:\/\/dynn-icml2022.github.io\/spapers\/paper_7.pdf\">Yun et al., &#8220;Slimmable Quantum Federated Learning&#8221;<\/a><\/li>\n<li>[IEEE ICDCS] <a href=\"https:\/\/ieeexplore.ieee.org\/document\/9912289\">Yun et al., &#8220;Quantum Multi-Agent Reinforcement Learning via Variational Quantum Circuit Design&#8221;<\/a><br \/>\n<details>\n<summary>Manuscripts<\/summary>\n<h2 id=\"manuscripts\">Manuscripts<\/h2>\n<ul>\n<li><a href=\"https:\/\/arxiv.org\/abs\/2210.16731\">Yun et al., &#8220;Projection Valued Measure-based Quantum Machine Learning for Multi-Class Classification&#8221;<\/a><\/li>\n<li><a href=\"https:\/\/arxiv.org\/abs\/2210.09728\">Baek et al., &#8220;3D Scalable Quantum Convolutional Neural Networks for Point Cloud Data Processing in Classification Applications&#8221;<\/a><\/li>\n<li><a href=\"https:\/\/arxiv.org\/abs\/2209.12372\">Baek et al., &#8220;Scalable Quantum Convolutional Neural Networks&#8221;<\/a><\/li>\n<li><a href=\"https:\/\/arxiv.org\/abs\/2208.11510\">Yun et al., &#8220;Quantum Multi-Agent Meta Reinforcement Learning&#8221;<\/a><\/li>\n<\/ul>\n<\/details>\n<\/li>\n<\/ul>\n<h2 id=\"dependencies\">Dependencies<\/h2>\n<ul>\n<li>3.9 &gt;= Python &gt;= 3.7 (Python 3.10 may have the <code>concurrent<\/code> package issue for Qiskit)<\/li>\n<li>PyTorch &gt;= 1.8.0<\/li>\n<li>configargparse &gt;= 0.14<\/li>\n<li>GPU model training requires NVIDIA GPUs<\/li>\n<\/ul>\n<h2 id=\"contact\">Contact<\/h2>\n<p>TorchQuantum <a href=\"https:\/\/qmlsys.hanruiwang.me\">Forum<\/a><\/p>\n<p>Hanrui Wang <a href=\"mailto:hanrui@mit.edu\">hanrui@mit.edu<\/a><\/p>\n<h2 id=\"contributors\">Contributors<\/h2>\n<p>Jiannan Cao, Jessica Ding, Jiai Gu, Song Han, Zhirui Hu, Zirui Li, Zhiding Liang, Pengyu Liu, Yilian Liu, Mohammadreza Tavasoli, Hanrui Wang, Zhepeng Wang, Zhuoyang Ye<\/p>\n<h2 id=\"citation\">Citation<\/h2>\n<pre><code>@inproceedings{hanruiwang2022quantumnas,\r\n    title     = {Quantumna<span class=\"hljs-variable\">s:<\/span> Noise-adaptive <span class=\"hljs-built_in\">search<\/span> <span class=\"hljs-keyword\">for<\/span> robust quantum circuits},\r\n    author    = {Wang, Hanrui <span class=\"hljs-built_in\">and<\/span> Ding, Yongshan <span class=\"hljs-built_in\">and<\/span> Gu, Jiaqi <span class=\"hljs-built_in\">and<\/span> Li, Zirui <span class=\"hljs-built_in\">and<\/span> Lin, Yujun <span class=\"hljs-built_in\">and<\/span> Pan, David Z <span class=\"hljs-built_in\">and<\/span> Chong, Frederic T <span class=\"hljs-built_in\">and<\/span> Han, Song},\r\n    booktitle = {The <span class=\"hljs-number\">28<\/span><span class=\"hljs-keyword\">th<\/span> IEEE International Symposium <span class=\"hljs-keyword\">on<\/span> High-Performance Computer Architecture (HPCA-<span class=\"hljs-number\">28<\/span>)},\r\n    year      = {<span class=\"hljs-number\">2022<\/span>}\r\n}\r\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>A PyTorch Library for Quantum Simulation and Quantum Machine Learning Faster, Scalable, Easy Debugging, Easy Deployment on Real Machine &nbsp; \ud83d\udc4b Welcome What it is doing Quantum simulation framework based on PyTorch. It supports statevector simulation and pulse simulation (coming soon) on GPUs. It can scale up to the simulation of 30+ qubits with multiple [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-18","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/torchquantum.mit.edu\/index.php\/wp-json\/wp\/v2\/pages\/18","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/torchquantum.mit.edu\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/torchquantum.mit.edu\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/torchquantum.mit.edu\/index.php\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/torchquantum.mit.edu\/index.php\/wp-json\/wp\/v2\/comments?post=18"}],"version-history":[{"count":6,"href":"https:\/\/torchquantum.mit.edu\/index.php\/wp-json\/wp\/v2\/pages\/18\/revisions"}],"predecessor-version":[{"id":33,"href":"https:\/\/torchquantum.mit.edu\/index.php\/wp-json\/wp\/v2\/pages\/18\/revisions\/33"}],"wp:attachment":[{"href":"https:\/\/torchquantum.mit.edu\/index.php\/wp-json\/wp\/v2\/media?parent=18"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}