dwavesystems / dwave-gate

dwave-gate is a software package for constructing, modifying and running quantum circuits on the provided state-vector simulator.
Apache License 2.0
12 stars 7 forks source link

Add QIR compilation support #32

Closed thisac closed 1 year ago

thisac commented 1 year ago

Add support for QIR compilation to dwave-gate. This includes support for:

circuit = Circuit(3, 3)

with circuit.context as reg:
    ops.X(reg.q[0])
    ops.CX(reg.q[1], reg.q[2])
    ops.Measurement(reg.q) | reg.c

qir_string = circuit.to_qir()
circuit = Circuit.from_qir(qir_string)
codecov[bot] commented 1 year ago

Codecov Report

Merging #32 (861915e) into master (ecb8b06) will decrease coverage by 0.14%. The diff coverage is 99.40%.

@@             Coverage Diff             @@
##            master      #32      +/-   ##
===========================================
- Coverage   100.00%   99.86%   -0.14%     
===========================================
  Files           15       19       +4     
  Lines         1191     1523     +332     
  Branches       184      250      +66     
===========================================
+ Hits          1191     1521     +330     
- Misses           0        1       +1     
- Partials         0        1       +1     
Impacted Files Coverage Δ
dwave/gate/operations/operations.py 100.00% <ø> (ø)
dwave/gate/tools/unitary.py 100.00% <ø> (ø)
dwave/gate/utils.py 100.00% <ø> (ø)
dwave/gate/qir/loader.py 97.29% <97.29%> (ø)
dwave/gate/circuit.py 100.00% <100.00%> (ø)
dwave/gate/operations/base.py 100.00% <100.00%> (ø)
dwave/gate/qir/__init__.py 100.00% <100.00%> (ø)
dwave/gate/qir/compiler.py 100.00% <100.00%> (ø)
dwave/gate/qir/instructions.py 100.00% <100.00%> (ø)

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more