All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Transpiled circuits can now have "measure" gates, introduced with
the
circ.m(qubit, plane, angle)
method. The measured qubit cannot be used in any subsequent gate. - Added
gflow.find_pauliflow
,gflow.verify_pauliflow
andpauliflow_from_pattern
methods (#117) - Pauli-flow finding algorithm (#117)
- workflow for isort, codecov (#148, #147)
- Fix output node order sorting bug in Pauli preprocessing
measure_pauli
(#145)
- The transpiler now returns a
TranspileResult
dataclass: the pattern is available in thepattern
field, and the fieldclassical_outputs
contains the index where the classical measures can be found in theresults
array of the simulator. - The circuit simulator now returns a
SimulateResult
dataclass: the state vector is available in thestatevec
field, and the fieldclassical_measures
contains the results of the measure gates. - Patterns are now allowed to measure all their nodes, and have an empty output set.
- Completely migrated to pytest, no
unittest
usage remains (#134)
- Added flow and gflow verifiers (#99).
- Added
gflow.flow_from_pattern
method. - Added noisy MBQC simulation backend.
sim.density_matrix
module added for density matrix simulation backend, which is incorporated into thesimulator.PatternSimulator
interface.noise_models
module, containing abstractclassNoiseModel
and a simplified model (no noise)NoiseLessNoiseModel
, to define operaion-specfic channels (e.g. 'N' and 'E' commands have separate noise models expressed by Kraus channels).channels
module, definingKrausChannel
class.random_objects
andlinalg_validations
module for math support: random state, random unitary, random maps, matrix validations for channel definition.
- Fixed bug in index permutation within
linalg.MatGF2
andgflow.find_gflow
. - Fixed
gflow.gflow_from_pattern
method.
- Renamed methods;
gflow.flow
andgflow.gflow
are nowgflow.find_flow
andgflow.find_gflow
, respectively. Pattern.seq
is renamed into a private fieldPattern.__seq
andPattern.Nnode
is now a read-only property.Pattern
constructor now only takes an optional list ofinput_nodes
, and can only be updated viaadd
andextend
.Pattern
are now iterable andlen
is now defined for patterns: we should writefor command in pattern:
instead offor command in pattern.seq:
andlen(pattern)
instead oflen(pattern.seq)
.N
commands are no longer added byPattern
constructor and should be added explicitly after the instantiation.- Changed the behavior of visualization in the
GraphVisualizer
class. Prepared avisualize
method that visualizes based on the graph only, and avisualize_from_pattern
that visualizes based on the pattern. Both search for gflow or flow, and if found, plot them. If not found, in the case of from the graph, only the graph is drawn, and in the case of from the pattern, both the graph and all correction sets are drawn. - Removed
paddle
from benchmarks following github dependabot alert. PatternSimulator
takes optional argument noise_model during init, to specify noise model fordensitymatrix
simualtion.
- Added
rustworkx
as a backend for the graph state simulator- Only
networkx
backend was available for pattern optimization. By setting theuse_rustworkx
option to True while usingPattern.perform_pauli_measurements()
, graphix will run pattern optimization usingrustworkx
(#98)
- Only
- Added
.ccx
and.swap
methods tographix.Circuit
.
- Fixed gflow-based graph visualization (#107)
- internal updates of gflow and linear algebra functionalities:
- A new option
mode
ingflow.gflow
, specifying whether to obtain all possible maximally delayed gflow or not (#80) - New
MatGF2
class that computes elementary operations and Gauss-Jordan elimination on GF2 field, for faster gflow-finding (#80)
- A new option
- Removed
z3-solver
and addedgalois
andsympy
inrequirements.txt
(#80)
- Removed
timeout
optional arguments fromgflow.flow
andgflow.gflow
.
- Bugfix conditional branch in
gflow.gflowaux
(#80)
- Add support for python 3.11
- Visualization tool of resource state for a pattern, with flow or gflow structures (#78)
- Visualize the resource state by calling
Pattern.draw_graph()
- Tool to extract fusion network from the resource state of a pattern (#87).
input_nodes
attribute added to the pattern class (#88)leave_input
optional argument toPattern.perform_pauli_measurements()
which leaves the input qubits unmeasured during the optimization.
- bump networkx version to 3.* (#82)
- Fast alternative to partial trace (
Statevec.remove_qubit
) for a separable (post-measurement) qubit (#73)
StatevectorBackend
now usesStatevec.remove_qubit
after each measurement, instead of performingptrace
after multiple measurements, for better performance. This keeps the result exactly the same (#73)- bump dependency versions for docs build (#77)
- Interface to run patterns on the IBMQ devices. (see PR) (#44)
- Quantum classifier demo (#57) by @Gopal-Dahale
- fixed a bug in a code snippet isn docs (#59), as pointed out by @zilkf92
- fixed issue building docs on readthedocs (#61)
- fixed bug in pauli preprocessing routine and graph state simulator (#63)
- Second output of
pattern.pauli_nodes
(non_pauli_node
list) is now list of nodes, not list of lists (commands).
- Fast pattern standardization and signal shfiting with
pattern.LocalPattern
class (#42), performance report at #43 - Defaulted local pattern method for
graphix.Pattern.standardize()
andgraphix.Pattern.shift_signals()
. Note the resulting pattern is equivalent to the output of original method. - Automatic selection of appropriate tensor network graph state preparation strategy
graph_prep="auto"
argument for instantiation ofTensorNetworkBackend
(#50)
- option
graph_prep="opt"
forgraph_prep
kwarg ofTensorNetworkBackend
(#50) will be deprecated, and will be replaced bygraph_prep="parallel"
, as we identified thatparallel
preparation is not always optimal.
- Move import path of
generate_from_pattern
fromgraphix.gflow
tograhpix.generator
(#40) - Rename
Pattern.get_measurement_order
toPattern.get_measurement_commands
(#40) - Modify
Pattern.get_meas_plane
method to work for Clifford-decorated nodes (#40)
- Fix QFT circuits in examples (#38)
- Fix the stability issue of
Pattern.minimize_space
method which sometimes failed to give theoretical minimum space for patterns with flow (#40)
- Fast circuit translation for some types gates and circuits (see PR) (#16)
- Additional required modules:
quimb
andautoray
for more performant TN backend (#32)
- Restructured tensor-network simulator backend for more optimized contraction (#32)
- Modify TN simulator interface to
TensorNetwork
fromMPS
(#32)
- Treatment of isolated node in
perform_pauli_measurements()
method (#36)
- added QAOA demo to documentation and improved readme
- Fix manual input pattern (#11)
- nested array error in numpy 1.24 (deprecated from 1.23.*) fixed and numpy version changed in requirements.txt (#7)
- circuit.standardize_and_transpile() error fixed (#9)