Skip to content

0.2.0

Choose a tag to compare

@thisac thisac released this 09 Feb 19:07
ecb8b06

New Features

  • Adds the get_qubit method to the Circuit class allowing for the retrieval of qubits in the circuit by label.

    circuit = Circuit()
    circuit.add_qubit(Qubit("my_qubit"))
    
    qubit = circuit.get_qubit("my_qubit")
  • Add support for mid-circuit measurements.

  • Add support for operations conditioned on measurements.

  • Add support for measurement sampling and expectation value calculations.

  • Circuit context returns the classical register together with QuantumRegister. The two
    registers are contained within a tuple and are returned as with circuit.context as (q, c),
    instead of with circuit.context as q.

    circuit = Circuit(2, 2)
    
    with circuit.context as (q, c):
        ops.X(q[0])
  • Add a Windows executable makefile (make.bat)

  • Add make docs and make clean-docs commands to the makefile for building and
    cleaning/removing the documentation locally.

Upgrade Notes

  • Update context to return a NamedTuple instead of a regular tuple, allowing for the registers
    to be returned as previously, directly unpacked into q and c, or as a named Registers
    tuple and retrieved via Registers.q and Registers.c respectively.

  • Update parametric context to return a NamedTuple instead of a regular tuple similar to the
    non-parametric context upgrade, with the parameter register accessed via Registers.p.

    circuit = ParametricCircuit(2, 2)
    
    with circuit.context as reg:
        ops.RX(reg.p[0], reg.q[0])
  • Check types when adding qubits/bits to a circuit and raise a TypeError if an incorrect type
    is passed to the method.

  • Rename label to name for operations.

Bug Fixes

  • Fixes an issue where an error is being raised when subsequent measurements are made on the same
    qubit. Instead, any subsequent measurement will replace the former one at simulation runtime.

  • Fix inconsistent spacing in primitive object representations.

  • Fix sequential qubit/bit labelling when adding new registers.

  • Update operation representations to use repr() for hashables.

  • Adds pip installation step to make install command.

  • Expand installation section in the README to include installation on Windows (using
    make.bat) and add details to installation steps.