1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
//! A high-performance, hardware-accelerated modular quantum computing library with a focus on physical applications.
//!
//! Quant-Iron provides tools to represent quantum states, apply standard quantum gates, perform measurements, build quantum circuits, and implement quantum algorithms.
//!
//! ## Features
//! - **Quantum State Representation**: Create and manipulate predefined or custom quantum states of arbitrary qubit count.
//! - **Standard Operations**: Hadamard (H), Pauli (X, Y, Z), CNOT, SWAP, Toffoli, Phase shifts, Rotations, and custom unitary operations.
//! - **Parametric Gates**: Support for parametrised gates allowing for dynamic adjustment of gate parameters.
//! - **Hardware Acceleration**: Optimised for parallel execution (CPU and GPU) and low memory overhead, with OpenCL-accelerated operations for enhanced performance on compatible hardware. (Requires `gpu` feature flag).
//! - **Circuit Builder**: High-level interface for constructing quantum circuits with a fluent API and the `circuit!` macro with support for subroutines.
//! - **Measurement**: Collapse wavefunction in the measurement basis with single or repeated measurements in the `Computational`, `X`, `Y`, and custom bases.
//! - **Pauli String Algebra**:
//! - Represent products of Pauli operators with complex coefficients (`PauliString`).
//! - Construct sums of Pauli strings (`SumOp`) to define Hamiltonians and other observables.
//! - Apply Pauli strings and their sums to quantum states.
//! - Calculate expectation values of `SumOp` with respect to a quantum state.
//! - Apply exponentials of `PauliString` instances to states.
//! - **Predefined Quantum Models**:
//! - **Heisenberg Model**: Generate Hamiltonians for 1D and 2D anisotropic Heisenberg models using `SumOp`.
//! - **Ising Model**: Generate Hamiltonians for 1D and 2D Ising models with configurable site-specific or uniform interactions and fields using `SumOp`.
//! - **Predefined Quantum Algorithms**:
//! - **Quantum Fourier Transform (QFT)**: Efficiently compute the QFT for a given number of qubits.
//! - **Inverse Quantum Fourier Transform (IQFT)**: Efficiently compute the inverse QFT for a given number of qubits.
//! - **OpenQASM 3.0 Support**: Convert circuits to OpenQASM 3.0 for interoperability with other quantum computing platforms.
//! - **Extensibility**: Easily extensible for custom gates and measurement bases.
//! - **Error Handling**: Comprehensive error handling for invalid operations and state manipulations.
//! - **Quality of Life**: Implementation of `std` and arithmetic traits for easy, intuitive usage.
//!
//! ## Important Components
//!
//! - [Circuit](mod@circuit): Provides the `Circuit` and `CircuitBuilder` for constructing quantum circuits.
//! - [Circuit!](circuit!) - Provides a macro for easily constructing circuits.
//! - [Components](components): Contains the core components of the library:
//! - [Operator]: Contains standard quantum gates and operators like Hadamard
//! - [State]: Represents quantum states and provides methods for state manipulation.
//! - [PauliString]: Represents products of Pauli operators with complex coefficients.
//! - [SumOp]: Represents sums of Pauli strings for defining Hamiltonians and other observables.
//! - [MeasurementResult]: Represents the result of a measurement operation, including indices, basis, outcomes, and new state.
//! - [Subroutine](subroutine): Contains the `Subroutine` for defining reusable quantum subroutines.
//! - [Models](models): Contains predefined quantum models like the Heisenberg and Ising models.
//! - [Algorithms](algorithms): Contains predefined quantum algorithms like time evolution.
//!
//! Refer to the examples in the `examples` directory for practical usage of the library.
//!
//! ## Feature Flags
//! - `gpu`: Enables OpenCL support for hardware acceleration for operations on compatible hardware.
pub
// Re-export important types for easier imports
pub use crate;
pub use crate;
pub use crate;
pub use crate;
pub use crate;
pub use crateSubroutine;
pub use crate;
pub use cratetime_evolution;
pub use crate;