Base Functions

QuantumAnnealing.int_to_binaryMethod

converts a integer id into a binary state vector following the package conventions valid ints are from 0-to-2^n-1 pad should be the total number qubits in the system

source
QuantumAnnealing.int_to_spinMethod

converts a integer id into a spin state vector following the package conventions valid ints are from 0-to-2^n-1 pad should be the total number qubits in the system

source
QuantumAnnealing.print_z_state_probabilitiesMethod

given a 2^n vector of probably values, prints each value and its associated state vector. limit is used to limit the total number of states that are printed. sort is used to re-order the states by most likely instead of the default which is numerical order from 0-to-(2^n-1)

source

Simulate Functions

QuantumAnnealing.hamiltonian_transverse_isingMethod

Function to build the transverse field Ising model hamiltonian at a given unitless timestep s.

Arguments: isingmodel - ising model represented as a dictionary. The qubits and couplings are represented as tuples, and the weights are numbers. For Example: im = Dict((1,) => 1, (2,) => 0.5, (1,2) => 2) annealingschedule - The annealing schedule, of the form given by the struct s - the imaginary timestep. This should usually be in the range from 0.0-to-1.0

source
QuantumAnnealing.simulateMethod

Main function for performing quantum annealing simulation via a Magnus Expansion (second order). Noise can be simulated by running multiple times with randomized constant fields.

Arguments: isingmodel - ising model represented as a dictionary. The qubits and couplings are represented as tuples, and the weights are numbers. For Example: im = Dict((1,) => 1, (2,) => 0.5, (1,2) => 2) annealingschedule - The annealing schedule, of the form given by the struct

Parameters: initialstate - Initial state vector. Defaults to uniform superposition state on n qubits constantfieldx - vector of constant biases in the X basis on each qubit. Default is zeros(n) constantfieldz - vector of constant biases in the Z basis on each qubit. Default is zeros(n) The parameters `meantolandmax_tolspecify the desired simulation accuracy. Thesilence` parameter can be used to suppress the progress log.

source
QuantumAnnealing.simulate_deMethod

simulator that uses the DifferentialEquations.jl differential equation solver to solve the Schrodinger Equation, rather than the Magnus Expansion. This simulator can run into issues at higher anneal times. The API is the same as for the simulate function.

Arguments: isingmodel - ising model represented as a dictionary. The qubits and couplings are represented as tuples, and the weights are numbers. For Example: im = Dict((1,) => 1, (2,) => 0.5, (1,2) => 2) annealingschedule - The annealing schedule, of the form given by the struct reltol - the relative tolerance that will be used in the ODE simulation

Parameters: initialstate - Initial state vector. Defaults to uniform superposition state on n qubits constantfieldx - vector of constant biases in the X basis on each qubit. Default is zeros(n) constantfield_z - vector of constant biases in the Z basis on each qubit. Default is zeros(n)

source
QuantumAnnealing.simulate_deMethod

A simplified interface to the simulate_de routine that determines suitable tolerance values to ensure a high accuracy simulation. The parameters mean_tol and max_tol specify the desired simulation accuracy. The silence parameter can be used to suppress the progress log.

source

Annealing Schedules

QuantumAnnealing.AnnealingScheduleType

A data structure containing two uni-variate functions defined in the domain of 0.0-to-1.0. The A function drives the evolution of the X basis and the B function drives the evolution of the Z basis. init_default is a uni-variate function that given an integer n builds a initial state vector for an n qubit system.

source
QuantumAnnealing.AS_DW_QUADRATICConstant

An AnnealingSchedule approximating those used in hardware by D-Wave Systems

NOTE: users are strongly encouraged to download annealing schedules for specific D-Wave Systems devices and load them using parse_dwave_annealing_schedule.

source

Ising Functions

QuantumAnnealing.print_ising_energy_levelsMethod

given an Ising model prints state strings by ascending energy levels. limit is used the stop the printing after a number of energy levels have been presented (limit <= 0 will print all states).

source

D-Wave Functions

QuantumAnnealing.annealing_protocol_dwaveMethod

Function to modify an existing annealing schedule to use a customized annealing schedule (asch). These parameters are the same as those used in a dwisc call or a dwave schedule. Inputs: annealingschedule - annealingschedule

Parameters: asch - This is the annealing-schedule parameter. This is a list of tuples of the form [(s₀,seffective₀), (s₀,seffective₁), ..., (sₙ,s_effectiveₙ)].

source
QuantumAnnealing.read_bqpjsonMethod

This function reads in a bqpjson file and generates the ising model dictionary inputs: bqpjson::String - a bqpjson file (v1.0.0) that can be run on D-Wave hardware outputs: n - number of qubits ising_model::Dict{Tuple => Float64} - Dictionary of qubits and couplings to weights mapping:Dict{Int => Int} - mapping of the qubits in the bqpjson file to simulation qubits

source