Classiq

Latest version: v0.58.1

Safety actively analyzes 682229 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 4

0.57.0

Released on 2024-11-11.

Upgrade Instructions

- [Python SDK](../classiq_101/registration_installations.md/platform-version-updates)
- The IDE upgrades automatically.

Bug Fixes

1. Fix walkthrough bug in the IDE.
2. Change the default value of display_url in show(circuit, display_url) to True.

0.56.0

Released on 2024-10-31.

Upgrade Instructions

- [Python SDK](../classiq_101/registration_installations.md/platform-version-updates)
- The IDE upgrades automatically.

New Features

1. Add an optional `else` block to the `control` statement.

Bug Fixes

1. Fix Pauli feature map circuit visualization.
2. Add missing `len` property to `QConstant`s of type `CArray` (Qmod/Python).

0.55.0

Released on 2024-10-28.

Upgrade Instructions

- [Python SDK](../classiq_101/registration_installations.md/platform-version-updates)
- The IDE upgrades automatically.

Enhancements

1. Qmod/Python: Functions `assign`, `assign_amplitude`, `inplace_xor`, and
`inplace_add` are equivalent to the operators `|=`, `*=`, `^=`, and `+=`
respectively except that they can be used in operands (Python lambda
functions):

[comment]: DO_NOT_TEST

python
within(
lambda: assign(x, y), y |= x
lambda: inplace_xor(y, z), z ^= y
)


2. Support non-equation Boolean expressions as control conditions:

=== "SDK"

[comment]: DO_NOT_TEST

python
qfunc
def main(a: Output[QBit], b: Output[QBit], res: Output[QBit]) -> None:
allocate(1, a)
allocate(1, b)
allocate(1, res)
control(a & b, lambda: X(res))


=== "Native"


qfunc main(output a: qbit, output b: qbit, output res: qbit) {
allocate(1, a);
allocate(1, b);
allocate(1, res);
control (a & b) {
X(res);
}
}


Interface Changes

1. Parameters `value` and `target` of functions `inplace_add` and `inplace_xor`
have been renamed to `expression` and `target_var` respectively.
Parameters `value` and `target` will no longer be supported starting on
02/12/24 at the earliest.

Bug Fixes

1. Solve a within-apply bug.

0.54.0

Released on 2024-10-21.

Upgrade Instructions

- [Python SDK](../classiq_101/registration_installations.md/platform-version-updates)
- The IDE upgrades automatically.

Deprecations

1. Python 3.8 is no longer supported in the Python SDK. The minimum supported
version is now Python 3.9.

Enhancements

1. Optimize in-place XOR variable assignments (`x ^= y`).
(The implementation no longer uses auxiliary qubits.)
2. Improve error messages in `CArray` (array) parameter declaration.
3. Support array subscripts and struct field access on the left-hand side of
in-place arithmetic assignments (`qbv[0] ^= 1` and `my_Struct.field += 2.5`).
4. Optimize the controlled version of QFT arithmetic implementations by skipping
controlling the QFT and QFT dagger.

0.53.0

Released on 2024-10-14.

Upgrade Instructions

- [Python SDK](../classiq_101/registration_installations.md/platform-version-updates)
- The IDE upgrades automatically.

Enhancements

1. Introducing [generative functions](../qmod-reference/language-reference/generative-functions.md)
to the Python SDK. Generative functions are `qfunc`s that support Python
control flow, integration with third-party libraries, and debugging.
2. Execution using IBM devices is available again.
3. New method `estimation_cost` in `ExecutionSession` evaluates a quantum
circuit given a classical cost function.
4. A new `+=` operator performs
[in-place addition](../qmod-reference/language-reference/statements/numeric-assignment.md)
of quantum numerics.<br/>Example: `z += x ** 2 - 0.5 * y`
5. The state of `SampledState` supports dot-notation for field access when
representing a quantum struct:

[comment]: DO_NOT_TEST

python
struct_sample = sample.state["my_qstruct"]
field_sample = struct_sample.my_field


Library Additions

1. Add two new functions for encoding classical data, `encode_in_angle` and `encode_on_bloch`. See [notebook](../../explore/functions/qmod_library_reference/classiq_open_library/variational_data_encoding/variational_data_encoding/).

2. Add a new example for hybrid classical-quantum neural network. See [notebook](../../explore/algorithms/qml/hybrid_qnn/hybrid_qnn_for_subset_majority/).

Interface Changes

1. Parameter `control` of built-in functions such as `CX` has been renamed to
`ctrl`. Parameter `control` will no longer be supported starting on 4/11/24
at the earliest.

Bug Fixes

1. Fix classical array slicing in the SDK (`my_list[1:3][0]`).
2. Fix synthesis of arithmetic operations nested in a within-apply statement
when `machine_precision` is set.
3. Fix in-place arithmetic operations (`^=`/`+=`) when the value on the
right-hand side is a signed variable that is not aligned with the target
variable.

0.52.0

execution with older SDK versions may result in errors or unexpected behavior.
To ensure proper execution of your quantum programs via the SDK,
please upgrade to the latest version (See instructions guide above).

- The `Pydantic` package dependency has been upgraded from version 1 to version 2.
If you are using an older version of `Pydantic` in the same environment as our SDK,
this may lead to compatibility issues.
Note that installing or upgrading the SDK will also update your `Pydantic` version to V2.
It is recommended to verify compatibility across your environment.

Page 1 of 4

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.