Upgrade Instructions
- [Python SDK](../classiq_101/registration_installations.md/platform-version-updates)
- The IDE upgrades automatically.
Enhancement
1. [Hardware-aware synthesis](../reference-manual/platform/synthesis/hardware-aware-synthesis.md)
will now use the Solovay-Kitaev algorithm to approximate
single-qubit gates when the basis gate set is a specific variation of
Clifford + T (`X`, `Z`, `H`, `T`, `CX`, and `CCX`).
2. `qsvt` function was added to the function library.
See [Quantum Singular Value Transformation](../explore/functions/qmod_library_reference/classiq_open_library/qsvt/qsvt.ipynb).
3. A tutorial on discrete quantum walks was added to the tutorials library.
See [Discrete Quantum Walk](../explore/tutorials/discrete_quantum_walk/discrete_quantum_walk.ipynb).
4. SDK: Quantum functions (`qfunc`) can be recursive.
5. SDK: PauliTerm can be used to declare a hamiltonian.
[comment]: DO_NOT_TEST
python
hamiltonian = [
PauliTerm(pauli=[Pauli.I], coefficient=1),
PauliTerm(pauli=[Pauli.Z, Pauli.X], coefficient=2),
]
6. Introducing **ExecutionSession** which will allow choosing the execution
primitive in the SDK
without the need of changing/synthesizing the quantum program once again.
[comment]: DO_NOT_TEST
python
model = create_model(main)
qprog = synthesize(model)
preferences = ExecutionPreferences(num_shots=1200)
execution_session = ExecutionSession(qprog, preferences)
if the quantum program does not need any execution paramters:
execution_session.sample()
if the quantum program needs execution parameters:
execution_session.sample({"phi": 1})
if multiple samples are needed:
execution_session.batch_sample([{"phi": 1}, {"phi": 2}, {"phi": 3}])
if an estimation is needed without execution parameters:
hamiltonian = [
PauliTerm(pauli=[Pauli.I], coefficient=1),
PauliTerm(pauli=[Pauli.Z], coefficient=2),
]
execution_parameters.estimate(hamiltonian)
if an estimation is needed with execution paramters:
execution_parameters.estimate(hamiltonian, {"theta": 1})
if multiple estimations are needed:
execution_parameters.batch_estimate(hamiltonian, [{"theta": 1}, {"theta": 2}])
7. A Qmod library reference, with usage examples for built-in and open library functions, can now be found in
[Qmod Library Reference](../explore/functions/qmod-library-reference/).
Interface Changes
1. SDK: In `execute_qnn`, the optional argument `observables` of type `PauliOperators`
has been replaced with the optional argument `observable` of type `PauliOperator`.
2. Documentation: The structure and content have the classiq documentation have been changed signficantly with the following new structure:
- [What's Classiq](../whats_classiq.ipynb)
- [Classiq 101](../classiq_101/index.md)
- [Explore](../explore/index.md)
- [Read](../read/index.md)
- [Practice](../practice/index.md)
- [Reference Manual](../reference-manual/index.md)
- [Release Notes](../release-notes/0-41-0.md)
The old `User Guide` chapter from the previous documentation can be found in the new [Reference Manual](../reference-manual/platform/index.md).
Deprecations
1. SDK: The `quantum_if` operation and the old `control` syntax have been
removed.
- `quantum_if` is removed. Use `control` instead.
- `control(operand, ctrl)` is no longer supported. Use
`control(ctrl, operand)` instead.
- `control(n, operand)` does not support quantum numeric variables (`n`).
Instead, use a `bind` operation to cast `n` into a quantum array, or
compare `n` to an integer explicitly (e.g., `n == 7`).
2. SDK: The `QParam` type has been removed.
- Instead of `QParam[int]`, use `CInt`.
- Instead of `QParam[float]`, use `CReal`.
- Instead of `QParam[bool]`, use `CBool`.
- Instead of `QParam[List[...]]`, use `CArray[...]`.
- Instead of `QParam[Array[..., size]]`, use `CArray[..., size]`.
3. Native Qmod: Accessing quantum variable properties (e.g., `qbv.len` or
`n.is_signed`) via function call syntax (`len(qbv)`, `is_signed(qbv)`) is no
longer supported.
4. The field `optimizer_preferences` of `ExecutionPreferences` has been removed.
5. The function `set_initial_values` has been removed.
IDE
1. "Slack" and "Learn More" links were moved from the side drawer to the IDE
header. New links were added as well: Community, User Guide.
2. Allow visualization of larger circuits and prolong the timeout for
visualization
3. Users can now download a LaTeX format of their quantum programs directly from
the IDE, allowing for easy sharing, publication, and presentation of their
work.
![plot](./resources/images/collage-circuit-latex.jpg)
4. Cookies settings are now available to adjust the given consent at any time.
Bug fixes
1. "selected example not found" error when opening the IDE
2. Resetting now clears preferences form instead of initializing from cache on
the model page
3. Naming for exported files on the Graphical Editor
4. State vector measurement results ordering
5. Parameter names in lambda expressions don't have to match the
parameter names in operand declarations:
=== "Native"
qfunc my_H(qb: qbit) {
H(qb);
}
...
apply_to_all<my_H>(qba); // used to throw an error since "qb" != "target"
=== "Python"
[comment]: DO_NOT_TEST
python
qfunc
def my_H(qb: QBit) -> None:
H(qb)
...
apply_to_all(my_H, qba) used to throw an error since "qb" != "target"