Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation for basis rotation ansatz #97

Merged
merged 6 commits into from
Apr 22, 2024
Merged

Documentation for basis rotation ansatz #97

merged 6 commits into from
Apr 22, 2024

Conversation

damarkian
Copy link
Contributor

Updates to documentation for latest rewrite of basis rotation ansatz based on Clements QR decompositions of the orbital optimization unitary.

Copy link

codecov bot commented Apr 17, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (2d60cfd) to head (f65bf64).

Additional details and impacted files
@@            Coverage Diff            @@
##              main       #97   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           12        12           
  Lines          587       587           
=========================================
  Hits           587       587           
Flag Coverage Δ
unittests 100.00% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@damarkian damarkian added this to the Qibochem 0.0.3 milestone Apr 18, 2024
@damarkian damarkian marked this pull request as ready for review April 19, 2024 05:23
Copy link
Contributor

@chmwzc chmwzc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this! Just a few minor suggestions on how the code example in the docs can be simplified slightly, but I'll leave it up to you whether to change it or not👍

Comment on lines +163 to +165
from qibochem.driver.molecule import Molecule
from qibochem.ansatz import basis_rotation, ucc
from qibo import Circuit, gates, models
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
from qibochem.driver.molecule import Molecule
from qibochem.ansatz import basis_rotation, ucc
from qibo import Circuit, gates, models
from qibochem.driver import Molecule
from qibochem.ansatz import basis_rotation, hf_circuit
from qibo import models

h3p.run_pyscf(max_scf_cycles=1)

e_init = h3p.e_hf
h3p_sym_ham = h3p.hamiltonian("sym", h3p.oei, h3p.tei, 0.0, "jw")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
h3p_sym_ham = h3p.hamiltonian("sym", h3p.oei, h3p.tei, 0.0, "jw")
h3p_sym_ham = h3p.hamiltonian()

Comment on lines +178 to +180
circuit = Circuit(nqubits)
for _i in range(mol.nelec):
circuit.add(gates.X(_i))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
circuit = Circuit(nqubits)
for _i in range(mol.nelec):
circuit.add(gates.X(_i))
circuit = hf_circuit(nqubits, mol.nelec)

@damarkian damarkian merged commit 81239b2 into main Apr 22, 2024
7 checks passed
@damarkian damarkian deleted the doc_br branch April 22, 2024 08:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants