Runtime integration for streamlined access to OQC simulators and QPUs.
OQCProvider
, OQCDevice
, and OQCJob
classes to submit and manage jobs on Oxford Quantum Circuits (OQC) QPUs and simulators.
oqc
extra:
OQCProvider
and initializing it with your API token.
This token authenticates your access to the OQC cloud platform:
"https://cloud.oqc.app/"
. If needed, you can specify a custom endpoint:
shots
: The number of times the circuit is ran. The default value is 1000.repetition_period
: The length of time in between shots. The default value is 200e-6 seconds and OQC strongly recommends that you use the default unless you thoroughly understand the potential impact.results_format
: The two options for this are 'raw'
and 'binary'
.metrics
: The type of metrics you want to be recorded. The only metrics related to a task are its optimized circuit and the corresponding instruction count. So, there are four options:
'default'
: Returns both metrics.'empty'
: Returns no metrics.'optimized_circuit'
: Returns the optimized qasm2 circuit.'optimized_instruction_count'
: Returns the instruction count of the optimized circuit.optimizations
: These are the optimizations you want to perform on the input program(s). OQC uses the tKet optimization compiler, as it is integrated into their compiler pipeline. Documention on these are in the pytket.passes documentation, and below are the instructions to access them through OQCDevice.run()
:
Option | TKET pass |
---|---|
'clifford_simplify' | CliffordSimp |
'context_simplify' | ContextSimp |
'decompose_controlled_gates' | DecomposeArbitrarilyControlledGates |
'default_mapping_pass' | DefaultMappingPass |
'empty' | Empty |
'full_peephole_optimise' | FullPeepholeOptimise |
'globalise_phased_x' | GlobalisePhasedX |
'kak_decomposition' | KAKDecomposition |
'one' | One |
'peephole_optimise_2q' | PeepholeOptimise2Q |
'remove_barriers' | RemoveBarriers |
'remove_discarded' | RemoveDiscarded |
'remove_redundancies' | RemoveRedundancies |
'simplify_measured' | SimplifyMeasured |
'three_qubit_squash' | ThreeQubitSquash |
'two' | Two |
qbraid.transpile(program, "qasm3")
) can be passed directly to the OQCDevice.run()
method.include
statements will be removed from transpiled OpenQASM 3 program upon submission, as they are not recognized by OQC.stdgates.inc
gate set plus the ecr
gate.