Class session
Defined in File session.hpp
Class Documentation
-
class session
A session of the QB SDK quantum programming and execution framework.
Public Functions
-
session()
Construct a new session object.
Some parameters are uninitialized, e.g., number of qubits (
qns_). These parameters can be set manually (using corresponding setter methods) or via provided presets, e.g., qb12().
-
session(const std::string &name)
Construct a new session object with a specific name.
- Parameters
name – Session name
-
session(const bool debug)
Construct a new session object with a specific debug flag.
- Parameters
debug – Debug flag. Printing debug messages to console if true.
-
void set_infile(const std::string &infile)
Set the input QASM source file.
- Parameters
infile – Full path to the source file
-
void set_infiles(const VectorString &infiles)
Set the list input QASM source files.
- Parameters
infiles – A list of paths to source files
-
const VectorString &get_infiles() const
Get the list input QASM source files.
- Returns
List input QASM source files
-
void set_instring(const std::string &instring)
Set the input QASM source string.
- Parameters
instring – Input source string
-
void set_instrings(const VectorString &instrings)
Set the list of input QASM source strings.
- Parameters
instrings – Input source strings
-
const VectorString &get_instrings() const
Get the input QASM source strings of the session.
- Returns
List of source strings
Set the irtarget (
xacc::CompositeInstruction) object.Note
This
xacc::CompositeInstructioncan be manually constructed (i.e., building the IR tree using XACC). If the irtarget is provided instead of QASM strings or files, the QASM compilation step will be skipped.- Parameters
irtarget_m – Input IR object
Set the list of irtarget (
xacc::CompositeInstruction) objects.- Parameters
irtarget_ms – List of input IR objects
-
const std::vector<std::vector<std::shared_ptr<xacc::CompositeInstruction>>> &get_irtarget_ms() const
Get the list of input IR objects.
- Returns
List of input IR objects
-
void set_include_qb(const std::string &include_qb)
Set the path to the OpenQASM include file.
- Parameters
include_qb – Path to the OpenQASM include file
-
void set_include_qbs(const VectorString &include_qbs)
Set the list of paths to the OpenQASM include files.
- Parameters
include_qbs – Paths to the OpenQASM include files
-
const VectorString &get_include_qbs() const
Get the list of paths to the OpenQASM include files.
- Returns
Paths to the OpenQASM include files
-
void set_parameter_vector(const std::vector<double> &vals_vec)
Set the parameter values for execution.
- Parameters
vals_vec – New parameter vector for runtime substitution
-
void set_parameter_vectors(Table2d<std::vector<double>> vals_vecs)
Set the list of parameter values for execution.
- Parameters
vals_vecs – New parameter vectors for runtime substitution
-
const Table2d<std::vector<double>> &get_parameter_vectors() const
Get the parameter values for runtime circuit execution.
- Returns
A vector-of-vectors of parameter values
-
void set_calc_jacobian(bool calculate_gradients_m)
Determine whether jacobians will be calculated for parametrized circuits.
- Parameters
calculate_gradients_m – Whether to calculate jacobians for parametrized circuits
-
void set_calc_jacobians(VectorBool calculate_gradients_ms)
Determine whether jacobians will be calculated for specific parametrized circuits.
- Parameters
calculate_gradients_ms – Whether to calculate jacobians for specific parametrized circuits
-
const VectorBool &get_calc_jacobians() const
Get the jacobians calculation flags.
- Returns
A 1-d array of jacobians calculation flags
-
void set_remote_backend_database_path(const std::string &remote_backend_database)
Set the path to the qpu config JSON file.
Set the path to the remote backend database yaml file.
- Parameters
remote_backend_database_path – Path to the remote backend database yaml file.
-
const std::string &get_remote_backend_database_path() const
Get the path to the remote backend database yaml file.
- Returns
Path to the remote backend database yaml file.
-
void set_acc(const std::string &acc)
Set the backend accelerator.
- Parameters
acc – Name of the accelerator
-
void set_accs(const VectorString &accs)
Set the list of backend accelerators.
- Parameters
accs – List of backend accelerator names
-
const VectorString &get_accs() const
Get the list of backend accelerators.
- Returns
List of backend accelerator names
-
void set_aer_sim_type(const std::string &sim_type)
Set the AER backend simulator type.
- Parameters
sim_type – Simulator type
-
void set_aer_sim_types(const VectorString &sim_types)
Set the AER backend simulator types.
- Parameters
sim_types – Simulator type
-
const VectorString &get_aer_sim_types() const
Get the AER backend simulator type.
- Returns
Simulator type
-
void set_random(const size_t &in_random)
Set the depth of the auto-generated random circuit.
- Parameters
in_random – Circuit depth
-
void set_randoms(const VectorN &in_random)
Set the depths of the auto-generated random circuits.
- Parameters
in_random – Circuit depth values
-
const VectorN &get_randoms() const
Set the depths of the auto-generated random circuits.
- Returns
Circuit depth values
-
void set_xasm(const bool &in_xasm)
Set the XASM input flag.
True if the input is in XASM dialect.
- Parameters
in_xasm – XASM input flag
-
void set_xasms(const VectorBool &in_xasm)
Set the XASM input flags.
- Parameters
in_xasm – XASM input flags
-
const VectorBool &get_xasms() const
Get the XASM input flag.
- Returns
XASM input flags
-
void set_quil1(const bool &in_quil1)
Set the Quil input flag.
True if the input is in Quil (v1) dialect.
- Parameters
in_quil1 – Quil input flag
-
void set_quil1s(const VectorBool &in_quil1)
Set the Quil input flags.
- Parameters
in_quil1 – Quil input flags
-
const VectorBool &get_quil1s() const
Get the Quil input flags.
- Returns
Quil input flags
-
void set_noplacement(const bool &in_noplacement)
Set the noplacement flag.
True to disable circuit placement.
- Parameters
in_noplacement – noplacement flag
-
void set_noplacements(const VectorBool &in_noplacement)
Set the noplacement flags.
- Parameters
in_noplacement – noplacement flags
-
const VectorBool &get_noplacements() const
Get the noplacement flag.
- Returns
noplacement flags
-
void set_placement(const std::string &in_placement)
Set the circuit placement method.
- Parameters
in_placement – Name of the circuit placement module
-
void set_placements(const VectorString &in_placements)
Set the circuit placement methods.
- Parameters
in_placements – Names of the circuit placement modules
-
const VectorString &get_placements() const
Get the circuit placement methods.
- Returns
Names of the circuit placement modules
-
void set_nooptimise(const bool &in_nooptimise)
Set the nooptimise flag.
True to disable circuit optimization
- Parameters
in_nooptimise – nooptimise flag
-
void set_nooptimises(const VectorBool &in_nooptimise)
Set the nooptimise flags.
- Parameters
in_nooptimise – nooptimise flags
-
const VectorBool &get_nooptimises() const
Get the nooptimise flags.
- Returns
nooptimise flags
-
void set_circuit_opt(const Passes &in_passes)
Set the circuit optimization passes.
- Parameters
in_opts – Sequence of optimization passes to apply
-
void set_circuit_opts(const Table2d<Passes> &in_passes)
Set the circuit optimization passes.
- Parameters
in_opts – 2-D table of sequences of optimization passes to apply
-
const Table2d<Passes> &get_circuit_opts() const
Get the circuit optimization passes.
- Returns
2-D table of sequences of optimization passes to apply
-
void set_nosim(const bool &in_nosim)
Set the nosim flag.
True to disable circuit simulation, e.g., dry-run to inspect transpilation and resource estimation only.
- Parameters
in_nosim – nosim flag
-
void set_nosims(const VectorBool &in_nosim)
Set the nosim flags.
- Parameters
in_nosim – nosim flags
-
const VectorBool &get_nosims() const
Get the nosim flags.
- Returns
nosim flags
-
void set_noise(const bool &in_noise)
Set the noise simulation flag.
True to enable noisy simulation.
- Parameters
in_noise – Noise flag
-
void set_noises(const VectorBool &in_noise)
Set the noise simulation flags.
- Parameters
in_noise – Noise flags
-
const VectorBool &get_noises() const
Get the noise simulation flags.
- Returns
Noise flags
-
const std::shared_ptr<std::vector<std::complex<double>>> &get_state_vec_raw() const
Get the full state vector (works with QPP backend only!)
- Returns
Full complex state vector as std::vector<std::complex<double>>
-
void get_state_vec(const bool &in_get_state_vec)
Set the flag to retrieve the state vector.
- Parameters
in_get_state_vec – Flag to retrieve state vector (works with QPP backend only!)
-
void set_output_oqm_enabled(const bool &in_output_oqm_enabled)
Set the output transpilation and resource estimation flag.
True to enable output transpilation and resource estimation
- Parameters
in_output_oqm_enabled – Config. value
-
void set_output_oqm_enableds(const VectorBool &in_output_oqm_enabled)
Set the output oqm enableds object.
- Parameters
in_output_oqm_enabled – Config. values
-
const VectorBool &get_output_oqm_enableds() const
Get the output oqm enableds object.
- Returns
Config. values
-
void set_notiming(const bool &in_notiming)
Set the notiming configuration flag.
- Parameters
in_notiming – Config. value
-
void set_notimings(const VectorBool &in_notiming)
Set the notiming configuration flags.
- Parameters
in_notiming – Config. values
-
const VectorBool &get_notimings() const
Get the notiming configuration flags.
- Returns
Config. values
-
void set_qn(const size_t &in_qn)
Set the number of qubits.
- Parameters
in_qn – Number of qubits
-
void set_qns(const VectorN &in_qn)
Set the numbers of qubits.
- Parameters
in_qn – Numbers of qubits
-
const VectorN &get_qns() const
Get the numbers of qubits.
- Returns
Number of qubits
-
void set_rn(const size_t &in_rn)
Set the number of repetitions.
- Parameters
in_rn – Number of repetitions
-
void set_rns(const VectorN &in_rn)
Set the numbers of repetitions.
- Parameters
in_rn – Numbers of repetitions
-
const VectorN &get_rns() const
Get the numbers of repetitions.
- Returns
Numbers of repetitions
-
void set_sn(const size_t &in_sn)
Set the number of measurement shots.
- Parameters
in_sn – Number of shots
-
void set_sns(const VectorN &in_sn)
Set the number of measurement shots.
- Parameters
in_sn – Number of shots
-
const VectorN &get_sns() const
Get the number of measurement shots.
- Returns
Number of shots
-
void set_theta(const ND &in_theta)
Set the angle variables (theta)
- Parameters
in_theta – Theta values
-
void set_thetas(const VectorMapND &in_theta)
Set the angle variables (theta)
- Parameters
in_theta – Theta values
-
const VectorMapND &get_thetas() const
Get the angle variables (theta)
- Returns
Theta values
-
void set_initial_bond_dimension(const size_t &in_initial_bond_dimension)
Set the initial bond dimension (MPS simulator)
Note
This is only needed if using the “tnqvm” backend accelerator.
- Parameters
in_initial_bond_dimension – Initial MPS bond dimension value
-
void set_initial_bond_dimensions(const VectorN &in_initial_bond_dimension)
Set the initial bond dimension (MPS simulator)
- Parameters
in_initial_bond_dimension – Initial MPS bond dimension value
-
const VectorN &get_initial_bond_dimensions() const
Get the initial bond dimension (MPS simulator)
- Returns
Initial MPS bond dimension value
-
void set_initial_kraus_dimension(const size_t &in_initial_kraus_dimension)
Set the initial kraus dimension (MPS simulator)
Note
This is only needed if using the “tnqvm” backend accelerator.
- Parameters
in_initial_kraus_dimension – Initial MPS kraus dimension value
-
void set_initial_kraus_dimensions(const VectorN &in_initial_kraus_dimension)
Set the initial kraus dimension (MPS simulator)
- Parameters
in_initial_kraus_dimension – Initial MPS kraus dimension value
-
const VectorN &get_initial_kraus_dimensions() const
Get the initial kraus dimension (MPS simulator)
- Returns
Initial MPS kraus dimension value
-
void set_max_bond_dimension(const size_t &in_max_bond_dimension)
Set the maximum bond dimension (MPS simulator)
Note
This is only needed if using the “tnqvm” backend accelerator.
- Parameters
in_max_bond_dimension – Max MPS bond dimension value
-
void set_max_bond_dimensions(const VectorN &in_max_bond_dimension)
Set the maximum bond dimension (MPS simulator)
- Parameters
in_max_bond_dimension – Max MPS bond dimension value
-
const VectorN &get_max_bond_dimensions() const
Get the maximum bond dimension (MPS simulator)
- Returns
Max MPS bond dimension value
-
void set_max_kraus_dimension(const size_t &in_max_kraus_dimension)
Set the maximum kraus dimension (MPS simulator)
Note
This is only needed if using the “tnqvm” backend accelerator.
- Parameters
in_max_kraus_dimension – Max MPS kraus dimension value
-
void set_max_kraus_dimensions(const VectorN &in_max_kraus_dimension)
Set the maximum kraus dimension (MPS simulator)
- Parameters
in_max_kraus_dimension – Max MPS kraus dimension value
-
const VectorN &get_max_kraus_dimensions() const
Get the maximum kraus dimension (MPS simulator)
- Returns
Max MPS kraus dimension value
-
void set_svd_cutoff(const ND &in_svd_cutoff)
Set the SVD cutoff limit (MPS simulator)
Note
This is only needed if using the “tnqvm” backend accelerator.
- Parameters
in_svd_cutoff – SVD cutoff value
-
void set_svd_cutoffs(const VectorMapND &in_svd_cutoff)
Set the SVD cutoff limit (MPS simulator)
- Parameters
in_svd_cutoff – SVD cutoff value
-
const VectorMapND &get_svd_cutoffs() const
Get the SVD cutoff limit (MPS simulator)
- Returns
SVD cutoff value
-
void set_rel_svd_cutoff(const ND &in_rel_svd_cutoff)
Set the relative SVD cutoff limit (MPS simulator)
Note
This is only needed if using the “tnqvm” backend accelerator.
- Parameters
in_rel_svd_cutoff – SVD cutoff value
-
void set_rel_svd_cutoffs(const VectorMapND &in_rel_svd_cutoff)
Set the relative SVD cutoff limit (MPS simulator)
- Parameters
in_rel_svd_cutoff – SVD cutoff value
-
const VectorMapND &get_rel_svd_cutoffs() const
Get the relative SVD cutoff limit (MPS simulator)
- Returns
Relative SVD cutoff value
-
void set_measure_sample_sequential(const std::string &in_measure_sample_sequential)
Set the measurement sampling method - “off” uses the cutensorNet contraction method of the entire tensor network state. Program terminates with error meassage if cutensorNet fails. “on” uses the cutensor sequential contraction method. “auto” (default) uses the cutensorNet contraction method and automatically swithes to the cutensor sequential contraction method if the cutensorNet method fails.
Note
This is only needed if using the emulator tensor network accelerator
- Parameters
in_measure_sample_sequential – Measure sampling option value
-
void set_measure_sample_sequentials(const VectorString &in_measure_sample_sequential)
Set the measurement sampling methods.
- Parameters
in_measure_sample_sequential – Measure sampling option values
-
const VectorString &get_measure_sample_sequentials() const
Get the measurement sampling method.
- Returns
Measure sampling option values
-
void set_noise_model(const NoiseModel &model)
Set the noise model.
- Parameters
model – The noise model to use
-
void set_noise_models(const std::vector<std::vector<NoiseModel>> &noise_models)
Set the noise models.
- Parameters
models – The noise models to use
-
const std::vector<std::vector<NoiseModel>> &get_noise_models() const
Get the noise models.
- Returns
The noise models to use
-
void set_output_amplitude(const std::map<std::string, std::complex<double>> &in_output_amplitude)
Set the amplitudes for Jensen–Shannon divergence calculation.
- Parameters
in_output_amplitude – Amplitude values
-
void set_output_amplitudes(const std::vector<std::vector<std::map<std::string, std::complex<double>>>> &in_output_amplitude)
Set the amplitudes for Jensen–Shannon divergence calculation.
- Parameters
in_output_amplitude – Amplitude values
-
const std::vector<std::vector<std::map<std::string, std::complex<double>>>> &get_output_amplitudes() const
Get the amplitudes for Jensen–Shannon divergence calculation.
- Returns
Amplitude values
-
void set_debug(const bool &debug)
Set the debug flag (verbose logging)
- Parameters
debug – Config. value
-
const bool &get_debug() const
Get the debug flag.
- Returns
Config. value
-
const VectorString &get_out_raws() const
Get the raw output bitstring results.
- Returns
Bitstring results
-
const Table2d<std::vector<int>> &get_out_counts() const
Get the output measurement counts as a vector.
- Returns
Measurement counts vector
-
const Table2d<std::vector<double>> &get_out_probs() const
Get the output probabilities.
- Returns
Measurement probabilities vector
-
const Table2d<Table2d<double>> &get_out_prob_jacobians() const
Get the output probability gradients.
- Returns
Table of probability jacobians w.r.t. runtime parameters
-
const VectorMapND &get_out_divergences() const
Get the output Jensen–Shannon divergence results.
- Returns
Divergence results
-
const VectorString &get_out_transpiled_circuits() const
Get the output transpiled circuits.
- Returns
Output transpiled circuits
-
const VectorString &get_out_qobjs() const
Get the output QObj Json strings.
- Returns
QObj Json strings
-
const VectorString &get_out_qbjsons() const
Get the output QB Json strings (hardware execution)
- Returns
QB Json strings
-
const VectorMapNN &get_out_single_qubit_gate_qtys() const
Get the output single-qubit gate counts.
- Returns
Single-qubit gate counts
-
const VectorMapNN &get_out_double_qubit_gate_qtys() const
Get the output two-qubit gate counts.
- Returns
Two-qubit gate counts
-
const VectorMapND &get_out_total_init_maxgate_readout_times() const
Get the output total circuit execution time (hardware runtime estimation)
- Returns
Estimated hardware runtime.
-
const VectorMapND &get_out_z_op_expects() const
Get the output expected value in the Z basis.
- Returns
expected value in the Z basis
-
void set_noise_mitigation(const std::string &noise_mitigate)
Set the noise mitigation method.
- Parameters
noise_mitigate – Noise mitigation method
-
void set_noise_mitigations(const VectorString &noise_mitigates)
Set the noise mitigation methods.
- Parameters
noise_mitigates – Noise mitigation methods
-
const VectorString &get_noise_mitigations() const
Get the noise mitigation methods.
- Returns
Noise mitigation methods
-
void set_seed(const size_t &in_seed)
Set the random seed value.
- Parameters
in_seed – Seed value
-
void set_seeds(const VectorN &in_seeds)
Set random seed values.
- Parameters
in_seeds – Seed values
-
const VectorN &get_seeds() const
Get random seed values.
- Returns
Seed values
-
const std::string get_summary() const
Get the summary of all session configurations.
- Returns
Session configuration summary
-
void setName(const VectorString &name_)
Set the names of tasks.
- Parameters
name_ – Task names
-
void setName(const std::string &name_)
Set the name of task.
- Parameters
name_ – Task name
-
const VectorString &getName() const
Get names of tasks.
- Returns
Task names
-
void get_jensen_shannon(const size_t &ii, const size_t &jj)
Compute the Jensen-Shannon divergence result for the (ii, jj) result.
- Parameters
ii – Row index
jj – Column index
-
void get_jensen_shannon()
Compute all the Jensen-Shannon divergence results.
-
void run(const size_t ii, const size_t jj)
Run a quantum task at the (ii, jj) index in the experiment table.
-
void validate_run()
Validate the run i.e. ensure all configurations are set in a valid manner.
-
void run()
Execute all quantum tasks.
-
void set_parallel_run_config(const std::string &in_config)
Set the multi-qpu run configurations: e.g., the list of QPUs paricipate in this run
Threadsafe execution of (ii, jj) task using the provided accelerator. Returns a job handle if the job is posted to a remote accelerator (e.g. AWS Braket). Otherwise, returns null if this function completes the run locally.
-
Executor &get_executor()
Get the QPU pool executor.
-
void qb12()
Shortcuts for setting defaults 12 qubits, 1024 shots, noiseless
-
void aws_setup(uint qn, uint sn, uint wn)
AWS defaults.
- Parameters
qn – Number of qubits
sn – Number of shots
wn – Number of asynchronous workers
-
inline size_t bitstring_index(std::string in_bitstring, size_t ii, size_t jj)
Returns the (base-10) integer vector index for the probabilities/ counts vector, corresponding to a bitstring for the quantum experiment at (ii, jj).
- Parameters
in_bitstring – The bitstring to be converted to the vector index
ii – The first index for the quantum experiment
jj – The second index for the quantum experiment
Public Static Attributes
-
static const char *help_out_counts_
-
static const char *help_out_probs_
-
static const char *help_out_jacobians_
Private Types
Private Functions
-
void set_log_enabled(const bool &in_log_enabled)
-
void set_log_enableds(const VectorBool &in_log_enabled)
-
const VectorBool &get_log_enableds() const
-
void set_beta(const ND &in_beta)
-
void set_betas(const VectorMapND &in_beta)
-
const VectorMapND &get_betas() const
-
int validate_sns_nonempty()
-
int validate_qns_nonempty()
-
int validate_rns_nonempty()
-
int validate_thetas_option()
-
int validate_instrings()
-
void validate_acc(const std::string &acc)
-
void validate_noise_mitigation(const std::string &noise_mitigate)
-
void validate_aer_sim_type(const std::string &sim_type)
-
void validate_measure_sample_options(const std::string &measure_sample_options)
-
int is_ii_consistent()
-
int is_jj_consistent()
-
circuit_input_types validate_infiles_instrings_randoms_irtarget_ms_nonempty(const size_t ii, const size_t jj)
-
std::string random_circuit(const int n_q, const int depth)
-
double get_jensen_shannon_divergence(const std::vector<int> counts, const std::vector<std::complex<double>> amplitudes)
-
std::string aer_circuit_transpiler(std::string &circuit)
-
void ensure_results_table_size(size_t ii, size_t jj)
Ensure that all result tables are resized/expanded to accommodate (ii, jj) experiment index.
-
run_i_j_config get_run_config(size_t ii, size_t jj)
Retrieve and validate run configurations for index pair (ii, jj) using the table index convention.
Helper to populate result tables (e.g. counts, expectation values, resource estimations) post-execution.
-
std::shared_ptr<xacc::CompositeInstruction> compile_input(const std::string &in_source_string, int in_num_qubits, source_string_type in_source_type)
Util method to compile input source string into IR This method is thread-safe, thus can be used to compile multiple source strings in parallel.
-
std::string get_target_circuit_qasm_string(size_t ii, size_t jj, const run_i_j_config &run_config)
Retrieve the target circuit string for (i, j) task: This will involve loading file (if file mode is selected), generate random circuit string (if random mode is selected), etc.
-
std::shared_ptr<xacc::Accelerator> get_sim_qpu(bool execute_on_hardware, const run_i_j_config &run_config)
Get the simulator based on
run_i_j_config
-
void run_gradients(const size_t ii, const size_t jj)
Calculate the gradients for the parametrized quantum task at the (ii, jj) index in the experiment table.
Execute the circuit on a simulator.
Internal (ii, jj) task execution. acc: if given (not null), this will be used for simulation. Otherwise, constructed from the run configuration for (ii, jj). optional_mutex: if not null, performed locking as appropriate to make this execution thread safe (e.g., accessing data members of this session instance).
Private Members
-
bool debug_
-
std::string remote_backend_database_path_
-
YAML::Node remote_backend_database_
-
VectorString name_m
-
std::vector<std::vector<std::vector<int>>> number_m
-
VectorString infiles_
-
VectorString include_qbs_
-
VectorString instrings_
-
std::vector<std::pair<std::string, std::function<void()>>> cudaq_kernels_
-
std::vector<std::vector<std::shared_ptr<xacc::CompositeInstruction>>> irtarget_ms_
-
VectorString accs_
-
VectorString aer_sim_types_
-
VectorN randoms_
-
VectorString placements_
-
VectorBool xasms_
-
VectorBool quil1s_
-
VectorBool noplacements_
-
VectorBool nooptimises_
-
VectorBool nosims_
-
VectorBool noises_
-
VectorBool output_oqm_enableds_
-
VectorBool log_enableds_
-
VectorBool notimings_
-
VectorBool calc_jacobians_
-
VectorN qns_
-
VectorN rns_
-
VectorN sns_
-
VectorN seeds_
-
VectorMapND betas_
-
VectorMapND thetas_
-
Table2d<std::vector<double>> parameter_vectors_
-
VectorN max_bond_dimensions_
-
VectorN initial_bond_dimensions_
-
VectorN max_kraus_dimensions_
-
VectorN initial_kraus_dimensions_
-
VectorMapND svd_cutoffs_
-
VectorMapND rel_svd_cutoffs_
-
VectorString measure_sample_sequentials_
-
std::vector<std::vector<NoiseModel>> noise_models_
-
VectorN acc_uses_n_bits_
-
std::vector<std::vector<std::map<std::string, std::complex<double>>>> output_amplitudes_
-
VectorString out_raws_
-
Table2d<std::vector<double>> out_probs_
-
Table2d<std::vector<int>> out_counts_
-
VectorMapND out_divergences_
-
VectorString out_transpiled_circuits_
-
VectorString out_qobjs_
-
VectorString out_qbjsons_
-
Table2d<Table2d<double>> out_prob_gradients_
-
VectorBool acc_uses_lsbs_
-
VectorMapNN out_single_qubit_gate_qtys_
-
VectorMapNN out_double_qubit_gate_qtys_
-
VectorMapND out_total_init_maxgate_readout_times_
-
VectorMapND out_z_op_expects_
-
std::shared_ptr<Executor> executor_
-
bool in_get_state_vec_
-
std::shared_ptr<std::vector<std::complex<double>>> state_vec_
-
VectorString error_mitigations_
-
const int INVALID = -1
-
const int VALID = 0
-
const size_t RANDOMS_UPPERBOUND = 1000
-
const size_t SNS_LOWERBOUND = 1
-
const size_t SNS_UPPERBOUND = 1000000
-
const size_t QNS_LOWERBOUND = 1
-
const size_t QNS_UPPERBOUND = 10000
-
const size_t RNS_LOWERBOUND = 1
-
const size_t RNS_UPPERBOUND = 1000000
-
const size_t MAX_BOND_DIMENSION_LOWERBOUND = 1
-
const size_t MAX_BOND_DIMENSION_UPPERBOUND = 50000
-
const size_t INITIAL_BOND_DIMENSION_LOWERBOUND = 1
-
const size_t INITIAL_BOND_DIMENSION_UPPERBOUND = 50000
-
const size_t MAX_KRAUS_DIMENSION_LOWERBOUND = 1
-
const size_t MAX_KRAUS_DIMENSION_UPPERBOUND = 50000
-
const size_t INITIAL_KRAUS_DIMENSION_LOWERBOUND = 1
-
const size_t INITIAL_KRAUS_DIMENSION_UPPERBOUND = 50000
-
std::unordered_set<std::string> VALID_ACCS = {"aer", "aws-braket", "tnqvm", "qpp", "qsim", "loopback", "qb-lambda", "sparse-sim", "cirq-qsim", "qb-mps", "qb-purification", "qb-mpdo"}
-
std::unordered_set<std::string> VALID_AER_SIM_TYPES = {"statevector", "density_matrix", "matrix_product_state"}
-
std::unordered_set<std::string> VALID_ERROR_MITIGATIONS = {"ro-error", "rich-extrap", "assignment-error-kernel"}
-
std::unordered_set<std::string> VALID_HARDWARE_PLACEMENTS = {"swap-shortest-path", "noise-aware"}
-
std::unordered_set<std::string> VALID_MEASURE_SAMPLING_OPTIONS = {"auto", "on", "off"}
Private Static Functions
-
static std::string convertRawOpenQasmToQBKernel(const std::string &in_rawQasm)
Wrap raw OpenQASM string in a QB Kernel:
Move qreg to a kernel argument
Denote the kernel name as ‘QBCIRCUIT’
Private Static Attributes
-
static const char *help_infiles_
-
static const char *help_instrings_
-
static const char *help_irtarget_ms_
-
static const char *help_include_qbs_
-
static const char *help_parameter_vectors_
-
static const char *help_calc_jacobians_
-
static const char *help_remote_backend_database_path_
-
static const char *help_accs_
-
static const char *help_aer_sim_types_
-
static const char *help_randoms_
-
static const char *help_xasms_
-
static const char *help_quil1s_
-
static const char *help_noplacements_
-
static const char *help_placements_
-
static const char *help_nooptimises_
-
static const char *help_circuit_opts_
-
static const char *help_nosims_
-
static const char *help_noises_
-
static const char *help_state_vec_
-
static const char *help_output_oqm_enableds_
-
static const char *help_log_enableds_
-
static const char *help_notimings_
-
static const char *help_qns_
-
static const char *help_rns_
-
static const char *help_sns_
-
static const char *help_betas_
-
static const char *help_thetas_
-
static const char *help_initial_bond_dimensions_
-
static const char *help_initial_kraus_dimensions_
-
static const char *help_max_bond_dimensions_
-
static const char *help_max_kraus_dimensions_
-
static const char *help_svd_cutoffs_
-
static const char *help_rel_svd_cutoffs_
-
static const char *help_measure_sample_sequentials_
-
static const char *help_noise_models_
-
static const char *help_output_amplitudes_
-
static const char *help_debug_
-
static const char *help_out_raws_
-
static const char *help_out_divergences_
-
static const char *help_out_transpiled_circuits_
-
static const char *help_out_qobjs_
-
static const char *help_out_qbjsons_
-
static const char *help_out_single_qubit_gate_qtys_
-
static const char *help_out_double_qubit_gate_qtys_
-
static const char *help_out_total_init_maxgate_readout_times_
-
static const char *help_out_z_op_expects_
-
static const char *help_noise_mitigations_
-
static const char *help_seeds_
-
static const char *help_bitstring_index_
-
session()