Overview¶
The Pennylane Lightning C++ API is intended to be called from Python through Nanobind. Direct use of the C++ API is currently unsupported and is provided for reference only.
Page Hierarchy¶
Full API¶
Namespaces¶
Classes and Structs¶
- Template Struct ApplyCRX
- Struct Documentation
Pennylane::LightningQubit::Gates::AVXCommon::ApplyCRXPrecisionPrecisionAVXConceptapplyInternalInternalPermutation()applyInternalInternalOffDiagFactor()applyInternalInternalDiagFactor()applyInternalInternal()applyInternalExternalDiagFactor()applyInternalExternalOffDiagFactor()applyInternalExternal()applyExternalInternalOffDiagPerm()applyExternalInternal()applyExternalExternal()packed_size_symmetric
- Struct Documentation
- Template Struct ApplyCRY
- Struct Documentation
Pennylane::LightningQubit::Gates::AVXCommon::ApplyCRYPrecisionPrecisionAVXConceptapplyInternalInternalPermutation()applyInternalInternalOffDiagFactor()applyInternalInternalDiagFactor()applyInternalInternal()applyInternalExternalDiagFactor()applyInternalExternalOffDiagFactor()applyInternalExternal()applyExternalInternalOffDiagFactor()applyExternalInternal()applyExternalExternal()packed_size_symmetric
- Struct Documentation
- Template Struct ApplyCRZ
- Struct Documentation
Pennylane::LightningQubit::Gates::AVXCommon::ApplyCRZPrecisionPrecisionAVXConceptapplyInternalImagPermutation()applyInternalInternalRealFactor()applyInternalInternalImagFactor()applyInternalInternal()applyInternalExternalRealFactor()applyInternalExternalImagFactor()applyInternalExternal()applyExternalInternalRealFactor()applyExternalInternalImagFactor()applyExternalInternal()applyExternalExternal()packed_size_symmetric
- Struct Documentation
- Template Struct ApplyCY
- Struct Documentation
Pennylane::LightningQubit::Gates::AVXCommon::ApplyCYPrecisionPrecisionAVXConceptapplyInternalInternalPermuation()applyInternalInternalFactor()applyInternalInternal()applyInternalExternalMask()applyInternalExternalPermutation()applyInternalExternalSign_target0()applyInternalExternalSign_target1()applyInternalExternal()applyExternalInternalSign()applyExternalInternal()applyExternalExternal()packed_size_symmetric
- Struct Documentation
- Class LightningGPUSimulator
- Inheritance Relationships
- Class Documentation
Catalyst::Runtime::Simulator::LightningGPUSimulatorLightningGPUSimulator()~LightningGPUSimulator()LightningGPUSimulator()operator=()LightningGPUSimulator()operator=()AllocateQubit()AllocateQubits()ReleaseQubit()ReleaseQubits()GetNumQubits()StartTapeRecording()StopTapeRecording()SetDeviceShots()SetDevicePRNG()SetState()SetBasisState()GetDeviceShots()NamedOperation()MatrixOperation()Observable()TensorObservable()HamiltonianObservable()Expval()Var()State()Probs()PartialProbs()Sample()PartialSample()Counts()PartialCounts()Measure()Gradient()CacheManagerInfo()
- Class LightningKokkosSimulator
- Inheritance Relationships
- Class Documentation
Catalyst::Runtime::Simulator::LightningKokkosSimulatorLightningKokkosSimulator()~LightningKokkosSimulator()LightningKokkosSimulator()operator=()LightningKokkosSimulator()operator=()AllocateQubit()AllocateQubits()ReleaseQubit()ReleaseQubits()GetNumQubits()StartTapeRecording()StopTapeRecording()SetDeviceShots()SetDevicePRNG()SetState()SetBasisState()GetDeviceShots()NamedOperation()MatrixOperation()Observable()TensorObservable()HamiltonianObservable()Expval()Var()State()Probs()PartialProbs()Sample()PartialSample()Counts()PartialCounts()Measure()Gradient()CacheManagerInfo()
- Class LightningSimulator
- Inheritance Relationships
- Class Documentation
Catalyst::Runtime::Simulator::LightningSimulatorLightningSimulator()~LightningSimulator()LightningSimulator()operator=()LightningSimulator()operator=()AllocateQubit()AllocateQubits()ReleaseQubit()ReleaseQubits()GetNumQubits()StartTapeRecording()StopTapeRecording()SetDeviceShots()SetDevicePRNG()SetState()SetBasisState()GetDeviceShots()NamedOperation()MatrixOperation()Observable()TensorObservable()HamiltonianObservable()Expval()Var()State()Probs()PartialProbs()Sample()PartialSample()Counts()PartialCounts()Measure()Gradient()CacheManagerInfo()
- Template Class DataBuffer
- Class Documentation
Pennylane::LightningGPU::DataBuffertypeDataBuffer()DataBuffer()DataBuffer()DataBuffer()operator=()operator=()~DataBuffer()zeroInit()getData()getData()getLength()getStream()getDevice()getDevTag()CopyGpuDataToGpu()CopyGpuDataToGpu()CopyHostDataToGpu()CopyHostDataToGpu()CopyHostDataToGpuWithStride()CopyGpuDataToHost()
- Class Documentation
- Template Class StateVectorCudaBase
- Inheritance Relationships
- Class Documentation
Pennylane::LightningGPU::StateVectorCudaBasescalar_type_tCFP_tgetData()getData()getStream()getStream()setStream()CopyHostDataToGpu()CopyGpuDataToGpuIn()CopyGpuDataToGpuIn()CopyHostDataToGpu()CopyGpuDataToHost()CopyGpuDataToGpuOut()getDataBuffer()getDataBuffer()updateData()updateData()updateData()ParFuncFMapStateVectorCudaBase()StateVectorCudaBase()StateVectorCudaBase()StateVectorCudaBase()StateVectorCudaBase()~StateVectorCudaBase()getCtrlMap()getParametricGatesMap()
- Template Class StateVectorCudaManaged
- Inheritance Relationships
- Class Documentation
Pennylane::LightningGPU::StateVectorCudaManagedPrecisionTComplexTCFP_tMemoryStorageTStateVectorCudaManaged()StateVectorCudaManaged()StateVectorCudaManaged()StateVectorCudaManaged()StateVectorCudaManaged()StateVectorCudaManaged()StateVectorCudaManaged()StateVectorCudaManaged()~StateVectorCudaManaged()resetStateVector()setBasisState()setStateVector()applyOperation()applyOperation()applyOperation()applyOperation()applyOperation()applyControlledMatrix()applyGenerator()applyControlledGenerator()applyGenerator()applyMatrix()applyMatrix()collapse()applyIdentity()applyPauliX()applyPauliY()applyPauliZ()applyHadamard()applyS()applySX()applyT()applyRX()applyRY()applyRZ()applyRot()applyRot()applyPhaseShift()applyCNOT()applyCY()applyCZ()applySWAP()applyIsingXX()applyIsingYY()applyIsingZZ()applyIsingXY()applyCRot()applyCRot()applyCRX()applyCRY()applyCRZ()applyControlledPhaseShift()applySingleExcitation()applySingleExcitationMinus()applySingleExcitationPlus()applyPSWAP()applyToffoli()applyCSWAP()applyDoubleExcitation()applyDoubleExcitationMinus()applyDoubleExcitationPlus()applyMultiRZ()applyGeneratorGlobalPhase()applyGeneratorRX()applyGeneratorRY()applyGeneratorRZ()applyGeneratorIsingXX()applyGeneratorIsingYY()applyGeneratorIsingZZ()applyGeneratorIsingXY()applyGeneratorPhaseShift()applyGeneratorCRX()applyGeneratorCRY()applyGeneratorCRZ()applyGeneratorControlledPhaseShift()applyGeneratorSingleExcitation()applyGeneratorSingleExcitationMinus()applyGeneratorSingleExcitationPlus()applyGeneratorDoubleExcitation()applyGeneratorDoubleExcitationMinus()applyGeneratorDoubleExcitationPlus()applyGeneratorMultiRZ()applyGeneratorPSWAP()applyControlledGeneratorRX()applyControlledGeneratorRY()applyControlledGeneratorRZ()applyControlledGeneratorIsingXX()applyControlledGeneratorIsingXY()applyControlledGeneratorIsingYY()applyControlledGeneratorIsingZZ()applyControlledGeneratorSingleExcitation()applyControlledGeneratorSingleExcitationMinus()applyControlledGeneratorSingleExcitationPlus()applyControlledGeneratorDoubleExcitation()applyControlledGeneratorDoubleExcitationMinus()applyControlledGeneratorDoubleExcitationPlus()applyControlledGeneratorPhaseShift()applyControlledGeneratorGlobalPhase()applyControlledGeneratorPSWAP()applyControlledGeneratorMultiRZ()getCublasCaller()getCusparseHandle()getCusvHandle()getDataVector()
- Template Class StateVectorCudaMPI
- Inheritance Relationships
- Class Documentation
Pennylane::LightningGPU::StateVectorCudaMPICFP_tPrecisionTComplexTMemoryStorageTStateVectorCudaMPI()StateVectorCudaMPI()StateVectorCudaMPI()StateVectorCudaMPI()StateVectorCudaMPI()StateVectorCudaMPI()StateVectorCudaMPI()~StateVectorCudaMPI()getMPIManager()getTotalNumQubits()getNumGlobalQubits()getNumLocalQubits()getSwapWorker()resetStateVector()setBasisState()setStateVector()applyOperation()applyOperation()applyOperation()applyGenerator()applyMatrix()applyMatrix()applyIdentity()applyPauliX()applyPauliY()applyPauliZ()applyHadamard()applyS()applySX()applyT()applyRX()applyRY()applyRZ()applyRot()applyRot()applyPhaseShift()applyCNOT()applyCY()applyCZ()applySWAP()applyIsingXX()applyIsingYY()applyIsingZZ()applyIsingXY()applyCRot()applyCRot()applyCRX()applyCRY()applyCRZ()applyControlledPhaseShift()applySingleExcitation()applySingleExcitationMinus()applySingleExcitationPlus()applyPSWAP()applyToffoli()applyCSWAP()applyDoubleExcitation()applyDoubleExcitationMinus()applyDoubleExcitationPlus()applyMultiRZ()applyGeneratorRX()applyGeneratorRY()applyGeneratorRZ()applyGeneratorIsingXX()applyGeneratorIsingYY()applyGeneratorIsingZZ()applyGeneratorIsingXY()applyGeneratorPSWAP()applyGeneratorPhaseShift()applyGeneratorCRX()applyGeneratorCRY()applyGeneratorCRZ()applyGeneratorControlledPhaseShift()applyGeneratorSingleExcitation()applyGeneratorSingleExcitationMinus()applyGeneratorSingleExcitationPlus()applyGeneratorDoubleExcitation()applyGeneratorDoubleExcitationMinus()applyGeneratorDoubleExcitationPlus()applyGeneratorMultiRZ()getCublasCaller()getCusparseHandle()getCusvHandle()getDataVector()expval()expval()getExpectationValuePauliWords()
- Template Class getProbsNQubitOpFunctor
- Class Documentation
Pennylane::LightningKokkos::Functors::getProbsNQubitOpFunctorexecution_spacevalue_typeUnmanagedSizeTHostViewComplexTKokkosComplexVectorgetProbsNQubitOpFunctor()value_countarrn_wiresparityrev_wiresrev_wire_0rev_wire_1rev_wire_2rev_wire_3rev_wire_4rev_wire_5rev_wire_6rev_wire_7rev_wire_8parity_0parity_1parity_2parity_3parity_4parity_5parity_6parity_7parity_8parity_9
- Class Documentation
- Template Class StateVectorKokkos
- Inheritance Relationships
- Class Documentation
Pennylane::LightningKokkos::StateVectorKokkosPrecisionTComplexTCFP_tDoubleLoopRankHostExecSpaceKokkosExecSpaceKokkosVectorKokkosSizeTVectorUnmanagedComplexHostViewUnmanagedSizeTHostViewUnmanagedConstComplexHostViewUnmanagedConstSizeTHostViewUnmanagedPrecisionHostViewScratchViewComplexScratchViewSizeTTeamPolicyMemoryStorageTStateVectorKokkos()StateVectorKokkos()initZeros()setBasisState()setBasisState()resetStateVector()setStateVector()setStateVector()setStateVector()StateVectorKokkos()StateVectorKokkos()StateVectorKokkos()StateVectorKokkos()StateVectorKokkos()StateVectorKokkos()~StateVectorKokkos()applyOperation()applyPauliRot()applyMultiQubitOp()applyOperation()applyNCMultiQubitOp()applyMatrix()applyMatrix()applyMatrix()applyControlledMatrix()applyControlledMatrix()applyControlledMatrix()applyGenerator()applyControlledGenerator()applyGenerator()collapse()normalize()updateData()updateData()updateData()updateData()getData()getData()getView()getView()getDataVector()getDataVector()HostToDevice()DeviceToHost()DeviceToDevice()
- Template Class StateVectorKokkosMPI
- Inheritance Relationships
- Class Documentation
Pennylane::LightningKokkos::StateVectorKokkosMPIPrecisionTSVKComplexTCFP_tKokkosVectorUnmanagedComplexHostViewUnmanagedConstComplexHostViewKokkosSizeTVectorUnmanagedSizeTHostViewUnmanagedConstSizeTHostViewUnmanagedPrecisionHostViewKokkosExecSpaceHostExecSpaceBaseTypeStateVectorKokkosMPI()StateVectorKokkosMPI()StateVectorKokkosMPI()StateVectorKokkosMPI()StateVectorKokkosMPI()StateVectorKokkosMPI()StateVectorKokkosMPI()StateVectorKokkosMPI()StateVectorKokkosMPI()StateVectorKokkosMPI()StateVectorKokkosMPI()~StateVectorKokkosMPI()getLocalSV()getMPIManager()getSendBuffer()getRecvBuffer()getNumGlobalWires()getNumLocalWires()resetIndices()initZeros()setBasisState()allocateBuffers()barrier()allReduceSum()sendrecvBuffers()getLocalBlockSize()getRevLocalWireIndex()getRevGlobalWireIndex()getMPIRankToGlobalIndexMap()getGlobalWires()getLocalWires()getLocalWireIndices()getLocalWireIndex()getGlobalWiresIndices()getGlobalWireIndex()findGlobalWires()findLocalWires()global2localIndex()getGlobalIndexFromMPIRank()getMPIRankFromGlobalIndex()isWiresLocal()isWiresGlobal()normalize()resetStateVector()setBasisState()setStateVector()setStateVector()localWiresSubsetToSwap()swapGlobalLocalWires()matchWires()matchLocalWires()matchGlobalWiresAndIndex()matchGlobalWiresAndIndex()applyPauliRot()applyOperation()applyOperation()applyMatrix()applyMatrix()applyControlledMatrix()applyControlledMatrix()applyGenerator()applyControlledGenerator()applyGenerator()collapse()updateData()updateData()updateData()updateData()updateData()getData()getData()getView()getView()getDataVector()getDataVector()HostToDevice()DeviceToHost()DeviceToDevice()reorderLocalWires()reorderGlobalLocalWires()reorderAllWires()
- Template Class DynamicDispatcher
- Class Documentation
Pennylane::LightningQubit::DynamicDispatcherCFP_tIndexTGateFuncControlledGateFuncGeneratorFuncControlledGeneratorFuncMatrixFuncControlledMatrixFuncSparseMatrixFuncControlledSparseMatrixFuncDynamicDispatcher()DynamicDispatcher()operator=()operator=()~DynamicDispatcher()registeredKernels()isRegisteredKernel()registerKernelName()getKernelName()registeredGatesForKernel()registeredControlledGatesForKernel()registeredGeneratorsForKernel()registeredControlledGeneratorsForKernel()registeredMatricesForKernel()registeredControlledMatricesForKernel()registeredSparseMatricesForKernel()registeredControlledSparseMatricesForKernel()strToGateOp()strToControlledGateOp()hasGateOp()strToGeneratorOp()strToControlledGeneratorOp()registerGateOperation()registerControlledGateOperation()registerGeneratorOperation()registerControlledGeneratorOperation()registerMatrixOperation()registerControlledMatrixOperation()registerSparseMatrixOperation()registerControlledSparseMatrixOperation()isRegistered()isRegistered()isRegistered()isRegistered()isRegistered()isRegistered()applyOperation()applyOperation()applyControlledGate()applyControlledGate()applyOperations()applyOperations()applyMatrix()applyMatrix()applyControlledMatrix()applySparseMatrix()applySparseMatrix()applyControlledSparseMatrix()applyGenerator()applyGenerator()applyControlledGenerator()applyControlledGenerator()getInstance()
- Class Documentation
- Template Class GateImplementationsAVXCommon
- Inheritance Relationships
- Class Documentation
Pennylane::LightningQubit::Gates::GateImplementationsAVXCommonapplyPauliX()applyPauliY()applyPauliZ()applyS()applyT()applyPhaseShift()applyHadamard()applyRX()applyRY()applyRZ()applyRot()applyCZ()applyCY()applySWAP()applyCNOT()applyIsingXX()applyIsingXY()applyIsingYY()applyIsingZZ()applyControlledPhaseShift()applyCRX()applyCRY()applyCRZ()applyGeneratorPhaseShift()applyGeneratorIsingXX()applyGeneratorIsingYY()applyGeneratorIsingZZ()implemented_gatesimplemented_generatorsimplemented_sparse_matricesimplemented_controlled_gatesimplemented_controlled_generatorsimplemented_controlled_matricesimplemented_controlled_sparse_matrices
- Class GateImplementationsLM
- Inheritance Relationships
- Class Documentation
Pennylane::LightningQubit::Gates::GateImplementationsLMparity_2_offset()applyNCSingleQubitOp()applySingleQubitOp()applyNCTwoQubitOp()applyTwoQubitOp()applyNCN()applyNCMultiQubitOp()applyMultiQubitOp()applyNCMultiQubitSparseOp()applyMultiQubitSparseOp()applyPauliRot()applyNC1()applyNCPauliX()applyPauliX()applyCNOT()applyToffoli()applyNCPauliY()applyPauliY()applyCY()applyNCPauliZ()applyPauliZ()applyCZ()applyNCHadamard()applyHadamard()applyNCS()applyS()applyNCT()applyT()applyNCSX()applySX()applyNCPhaseShift()applyPhaseShift()applyControlledPhaseShift()applyNCRX()applyRX()applyCRX()applyNCRY()applyRY()applyCRY()applyNCRZ()applyRZ()applyCRZ()applyIdentity()applyNCRot()applyRot()applyCRot()applyNC2()applyNCSWAP()applySWAP()applyCSWAP()applyNCIsingXX()applyIsingXX()applyNCIsingXY()applyIsingXY()applyNCIsingYY()applyIsingYY()applyNCIsingZZ()applyIsingZZ()applyNCSingleExcitation()applySingleExcitation()applyNCSingleExcitationMinus()applySingleExcitationMinus()applyNCSingleExcitationPlus()applySingleExcitationPlus()applyNCPSWAP()applyPSWAP()applyNC4()applyNCDoubleExcitation()applyNCDoubleExcitationMinus()applyNCDoubleExcitationPlus()applyDoubleExcitation()applyDoubleExcitationMinus()applyDoubleExcitationPlus()applyMultiRZ()applyNCMultiRZ()applyGlobalPhase()applyNCGlobalPhase()applyPCPhase()applyNCPCPhase()applyNCGenerator1()applyNCGeneratorGlobalPhase()applyGeneratorGlobalPhase()applyNCGeneratorPhaseShift()applyGeneratorPhaseShift()applyGeneratorControlledPhaseShift()applyNCGeneratorRX()applyGeneratorCRX()applyNCGeneratorRY()applyGeneratorCRY()applyNCGeneratorRZ()applyGeneratorCRZ()applyNCGenerator2()applyNCGeneratorIsingXX()applyGeneratorIsingXX()applyNCGeneratorIsingXY()applyGeneratorIsingXY()applyNCGeneratorIsingYY()applyGeneratorIsingYY()applyNCGeneratorIsingZZ()applyGeneratorIsingZZ()applyNCGeneratorSingleExcitation()applyGeneratorSingleExcitation()applyNCGeneratorSingleExcitationMinus()applyGeneratorSingleExcitationMinus()applyNCGeneratorSingleExcitationPlus()applyGeneratorSingleExcitationPlus()applyNCGeneratorPSWAP()applyGeneratorPSWAP()applyNCGenerator4()applyNCGeneratorDoubleExcitation()applyGeneratorDoubleExcitation()applyNCGeneratorDoubleExcitationMinus()applyGeneratorDoubleExcitationMinus()applyNCGeneratorDoubleExcitationPlus()applyGeneratorDoubleExcitationPlus()applyGeneratorMultiRZ()applyNCGeneratorMultiRZ()kernel_idnamerequired_alignmentpacked_bytesimplemented_gatesimplemented_controlled_gatesimplemented_generatorsimplemented_controlled_generatorsimplemented_matricesimplemented_controlled_matricesimplemented_sparse_matricesimplemented_controlled_sparse_matrices
- Template Class StateVectorLQubit
- Inheritance Relationships
- Class Documentation
Pennylane::LightningQubit::StateVectorLQubitComplexTMemoryStorageTmemoryModel()threading()getSupportedKernels()getSupportedKernels()applyOperation()applyOperation()applyOperation()applyOperation()applyOperation()applyPauliRot()applyGenerator()applyGenerator()applyGenerator()applyControlledMatrix()applyControlledMatrix()applyMatrix()applyMatrix()applyMatrix()applyMatrix()applyControlledSparseMatrix()applyControlledSparseMatrix()applySparseMatrix()applySparseMatrix()applySparseMatrix()applySparseMatrix()collapse()normalize()setBasisState()setBasisState()resetStateVector()setStateVector()setStateVector()setStateVector()StateVectorLQubit()threading_memory_model_
- Template Class StateVectorLQubitManaged
- Inheritance Relationships
- Class Documentation
Pennylane::LightningQubit::StateVectorLQubitManagedPrecisionTComplexTCFP_tMemoryStorageTStateVectorTStateVectorLQubitManaged()StateVectorLQubitManaged()StateVectorLQubitManaged()StateVectorLQubitManaged()StateVectorLQubitManaged()StateVectorLQubitManaged()operator=()operator=()~StateVectorLQubitManaged()getData()getData()getDataVector()getDataVector()updateData()updateData()allocator()
- Template Class ObservableTNCuda
- Inheritance Relationships
- Class Documentation
Pennylane::LightningTensor::TNCuda::Observables::ObservableTNCudaPrecisionTComplexTMetaDataT~ObservableTNCuda()getObsName()getWires()getNumTensors()getNumStateModes()getStateModes()getMetaData()getCoeffs()operator==()operator!=()ObservableTNCuda()ObservableTNCuda()ObservableTNCuda()operator=()operator=()coeffs_numTensors_numStateModes_stateModes_metaData_
- Template Class TNCuda
- Inheritance Relationships
- Class Documentation
Pennylane::LightningTensor::TNCuda::TNCudaTNCuda()TNCuda()TNCuda()~TNCuda()getMethod()getCublasCaller()getData()getDataVector()reset()setWorksizePref()getWorksizePref()setBasisState()updateSiteData()applyOperations()applyOperations()applyOperation()applyControlledOperation()applyOperation()applyMatrix()get_state_tensor()get_state_tensor()getSitesExtents()getTensorsOutDataPtr()getSitesExtentsPtr()computeState()maxBondDim_bondDims_
- Class MPIManager
- Class Documentation
Pennylane::Util::MPIManagerMPIManager()MPIManager()MPIManager()~MPIManager()getMPIDatatype()getRank()getSize()getSizeNode()getComm()getTime()getVendor()getVersion()get_cpp_mpi_type_map()getMPIOpType()Allgather()allgather()Allgather()allgather()Allreduce()allreduce()Allreduce()allreduce()Reduce()Reduce()Reduce()Gather()Gather()Barrier()Bcast()Bcast()Scatter()Scatter()scatter()Send()Recv()Sendrecv()Sendrecv()GatherV()GatherV()Scan()split()
- Class Documentation
Functions¶
Variables¶
Defines¶
Typedefs¶
api/library_root
Download Python script
Download Notebook
View on GitHub