PyQTorch
Fast differentiable statevector emulator based on PyTorch. The code is open source, hosted on Github and maintained by Pasqal.
          Backend
  
  
      dataclass
  
  
            Bases: Backend
PyQTorch backend.
          convert(circuit, observable=None)
  Convert an abstract circuit and an optional observable to their native representation.
Additionally, this function constructs an embedding function which maps from user-facing parameters to device parameters (read more on parameter embedding here).
Source code in qadence/backend.py
            
          run(circuit, param_values={}, state=None, endianness=Endianness.BIG, *args, **kwargs)
  Run a circuit and return the resulting wave function.
| PARAMETER | DESCRIPTION | 
|---|---|
circuit | 
          
             A converted circuit as returned by  
                
                  TYPE:
                      | 
        
param_values | 
          
             Already embedded parameters of the circuit. See
 
                
                  TYPE:
                      | 
        
state | 
          
             Initial state. 
                
                  TYPE:
                      | 
        
endianness | 
          
             Endianness of the resulting wavefunction. 
                
                  TYPE:
                      | 
        
| RETURNS | DESCRIPTION | 
|---|---|
              
                  ArrayLike
              
           | 
          
             A list of Counter objects where each key represents a bitstring  | 
        
              
                  ArrayLike
              
           | 
          
             and its value the number of times it has been sampled from the given wave function.  | 
        
Source code in qadence/backend.py
            
          Configuration
  
  
      dataclass
  
  
            Bases: BackendConfiguration
          algo_hevo: AlgoHEvo = AlgoHEvo.EXP
  
  
      class-attribute
      instance-attribute
  
  Determine which kind of Hamiltonian evolution algorithm to use.
          loop_expectation: bool = False
  
  
      class-attribute
      instance-attribute
  
  When computing batches of expectation values, only allocate one wavefunction.
Loop over the batch of parameters to only allocate a single wavefunction at any given time.
          n_steps_hevo: int = 100
  
  
      class-attribute
      instance-attribute
  
  Default number of steps for the Hamiltonian evolution.
          use_gradient_checkpointing: bool = False
  
  
      class-attribute
      instance-attribute
  
  Use gradient checkpointing.
Recommended for higher-order optimization tasks.
          use_single_qubit_composition: bool = False
  
  
      class-attribute
      instance-attribute
  
  Composes chains of single qubit gates into a single matmul if possible.
          supported_gates = list(set(OpName.list()) - set([OpName.TDAGGER]))
  
  
      module-attribute
  
  The set of supported gates.
Tdagger is currently not supported.
            PyQComposedBlock(ops, qubits, n_qubits, config=None)
  
            Bases: QuantumCircuit
Compose a chain of single qubit operations on the same qubit into a single.
call to _apply_batch_gate.
Source code in qadence/backends/pyqtorch/convert_ops.py
                  
            PyQHamiltonianEvolution(qubit_support, n_qubits, block, config)
  
            Bases: Module
Source code in qadence/backends/pyqtorch/convert_ops.py
                  
          dagger(values)
  
          jacobian_generator(values)
  Approximate jacobian of the evolved operator with respect to generator parameter(s).
Source code in qadence/backends/pyqtorch/convert_ops.py
            
          jacobian_time(values)
  Approximate jacobian of the evolved operator with respect to time evolution.
Source code in qadence/backends/pyqtorch/convert_ops.py
            
          unitary(values)
  The evolved operator given current parameter values for generator and time evolution.