QFASTDecompositionPass

class QFASTDecompositionPass(gate=PauliGate(2), success_threshold=1e-08, progress_threshold=0.005, cost=<bqskit.ir.opt.cost.functions.residuals.hilbertschmidt.HilbertSchmidtResidualsGenerator object>, max_depth=None, instantiate_options={})[source]

Bases: SynthesisPass

A pass performing one round of decomposition from the QFAST algorithm.

References

E. Younis, K. Sen, K. Yelick and C. Iancu, “QFAST: Conflating Search and Numerical Optimization for Scalable Quantum Circuit Synthesis,” 2021 IEEE International Conference on Quantum Computing and Engineering (QCE), 2021, pp. 232-243, doi: 10.1109/QCE52317.2021.00041.

__init__(gate=PauliGate(2), success_threshold=1e-08, progress_threshold=0.005, cost=<bqskit.ir.opt.cost.functions.residuals.hilbertschmidt.HilbertSchmidtResidualsGenerator object>, max_depth=None, instantiate_options={})[source]

QFASTDecompositionPass Constructor.

Parameters:
  • gate (Gate) – The gate to decompose unitaries into. Ensure that the gate specified is expressive over the unitaries being synthesized. (Default: PauliGate(2))

  • success_threshold (float) – The distance threshold that determines successful termintation. Measured in cost described by the cost function. (Default: 1e-8)

  • progress_threshold (float) – The distance necessary to improve for the synthesis algorithm to complete a layer and move on. Lowering this will led to synthesis going deeper quicker, and raising it will force to algorithm to spend more time on each layer. Caution, changing this too much might break the synthesis algorithm. (Default: 5e-3)

  • cost (CostFunction | None) – The cost function that determines distance during synthesis. The goal of this synthesis pass is to implement circuits for the given unitaries that have a cost less than the success_threshold. (Default: HSDistance())

  • max_depth (int) – The maximum number of gates to append without success before termination. If left as None it will default to unlimited. (Default: None)

  • (dict[str (instantiate_options) – Any]): Options passed directly to circuit.instantiate when instantiating circuit templates. (Default: {})

Raises:

ValueError – If max_depth is nonpositive.

Attributes

name

The name of the pass.

Methods

can_restrict(head)

Return true if the VLG head can be restricted further.

execute(*args, **kwargs)

Map a function over iterable arguments in parallel.

expand(circuit, location, locations)

Expand the circuit after a successful layer.

finalize(circuit, utry, instantiate_options)

Finalize the circuit by replacing the head with self.gate.

get_connectivity(_, data)

Retrieve the current connectivity of the circuit.

get_location_of_head(circuit)

Return the current location of the circuit's VLG head.

get_model(_, data)

Retrieve the machine model from the data dictionary.

get_placement(_, data)

Retrieve the logical to physical qubit map from the data dictionary.

get_target(_, data)

Retrieve the target from the data dictionary.

in_parallel(data)

Return true if pass is being executed in a parallel.

lift_head_restrictions(circuit, locations)

Set the circuit's VLG head's valid locations to locations.

restrict_head(circuit, location)

Remove location from the VLG Head in circuit.

run(circuit, data)

Perform the pass's operation, see BasePass for more.

synthesize(utry, data)

Synthesize utry, see SynthesisPass for more.