leakage_frame_simulator_apply_circuit#

cuquantum.bindings.custabilizer.leakage_frame_simulator_apply_circuit(
intptr_t handle,
intptr_t leakage_frame_simulator,
intptr_t circuit,
int randomize_frame_after_measurement,
uint64_t seed,
intptr_t x_table_device,
intptr_t z_table_device,
intptr_t l_table_device,
intptr_t m_table_device,
intptr_t stream,
)[source]#

Run leakage-aware Pauli frame simulation using the circuit.

Parameters:
  • handle (intptr_t) – Library handle.

  • leakage_frame_simulator (intptr_t) – An instance of LeakageFrameSimulator with parameters consistent with the bit tables.

  • circuit (intptr_t) – A circuit acting on at most numQubits qubits and producing at most numMeasurements measurement bits (see CUSTABILIZER_CIRCUIT_NUM_MEASUREMENT_BITS).

  • randomize_frame_after_measurement (int) – Disabling the randomization is helpful in some cases to focus on the error frame propagation.

  • seed (uint64_t) – Random seed.

  • x_table_device (intptr_t) – Device buffer of the X bit table in qubit-major order. Must be of size at least numQubits * tableStrideMajor.

  • z_table_device (intptr_t) – Device buffer of the Z bit table in qubit-major order. Must be of size at least numQubits * tableStrideMajor.

  • l_table_device (intptr_t) – Device buffer of the leakage bit table in qubit-major order. Must be of size at least numQubits * tableStrideMajor. Bit (q, shot) is 1 when qubit q is in the leaked subspace for shot shot.

  • m_table_device (intptr_t) – Device buffer of the measurement bit table in measurement-major order: numMeasurements measurement rows followed by numDetectors DETECTOR rows (CUSTABILIZER_CIRCUIT_NUM_DETECTORS). Must be of size at least (numMeasurements + numDetectors) * tableStrideMajor.

  • stream (intptr_t) – CUDA stream.