Quandary
Loading...
Searching...
No Matches
Public Member Functions | List of all members
SWAP_0Q Class Reference

Multi-qubit SWAP gate implementation. More...

#include <gate.hpp>

Inheritance diagram for SWAP_0Q:
Inheritance graph
[legend]
Collaboration diagram for SWAP_0Q:
Collaboration graph
[legend]

Public Member Functions

 SWAP_0Q (const std::vector< size_t > &nlevels_, const std::vector< size_t > &nessential_, double time, const std::vector< double > &rotation_frequencies_, DecoherenceType decoherence_type_, bool quietmode=false)
 
 ~SWAP_0Q ()
 
- Public Member Functions inherited from Gate
 Gate ()
 
 Gate (const std::vector< size_t > &nlevels_, const std::vector< size_t > &nessential_, double time_, const std::vector< double > &gate_rot_freq, DecoherenceType decoherence_type_, bool quietmode=false)
 Constructor for quantum gates.
 
virtual ~Gate ()
 
PetscInt getDimRho ()
 Retrieves the dimension of the density matrix.
 
void assembleGate ()
 Assembles the vectorized gate matrix.
 
void applyGate (const Vec state, Vec VrhoV)
 Applies the gate transformation to a quantum state.
 

Additional Inherited Members

- Protected Attributes inherited from Gate
Mat V_re
 
Mat V_im
 Real and imaginary parts of V_target, non-vectorized, essential levels only.
 
std::vector< size_t > nessential
 Number of essential levels per oscillator.
 
std::vector< size_t > nlevels
 Total number of levels per oscillator.
 
int mpirank_petsc
 MPI rank in PETSc communicator.
 
int mpisize_petsc
 MPI size in PETSc communicator.
 
int mpirank_world
 MPI rank in world communicator.
 
bool quietmode
 Flag to suppress output messages.
 
PetscInt dim_ess
 Dimension of target gate matrix (non-vectorized), essential levels only.
 
PetscInt dim_rho
 Dimension of system matrix rho (non-vectorized), all levels, N.
 
double final_time
 Final time T. Time of gate rotation.
 
std::vector< double > gate_rot_freq
 Frequencies of gate rotation (rad/time). Default: 0.0.
 
DecoherenceType decoherence_type
 Type of Lindblad operators for open system dynamics.
 

Detailed Description

Multi-qubit SWAP gate implementation.

Implements a SWAP gate for Q qubits, swapping qubit 0 with qubit Q-1 while leaving all other qubits unchanged.

Constructor & Destructor Documentation

◆ SWAP_0Q()

SWAP_0Q::SWAP_0Q ( const std::vector< size_t > &  nlevels_,
const std::vector< size_t > &  nessential_,
double  time,
const std::vector< double > &  rotation_frequencies_,
DecoherenceType  decoherence_type_,
bool  quietmode = false 
)

◆ ~SWAP_0Q()

SWAP_0Q::~SWAP_0Q ( )

The documentation for this class was generated from the following files: