Class QuantumGate_LinearCombination

Inheritance Relationships

Base Types

Class Documentation

class QuantumGate_LinearCombination : public QuantumGateBase, public QuantumGateBase

ここら辺のtarget listの仕様について ゲートをマージしたときのtargetやcontrolの挙動は get_new_qubit_list 関数で決められている Identity のゲート + 含まれるすべてのゲート のゲート集合を元に、 get_new_qubit_list で決める ただし、和が1のProbabilistic においてのみ、 Identityなしで求めている いくつかのゲートの線型結合

いくつかのゲートの線型結合

Public Functions

inline explicit QuantumGate_LinearCombination(const std::vector<CPPCTYPE> &coefs, const std::vector<QuantumGateBase*> &gate_list)

コンストラクタ

パラメータ:
  • coefs -- ゲートにかけられる係数

  • gate_list -- ゲートのリスト

inline virtual ~QuantumGate_LinearCombination()
inline virtual void update_quantum_state(QuantumStateBase *state) override

量子状態を更新する

パラメータ:

state -- 更新する量子状態

inline virtual QuantumGate_LinearCombination *copy() const override

自身のディープコピーを生成する

戻り値:

自身のディープコピー

inline virtual void set_matrix(ComplexMatrix &matrix) const override

自身のゲート行列をセットする

パラメータ:

matrix -- 行列をセットする変数の参照

inline virtual boost::property_tree::ptree to_ptree() const override

ptreeに変換する

戻り値:

ptree

inline virtual std::vector<CPPCTYPE> get_coef_list()
inline virtual std::vector<QuantumGateBase*> get_gate_list()
inline explicit QuantumGate_LinearCombination(const std::vector<CPPCTYPE> &coefs, const std::vector<QuantumGateBase*> &gate_list)

コンストラクタ

パラメータ:
  • coefs -- ゲートにかけられる係数

  • gate_list -- ゲートのリスト

inline virtual ~QuantumGate_LinearCombination()
inline virtual void update_quantum_state(QuantumStateBase *state) override

量子状態を更新する

パラメータ:

state -- 更新する量子状態

inline virtual QuantumGate_LinearCombination *copy() const override

自身のディープコピーを生成する

戻り値:

自身のディープコピー

inline virtual void set_matrix(ComplexMatrix &matrix) const override

自身のゲート行列をセットする

パラメータ:

matrix -- 行列をセットする変数の参照

inline virtual boost::property_tree::ptree to_ptree() const override

ptreeに変換する

戻り値:

ptree

inline virtual std::vector<CPPCTYPE> get_coef_list()
inline virtual std::vector<QuantumGateBase*> get_gate_list()
inline virtual bool is_noise() override

Protected Attributes

std::vector<CPPCTYPE> _coefs
std::vector<QuantumGateBase*> _gate_list