Function reference

Core type

QuantumCircuitOpt.QuantumCircuitModel — Type
QuantumCircuitModel

The composite mutable struct, QuantumCircuitModel, holds dictionaries for input data, abstract JuMP model for optimization, variable references and result from solving the JuMP model.

source

Model construction and optimization

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.

source
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.

source
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.

source
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.

source
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.

source

Logging