#include <stdio.h>
#include <iostream>
#include <math.h>
#include <assert.h>
#include <petscmat.h>
#include <vector>
#include "defs.hpp"
#include "util.hpp"
Go to the source code of this file.
|
| Gate * | initTargetGate (GateType target_gate, const std::string &file, const std::vector< size_t > &nlevels, const std::vector< size_t > &nessential, double total_time, DecoherenceType decoherence_type, const std::vector< double > &gate_rot_freq, bool quietmode) |
| | Factory function to initialize a gate from configuration string.
|
| |
◆ initTargetGate()
| Gate * initTargetGate |
( |
GateType |
target_gate, |
|
|
const std::string & |
file, |
|
|
const std::vector< size_t > & |
nlevels, |
|
|
const std::vector< size_t > & |
nessential, |
|
|
double |
total_time, |
|
|
DecoherenceType |
decoherence_type, |
|
|
const std::vector< double > & |
gate_rot_freq, |
|
|
bool |
quietmode |
|
) |
| |
Factory function to initialize a gate from configuration string.
Creates and returns a pointer to the appropriate Gate subclass based on the target specification string.
- Parameters
-
| target_gate | target_gate Type of gate to initialize. |
| file | Path to the file containing gate matrix data (if applicable). |
| nlevels | Number of levels per oscillator. |
| nessential | Number of essential levels per oscillator. |
| total_time | Total time for gate operation. |
| decoherence_type | Type of Lindblad operators for open system dynamics. |
| gate_rot_freq | Frequencies of gate rotation. |
| quietmode | Flag to suppress output messages. |
- Returns
- Gate* Pointer to the initialized gate object.