CUDA-Q Algorithms

Getting Started

  • Getting Started
    • What’s in the library
    • Installation
      • Building from source
    • The primitive-first philosophy
    • Where to go next

User Guide

  • Preprocessing: molecule to qubit Hamiltonian
    • Integral sources (FCIDUMP / PySCF / Psi4)
      • FCIDUMP
      • PySCF
      • Psi4
    • Fermion-to-qubit transforms (Jordan-Wigner and Bravyi-Kitaev)
    • Superfast mappings and the physical parity sector
    • The chemistry bridge (spatial integrals to a qubit Hamiltonian)
    • Classical double factorization (optional compression)
      • Convention
      • Backends (NVIDIA math libraries)
      • X-DF vs C-DF
      • RC-DF regularization
      • Inner core solve: explicit vs matrix-free
      • API
      • Feeding a compressed tensor to the transform
  • Block encodings
    • The block-encoding idea and PauliLCU
      • PREPARE, SELECT, UNPREPARE
      • The "alias" backend
    • LCUBlockEncoding: alias-sampled PREPARE, unary-iteration SELECT
    • The BlockEncoding protocol
      • Implementing the protocol
    • Sparse-access encodings
      • Matrix data versus arithmetic access
      • A sparse inverse
      • Sparse inverse application: heat diffusion
    • Bring your own encoding: the double-factorized example
      • QROM-programmed real spatial frames
    • Combining encodings
  • Coherent circuit primitives
    • Coherent table lookup with QROM
      • Lookup, use, unlookup
      • SELECT and SELECT-SWAP
      • External control
    • Modular arithmetic and comparison flags
      • Register and constant arithmetic
      • Comparison flags are XOR outputs
      • The QFT comparator temporarily shifts its operand
      • Resources and correctness
    • Alias preparation and generic LCU composition
      • What is prepared
      • Integer tables and discretization
      • Compose a non-Pauli LCU
      • Consumers and costs
  • Trotter (product-formula simulation)
    • Using the primitive
      • Product-formula orders
      • State preparation injection
      • Composing inside user kernels
      • Identity terms and the global phase
    • Simulation-only helper
  • Qubitization and QSVT
    • The qubitization walk
      • Chebyshev moments
    • QSVT and phase sequences
    • Hamiltonian simulation
    • Quantum phase estimation
    • State preparation injection
    • Hardware-shaped vs. simulation-only
    • Simulator selection
  • State preparation
    • Ansatz kernels and operator pools
    • Hartree-Fock references and fixed-parameter UCC
      • The hartree_fock_ucc_kernel factory
      • Resource estimation
    • Givens-rotation Slater determinants
      • Orbital rotations
    • State preparation injection
    • Package conventions
  • Chemistry primitives
    • Fermionic basis changes
      • Conventions
      • Fixed transformations
      • Programmable plans
      • Accuracy
      • Selecting with QROM
      • Resources
      • Selected orbital reflections and precision
      • Literature and scope

Examples

  • Getting-started walkthrough
    • Quickstart: block-encode a Hamiltonian and walk it
    • Hamiltonian simulation, two independent ways
    • From a molecule to its ground-state energy
    • Double factorization and the BlockEncoding protocol
    • State preparation and injection
    • Bring your own block encoding
    • Solve a linear system with QSVT
    • Quantum phase estimation with three energy oracles
    • Combine block encodings: Fermi-Hubbard with T in momentum space
    • Sparse matrix inversion for heat diffusion
  • Preprocessing examples
    • Fermion mappings on an interacting lattice
    • Double factorization of the two-electron integrals
    • From double-factorized integrals to LCU/QSVT cost
  • Block-encoding examples
    • Walkthrough of the PauliLCU block-encoding API
    • Sparse matrix data and arithmetic oracles
    • The double-factorized block encoding vs a flat PauliLCU
  • Circuit primitive examples
    • Coherent QROM lookup
    • Reversible modular arithmetic
    • Alias sampling and an LCU
  • State-preparation examples
    • Hartree-Fock and fixed-parameter UCCSD state preparation
    • Givens-rotation Slater determinant preparation
  • Chemistry-primitive examples
    • Fermionic basis changes with explicit QROM
  • Hamiltonian-simulation examples
    • Hamiltonian simulation with PauliLCU and QSVT
    • Suzuki-Trotter simulation of a chemistry-style Hamiltonian

Reference

  • Conventions and Reference
    • Qubit ordering: qubit 0 is least significant
    • Pauli words
    • Spin orbitals: interleaved
    • Fermionic integral tensors
    • Jordan-Wigner ladder operators
    • Block encodings
    • Sparse-access encodings
    • Qubitization walk
    • QSVT
    • Reflection gate vs reflection observable
    • Simulation targets and tolerances
    • BLAS threading and C-DF reproducibility
    • Hermiticity
  • Python API Reference
    • Block encodings
      • PauliLCU
        • PauliLCU.backend
        • PauliLCU.mu
        • PauliLCU.alpha
        • PauliLCU.kernel_args
        • PauliLCU.encode_kernel()
        • PauliLCU.walk_kernel()
        • PauliLCU.prepare_kernel()
        • PauliLCU.unprepare_kernel()
        • PauliLCU.apply_kernel()
        • PauliLCU.controlled_apply_kernel()
        • PauliLCU.walk_step_kernel()
        • PauliLCU.adjoint_walk_step_kernel()
        • PauliLCU.controlled_walk_step_kernel()
        • PauliLCU.controlled_adjoint_walk_step_kernel()
        • PauliLCU.select_observable()
      • select_observable()
      • LCUBlockEncoding
        • LCUBlockEncoding.num_ancilla
        • LCUBlockEncoding.num_index
        • LCUBlockEncoding.num_garbage
        • LCUBlockEncoding.num_select_work
        • LCUBlockEncoding.weights
        • LCUBlockEncoding.alpha
        • LCUBlockEncoding.discretized_weights
        • LCUBlockEncoding.discretization_bound
        • LCUBlockEncoding.preparation
        • LCUBlockEncoding.encode_kernel()
        • LCUBlockEncoding.walk_kernel()
        • LCUBlockEncoding.prepare_kernel()
        • LCUBlockEncoding.unprepare_kernel()
        • LCUBlockEncoding.apply_kernel()
        • LCUBlockEncoding.controlled_apply_kernel()
        • LCUBlockEncoding.walk_step_kernel()
        • LCUBlockEncoding.adjoint_walk_step_kernel()
        • LCUBlockEncoding.controlled_walk_step_kernel()
        • LCUBlockEncoding.controlled_adjoint_walk_step_kernel()
        • LCUBlockEncoding.select_observable()
      • BlockEncoding
        • BlockEncoding.num_system
        • BlockEncoding.num_ancilla
        • BlockEncoding.alpha
        • BlockEncoding.prepare_kernel()
        • BlockEncoding.unprepare_kernel()
        • BlockEncoding.apply_kernel()
        • BlockEncoding.controlled_apply_kernel()
        • BlockEncoding.walk_step_kernel()
        • BlockEncoding.adjoint_walk_step_kernel()
        • BlockEncoding.controlled_walk_step_kernel()
        • BlockEncoding.controlled_adjoint_walk_step_kernel()
        • BlockEncoding.select_observable()
      • RotatedEncoding
        • RotatedEncoding.from_orbital_rotation()
        • RotatedEncoding.num_rotations
        • RotatedEncoding.mode_signs
        • RotatedEncoding.encode_kernel()
      • SumEncoding
        • SumEncoding.num_ancilla
        • SumEncoding.num_slots
        • SumEncoding.alpha
        • SumEncoding.prepare_kernel()
        • SumEncoding.unprepare_kernel()
        • SumEncoding.apply_kernel()
        • SumEncoding.controlled_apply_kernel()
        • SumEncoding.walk_step_kernel()
        • SumEncoding.adjoint_walk_step_kernel()
        • SumEncoding.encode_kernel()
    • Sparse-access block encodings
      • encode_sparse()
      • SparseOracleEncoding
        • SparseOracleEncoding.num_ancilla
        • SparseOracleEncoding.num_block_ancilla
        • SparseOracleEncoding.num_scratch
        • SparseOracleEncoding.d
        • SparseOracleEncoding.d_padded
        • SparseOracleEncoding.h
        • SparseOracleEncoding.alpha
        • SparseOracleEncoding.encode_kernel()
        • SparseOracleEncoding.walk_kernel()
        • SparseOracleEncoding.prepare_kernel()
        • SparseOracleEncoding.unprepare_kernel()
        • SparseOracleEncoding.apply_kernel()
        • SparseOracleEncoding.controlled_apply_kernel()
        • SparseOracleEncoding.walk_step_kernel()
        • SparseOracleEncoding.adjoint_walk_step_kernel()
        • SparseOracleEncoding.controlled_walk_step_kernel()
        • SparseOracleEncoding.controlled_adjoint_walk_step_kernel()
        • SparseOracleEncoding.select_observable()
        • SparseOracleEncoding.from_general_oracles()
      • OracleKernels
        • OracleKernels.d
        • OracleKernels.h
        • OracleKernels.value_bits
        • OracleKernels.num_work
        • OracleKernels.slot_flip
        • OracleKernels.num_system
      • banded_oracles()
      • qrom_oracles()
      • quantized_angle()
    • Qubitization and QSVT
      • Walk
        • Walk.encoding
        • Walk.kernel()
        • Walk.adjoint_kernel()
        • Walk.roundtrip_kernel()
        • Walk.controlled_kernel()
        • Walk.controlled_roundtrip_kernel()
        • Walk.moment()
        • Walk.moments()
      • reflection_observable()
      • QSVT
        • QSVT.encoding
        • QSVT.kernel()
        • QSVT.controlled_kernel()
      • PhaseSequence
        • PhaseSequence.projector_phases
      • recover_real_time_evolution()
      • PhaseEstimation
        • PhaseEstimation.phase_to_energy()
        • PhaseEstimation.kernel()
        • PhaseEstimation.phase_probabilities_from_counts()
        • PhaseEstimation.energies_from_probabilities()
        • PhaseEstimation.energies_from_counts()
      • FORWARD
      • ADJOINT
    • Trotter
      • FIRST_ORDER_TROTTER
      • HamiltonianLike
      • Trotter
        • Trotter.coefficients
        • Trotter.words
        • Trotter.identity_coefficient
        • Trotter.num_qubits
        • Trotter.num_terms
        • Trotter.ordering
        • Trotter.kernel()
        • Trotter.state_kernel()
        • Trotter.resources()
      • TrotterOrdering
      • TrotterResourceEstimate
      • estimate_trotter_resources()
      • make_trotter_terms()
    • Circuit primitives
      • AliasSamplingPrepare
        • AliasSamplingPrepare.adjoint_kernel()
        • AliasSamplingPrepare.discretization_bound
        • AliasSamplingPrepare.keep
        • AliasSamplingPrepare.kernel()
        • AliasSamplingPrepare.ladder_offset
        • AliasSamplingPrepare.lam
        • AliasSamplingPrepare.num_bins
        • AliasSamplingPrepare.num_garbage
        • AliasSamplingPrepare.num_index
        • AliasSamplingPrepare.probabilities
        • AliasSamplingPrepare.qrom
        • AliasSamplingPrepare.table_probabilities
      • QROM
        • QROM.block_size
        • QROM.controlled
        • QROM.kernel
        • QROM.num_ladder
        • QROM.variant
      • UnaryIterationKernels
        • UnaryIterationKernels.controlled
        • UnaryIterationKernels.num_work
        • UnaryIterationKernels.toffoli_count
        • UnaryIterationKernels.describe()
      • unary_iteration_kernels()
      • Reversible arithmetic
        • Register conventions
        • CDKM addition and subtraction
        • CDKM comparisons
        • Fourier transforms and phase addition
        • QFT comparisons with a shifted operand
    • Preprocessing
      • from_fcidump()
      • spin_orbital_tensors()
      • qubit_hamiltonian()
      • from_pyscf()
      • from_psi4()
      • jordan_wigner()
      • bravyi_kitaev()
      • bravyi_kitaev_superfast()
      • bravyi_kitaev_superfast_stabilizers()
      • DoubleFactorization
        • DoubleFactorization.reconstruct_eri()
      • explicit_double_factorization()
      • compressed_double_factorization()
      • reconstruct_eri()
      • factorization_error()
      • modified_one_body_integrals()
      • double_factorization_one_norm()
      • cupy_gpu_available()
      • resolve_backend()
    • State preparation
      • get_uccsd_excitations()
      • get_num_uccsd_parameters()
      • get_uccgsd_pauli_lists()
      • get_upccgsd_pauli_lists()
      • get_ceo_pauli_lists()
      • get_fixed_parameter_ucc_pauli_lists()
      • make_uccsd_operator_pool()
      • make_uccgsd_operator_pool()
      • make_upccgsd_operator_pool()
      • make_ceo_operator_pool()
      • make_hartree_fock_occupation()
      • validate_hartree_fock_occupation()
      • validate_fixed_parameter_ucc()
      • estimate_hartree_fock_resources()
      • estimate_hartree_fock_occupation_resources()
      • estimate_fixed_parameter_ucc_resources()
      • hartree_fock_ucc_kernel()
      • HartreeFockResourceEstimate
      • FixedParameterUccResourceEstimate
      • GivensRotation
      • GivensRotationSchedule
      • GivensResourceEstimate
      • slater_determinant_kernel()
      • make_givens_rotation_schedule()
      • validate_givens_rotation_schedule()
      • get_givens_rotation_indices()
      • get_givens_rotation_angles()
      • get_givens_rotation_phases()
      • estimate_givens_resources()
      • OrbitalRotationSchedule
      • make_orbital_rotation_schedule()
      • orbital_rotation_program()
    • Chemistry primitives
      • Fermionic basis changes
        • AngleEncoding
        • FermionBasisChange
        • fermion_basis_change()
        • GivensStructure
        • GivensOperation
        • GivensBasisChangeSchedule
        • compile_givens_basis_change()
        • FermionBasisChangeErrorEstimate
        • FermionBasisChangeResourceEstimate
        • estimate_fermion_basis_change_error()
        • estimate_fermion_basis_change_resources()
    • Simulation utilities
      • state_from()
      • good_subspace()
      • action()
      • transform()
      • evolve()
      • run_on_large_stack()
      • phase_probabilities()
      • energies()
      • state_from()
CUDA-Q Algorithms
  • Search


© Copyright 2026, NVIDIA Corporation & Affiliates.

Built with Sphinx using a theme provided by Read the Docs.