The Classiq Library is the largest collection of quantum algorithms, applications. It is the best way to explore quantum computing software. We welcome community contributions to our Library 🙌
The goal of this issue is to standardize the HHL notebook to follow a specific structure, to improve its visibility and usability.
There is a general initiative to standardize the algorithms directory, putting all notebooks in a specific template. The fixed structure of the notebook allows to deliver the main idea of the algorithm, as well as the rational of high-level modelling with Classiq. Examples can be seen in: Deutsch Jozsa, Bernstein Vazirani, and Simon algorithms notebooks.
In this issue the HHL notebook should be rewritten to have the following structure:
The title should be the name of the algorithm.
Below the title a short explanation of the algorithm, including its input, promise, and output. Include a figure of the algorithm blocks.
The sections structure is:
"How to Build the Algorithm with Classiq"
1.1. "The quantum part" (include all quantum functions)
1.2. "The classical postprocess" (include all classical post-processing functions)
"Example: exact Hamiltonian evolution"
"Example: approximated Hamiltonian evolution"
"Technical notes"
Further guidelines:
Go over the already standardized examples mentioned above, to understand the aimed structure of the notebook.
Heavy technical explanations should be moved to section 4.
Section 1.1 should include an hhl qfunc whose declaration is hhl( rhs_vector: CArray[float], precision: CInt, hamiltonian_evolution_with_power: QCallable[CInt, QArray[QBit]], res: Output[QArray[QBit]], indicator: Output[QBit]).
Section 1.2 should include a pythonic function that gets the execution results and returns the solution vector for the linear equation.
Section 2 should include defining the Hamiltonian evolution with Classiq's unitary built-in function.
Section 3 should include the decomposition of a matrix to the Pauli basis and the definition of a specific Hamiltonian evolution with Classiq's suzuki-trotter built-in function.
Make sure to generate a qmod (using the write_qmod function) for the two different examples.
Make sure the notebook looks well, does not have any typos / mistakes, and is running properly.
The goal of this issue is to standardize the HHL notebook to follow a specific structure, to improve its visibility and usability.
There is a general initiative to standardize the
algorithms
directory, putting all notebooks in a specific template. The fixed structure of the notebook allows to deliver the main idea of the algorithm, as well as the rational of high-level modelling with Classiq. Examples can be seen in: Deutsch Jozsa, Bernstein Vazirani, and Simon algorithms notebooks.In this issue the HHL notebook should be rewritten to have the following structure:
Further guidelines:
hhl
qfunc whose declaration ishhl( rhs_vector: CArray[float], precision: CInt, hamiltonian_evolution_with_power: QCallable[CInt, QArray[QBit]], res: Output[QArray[QBit]], indicator: Output[QBit])
.unitary
built-in function.suzuki-trotter
built-in function.write_qmod
function) for the two different examples.If you have any questions or comments, you can ask them here in the issue, or in our slack community, and the Classiq team will be happy to assist.
Happy quantum coding!