cuquantum.custatevec.apply_pauli_rotation

cuquantum.custatevec.apply_pauli_rotation(intptr_t handle, intptr_t sv, int sv_data_type, uint32_t n_index_bits, double theta, paulis, targets, uint32_t n_targets, controls, control_bit_values, uint32_t n_controls)[source]

Apply the exponential of a multi-qubit Pauli operator.

Parameters
  • handle (intptr_t) – the handle to the cuStateVec library.

  • sv (intptr_t) – state vector.

  • sv_data_type (int) – data type of the state vector.

  • n_index_bits (uint32_t) – the number of bits in the state vector index.

  • theta (double) – theta.

  • paulis (object) –

    host pointer to custatevecPauli_t array. It can be:

    • an int as the pointer address to the array, or

    • a Python sequence of _Pauli.

  • targets (object) –

    pointer to a host array of target bits. It can be:

    • an int as the pointer address to the array, or

    • a Python sequence of int32_t.

  • n_targets (uint32_t) – the number of target bits.

  • controls (object) –

    pointer to a host array of control bits. It can be:

    • an int as the pointer address to the array, or

    • a Python sequence of int32_t.

  • control_bit_values (object) –

    pointer to a host array of control bit values. It can be:

    • an int as the pointer address to the array, or

    • a Python sequence of int32_t.

  • n_controls (uint32_t) – the number of control bits.