Pitt-JonesLab / quantum_logical

logical state encodings for error-detection/correction of quantum states
MIT License
0 stars 1 forks source link

Convert TrotterSim into a subclass of QasmSimulatorPy #19

Open evmckinney9 opened 10 months ago

evmckinney9 commented 10 months ago

Description

The aim of this issue is to extend the functionality of the TrotterSim class, making it a subclass of QasmSimulatorPy. This enhancement will enable TrotterSim to handle complete quantum circuits, as opposed to just single operators. The main challenge is to integrate the dynamics of quantum gates (including those with varying durations and types) with the effects of noise modeled by the TrotterGroup.

Key Considerations

  1. Handling Gate Indices:

    • Accurate indexing of qubits and gates is crucial for the correct implementation of the circuit within the Trotter simulation framework.
    • Special attention is required to handle multi-qubit gates and ensure that the indices align correctly with the intended gates in the circuit.
  2. Creating Trotter Step Operators from Circuit Layers:

    • The circuit needs to be divided into smaller Trotter steps (trotter_dt). This division should account for gates with varying durations.
    • For longer gates, they should appear in all relevant Trotter slices, while shorter gates only in their required slices.
    • Decision on scheduling shorter gates (ASAP or ALAP) should be based on specific requirements or could be a parameter in the simulator.
  3. Integration with TrotterGroup Noise Model:

    • The simulator needs to alternate between applying circuit slices and noise slices accurately at each Trotter step.
    • Constructing a large unitary for each Trotter step, considering the right indices and dimensions, especially for multi-qubit gates, is a significant part of this task.

Objectives

evmckinney9 commented 10 months ago

Currently - we have the simulator responsible both for inserting the error channel layers (implicitly during the noisy simulation), but we should separate these responsibilities. First, have a pass that does the trotter 'slicing', and inserts the trotterized error channels. Second, have a density matrix simulator that is configured to work with qudit states and operators.