Skip to content

Commit

Permalink
update getting-started docs
Browse files Browse the repository at this point in the history
  • Loading branch information
damarkian committed Oct 3, 2023
1 parent 6a13aa0 commit 790cedf
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 2 deletions.
24 changes: 22 additions & 2 deletions doc/source/getting-started/ansatz.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,34 @@ A quantum circuit consisting of parameterized gates RX(theta), RY(theta) and RZ(
Hardware Efficient Ansatz
-------------------------

Qibochem provides a hardware efficient ansatz that simply consists of a layer of single qubit rotation gates followed by a layer of two-qubit gates that entangle the qubits. For the H\ :sub:`2` case discussed in previous sections, a possible hardware efficient ansatz can be constructed as such:
Qibochem provides a hardware efficient ansatz that simply consists of a layer of single-qubit rotation gates followed by a layer of two-qubit gates that entangle the qubits. For the H\ :sub:`2` case discussed in previous sections, a possible hardware efficient ansatz can be constructed as such:

.. image:: qibochem_doc_ansatz_hardware-efficient.svg

Example
^^^^^^^

Placeholder for hardware-efficient ansatz example
.. code-block:: python
from qibochem.ansatz import hardware_efficient
import qibo
nlayers = 1
nqubits = 4
nfermions = 2
circuit = qibo.models.Circuit(4)
circuit.add(gates.X(_i) for _i in range(nfermions))
hardware_efficient_ansatz = hardware_efficient.hea(nlayers, nqubits)
circuit.add(hardware_efficient_ansatz)
print(circuit.draw())
.. code-block:: output
q0: ─X──RY─RZ─o─────Z─
q1: ─X──RY─RZ─Z─o───|─
q2: ─RY─RZ──────Z─o─|─
q3: ─RY─RZ────────Z─o─
Unitary Coupled Cluster Ansatz
Expand Down
2 changes: 2 additions & 0 deletions doc/source/getting-started/index.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
===============
Getting started
===============

Expand All @@ -11,4 +12,5 @@ This section covers the basics of qibochem. More details are given in the follow
molecule
hamiltonian
ansatz
..
measurement
1 change: 1 addition & 0 deletions doc/source/getting-started/installation.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
============
Installation
============

Expand Down
2 changes: 2 additions & 0 deletions doc/source/getting-started/measurement.rst
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
===========
Measurement
===========

1 change: 1 addition & 0 deletions doc/source/getting-started/molecule.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
========
Molecule
========

Expand Down

0 comments on commit 790cedf

Please sign in to comment.