Skip to content

Releases: QuAIR/QuAIRKit

QuAIRKit 0.4.4 Release Note

30 Dec 07:50
54711fd

Choose a tag to compare

Feature Rollout

  • OpenQASM 2.0 import support: Circuit.from_qasm2() enables loading quantum circuits from OpenQASM 2.0 strings, supporting standard gates, measurements, and reset operations.
  • Circuit feature update:
    • Negative index support: Circuit operations now support negative indices (counting from the end).
    • Batch support for encoding layers: basis_encoding, amplitude_encoding, angle_encoding, iqp_encoding now support batch operations.
    • Batch support for QASM: QASM export and related functions now support batch processing.
    • Circuit.from_operators: reconstruct a Circuit from a saved operator list.
    • Enhanced reset functionality: reset method now accepts torch.Tensor as replace_state parameter.
  • Performance optimization: Operator acceleration and improved batch measurement execution with gradient support.

Stability Update

  • Improved numerical stability in state collapse and measurement operations.
  • Enhanced system index handling and validation in Circuit methods.
  • Refactored LOCCNet and measurement logic for better performance and reliability.
  • Improved probability dimension handling in state simulators and batch operations.
  • Expanded unit test coverage for circuit and state-related functionals.
  • Fixed tensor shape handling and cloning issues in state evolution methods.

New Tutorials


End of Release Notes

QuAIRKit 0.4.3 Release Note

01 Sep 06:37
655042d

Choose a tag to compare

Stability Update

  • Added future warnings for updated interfaces
  • Added minor bug fixes on LOCCNet and CNOT computation.

New Tutorials


End of Release Notes

QuAIRKit 0.4.1 Release Note

14 Aug 02:37
0b0b9d9

Choose a tag to compare

Feature Rollout

  • Third-party cloud integration: QuAIRKit can now set backend to third-party cloud platforms, and support measurement & expectation value with gradients.
  • Circuit feature update:
    • encoding layers: data encoding layer interfaces, including basis_encoding, amplitude_encoding, angle_encoding, iqp_encoding.
    • qasm & qasm2: export circuit to OpenQASM-like or OpenQASM 2.0 format.
    • quasi & param_quasi: interfaces for appending (parameterized) quasi-probability unitary operations.
    • Circuit.dagger: reverse the entire circuit with inverse operators.
  • LOCC functionals: new application OneWayLOCCNet, designed for simulating and searching LOCC protocols.

Stability Update

  • Improved the computation logic for Measure, Collapse and CNOT.
  • Expanded unit test coverage for LOCC and circuit-related functionals.
  • Functions in database that support qudit inputs do not have to specify num_systems.

New Tutorials


End of Release Notes

QuAIRKit 0.4.0 Release Note

28 May 07:02

Choose a tag to compare

Feature Rollout

  • Physical mapping: Circuit can now be initialized with the argument physical_idx, enabling operations such as concatenation and sorting of circuits based on their physical locations.
  • Circuit interface update:
    • Added new permutation gates: Circuit.permute (permutation gate) and Circuit.control_permute (controlled permutation gate).
    • Added new Trotter decomposition layer: Circuit.trotter, which implements Hamiltonian evolution operators via Trotter decomposition.
    • Expanded oracle functionality: Circuit.oracle and Circuit.param_oracle now accept an optional argument control_idx (default: None), allowing controlled operations at different positions. The method Circuit.control_oracle will be gradually deprecated in future releases. For example, the usage
  cir.oracle(u, [[0, 1], 2], control_idx=3)

is equivalent to applying the unitary:

$$(I - \ket{10}\bra{10}) \otimes I + \ket{10}\bra{10} \otimes U$$
  • LaTeX plot: Circuit visualization in QuAIRKit is now rendered via Quantikz, a LaTeX package for quantum circuits, replacing the previous Matplotlib implementation. Users with a local LaTeX installation (TeX Live 2024 or newer recommended) can now generate high-quality circuit diagrams & LaTeX codes directly from Circuit.plot, supporting academic visualizations including:
    • circuit presentation in different forms (adjusted by argument style)
    • channels, multi-controlled operations, SWAP and permutations.
    • measurements, post-selections and one-way LOCC operations.

Stability Update

  • Remove setup.py to fit PEP 660.
  • Simplified the computation logic of controlled gates.
  • Expanded unit test coverage to include features introduced in v0.3.0.
  • All parameterized matrix functions in database.matrix now support batch processing of parameter inputs.
  • Added detailed code examples in docstrings for functions in modules qinfo, database, loss and attributes within Circuit.
  • Add several bug fixs & improvements, including:
    • Fixed an issue preventing Circuit from containing multiple probabilistic operations.
    • Fixed incorrect handling of logarithm bases other than 2 in qinfo.von_neumann_entropy.
    • Improved numerical stability by re-implementing qinfo.sqrtm purely in PyTorch, removing dependency on SciPy..

New Tutorials


End of Release Notes

QuAIRKit 0.3.0 Release Note

16 Dec 02:00
f17bd79

Choose a tag to compare

Feature Rollout

  • Probabilistic computation: internally supported parallel (pure & mixed state) computations for probabilistic outcomes generated by measurements or quasi-sampling:
    • Circuit.collapse: renamed as Circuit.measure. When desired_result is None, calling this attribute would store all mid-circuit measurement outcomes and the corresponding probability distribution.
    • Measure: same as above.
    • Circuit.locc: add one-way LOCC (unitary) protocol to the circuit. Detailed tutorials will be released in the next version.
    • State.index_select: replaced by State.prob_select, which can be called to select the particular outcome.
  • Controlled operation: QuAIRKit now support multi-control unitaries:
    • Circuit.control_oracle: can inputs multi-control indices and customized projections.
      For example, cir.control_oracle(u, [[0, 1], 2], P) is equivalent to inserting the unitary
$$(I - P) \otimes I + P \otimes U$$
  • Quantum information functions: Advanced the quairkit.qinfo module with the following changes:
    • mutual_information: compute the mutual information of a bipartite state
    • general_state_fidelity: compute the fidelity of two subnormalized states.
    • Nkron: now supports trivial inputs, and has an alias name nkron

Stability Update

  • All matrix and channel representation functions are compatible with NumPy inputs and outputs.
  • Add code examples in docstrings of functions in database.
  • Improve the efficiency and interfaces of PQCombNet, which is now imported by quairkit.application.
  • Add bug fixes.

End of Release Notes

QuAIRKit 0.2.0 Release Note

05 Oct 14:39
b4498d9

Choose a tag to compare

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 and 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
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


End of Release Notes

QuAIRKit 0.1.0 Release Note

30 Jun 17:06

Choose a tag to compare

QuAIRKit absorbs the features and semantics of Paddle Quantum 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: quantum circuit & basic machine learning
  • measure: quantum measurement
  • state: quantum state
  • batch: batch computation

End of Release Notes