Quairkit

Latest version: v0.2.0

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

Scan your dependencies

0.2.0

Feature Rollout
- **Qudit computation**: QuAIRKit now support qudit systems in state evolution, circuit measurement, database generation and training. These covered functionals accept `num_systems` and `system_dim` as inputs.
- argument `num_systems` is aliased with `num_qubits`
- argument `system_dim` accepts both interger or a list of integers, representing the dimensions of all systems. Defaults to 2, i.e., all systems are qubits.
- **Quantum information functions**: Advanced the quairkit.qinfo module with the following changes:
- `partial_trace` & `partial_transpose`: The interfaces of these two functions are aligned with [PartialTrace](https://qetlab.com/PartialTrace) and [PartialTranspose](https://qetlab.com/PartialTranspose) in QETLAB. Moreover, these functions support qudit computations.
- `transpose_2` is now removed from quairkit.
- `partial_trace_discontiguous` remains unchanged, but only supports qubit systems.
- `is_povm` & `is_pvm`: Check whether the input set of matrices form a POVM or PVM.
- `mana_state` & `mana_channel`: Compute the mana of input state/channel.
- `stab_nullity` & `stab_renyi`: Compute the stabilizer nullity/Renyi entropy of input state
- Almost all functions in quairkit.qinfo support batched array inputs.
- **Training**: Add training net `PQCombNet` for quantum circuit architectural search, can be imported by `quairkit.ansatz.comb`.
- **State features**: Add the following properties & methods for flexible usage
- `system_dim`: User now can change the system dimensions of a `State` instance.
- `trace`, `transpose` & `permute`: same as `partial_trace`, `transpose` & `permute_systems`, except there is no need to input data or specify system dimensions.
- `sqrt` & `log`: same as `sqrtm` & `logm`

Stability Update
- **Import regulation**: Add `__init__` to all top-level modules, so that the following commands such as
python
from quairkit.database import *
from quairkit.loss import *
from quairkit.qinfo import *

would not import some unexpected variables.
- **GPU speedup**: Significantly improve GPU performances on batch computations.
- Add `quairkit.print_info` function that can print all packages and hardware information for sanity check.
- Add bug fixes and API improvements.

Tutorials
- Rewrite 4 old tutorials to improve readability.
- Add 4 new introduction tutorials, including:
- [Hamiltonian in QuAIRKit](https://github.com/QuAIR/QuAIRKit/blob/main/tutorials/introduction/Hamiltonian.ipynb)
- [Quantum gates and quantum channels](https://github.com/QuAIR/QuAIRKit/blob/main/tutorials/introduction/operator.ipynb)
- [Quantum information tools](https://github.com/QuAIR/QuAIRKit/blob/main/tutorials/introduction/qinfo.ipynb)
- [Training parameterized quantum circuits](https://github.com/QuAIR/QuAIRKit/blob/main/tutorials/introduction/training.ipynb)
- Add 2 feature tutorials, including:
- [Neural network setup customization](https://github.com/QuAIR/QuAIRKit/blob/main/tutorials/feature/custom.ipynb)
- [Introduction to qudit quantum computing](https://github.com/QuAIR/QuAIRKit/blob/main/tutorials/feature/qudit.ipynb)
---

End of Release Notes

0.1.0

QuAIRKit absorbs the features and semantics of [Paddle Quantum v2.4.0](https://github.com/PaddlePaddle/Quantum/tree/v2.4.0), while making the following improvements:

Technical Improvements

- **Backend Transition**: transitioned the computational backend from Paddle Paddle to PyTorch, improving both stability and compatibility with existing packages.

- **Modular Codebase**: refactored the codebase into five discrete modules to streamline the user experience. This modular approach facilitates easier maintenance, scalability, and collaborative development.

- **Batch Computation**: internally supported batch computation for
- quantum (noisy) circuit simulation;
- expectations and measurement

Basic broadcasting rule in QuAIRKit:
| Batched shape for operations | Batched shape for input states | Batched shape for output results |
|:----------------:|:---------------------:|:---------------------:|
| None | None | None |
| None | n | n |
| n | None | n|
| n | n | n |
|n | m | Error |

- **Pure & Mixed Auto-transition**: there is no longer needed to specify the backend `state_vector` or `density_matrix`. QuAIRKit supports implicit backend transition between pure state and mixed state simulators.

Feature Rollout

- **Random Seed Initialization**: introduced `quairkit.set_seed` to initialize a random seed across all random functionals within the platform.

- **Quantum computing data**: Expanded the quairkit.database module with the following data:

- `phase` & `shift`: phase and shift operators in quantum information.
- `universal_qudit`: a parameterized universal qudit gate, based on parameterization with respect to Gell-Mann matrices.
- `Uf` & `Of`: two quantum query models for Boolean functions.
- A collection of set-based data, including:
- `std_basis` & `qft_basis`: two quantum state bases for identity & QFT matrices, respectively.
- `bell_basis`: a two-qubit Bell basis.
- `heisenberg_weyl`: a set of Heisenberg-Weyl operators.
- `phase_space_point`: a set of phase-space point operators in discrete phase space.
- `gell_mann`: a set of Gell-Mann matrices.

- **Quantum information functions**: Expanded the quairkit.qinfo module with the following functions:

- `is_linear`: ascertains the linearity of a given function.
- `create_matrix`: constructs the matrix representation of a linear map between two vector spaces.
- `create_choi_repr`: constructs the Choi representation of a linear map between two operator spaces.
- `trace_norm` & `p_norm`: Schatten norm functions.
- `trace`: Trace of input tensor along a specified axis.
- `hessian` & `gradient`: The Hessian and general gradient of input functions.
- `decomp_1qubit` & `decomp_ctrl_1qubit`: Decomposition of (controlled) qubit-unitary operations.

Resolved Issues

- **Bug Fix**: corrected various typos and inaccuracies previously present in the database.
- **Controlled qubit-unitary**: controlled qubit-unitary operations now require parameterization from 3 to 4 parameters.

Dependencies Update
- The minimum requirement for the Python environment has been changed to Python 3.8.
- Add `pytest-xdist` for unit tests.

Tutorials

Added four tutorials for feature introductions of QuAIRKit:

- [circuit](https://github.com/QuAIR/QuAIRKit-Dev/blob/dev/tutorials/circuit.ipynb): quantum circuit & basic machine learning
- [measure](https://github.com/QuAIR/QuAIRKit-Dev/blob/dev/tutorials/measure.ipynb): quantum measurement
- [state](https://github.com/QuAIR/QuAIRKit-Dev/blob/dev/tutorials/measure.ipynb): quantum state
- [batch](https://github.com/QuAIR/QuAIRKit-Dev/blob/dev/tutorials/batch.ipynb): batch computation

---
End of Release Notes

Links

Releases

Has known vulnerabilities

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.