-
Notifications
You must be signed in to change notification settings - Fork 2
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
Conversation
for more information, see https://pre-commit.ci
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #97 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 12 12
Lines 587 587
=========================================
Hits 587 587
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
There was a problem hiding this 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👍
from qibochem.driver.molecule import Molecule | ||
from qibochem.ansatz import basis_rotation, ucc | ||
from qibo import Circuit, gates, models |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
h3p_sym_ham = h3p.hamiltonian("sym", h3p.oei, h3p.tei, 0.0, "jw") | |
h3p_sym_ham = h3p.hamiltonian() |
circuit = Circuit(nqubits) | ||
for _i in range(mol.nelec): | ||
circuit.add(gates.X(_i)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
circuit = Circuit(nqubits) | |
for _i in range(mol.nelec): | |
circuit.add(gates.X(_i)) | |
circuit = hf_circuit(nqubits, mol.nelec) |
Updates to documentation for latest rewrite of basis rotation ansatz based on Clements QR decompositions of the orbital optimization unitary.