CUDA-Q
Classiq to CUDA-Q translation.
These functions require the cudaq extra (install classiq[cudaq]).
Note that the cudaq extra is only available in Classiq Studio and on any Linux
Machine.
qprog_to_cudaq
Functions:
| Name | Description |
|---|---|
pauli_operator_to_cudaq_spin_op |
Transforms Qmod's SparsePauliOp data structure to CUDA-Q's SpinOperator. |
qprog_to_cudaq_kernel |
Translates a quantum program into a CUDA-Q kernel. |
pauli_operator_to_cudaq_spin_op
pauli_operator_to_cudaq_spin_op(
operator: SparsePauliOp,
) -> SpinOperator
Transforms Qmod's SparsePauliOp data structure to CUDA-Q's SpinOperator.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
operator
|
SparsePauliOp
|
The operator to be transformed |
required |
Returns:
| Name | Type | Description |
|---|---|---|
SpinOperator |
SpinOperator
|
The equivalent operator in CUDA-Q's data structure |
qprog_to_cudaq_kernel
qprog_to_cudaq_kernel(
quantum_program: QuantumProgram,
) -> PyKernel
Translates a quantum program into a CUDA-Q kernel.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
quantum_program
|
QuantumProgram
|
The quantum program to translate into CUDA-Q kernel. This is the result of the function 'synthesize()'. |
required |
Returns: A CUDA-Q kernel