Function reference
Core type
QuantumCircuitOpt.QuantumCircuitModel — Type
QuantumCircuitModelThe composite mutable struct, QuantumCircuitModel, holds dictionaries for input data, abstract JuMP model for optimization, variable references and result from solving the JuMP model.
Model construction and optimization
QuantumCircuitOpt.get_default_options — Function
get_default_options()This function returns the default options for building the struct QCModelOptions.
QuantumCircuitOpt.get_data — Function
get_data(params::Dict{String, Any}; eliminate_identical_gates = true)Given the user input params dictionary, this function returns a dictionary of processed data which contains all the necessary information to formulate the optimization model for the circuit design problem.
QuantumCircuitOpt.unitary — Function
unitary(input::String, num_qubits::Int64; angle = nothing)Given an input string representing the gate and number of qubits of the circuit, this function returns a full-sized gate with respect to the input number of qubits. For example, if num_qubits = 3 and the input gate in H_3 (Hadamard on third qubit), then this function returns IGate ⨂ IGate ⨂ HGate, where IGate and HGate are single qubit Identity and Hadamard gates, respectively. Note that angle vector is an optional input which is necessary when the input gate is parametrized by Euler angles.
QuantumCircuitOpt.build_QCModel — Function
build_QCModel(data::Dict{String,Any}; options = nothing)Build and return a QuantumCircuitModel from processed circuit data. Pass a Dict{Symbol,Any} as options to override values returned by get_default_options.
QuantumCircuitOpt.optimize_QCModel! — Function
optimize_QCModel!(qcm::QuantumCircuitModel; optimizer = nothing)Optimize qcm with an optional JuMP optimizer and return the result dictionary. The optimizer may be omitted when the underlying JuMP model already has one.
QuantumCircuitOpt.run_QCModel — Function
run_QCModel(params::Dict{String,Any}, optimizer::MOI.OptimizerWithAttributes;
options = nothing)Process circuit params, build and optimize the quantum-circuit model, and return its result dictionary. options overrides model defaults.
QuantumCircuitOpt.visualize_solution — Function
visualize_solution(results::Dict{String, Any}, data::Dict{String, Any}; gate_sequence = false)Given dictionaries of results and data, and assuming that the optimization model had a feasible solution, this function aids in visualizing the optimal circuit decomposition.
Logging
QuantumCircuitOpt.silence — Function
Suppresses information and warning messages output by QuantumCircuitOpt.
QuantumCircuitOpt.logger_config! — Function
allows the user to set the logging level