Quantum++  v1.2
A modern C++11 quantum computing library
qpp::QCircuit::GateStep Struct Reference

One step consisting only of gates/operators in the circuit. More...

#include <classes/circuits.h>

Collaboration diagram for qpp::QCircuit::GateStep:

Public Member Functions

 GateStep ()=default
 Default constructor. More...
 
 GateStep (GateType gate_type, std::size_t gate_hash, const std::vector< idx > &ctrl, const std::vector< idx > &target, std::string name="")
 Constructs a gate step instance. More...
 

Public Attributes

GateType gate_type_ = GateType::NONE
 gate type More...
 
std::size_t gate_hash_
 gate hash More...
 
std::vector< idxctrl_
 control More...
 
std::vector< idxtarget_
 target where the gate is applied More...
 
std::string name_
 custom name of the step More...
 

Detailed Description

One step consisting only of gates/operators in the circuit.

Constructor & Destructor Documentation

◆ GateStep() [1/2]

qpp::QCircuit::GateStep::GateStep ( )
default

Default constructor.

◆ GateStep() [2/2]

qpp::QCircuit::GateStep::GateStep ( GateType  gate_type,
std::size_t  gate_hash,
const std::vector< idx > &  ctrl,
const std::vector< idx > &  target,
std::string  name = "" 
)
inlineexplicit

Constructs a gate step instance.

Parameters
gate_typeGate type
gate_hashHash of the quantum gate
ctrlControl qudit indexes
targetTarget qudit indexes
step_noCircuit step number
nameOptional gate name

Member Data Documentation

◆ ctrl_

std::vector<idx> qpp::QCircuit::GateStep::ctrl_

control

◆ gate_hash_

std::size_t qpp::QCircuit::GateStep::gate_hash_

gate hash

◆ gate_type_

GateType qpp::QCircuit::GateStep::gate_type_ = GateType::NONE

gate type

◆ name_

std::string qpp::QCircuit::GateStep::name_

custom name of the step

◆ target_

std::vector<idx> qpp::QCircuit::GateStep::target_

target where the gate is applied


The documentation for this struct was generated from the following file: