Execution utilities
MimiqCircuits.QCSError — Type
QCSError(msg)Error reported by the remote executor for a single circuit of a job.
getresults returns a QCSError in place of the QCSResults of each circuit that failed to run, so the results of the other circuits in the same job stay available. It is returned, not thrown: check for it with result isa QCSError, and read the reason from result.msg. Use throw to turn it into an exception.
A job that fails as a whole raises an error from getresults instead.
See also getresults, getresult.
MimiqCircuits.check_equivalence — Method
check_equivalence(conn, ex::CircuitTesterExperiment; kwargs...)Executes the circuit tester experiment and verifies the results. Blocks until the execution is complete.
MimiqCircuits.getinput — Method
getinput(connection, execution)Returns the first circuit and parameters for the given execution.
See also getinputs, getresults, getresult.
MimiqCircuits.getinputs — Method
getinputs(connection, execution)Returns the circuits and parameters for the given execution.
See also getinput, getresults, getresult.
MimiqCircuits.getresult — Method
getresult(connection, execution)Returns the first circuit and parameters for the given execution.
See also getinputs, getinput, getresults.
MimiqCircuits.getresults — Method
getresults(connection, execution[; interval=1])Block until the given execution is finished and return the results.
Keyword Arguments
interval: time interval in seconds to check for job completion (default: 1)
MimiqCircuits.loadresults — Method
loadresults(file)Load results from a given file.
MimiqCircuits.optimize — Method
optimize(connection, experiment[; kwargs...])
optimize(connection, experiments[; kwargs...])Run a classical optimization experiment using MIMIQ remote services.
This method uploads one or more OptimizationExperiments to the server and launches a classical optimizer to find the best parameter values minimizing a cost function derived from quantum circuit measurements.
Keyword Arguments
label::String: mnemonic name for the optimization job (default:"julia_"+ version string)algorithm::String: name of the optimization algorithm to use (default:"auto")nsamples::Int: number of samples to collect per function evaluation (default: 1000, maximum: 2^16)timelimit::Int: maximum wall-clock time (in minutes) allowed for the job (default: connection limit or 30)bonddim::Int: bond dimension used by the MPS backend if applicable (default: 256, maximum: 4096)entdim::Int: entanglement dimension used to control circuit pre-compression (default: 16, range: 4–64)mpscutoff::Float64: singular value truncation cutoff for MPS simulation. Smaller values give higher accuracy at increased cost. (default: up to remote)fuse::Bool: whether to fuse gates prior to simulation (default: remote service decides)reorderqubits::Bool: whether to reorder qubits for improved simulation performance (default: remote service decides)seed::Int: random seed for reproducibility (default: random)force::Bool: force dimension parameters (default: false)history::Bool: whether to return the full optimization history (default: false)
MimiqCircuits.saveresults — Method
saveresults(file, results)Save results to a given file.
MimiqCircuits.submit — Method
submit(connection, circuit[; kwargs...])
submit(connection, circuits[; kwargs...])
submit(connection, circuit, noisemodel[; kwargs...])
submit(connection, circuits, noisemodel[; kwargs...])Submit and schedule a quantum circuit execution on the MIMIQ remote services. Returns a Job object (non-blocking).
The circuit is applied to the zero state and the resulting state is measured via sampling. Optionally amplitudes corresponding to few selected bit states (or bitstrings) can be returned from the computation.
Keyword Arguments
label::String: mnemonic name to give to the simulation, will be visible on the web interfacealgorithm: algorithm to use by the compuation. By default"auto"will select the fastest algorithm between"statevector"or"mps".nsamples::Integer: number of times to sample the circuit (default: 1000, maximum: 2^16)bitstrings::Vector{BitString}: list of bit states to compute the amplitudes for (default:BitString[])timelimit: number of minutes before the computation is stopped (default: maximum allowed or 30 minutes)bonddim::Int: bond dimension for the MPS algorithm (default: 256, maximum: 4096)entdim::Int: parameter to control pre compression of the circuit. Higher value makes simulations slower. (default: 16, minimum:4, maximum: 64)mpscutoff::Float64: singular value truncation cutoff for MPS simulation. Smaller values give higher accuracy at increased cost. (default: up to remote)remove_swaps::Bool: whether or not to remove SWAP gates while permuting the qubits (default: up to remote)canonicaldecompose::Bool: whether or not to decompose the circuit into GateU and GateCX (default: up to remote)fuse::Bool: whether or not to fuse the gates in the circuit (default: up to remote)reorderqubits: whether or not to reorder the qubits in the circuit. Can betrue(default reordering),false(no reordering), or aSymbol/Stringfor a specific method (e.g.,:greedy,:spectral,:rcm,:sa_warm_start,:sa_only,:memetic,:multilevel,:grasp,:hybrid). (default: up to remote)reorderqubits_seed::Union{Nothing, Integer}: independent seed for the qubit reordering RNG, allowing reproducible reordering independently of the simulation seed. (default:nothing, uses main seed)seed::Int: a seed for running the simulation (default: random seed)mpsmethod::Symbol: method to use for MPO application in MPS simulations. Can be:dmpofor direct application or:vmpoa/:vmpobfor variational search. (default: up to remote)mpotraversal::Symbol: method to traverse the circuit while compressing it into MPOs. Can be:sequential(default) or:bfs(Breadth-First Search). (default: up to remote)streaming::Bool: whether or not to use the streaming simulator (default:false)