True-Q™ Changelog
All notable changes to True-Q™ will be documented in this file.
[2.14.5] - 2024-04-26
Changed
The required qutip version to
>=4.7.0and<5.0.
[2.14.4] - 2024-03-26
Changed
The required qiskit version to
<1.0.The required pyquil version to
>=3.5.6.
Fixed
A bug with the documentation search bar.
[2.14.3] - 2023-08-24
Changed
Bumped the required NumPy version to
1.20.0.
Removed
Dropped support for Python 3.7.
[2.14.2] - 2022-12-20
Changed
Updated documentation.
[2.14.1] - 2022-10-24
Changed
Changed
trueq.compilation.RCKakto allow randomly compiling with arbitrary multi-qudit gates, which was previously limited to qubits only.
[2.14.0] - 2022-10-06
Changed
Switched the licensing method used by True-Q to PathWave License Manager. Please see the Readme for new installation instructions and more information on Keysight Licensing.
[2.13.4] - 2022-10-04
Added
Added support for
trueq.CircuitCollectionintrueq.compilation.Compiler.compile().
Changed
Improved the performance of
trueq.compilation.Compiler.compile()when called with multiple instances oftrueq.compilation.BackendPass.
Fixed
Fixed a bug in
trueq.CircuitCollection.append()where batch circuits were allowed to be passed into the argument without raising a value error.
[2.13.3] - 2022-09-28
Added
Added
analyze_dimto the options argument oftrueq.CircuitCollection.fit()so a user specified dimension can be used instead of the dimension of the circuit collection.Added qudit support for
trueq.Simulator.add_knr_noise().
Changed
Updated the minimum supported version of the optional dependency
qiskitto0.24.0.
Fixed
Fixed a bug in
trueq.compilation.Relabelwhere some keys of the relabeled circuit would not be updated correctly.Fixed a bug in
trueq.protocols.make_nox()where the input circuit was copied with results.Fixed a bug in
trueq.Simulator.predict_knr()where the simulator would improperly apply the noise to some cycles.
[2.13.2] - 2022-08-22
Added
Added the optional argument
n_markedtotrueq.protocols.make_nox()to reduce the number of NOX circuits and speed up the execution.Added
trueq.Subsystems.limit_size()to generate newtrueq.Subsystemswith elements of length less than a given size.Added optional
scalingsargument totrueq.compilation.FactoryNoiseTopologyto facilitate, for example, radian to degree conversion.
Changed
Changed
trueq.compilation.RCKakto allow randomly compiling with arbitrary multi-qubit gates. Previously,trueq.compilation.RCKakwas limited to one- and two-qubit gates.
Fixed
Fixed a bug in CB analysis where the
targeted_errorskey interacted incorrectly with thelabelsparameter oftrueq.CircuitCollection.fit().Fixed a bug in the
trueq.compiler.DeferredSwappercompiler pass that was clearing the circuit keys.
[2.13.1] - 2022-08-04
Added
Added tools for fidelity-aware gate decomposition strategies, in particular the following classes were added:
trueq.compiler.DecompStrategy,trueq.compiler.FactoryNoiseTopology,trueq.compiler.CPhaseStrategy,trueq.compiler.XYStrategy,trueq.compiler.CPhaseXYJointStrategy, andtrueq.compiler.BestCostDecomposer.Added the optional arguments
include_valsandinclude_stdstotrueq.estimate.Array.to_dataframe().
Changed
Changed
trueq.protocols.make_nox()so that it also amplifies the noise of cycles that containtrueq.Prep().
Fixed
Fixed a bug where
trueq.CircuitCollection.fit()would throw an error if results contained an unexpected outcome, e.g., a2in a qubit experiment.Fixed
trueq.estimate.Array.to_dataframe()when the array is 1D.
[2.13.0] - 2022-07-28
Added
Added
trueq.compilation.AllocateLabelsandtrueq.compilation.DeferredSwapperfor compiling circuits to native topologies.Added
trueq.protocols.make_nox()to generate circuits for Noiseless Output Extrapolation (NOX).Added options argument to
trueq.CircuitCollection.fit()to specify the observables to compute expectation values of when NOX circuits are present.Added the
trueq.CircuitCollection.dimproperty.Added
trueq.compilation.RCKakto allow randomly compiling cycles with arbitrary 2-qubit gates.
Changed
Changed the convention of the Weyl chamber of
trueq.math.kak()to90 >= x >= y >= abs(z)andz >= 0wheneverx == 90. Previously, it had been180 >= x >= y >= z >= 0,x + y <= 180, andx <= 90wheneverz == 0.Changed the
trueq.Circuit.dimproperty to inherit the dimension of a circuit’s results when it has no cycles presents.Changed
trueq.Circuit.append()andtrueq.Circuit.prepend()to only allow for insertion of cycles or circuits of the same subsystem dimension.Changed
trueq.CircuitCollection.append()to only allow for circuit collections with circuits of the same subsystem dimension.Changed
trueq.Resultsobjects to be initialized with a dimension ofNonewhen not explicitly set through thedimorvaluearguments if there are no results.Updated the minimum required MacOS version to
Big Sur (11.0).
Removed
Removed deprecated
trueq.EstimateCollection.values(),trueq.math.Frame,trueq.math.pauli_basis, then_bodiesargument oftrueq.make_knr(),trueq.compilation.Merge.n_labels, andtrueq.Simulator.add_povm().
[2.12.4] - 2022-07-05
Added
Added an optional parameter to
trueq.compilation.decompose_clifford()for specifying a root vertex of the graph.Added
trueq.visualization.Graph.ibmq_7()for creating graphs based on 7 qubit IBMQ devices.
Changed
Updated the minimum supported version of the optional dependency
cirqto0.8.0.
[2.12.3] - 2022-06-21
Added
Added
trueq.Subsystems.nearest_neighbour()to generatetrueq.Subsystemsobjects fromtrueq.visualization.Graphobjects.Added
edgesandlabelsproperties totrueq.visualization.Graph.Added
trueq.utils.delayed_importfor importing optional packages when they are first invoked rather than at True-Q import time.Added
trueq.NormalEstimate.raw, which replacestrueq.NormalEstimate.decays.Added
trueq.interface.cirq.load(),trueq.interface.pyquil.load(), andtrueq.interface.qiskit.load()for forcing an import of their respective optional third-party libraries,cirq,pyquil, andqiskit.Added
trueq.utils.dict_to_words()for converting dictionaries to strings.Added
trueq.EstimateCollection.array()for extracting rectangular data from estimate collections in terms of the new classtrueq.EstimateArray.Added ability to convert fit estimates to
pandas.DataFrameviatrueq.EstimateCollection.array().to_dataframe().Added boolean
error_barsoption totrueq.Results.plot()andtrueq.visualization.plot_results().Added
trueq.Gate.to_clifford()to generate thetrueq.math.Cliffordof Clifford gates.Added the
trueq.Gate.is_cliffordproperty.
Changed
True-Q interfaces (Cirq, PyQuil, and Qiskit) no longer import their respective optional third-party libraries at True-Q import time. Instead, they are imported the first time they are required, raising an
ImportErrorif the optional dependency is not available. This has the advantage of improving True-Q import time as unused interfaces will never have their dependency imported. However, it also means thatto_trueq()converters cannot be attached to third-party circuit classes at True-Q import time—this is instead done when the third-party library is requested by the interface, including the newload()method on each interface (e.g.trueq.interface.pyquil.load()).trueq.interface.cirq,trueq.interface.pyquil,trueq.interface.qasm, andtrueq.interface.qiskitare no longer static classes, but instances of respective classestrueq.interface.cirq_interface.CirqInterface,trueq.interface.pyquil.PyQuilInterface,trueq.interface.qasm_interface.QasmInterface, andtrueq.interface.qiskit_interface.QiskitInterface.Instances of the Qiskit
trueq.interface.Executorclass now use their own instance oftrueq.interface.qiskit_interface.QiskitInterfaceso that any modifications of the specialized conversion compiler no longer affect the interface in the main scope, such astrueq.Circuit.to_qiskit().Updated
trueq.compilation.decompose_clifford()to accept a list of labels andtrueq.visualization.Graphas optional parameters.The packages
cvxpy,cvxopt,scs,qutip,ipywidgets, andIPythonare now loaded viatrueq.utils.delayed_importrather thantrueq.utils.optional_import().
Deprecated
Deprecated
trueq.NormalEstimate.decays.Deprecated
trueq.EstimateCollection.values()in favor of the new methodtrueq.EstimateCollection.array().
Fixed
Fixed error in
trueq.Key.from_dict()when some key value is an empty tuple.Fixed a bug where
trueq.CircuitCollection.fit()would return an incorrect expectation value estimate for non-protocol circuits without an assigned measurement basis.Updated
trueq.compiler.Relabelto usetrueq.math.Weylsobjects instead of the string format that was used prior to version2.12.0.Fixed behavior of
trueq.compilation.Mergeformax_sys > 1for cycles containing both single- and multi-qubit gates.
[2.12.2] - 2022-05-17
Changed
Changed
trueq.circuits.Circuit.get_probability()to accept lists of mixed strings of outcomes and observables to estimate the expectation values of.
Fixed
Fixed the default size of the
qiskit.QuantumRegistercreated when converting withtrueq.Circuit.to_qiskit()to match the number of qubits in the circuit rather than the value of the largest qubit label.Fixed a random failure in the SRB transpiler example.
Fixed
trueq.Gateandtrueq.math.Superopto properly comply with the NumPy array interface:np.array([x])andnp.array([np.array(x)])now produce the same result forxof either type.Fixed memory leaks in
trueq.CircuitCollection.fit()andtrueq.compilation.Merge.
[2.12.1] - 2022-04-29
Added
Added
trueq.math.auto_base()to find subsystem dimensions from a total dimension.Added
trueq.compilation.decompose_control()for decomposing multi-qubit gates as unitaries controlled by a computational basis state on a subsystem.Added
dimoption totrueq.Gate.controlled()to enable use when the base gate is 1-by-1.Added support for new gates, such as
XXPlusYYGateorXXMinusYYGate, that were introduced in Qiskit version0.35.0.Added
trueq.visualization.plot_results()for comparing multipletrueq.Resultsobjects in various styles.Added a
clip_to_zerooption totrueq.Results.normalized()which allows to clip negative-valued outcomes to zero. The clipping is done by default.Added
trueq.CircuitCollection.prepend()to prepend cycles or circuits to a circuit.Added the functions
trueq.utils.get_schema(),trueq.utils.get_schema_validator(), andtrueq.utils.add_schema_options()for specifying variadic keyword arguments as JSON schemas.Added
trueq.Subsystemsclass to implement lists of lists of labels, e.g., to specify which labels should be grouped together for analysis.Added the ability to pass optional arguments to
trueq.CircuitCollection.fit().Added the compiler pass
trueq.compilation.MarkBlocks()for group-marking entire blocks of hard cycles.Added
trueq.compilation.decompose_clifford()for decomposing multi-qudit Cliffords into circuits of one- and two-qudit gates.Added
trueq.math.Stabilizers.apply()for applying Clifford operators to selected subsystems oftrueq.math.Stabilizers,trueq.math.StabilizerGroup, ortrueq.math.Cliffordobjects.Added
trueq.math.Clifford.swap()for constructing Clifford operations that swap subsystems by a provided permutation.Added the
&operator totrueq.math.Cliffordfor taking the Kronecker product of Clifford operations.Added
trueq.math.check_permutation()for checking if the input is a permutation vector.
Changed
By default,
trueq.Results.normalized()removes negative-valued counts before normalizing.Removed
markerparameter fromtrueq.compilation.OneQuditDecomp.native_cycles.Changed the
n_bodiesargument oftrueq.make_knr()tosubsystems, allowing for lists of user specified combinations of gate-bodies to be analyzed in addition to the previous functionality.Changed the
n_bodiesargument oftrueq.Simulator.predict_knr()tosubsystemsto match changes totrueq.make_knr().Changed the compiler passes
RCCycleandRCLocalso that when they are applied to circuits whosetrueq.Keys contain the keyword"protocol", they do not overwrite the value ofkey.protocol.
Deprecated
Deprecated the
n_bodiesargument oftrueq.make_knr()in favour ofsubsystems. KNR circuits loaded from previous versions of True-Q will have theirn_bodiesmetadata automatically updated to a correspondingsubsystemsvalue to maintain backwards compatibility of fitting.
Fixed
Fixed
trueq.compilation.OneQuditDecomppass so that all returned cycles maintain the marker of the input cycle.Fixed bugs in
trueq.interface.Executorthat prevented circuits from being saved to a file and prevented the Executor threads from being terminated correctly.Fixed
trueq.Simulator.add_cycle_noise()to correctly infer the subsystem dimension to use during simulation.Fixed
trueq.Circuits.plot.irb_summary()to ignore irrelevant SRB and XRB experiments rather than raise an assertion error.
Removed
Removed
trueq.backend.api.hide_warnings()andtrueq.backend.local.hide_warnings().Removed
dimargument fromtrueq.Simulator.add_cycle_noise()as it should instead be inferred by a combination of the replacement cycle and the simulated cycle.
[2.12.0] - 2022-03-24
Added
Added support for qudits throughout the library, e.g., in methods such as generation, analysis, randomized compiling, etc.
Added aliases for common qudit gates to
trueq.Gate.ALIASESfor qudits of dimension 3, 5 and 7.Added
trueq.circuits.Circuit.get_probabilityto estimate the probability of a circuit returning a given outcome.Added
trueq.math.Tensor.merge()for manually merging subsystems together.Added
trueq.Simulator.add_stochastic_weyl()as an alias totrueq.Simulator.add_stochastic_pauli().Added the option
exclusivetotrueq.Gate.controlled()to toggle whether the control qubits dictate the exclusive condition for the application of the contolled unitary, or its power.Added
trueq.math.Clifford.inverse()for finding the inverse of a Clifford operator.Added
trueq.math.rotation.Rotation.from_weyl()as an alias totrueq.math.rotation.Rotation.from_pauli().Added
trueq.Gate.rw()as an alias totrueq.Gate.rp().Added convenience methods
trueq.Gate.w(),trueq.Gate.cw(), andtrueq.Gate.fourier()to generate gates for qudits.Added
trueq.compilation.RemarkCyclespass which remarks all the marked cycles, in such a way that the new markers start from1and increment up for every marked cycle.Added the static construction methods
rigetti_octagon(),aspen_11(), andaspen_m_1()totrueq.visualization.Graph.Added
trueq.utils.min_max()for finding the minimum and maximum value of a collection of iterables.Added
trueq.math.Weyls.delete_duplicates()for deleting duplicate rows.
Changed
The method
trueq.Simulator.dressed_noise()now returns the entire, complete superoperator (or the diagonal of its Pauli transfer matrix) instead of marginalizations to provided subsystems.For all protocols and methods, the
trueq.Keynames"analyze_decays","compiled_pauli","measurement_basis", and"targeted_errors"have had their value type changed fromstror tuple ofstrtotrueq.math.Weyls.Moved
trueq.compilation.CompilationErrorto the newtrueq.exceptionsmodule.Moved
trueq.math.DecompErrorto the newtrueq.exceptionsmodule.Expanded
trueq.Simulator.add_stochastic_pauli()to allow multi-qubit and multi-qudit error models.Expanded
trueq.math.rotation.Rotation.from_pauli()andtq.Gate.from_generators()to allow qudit Weyl operators.Added
legendoption toraw()plotter to control whether or not the legend should be plotted.Changed
trueq.interface.QiskitMetadatato additionally containregisters, and switched themappingandmeas_pair(renamed tomeas_mapping) properties to reference indices ofregisters. This was done to accommodate theqiskit.Bit.registerdeprecation.
Fixed
Orbit mixing in
trueq.Simulator.dressed_noise()works for more general simulators and cycles.Fixed KNR HTML fit rendering when
subset()is used to restrict parameter names.Fixed the basis used by
trueq.math.Superop.from_chi(),trueq.math.Superop.chi, andtrueq.math.Superop.plot_chi()to match the documentation for subsystem dimensions greater than two.
Removed
Removed
trueq.utils.multiply_pauli_str()in favour oftrueq.math.Weylsmultiplication.
[2.11.7] - 2022-02-23
Added
Added
trueq.estimate.base.NormalEstimate.subset()for selecting subsets of parameters whose names match a given pattern.Added
trueq.math.Superop.herm_ptm,trueq.math.Superop.from_herm_ptm(), andtrueq.math.Superop.plot_herm_ptm()for converting to, converting from, and visualizing the Hermitized Pauli (Weyl) matrix representation.Added
trueq.math.unitary_order()to compute the order of a unitary matrix.Added
trueq.math.Tensor.unify_structure()method to merge tensors into compatible separable structures.
Changed
Changed
trueq.estimate.base.EstimateCollection.subset()by adding the option to select subsets of parameters whose names match a given pattern.The function
plot_mat()is now available in the maintrueqnamespace, as well as in the existingtrueq.visualizationnamespace.The arguments
xlabelsandylabelsoftrueq.plot_mat()now try to automatically infer the subsystem dimension.
Fixed
Fixed a bug where
trueq.protocols.make_rcal()would sometimes generate duplicate circuits on single qubit systems.
[2.11.6] - 2022-02-01
Added
Added
trueq.math.Superop.chi,trueq.math.Superop.from_chi(), andtrueq.math.Superop.plot_chi()for converting to, converting from, and visualizing the chi matrix representation.Added
trueq.math.Weyls.indices()for computing a standardized index for each row.Added
trueq.Simulator.add_superop()for adding generic superoperator noise.Added the ability for
trueq.utils.save()to save to a binary stream, in addition to the existing ability to open a specified filename and save to it.Added individual reset functions for all settings in
trueq.settings.Added the method
trueq.Results.normalized()which returns new, normalized results.Added the method
trueq.Results.__add__()andtrueq.Results.__radd__()for taking the union oftrueq.Resultsobjects.
Changed
Changed the row separation character in
trueq.math.WeylBasefrom"/"to"_".Switched the implementation of
trueq.Simulator.add_kraus()to a newtrueq.simulation.NoiseSourcenamedtrueq.simulation.SuperopNoise.The compiler passes
RCCycleandRCLocalnow issue warnings if they are called on non-trivial circuits, but no randomizations are inserted, likely due to forgotten inclusion of cycle markers.Moved the
RCCycleandRCLocalcompiler passes fromtrueq.compilation.commonto the new submoduletrueq.compilation.rc.Updated documentation.
Fixed
The Qiskit interface no longer raises an error while converting a True-Q circuit to Qiskit format if the provided metadata specifies more qubits than what the True-Q circuit acts on.
Fixed
trueq.interface.pyquil.defgate_to_factory()for PyQuilDefGates with no parameters.
Removed
Removed
trueq.simulation.KrausNoisein favor oftrueq.simulation.SuperopNoise.
[2.11.5] - 2021-12-14
Added
Added
trueq.math.Clifford.fourier(),trueq.math.Clifford.cz()andtrueq.math.Clifford.cx()functions to generate Fourier, CZ and CXtrueq.math.Cliffordgates for qudits.Added
trueq.Gate.embed()for embedding gates into larger Hilbert spaces.Added the conversion method
trueq.interface.pyquil.defgate_to_factory().Added the modules
trueq.simulation.backendandtrueq.simulation.propagation_backend.Added the static method
trueq.math.Superop.depolarizing()for constructing depolarizing channels.
Changed
Changed the phase convention of the
**operator ontrueq.Gateto be more standard.The attributes
trueq.math.Superop.krausandtrueq.math.Superop.rowstack_subsysare now memoized when first accessed.Changed
trueq.make_irb()andtrueq.make_srb()to return circuits with keys containingmeasurement_basisexplicitly.The actual simulation of a circuit has been separated into a new abstract
trueq.simulation.SimulationBackendclass with a concrete implementationtrueq.simulation.PropagationBackend. Atrueq.Simulatorcan now select a simulation backend during construction.Changed
trueq.Simulator.add_readout_error()to additionally support POVMs.Improved the performance of
trueq.compilation.Merge, changed its behaviour to never output empty cycles, changed its parent class totrueq.compilation.MarkerPass, and renamed the propertyn_labelstomax_sys.
Deprecated
trueq.Simulator.add_povm()has been deprecated in favour oftrueq.Simulator.add_readout_error().Deprecated
trueq.compilation.Merge.n_labels, it is now calledmax_sys.Deprecated support for macOS versions older than 11.0 (Big Sur).
Fixed
The PyQuil interface now converts parametric
DefGates found inside of programs totrueq.config.GateFactorys while converting to the True-Q circuit format.trueq.interface.Interface.set_config()now checks if it was given a factory that is not allowed.
[2.11.4] - 2021-11-19
Added
Added the compiler pass
trueq.compilation.RCLocalto perform randomized compiling localized to entangling gates.Added the boolean option
enforce_disjointtotrueq.Twirl.union().Added
trueq.utils.UpgradePathclass.Added the
sqrtproperty and thecontrolled()method totrueq.Gateobjects.
Deprecated
trueq.math.Frameandtrueq.math.pauli_basishave been deprecated in favor of usingtrueq.math.WeylDecomp.
Fixed
Updated tests and examples to comply with new argument requirements for
matplotlib.subplot()inmatplotlib>=3.5.0.Updated
Iterableto be imported fromcollections.abcrather thancollections.Fix tie-breaking edge case in x-label orderings of
trueq.CircuitCollection.plot.knr_heatmap().
[2.11.3] - 2021-11-09
Fixed
Fixed bugs in
trueq.interface.Executorthat occured when submitting circuits to premium or mock Qiskit backends.
[2.11.2] - 2021-11-08
Added
Added the class
trueq.math.WeylDecompfor decomposing multi-qudit operators in the Weyl operator basis.
Changed
Allowed functions passed to
trueq.Simulator.add_cycle_noiseto have a second argument which receives all labels of the circuit currently being simulated.Changed
trueq.simulation.CycleMatchto also accept dictionaries as the cycle.Renamed the
sys_dimargument todimintrueq.config.GateFactoryconstructors and class methods.
Fixed
Fixed HTML display of
trueq.Gateinside JupyterLab.
Removed
Removed the
dimargument fromtrueq.math.general.reshuffle()which is now inferred automatically.
[2.11.1] - 2021-10-25
Added
Added
trueq.math.make_confusion_matrix()for easily constructing confusion matrices from error probabilities.Added the classes
trueq.math.Clifford,StabilizerGroup, andtrueq.math.Stabilizersfor efficiently storing and manipulating Clifford operations and stabilizer objects.Added
trueq.estimate.EstimateCollection.from_dict_list()to pair withto_dict_list()on the same class.Added
trueq.Config.from_dict()to pair withto_dict()on the same class.
Changed
Changed
trueq.Simulator.add_readout_error()to construct confusion matrices for qudit systems when given single error rates or vectors, when appropriate.Changed
trueq.estimate.Estimate.to_dict()to additionally store the class name.
Fixed
Updated
trueq.interface.cirqto match upstream changes when converting measurements.
[2.11.0] - 2021-10-12
Added
Added a subsystem dimension to the
trueq.math.Superopclass. This is entered as an optional argumentdimto the constructor and thefrom_*methods that construct a superoperator from an object that does not specify the dimension. The related propertiesdim,total_dim, andn_syswere also added.Added a subsystem dimension to the
trueq.math.Superopclass. This is entered as an optional argumentdimto the constructor and thefrom_*methods that construct a superoperator from an object that does not specify the dimension. The related propertiesdim,total_dim, andn_syswere also added.Added the static methods
eye(),zero(),random_bcsz(),random_constrained_cptp(),random_constrained_unitary(),random_decoherent(),random_stochastic(), andrandom_unitary()to thetrueq.math.Superopclass for constructing new superoperators.Added the functions
constrained_stick_breaking(),random_constrained_diagonal()andrandom_constrained_unitary()totrueq.mathwhich return random arrays.Added
trueq.utils.flatten()for flattening nestedIterables.Added the arguments
xgrid,ygrid, andblockstotrueq.visualization.plot_mat()for drawing guidelines around matrix elements.Added
trueq.algorithms.algorithms.bernstein_vazirani()for generating circuits implementing the Bernstein-Vazirani algorithm.Added
trueq.algorithms.algorithms.simon()for generating circuits implementing Simon’s algorithm.Added the method
trueq.interface.base.Interface.pair_from_trueq_circ()for viewing thetrueq.Circuitimmediately before it is converted into an external format.Added the argument
store_compiledtotrueq.interface.Executorwhich provides the option of saving the compiled circuits to disk, rather than the uncompiled.Added
trueq.interface.Executor.block()function that blocks the main thread until all circuits have completed acquisition on the backend.Added Python dependency
asteval>=0.9.25to the requirements.Added the method
trueq.KeySet.one_or_none()for retrieving the single value common to a keyword, when it exists.Added the class
trueq.math.WeylSetfor a set of Weyls whose order does not matter.Allowed
trueq.math.WeylBaseand subclass constructors to pass anothertrueq.math.WeylBasein place of a powers matrix and dimension.
Changed
Updated the
trueq.interface.Executorrich display with more features.
Fixed
Fixed various deprecation warnings and errors when working with certain backends in
trueq.interface.Executor.
Removed
Removed
trueq.interface.Executor.results().Removed Python dependency
simpleevalfrom the requirements.Removed deprecated
dargument oftrueq.Simulator.add_depolarizing().
Fixed
Fixed a bug in
trueq.math.Superop.is_cpfor certain superoperators with non-Hermitian Choi matrices.
[2.10.3] - 2021-09-10
Added
Added a convenience method
trueq.docs()for loading the documentation.Added
trueq.compilation.OneQuditDecompfor decompiling cycles of arbitrary single-qudit gates into diagonal gates and rotations between adjacent subspaces.Added
trueq.math.weyl.WeylBase.eye()for generating the identity instance.Added
trueq.math.weyl.WeylBase.random()for generating random instances.Added
trueq.math.Weyls.all()for generating all possible Weyl operators.Added
trueq.math.Weyls.herm_matfor generating Hermitian matrices.Added
trueq.math.Weyls.iter_sysfor iterating over subsystems.Added
trueq.math.prime_base()for computing the base prime in a prime power.Added arbitrary subsystem dimension support to
trueq.Simulator.add_depolarizing().Added optional argument
localtotrueq.Simulator.add_depolarizing()for switching between local and global depolarizing noise.Added support for qudit PTMs to
trueq.math.Superop.from_ptm()and related properties and methods.
Changed
Renamed
trueq.utils.ProtectedUnpicklertotrueq.utils.TrueQUnpickler.
Deprecated
Deprecated
dargument oftrueq.Simulator.add_depolarizing()because the dimension is now inferred automatically.
Fixed
trueq.Keyno longer restricts use of the keyword"cycle".Updated obsolete
"cycle"keyword to"cycles"intq.Simulator.predict_*().Fixed a bug in
trueq.Cycleequality when cycles are empty but have different dimensions.Fixed a bug in
trueq.Cycle.to/from_dict()for empty cycles.
[2.10.2] - 2021-08-24
Added
Added a method
trueq.algorithms.subroutines.qft()which generates a circuit implementing the quantum Fourier transform.Added
trueq.math.Superop.lkpdandtrueq.math.Superop.plot_lkpd()for leading Kraus polar decompositions.Added the estimate class
trueq.estimate.KnrBodyEstimate.Added a
dimattribute totrueq.Twirl.Added the class
trueq.math.weyl.base.WeylBase.Added the module
trueq.settingscontaining global settingsget_dim(),set_dim(),get_cl(), andset_cl().Added the compiler pass
trueq.compilation.OneQuditDecompfor decomposing cycles of arbitrary single-qudit gates into subspace rotations.
Changed
A fit of KNR data now returns
trueq.estimate.KnrBodyEstimateinstances instead of instances of the more generictrueq.estimate.NormalEstimateclass.The first argument of
trueq.make_srb(),trueq.make_xrb(), andtrueq.make_crosstalk_diagnostics()can now all accept a list of sets of labels, or atrueq.Twirlinstance. This behaviour replaces the optionaltwirlargument of these functions, which has been removed.Renamed the class
trueq.math.Weyltotrueq.math.Weyls.
Fixed
Fixed a formatting issue with some
fit()HTML displays.
[2.10.1] - 2021-07-16
Added
Added
trueq.utils.ProtectedUnpicklerwhich safely loads files saved in older versions of True-Q™ containing removed classes.Added
dimargument to the constructor oftrueq.Cycle.
Changed
Empty
trueq.Cycles now have a default dimension of 2.Changed pyQuil required version to >= 3.0.0 due to upstream changes.
Changed Qiskit required version to >= 0.28.0 due to upstream changes.
Updated documentation.
Fixed
Updated
trueq.inteface.pyquil_interfaceto support pyQuil v3.
Removed
trueq.Blockwas removed.trueq.math.frame.Frame.sparse_superoperatorwas removed.trueq.math.Weyl.symplectic_dot()was removed.
[2.10.0] - 2021-06-22
Added
Added
trueq.utils.cached_propertydecorator for creating class properties whose values are memoized.Extended the allowed replacement types of
trueq.Simulator.add_gate_replace()to includetrueq.math.superop.Superops, and matrix representations of gates and super operators.Added a parser to convert from the OPENQASM 2.0 format into
trueq.Circuits.
Changed
Updated the minimum required Linux
libstdc++version to9.3.0.Updated the minimum required MacOS version to
Catalina (10.15).Updated the minimum required Windows
Microsoft Visual C++ 2015-2019 Redistributable (x64)version to14.29.30037.
Fixed
Fixed a potential bug when opening a file that was saved by a user without
gzip.Fixed various bugs in the QASM interface.
Removed
Dropped support for Python 3.6.
Removed warnings when loading files saved in different versions of True-Q™.
Old
trueq.compilation.PassAPI was removed.Old
trueq.ConfigYAML format support was removed.Old
trueq.config.GateFactoryAPI was removed.trueq.compilation.CycleSandwichwas removed.trueq.compilation.get_transpiler()was removed.trueq.compilation.Native2QFastDecompwas removed.trueq.compile()was removed.trueq.Compiler.DEFAULT_PASSESwas removed.trueq.interface.base.Interface.get_priority_listwas removed.trueq.interface.base.Interface.set_priority_listwas removed.trueq.math.decompose_su4was removed.trueq.math.split_gatewas removed.
[2.9.5] - 2021-06-08
Changed
Changed powers of
trueq.Gatesuch that a global phase is deterministically fixed before exponentiation.
Fixed
Fixed a caching bug caused by global phase ambiguities in the noise source
trueq.Simulator.add_overrotation().
[2.9.4] - 2021-06-01
Added
Added
trueq.EstimateCollection.to_dict_list(), which converts an estimate collection into a list of dictionary representations.Added
trueq.math.Weylclass for storing lists of Weyl/Pauli operators.
Fixed
Fixed a bug in
trueq.Simulator.add_knr_noise()if using an estimate with a failed exponential fit.Fixed a bug preventing the noise
trueq.Simulator.add_cycle_noise()from being pickled for simulator multiprocessing.
[2.9.3] - 2021-04-23
Added
Added
trueq.simulation.match.BaseCycleMatch,trueq.simulation.match.AssociativeCycleMatch,trueq.simulation.match.AndCycleMatch, andtrueq.simulation.match.OrCycleMatchclasses designed for more general matching conditions to cycles during simulation.Added
lagparameter totrueq.simulation.match.CycleMatchto allow matching past cycles.Added
trueq.Simulator.add_cycle_noise()which can insert and replace entire cycles with other cycles or noise operations during simulation.
Changed
Changed
trueq.simulation.match.CycleMatchto inherit from the newly addedtrueq.simulation.match.BaseCycleMatchclass, and it now only accepts a single cycle during initialization.Changed all
trueq.simulation.Match.iter()functions to accept a history of cycle wrappers.Split
trueq.simulation.add_commonintotrueq.simulation.add_basicandtrueq.simulation.add_cycle_noise.
Deprecated
Deprecated support for Python 3.6.
[2.9.2] - 2021-03-31
Added
Added property
is_upgradedtotrueq.math.StateTensorandtrueq.math.OperatorTensor.Added
trueq.math.split_cyclewhich attempts to split all gates in a cycle into gates that act on as few subsystems as possible.
Changed
Increased the speed of the
trueq.Simulatorby improving caching.The method
trueq.simulation.NoiseSource.apply()now receives a list of cycles rather than the latest cycle to allow non-Markovian noise in the future.
Deprecated
Deprecated
trueq.math.split_gateand replaced it bytrueq.math.split_cycle.
Fixed
Fixed a regression that caused
key.compiled_paulis to not be randomized correctly in protocol generation functions, such astrueq.make_cb().Fixed a bug in KNR analysis which incorrectly analyzed cycles with gate labels out of order, e.g.
tq.Cycle({(1, 0): tq.Gate.cnot}).
[2.9.1] - 2021-03-22
Added
Added
trueq.Circuit.copy()for making copies of circuits.Added
trueq.CircuitCollection.copy()for making copies of circuit collections.Added
max_resetsargument totrueq.math.decompose_unitary()and thetrueq.compilation.NativeDecompcompiler pass.Added hashing and equality functions to
trueq.config.GateFactory,trueq.math.rotation.Rotation, andtrueq.math.rotation.FixedRotation.Added an optional
entanglerargument totrueq.randomly_compile()for randomly compiling circuits into a specified entangling gate.Added
trueq.compilation.UnmarkCyclespass which sets all cycle markers to0.Added
trueq.compilation.InsertIdentitypass which pads a group of marked cycles with cycles of identity gates.Added
trueq.Gate.get_alias()which returns alias of a given gate if it is aliased.Added
connectivityas an optional keyword argument fortrueq.Config.basic.Added alternate allowed
povmformat totrueq.Simulator.add_povm(povm)andtrueq.math.StateTensor.probabilities(povm).Added standardized epsilon constants to
trueq.utils.
Changed
trueq.compilation.CycleReplacementnow also accepts dictionaries as arguments for target and replacement cycles.trueq.compilation.Justifyis now atrueq.compilation.MarkerPassand works on multiple cycles at once, fixing the traffic jam issue it previously experienced.trueq.compilation.RemoveEmptyCyclebehavior has changed, it now works on groups of cycles with matching markers.Updated documentation.
Changed the order of initialization arguments in
trueq.Config, and madefactoriesa required argument.Changed implementation of
trueq.Simulator.add_readout_error()to be more memory efficient.Construction of
trueq.NativeGatenow requires a valid name.
Deprecated
Deprecated
trueq.Block.
Fixed
Fixed a bug in
trueq.simulation.add_spam.classification_povm()for multi-system classification matrices when the number of outcomes is greater than the number of dimensions.Fixed index ordering bug in
trueq.math.StateTensor.marginalize().Fixed typo and index ordering bug in
trueq.math.OperatorTensor.marginalize().
Removed
Removed
staggerandindependentarguments fromtrueq.make_rcal.
[2.9.0] - 2021-03-01
Added
A new base class
trueq.interface.base.Interfacefor all interfaces.Added
trueq.Simulator.add_rcal_noise(), which adds readout error to a simulator by reconstructing the noise from RCAL results.Added support for fixed parameter values to
trueq.config.GateFactory.trueq.Compiler.SIMPLIFY_PASSES,trueq.Compiler.HARDWARE_PASSES,trueq.Compiler.RC_PASSES,trueq.Compiler.NATIVE2Q_PASSESwere added, each of which defines a list of useful compiler passes.Added
trueq.Cycle.same_structure()andtrueq.Circuit.same_structure()methods for checking identical placement of operations, with possibly different gate parameter values.Added
trueq.utils.DisplayWrapperto allow SVGs to be displayed in both the documentation’s example gallery and python notebooks.
Changed
Complete rewrite of all interfaces:
trueq.interface.cirq,trueq.interface.pyquil,trueq.interface.qiskit,trueq.interface.QASM.The
trueq.compilation.CycleSandwichpass was replaced bytrueq.compilation.CycleReplacement.trueq.Config.factoriesis now a list, not a dictionary.trueq.ConfigYAML format has changed slightly to allow multiple gate definitions of the same name.trueq.compilation.Native2QFastDecompwas changed totrueq.compilation.NativeDecomp, and support for multi-qubit gates was added.trueq.math.decompose_su4was changed totrueq.math.decompose_unitary, and support for multi-qubit gates was added.Default compiler behavior has been altered, the compiler now uses the
trueq.Compiler.HARDWARE_PASSESpass list by default.Changed the return type of
trueq.Circuit.draw()to a new classtrueq.utils.DisplayWrapper.
Deprecated
trueq.compilation.compile(config, circuit, passes)deprecated in favour oftrueq.Compiler.from_config(config, passes).compile(circuit).trueq.compilation.get_transpiler()deprecated in favour oftrueq.Compiler.from_config().trueq.Compiler.DEFAULT_PASSESpass list was deprecated.trueq.compilation.Native2QFastDecompwas deprecated, seetrueq.compilation.NativeDecomp.trueq.math.decompose_su4was deprecated, seetrueq.math.decompose_unitary.
Fixed
trueq.Key.to_dict()andtrueq.Key.from_dict()were fixed to correctly invoketrueq.Twirl.to_dict()andtrueq.Twirl.from_dict().Fixed a bug in
trueq.compilation.Mergewhenn_labelsis more than 1.
Removed
Removed
trueq.interface.qiskit.RCPassQiskit compiler pass.Removed deprecated functions
trueq.Config.from_params()andtrueq.Config.make_config().Removed support for deprecated input
"SU"totrueq.Twirl.__init__().
[2.8.6] - 2021-02-10
Added
A new class
trueq.utils.ItemSet.The estimates returned by
trueq.Simulator.predict_knr()now include the Pauli decay parameters.Added
trueq.math.Rotation.id_scale()andtrueq.math.Rotation.find_closest()to thetrueq.math.Rotationclass.Added
trueq.Simulator.add_knr_noise(), which adds noise to a simulator by reconstructing the noise from KNR results.
Changed
Aside from KNR, benchmarking protocols can now benchmark subcircuits consisting of multiple cycles; see their individual documentation for more details.
If
xis atrueq.KeySet, thenx.keynamenow returns anItemSetrather than aset.Changed
trueq.compilation.NativeExactto work with parameterizedtrueq.config.GateFactorys.Changed the order of operations in
trueq.compilation.Native1Qto prefertrueq.compilation.Native1QModeovertrueq.compilation.NativeExact.Moved
trueq.compilation.one_qubit.unitary_to_u3args()totrueq.math.unitary_to_u3args().Changed
trueq.config.GateFactorys initialization and added the following methods:trueq.config.GateFactory.from_matrix(),trueq.config.GateFactory.from_hamiltonian(), andtrueq.config.GateFactory.from_function().trueq.config.GateFactory.layersis now an accessible property.Generalized
trueq.simulation.CycleMatchto accept multiple cycles.Added a note to KNR tables if an estimate is omitted from visualization.
trueq.compilation.RCCyclecan now auto-instantiate a twirl for each circuit it encounters based on the qubit labels present.
Fixed
Fixed a bug in the standard deviation reported by
trueq.Results.tvd().Fixed an edge case in KNR analysis so that it properly reports estimates for extra subsystems that are specified in the twirl but not the cycle, assuming that they are acted on by identity gates.
Fixed an edge case when using
"C1"twirling group in combination withpropagate_correctionflag when benchmarking a cycle using CB or KNR.
Removed
Removed
trueq.compilation.Native1QUGates, the logic now exists intrueq.compilation.NativeExact.
[2.8.5] - 2021-01-18
Added
Added
trueq.Simulator.add_gate_replace()which allows a user defined function to replace gates or modify matched gates.Added
trueq.simulation.NativeMatchfor matching noise toNativeGates by specifying their name.
Changed
Changed the
kraus_opsargument oftrueq.Simulator.add_kraus()to no longer allow a dictionary whose keys aren_sys. Thedimof a subsystem should now be specified, its default value is2.
Fixed
Fixed an edge case in
trueq.compilation.MarkCycleswhere some cycles could receive non-unique markers.
[2.8.4] - 2021-01-12
Added
Added the method
trueq.KeySet.table()for organizing keys.Added
trueq.Compiler.from_config().Added
trueq.Compiler.basic().
Changed
Made
trueq.compilation.Compileraccessible attrueq.Compiler.Moved
trueq.compilation.DEFAULT_PASSEStotrueq.Compiler.DEFAULT_PASSES.Compiler passes no longer accept
Configobjects, and instead accept lists ofGateFactorys.trueq.compilation.Native1Qandtrueq.compilation.Native1QModenow accept the kwargmode.Cyclesloaded fromtrueq<=2.8.0will have theirimmutableflag converted to anintand assigned tomarker.Slices of
trueq.CircuitCollectionwill return new circuit collections rather than lists.
Fixed
Fixed an edge case in KAK decomposition caused by numerical instabilities.
[2.8.3] - 2021-01-06
Fixed
Fixed an edge case in
trueq.randomly_compile()that occurs when using a non-Pauli twirl and a circuit containing more than one consecutive cycle with equal markers.Fixed a bug in the Qiskit
Executorinterface enabling support for the new IBMQ hardware gateset.
[2.8.2] - 2021-01-05
Added
Added
Matchand child classes which define rules for conditional simulator noise.Added
NoiseSourceand child classes, which abstract the notion of a noise source during simulation.Added
trueq.CircuitCollection.shuffle().Added several
trueq.visualization.Graph.ibmq_*()methods for creating predefined graphs based on IBMQ devices.Added
trueq.math.Superop.*_subsys()methods for subsystem-wise row-stacking.Added support for glob wildcards in
trueq.load().Added support for Qiskit version
0.23.2.
Changed
Updated the minimum required
Microsoft Visual C++ 2015-2019 Redistributable (x64)version for Windows to14.27.29334.Replaced
noisy_gatesandnoisy_labelsarguments in thetrueq.Simulator.add_*methods with thematchargument.
Fixed
Fixed a bug in
trueq.Circuit()andtrueq.Circuit.resultsthat allowed adding results to empty circuits.
[2.8.1] - 2020-12-09
Changed
The
Patternclass was renamed toPasswith specializationsMarkerPassandNCyclePass.Randomized Compiling now supports twirling sets of cycles at once, in addition to individual cycles.
OperationPatternwas renamed toOperationReplacement.
Fixed
NativeGateswhose parameters appear to be integer-like are now rounded.
Removed
Removed support for reverse traversal and repeated traversal by the compiler and its passes.
[2.8.0] - 2020-11-17
Added
Added a twirling group,
"C1", to conveniently initializetrueq.Twirlwith single-qubit Cliffords, regardless whether or not the cycle or labels contain multi-qubit gates.Added
trueq.visualization.Graph.sycamore()for making diagonal grid layouts.Added
mappingargument totrueq.visualization.Graphalong with the methodsto_label()andfrom_label()for converting and displaying different label systems by a new allowed value to the optionshow_labels.Added
trueq.utils.multiply_pauli_str()function.Added
trueq.compilation.RCCycleandtrueq.compilation.CompilePauliscompiler passes.Added
markertotrueq.Cycle, and themarkerkwarg to its constructor.Added
MarkCyclescompiler pattern that marks cycles which contain multi-qubit gates if all of the existing cycles in the circuit have the default marker0.Added
Gate.rx(),Gate.ry(),Gate.rz(), andGate.rp()for creating gates which are Pauli rotations.Added
trueq.math.QubitMode.ZYZYZto the set of known single qubit decompositions.Added string representations of
EstimateCollectionandEstimatesubtypes,NormalEstimateandRCalEstimate.Added
trueq.utils.parallel_map().Added
max_workersargument totrueq.Simulator.run()for parallelization over circuits.
Changed
Renamed
"SU"twirling group to"U"intrueq.Twirl.Changed the kwarg of
trueq.Results.plot()fromsparsetosparse_cutoff.Moved
trueq.config.rotationtotrueq.math.rotation.Bumped the required NumPy version to
1.18.0.Changed
trueq.Cycleso that instances are always immutableCompilation tools may only recompile a list of cycles with equal markers.
The compiler passes
RemoveEmptyCycle,RemoveId,Merge,Justifyhad their kwargs modified to use themarkerkeyword.Removed
namefrom theConfigobject, along with all references to it inGateFactoryandNativeGate.Renamed several methods of
Config, specificallyConfig.__init__becameConfig.from_yaml,Config.from_paramsis nowConfig.__init__, andConfig.make_configis nowConfig.from_parameterized.Methods that generate benchmarking circuits will no longer throw an error when
propagate_correction=Trueand the last cycle cannot be factored. Beware that this can result circuits whose last cycle has gates acting on more than two qubits.Improved speed of the simulator.
Improved speed of the compiler.
Deprecated
Deprecated
Config.from_params()andConfig.make_config().Deprecated
"SU"twirling group specification in favour of"U"intrueq.Twirl.
Fixed
Fixed an edge-case bug in
trueq.compiler.PhaseTrack.Fixed overlapping plot labels in
trueq.Results.plot().Improved the default cutoff of
trueq.Results.plot()when shown in sparse mode.Adjusted
Native2QKAKnumerical precision so that certain gates are correctly identified as identical. Before, in very specific instances, this lead to additional unnecessary two-qubit gates.Fixed a bug in
trueq.compiler.Mergewhich would result in a sub-optimal gate count in rare scenarios.
Removed
The
compresskwarg was removed fromtrueq.randomly_compile().Removed
add(),immutable, andpop()fromtrueq.Cycle, along with the constructor’s immutable kwarg (replaced bymarker).Removed
trueq.math.QubitMode.frame_change.Removed deprecated
trueq.Circuit.add_cycle(), which was renamed totrueq.Circuit.append().Removed deprecated
trueq.make_readout_calibration(), which was renamed totrueq.make_rcal().
[2.7.6] - 2020-10-21
Added
Added the following attributes and methods to
trueq.math.Superop:adj,avg_gate_fidelity,avg_gate_infidelity,coherent_infidelity,fidelity,infidelity,norm,dnorm,stochastic_infidelity,unitary_fraction, andunitarity.Added a new
compiled_pauliflag to control or specify which Paulis are compiled at the end of the circuits generated by benchmarking protocols (default isTrue).
Changed
Changed the default
rankoftrueq.math.random_bcsz()todim**2.
Fixed
Fixed the plotting extents in
raw()plotter.Qiskit version
0.23is now supported. Due to upstream changes, conversion to theczgate is only supported from Qiskit version0.23or greater, versions below this will raise a warning on import.
[2.7.5] - 2020-10-15
Added
Added a
BadModuleclass that raises anImportErrorwhen an optional module that is called is either outdated or not installed.Added the option
include_final_virtualto thePhaseTrackcompiler pattern.Added
ZYZto knowntrueq.math.QubitModesingle qubit decompositions.Added a new
Twirlclass to streamline management of twirling groups in generation and analysis.Added
trueq.math.random_bcsz()function to generate random CPTP superoperators.Added
trueq.estimates.RCalEstimate.apply_correction()for directly correcting bitstring distributions by readout calibration matrices.Added
Simulator.predict_*()methods to estimate the outcomes of protocols without simulating their circuit collections.Added
labelsoption to thetrueq.math.Tensor.mat()method.Added the method
trueq.math.Tensor.apply_to_all().
Changed
Updated the minimum required
Microsoft Visual C++ 2015-2019 Redistributable (x64)version for Windows to14.27.29112.Renamed the
twirling_groupargument ofmake_*()andrandomly_compile_qiskit()functions totwirl.Moved
random_density()andrandom_unitary()fromtrueq.math.generalto new moduletrueq.math.random.trueq.math.Tensor.marginalize()now accepts the labels to keep, rather than those to remove.Switched to a slightly more accurate estimate of
e_Sin XRB.Updated documentation.
Fixed
Fixed a bug in
trueq.math.Superop.is_tp.Fixed a transpose bug in the HTML display of
trueq.Gate.
Removed
Removed
trueq.utils.auto_twirl(),trueq.utils.pretty_twirl(), andtrueq.utils.twirls_equal().
[2.7.4] - 2020-09-11
Added
Added conversion functions to/from
true.math.Superopfrom/toqutip.Qobj.
Changed
GateFactorywas refactored to be represented as a sequence of static and single-parameter rotations called layers. The abstract classLayerwas added with childrenRotation(fast matrix exponentiation of a generator matrix times a free parameter) andFixedRotation(a fixed unitary).Renamed
GateFactory.dimtoGateFactory.widthfor consistency withGate.width.Renamed
GateFactory.get_gate()toGateFactory.make_gate().
Fixed
Native2QKAKnow correctly decomposes tensor products of single qubit gates.Circuit.draw()now displays parameters inNativeGatepopups.
Removed
trueq.math.QubitMode.validate_factorieswas removed and its logic moved directly into decomposition patterns in the compiler.Removed
GateFactory.find_closest().
[2.7.3] - 2020-08-25
Added
Updated documentation.
Changed
The process infidelity estimate name was renamed from
e_Ptoe_F.QASM and Cirq conversion now use gate labels as they appear in circuits, instead of mapping ordered labels to
0, 1, ..., n_qubits-1.
[2.7.2] - 2020-08-18
Added
Added a number of new compiler patterns,
Parallel,TryInOrder,RemoveEmptyCycle,NativeExact,Native1QUGates,Native1QRRZ,Native1QMode,Native2QCX,Native2QFastDecomp,Native2QKAK. Many of these are the result of splitting the previousNative1Q, andNative2Qinto individual components.Added
trueq.compilation.base.OperationPatternwhich is essentially aPatternwhich only performs calculations on individual operations, not full cycles.Added a fallback method to grab versions of optional imports.
Changed
Significant refactor of one and two qubit compilation tools, increasing the customizability of the compiler. Specifically one and two qubit decompositions were broken up into a number of separate compiler patterns. Default compiler options should result in identical outcomes to the previous defaults in the majority of cases.
Contents of
trueq.compilation.compilermoved totrueq.compilation.base.
Fixed
Fixed an edge case in compilation where circuits may have been over-simplified in rare instances for some diagnostic protocols.
Updated
trueq.interface.qiskit.Executorto work with Qiskit version0.20.0.Fixed
trueq.Circuit.resultssetter to maintainlast_modifiedattribute.
[2.7.1] - 2020-08-07
Added
Added the method
trueq.EstimateCollection.update_keys().Added the method
trueq.EstimateCollection.values()for extracting values of the same name across estimates.Added subplot titles to
compare()plotter.
Changed
Simplified and unified arguments of
trueq.Key.copy(),trueq.KeySet.copy(),trueq.CircuitCollection.update_keys().
Fixed
Fixed bug in
trueq.KeySet.similar_keys()wheninvert=Trueand not all keys have all names in common.Fixed a bug in
raw()plotter when data are ragged.Removed empty subplots that sometimes occur in
compare()plotter.Fixed a bug in the calculation of upper and lower bounds of
e_Pin IRB.Fixed a bug in the variance calculation for
e_Sin XRB.
[2.7.0] - 2020-07-23
Added
Added Python dependency
mako>=1.1.2to the requirements.Added
trueq.Circuit.draw()function which generates an interactive SVG representation of the circuit which has been tested in all major browsers.Calling
trueq.CircuitCollection.fit()on circuit collections with readout calibration circuits now returns the estimated single qubit confusion matrix for each qubit. These are automatically applied in fits of protocols to correct for readout errors in a scalable manner.Added
trueq.Descriptionswhich provides text descriptions of all parameters returned from fitting the various protocols which True-Q™ provides.Added
trueq.Simulator.sampleto sample from the output distribution without updating the results of the circuit.Added
trueq.Circuit.to_qasmto convert a circuit into an openQASM 2.0 representation. Non-standard QASM may also be used, and additional documentation may be found intrueq.interface.QASM.Added a new plotter
compare_pauli_infidelities().Added an optional
targeted_errorsparameter totrueq.make_cb()that replaces the functionality oftrueq.make_tnr().
Changed
Analysis underwent a significant re-write, which dramatically decreased analysis times. As a part of this rewrite
trueq.parametersand all subclasses were removed, and in their placetrueq.estimateand all subclasses will be used to return information from fits. The interface for fitting has changed slightly, with an emphasis now placed on subsetting circuit collections before calling fit. Analysis and plotting of KNR data now correctly handles degeneracies present in some fits.Increased IPython HTML support with more interactivity in both Jupyter or Colab.
Plotting of KNR data was changed,
nr_cmapandnr_barwere removed in favor ofknr_heatmapwhich has improved functionality overnr_cmap.Updated and improved the documentation.
Moved
trueq.config.make_config()to be a static method oftrueq.Config.Improved the fitting technique for XRB data.
Merged
trueq.assessmentsintotrueq.protocolsand added the functions within into the main namespace for convenience.Reduced arguments to
make_crosstalk_diagnosticsfor simplicity.trueq.Configandtrueq.config.GateFactorynow preserve capitalization of names.Order of parameters can now be optionally specified in
trueq.config.GateFactory.trueq.CircuitCollection.update_keys()now returns itself for convenience.Changed
trueq.Cycle.operatorstotrueq.Cycle.operationsandtruq.Cycle.n_operatorstotruq.Cycle.n_operationsfor consistency.Changed
trueq.utils.load()to optionally accept a list of saved True-Q™ object files and combine them into a single collection.Renamed
trueq.make_readout_calibration()totrueq.make_rcal().Renamed
trueq.Circuit.add_cycle()totrueq.Circuit.append()with additional functionality.The
append()method oftrueq.Circuit,trueq.CircuitCollection, andtrueq.EstimateCollectionare all now aliased to+=.Split
comparison()plotter intocompare()andcompare_twirl().Renamed
infidelity_comparison()plotter tocompare_rb().
Fixed
trueq.Simulator.runno longer fails when asked to measure a strict subset of the qubits addressed by a circuit.Fixed bugs in
trueq.Gate.is_identityandtrueq.Gate.is_unitaryfor non-unitary matrices.Fixed a bug in
setup.pythat broke the installer on a machine without Git.Updated
trueq.interface.cirqto match upstream changes when converting measurements.
Removed
trueq.Circuit.expectation_values()was removed.trueq.CircuitCollection.plot.incoherence()was removed.trueq.Gateno longer accepts dictionary instantiation.trueq.KeyMapwas removed.trueq.make_tnr()was removed and its functionality was incorporated intotrueq.make_cb().trueq.parametersand all subclasses were removed.trueq.protocols.CircuitAggregatorwas removed.trueq.protocols.QueueBackendwas removed.
[2.6.13] - 2020-06-05
Added
Added
trueq.Config.basicas a way to construct a simpleConfigobject.Added
trueq.Simulator.add_relaxationas a way to add relaxation errors to the simulator.Added helper functions
trueq.utils.auto_twirl()andtrueq.backend.api.random_twirl().
Fixed
trueq.utils.optional_importnow handles edge cases wheresetup.pyof a package is incorrectly configured.Fixed a bug in
Simulator.run()in the case where a measurement error is defined (e.g. viaSimulator.add_readout_error()) on a qubit not appearing in a circuit.Added
trueq.Resultsto API documentation.Fixed a shape bug in
trueq.math.tensor.OperatorTensor.upgrade().
Removed
Removed
get_cur_mem(),get_max_mem(), andset_max_mem()fromtrueq.backend.api.
[2.6.12] - 2020-05-08
Added
Added
trueq.visualization.Graphfor embedding device topology graphs in figures.
Changed
Bumped required Cirq version to
0.7.0and made compatible with version0.8.0.
[2.6.11] - 2020-05-01
Added
Updated documentation.
Changed
Changed the sort order of cycles; gate count at each size is now most important.
trueq.compilation.Mergeno longer removes identity gates.Changed Qiskit required version to
>=0.19due to upstream changes.
Fixed
Fixed a bug in conversion to the Cirq
PhasedXPowgate.
[2.6.10] - 2020-04-28
Added
Added
abs_maxoption totrueq.visualization.plot_mat()(and other functions which call this plotter) which sets the opacity scale of colors.Added
trueq.compilation.DecomposeRRZ, a compilation pattern to decompose single qubit gates into 2R(a) = Z(a)X(90)Z(-a)gates and 1 finalZ(t)gate.Added support for the
PhasedXPowgate to the Cirq interface.
[2.6.9] - 2020-04-13
Added
Added
trueq.compilation.InvolvingRestrictionspattern which enforces involving restrictions as defined in a config through a greedy algorithm.
Fixed
Fixed a bug in
trueq.Cycle.__getitem__()in the presence of a single-qubit block.
[2.6.8] - 2020-04-09
Added
Added an inequality comparison operator to
trueq.Cycle.Updated documentation.
Fixed
Switched deprecated SciPy functions to their NumPy equivalents.
[2.6.7] - 2020-04-06
Added
Added the method
trueq.Results.plot()that makes a bar plot of the results.Added the compiler pattern
trueq.compilation.PhaseTrackto accumulate virtual phases through a circuit and use them to parameterize native gates.Updated documentation.
Changed
Renamed
trueq.math.Tensor.dag()totrueq.math.Tensor.adj().Dimension on
trueq.Resultwill now increase if new ditstrings contain higher numbers than the existing stored dimension; previously this raised an exception.
Fixed
Fixed an ordering bug in
trueq.results.merge_results().Fixed a bug that occurred while averaging CB results.
[2.6.6] - 2020-03-27
Fixed
Fixed a bug in
trueq.compilation.Relabel, where relabeling would only work on permutations, it now works for any valid arbitrary labels.
[2.6.5] - 2020-03-17
Added
Added interface support for Qiskit based gates which do not define a
.to_matrix().
Changed
Custom keys are now preserved when the circuits which contain them are passed to analysis or randomized compiling.
Changed default priority list for the Qiskit interface.
[2.6.4] - 2020-03-09
Added
Added the
trueq.math.Superopclass for representing superoperators.Added the function
trueq.math.random_density()to generate random density matrices.
Changed
trueq.compilation.RemoveIdcan now optionally remove the identity gate from immutable cycles.trueq.compilation.DEFAULT_PATTERNSfinalRemoveIdnow removes all identities, even in immutable cycles.
[2.6.3] - 2020-02-27
Fixed
Fixed a bug in
setup.pywhich was introduced in the previous release.
[2.6.2] - 2020-02-26
Added
Added
axis_sizeoption to thenr_bar()plotting function.Added support to
trueq.Simulatorfor subsystem dimensions greater than 2, thereby adding support for leakage noise models.Added
dimattribute totrueq.Circuit.Added function
trueq.math.embed_unitary().Added support for pip and wheel installations.
Updated documentation.
Changed
Changed the internals of
trueq.Cycleto reduce memory usage (this should not change any behaviour).
[2.6.1] - 2020-02-20
Changed
trueq.compilation.Native1QandNative2Qhave been optimized slightly for speed.trueq.CircuitCollection.append()now returns itself after appending.Improved the performance of protocol generation functions, e.g.
trueq.make_knr().
Fixed
Fixed a backwards compatibility bug with
trueq.load().Made
trueq.save()more robust by first saving to a temporary location.Fixed issue with
set_priority_listwhere it could result in an empty list.
[2.6.0] - 2020-02-14
Added
Added
labelsoption to theinfidelity_comparison()plotting function.
Changed
Significant refactor of
trueq.interfaceinterfaces, which fixes ambiguities in the gate conversion process (runhelp(trueq.interface)for details).Moved
trueq.circuits.Cycleto a new module,trueq.cycle.Cycle.Moved
trueq.math.NUM_PRECISIONconstant totrueq.utils.NUM_PRECISION.trueq.make_readout_calibration()now flattens input labels to avoid confusion.Default compiler patterns tweaked slightly; the final
Justifystep has been removed. Seetrueq.compilation.DEFAULT_PATTERNSfor the default compiler steps.Reduced default value of
n_bodiesargument intrueq.make_knr()to1.Improved internal logic of
trueq.config.GateFactoryfor future changes in compilation and interface code.Updated documentation.
Fixed
Fixed
trueq.math.find_kak_equivalentand added tests.
[2.5.0] - 2020-02-11
Added
Added
trueq.math.Frame.plot_arr()andtrueq.math.Frame.plot_superoperator()for plotting matrices expressed in different bases.Added
trueq.Gate.is_identityfor checking if a gate is identity.Added
trueq.Cycle.is_equivalentfor checking if two cycles are equivalent.Added options
ignore_immandignore_idtotrueq.compilation.CycleSandwich.
Changed
trueq.config.fsim_factoryfSim definition now matches Cirq definition.circuits.plot.nr_bar()now shows error contributions in the legend instead of below the x-labels.
Fixed
Fixed a bug in
trueq.Circuit.update_keys().Fixed rich display of
trueq.Operation,trueq.Gate,trueq.NativeGate,trueq.Cycle, andtrueq.Circuitin Colab.Fixed the efficiency of
trueq.make_tnr()for many input targeted errors.Fixed rare conversion error in PyQuil interface where single qubit identity gates could have potentially failed to convert after altering default behavior.
[2.4.5] - 2020-02-06
Added
Added more caching to portions of
trueq.interfaceto speed up conversion.Added
trueq.Cycle.to_dict()andtrueq.Cycle.from_dict().Added
trueq.Results.to_dict()andtrueq.Results.from_dict().
Fixed
Cycles and results in circuits are now properly serialized.
[2.4.4] - 2020-02-05
Added
Added compatibility with Python 3.8.
Fixed
Fixed minor CSS bugs in
_repr_html_().Fixed a rare DLL loading bug.
[2.4.3] - 2020-02-04
Added
Added
assetstoMANIFEST.in.
Fixed
Fixed a bug in
trueq.Circuit.to_dict().
[2.4.2] - 2020-02-04
Added
Added
trueq.Gate.random(dim), which creates a random unitary gate of sizedim.Added
trueq.Gate.adj, which returns the adjoint of the existing Gate as a new Gate.Added
trueq.Gate.plot(), which plots the matrix representation of a Gate.Added
trueq.math.random_unitarywhich generates Haar random unitary matrix.Added
_repr_html_()totrueq.Operation,trueq.Gate,trueq.NativeGate,trueq.Cycle, andtrueq.Circuitfor rich display in Jupyter notebooks.
Changed
Simplified
trueq.visualization.plotters.PlottingSuitemechanics.Added a flag,
join_meas=True, to Cirq conversion so parallel measurements can optionally be combined into single Cirq measurement object inside of a moment.Changed the way
trueq.Cycleis serialized bytrueq.Key.to_dict().
Fixed
Fixed ordering of subplots in
CircuitCollection.plot.nr_bar().Solved division by zero error when no data present in plotters.
Fixed behavior of
trueq.Gate.generatorswhen called on identity gates.Cirq conversion now casts angles to real values, where previously complex 0.0 were potentially being passed.
Cirq conversion now assigns qubits to a device consistently.
Fixed a bug in
troubleshoot.py.
Removed
Removed unused function
trueq.utils.cycle_to_str.
[2.4.1] - 2020-01-23
Added
Added
trueq.compilation.CycleSandwichcompiler pattern.Added the convenience attributes
Cycle.gates_singleandCycle.gates_multi.
Changed
trueq.inteface.qiskit.Executornow addsbackend=backendnameto each circuit key.trueq.inteface.qiskit.Executornow has defaultn_shots=128(previously1024).
Fixed
Fixed bug in
Gate.is_unitary.Fixed superfluous
CircuitCollection.fit()warnings.
[2.4.0] - 2020-01-17
Added
Added
trueq.compilation.Relabelpattern that relabels qubits in a circuit.Added
trueq.compile(), which enables simple standard compilation and transpilation.Added the option to select noisy labels and gates in many of the simulator’s noise models, e.g.
Simulator().add_depolarizing(0.1, noisy_labels=[0, 3, 5]).Added
trueq.Circuit.n_measproperty, equal tolen(circuit.meas_locs).Added support to
Cycle.add()for inserting multiple like 1-qubit gates.Added
trueq.Config.connectivityproperty which gives the connectivity graph associated with the factories in the config.Added
trueq.Results.decompiled_results()to undo the effect of a compiled pauli.Added the convenience function
trueq.CircuitCollection.sum_results().Added the convenience function
trueq.CircuitCollection.update_keys().Added
clip=Falseoption totrueq.math.Tensor.to_results().Added
xlabelsandylabelsoptions totrueq.visualization.plot_mat().Added
trueq.math.int_base()for integer solutions tob**n == xforb.Added the
trueq.Cycle.dimattribute.Added
common_ylim=Trueoption toCircuit.plot.nr_bar().
Changed
make_readout_calibration()now makes mutable instead of immutable cycles.Refactored some portions of the interface code for Qiskit, Cirq, and PyQuil for simplicity and improved customization.
Renamed
trueq.compilation.SubstitutionCompilertotrueq.compilation.CompilerGeneralized allowed input type to
Results.marginal().Updated documentation.
Changed underlying datatype of
trueq.Gatefromdicttonp.ndarray.Qiskit Executor now has a default
max_submissions=5down from 25, to match upstream changes from IBM.Modified
trueq.math.int_log()to be faster, to have no default value, and to returnNonerather than error when no solution is found.Removed attributes
trueq.Gate.n_sysandtrueq.Gate.dim; a major step toward gates containing no label information whatsoever.
Fixed
Fixed ordering bug in
Tensor.to_results()andTensor.sample().Fixed return type bug for void backend functions.
Fixed PyQuil interface for
pyquil>=2.16.0.
[2.3.0] - 2019-12-10
Changed
Removed
nr_cmap()andnr_bar()plotting for circuits withkey.protocol="TNR".Added input validation to
nr_cmap()andnr_bar().Compiler speed improvements.
Various improvements to the documentation and examples.
Bumped qiskit-terra optional dependency to
>=0.11.
Fixed
Fixed simulator probability clipping issue.
Fixed compiler to accept lists of cycles.
[2.2.3] - 2019-11-19
Changed
Simulator.runacceptsn_shots=float("inf")as a possible input.Speed improvements to
Simulator.run()for many shots.
[2.2.2] - 2019-11-06
Added
Added
circuits.plot.irb_summary()to plot parameters related to IRB.
[2.2.1] - 2019-11-01
Added
Added aliases for single qubit clifford gates, available through e.g.
Gate.cliff0.Added
make_qcap()andqcap_bound()for Quantum Capacity (QCAP) assessment.Added
Tensor.to_results()which returns aResultsobject.Added
Results.tvd()to compute total variation distance (TVD) between results.Added
circuits.plot.timestamps()plotter showingResults.last_modified.Added case to
trueq.compilation.Native1Qthat will now directly compile into a fixed angle gate if there is one present in the config file.Added
TotalTimefor estimating experiment time based on gate lengths, etc.
Changed
Moved
make_crosstalk_diagnostics()totrueq.assessments.Modified the arguments of
CircuitCollection.batch().
Fixed
Fixed an exponential blowup in the analysis of
make_knr()circuits.Fixed a bug in readout calibration.
Fixed a memory reporting bug in macOS (enterprise version only).
[2.2.0] - 2019-10-21
Added
Added
make_knr()for K-body noise reconstruction (KNR).Added
make_tnr()for Targeted noise reconstruction (TNR).Added
interface.qiskit.Executorfor submission of circuits to a Qiskit backend.Added convenient specification of twirling groups using
P,C,SU, etc.Added
CircuitAggregatorcontext to build circuit collections from multiple protocols using only one call to the backend.
Changed
Changed return type of
randomly_compile()to a circuit collection of randomizations, and removed its ability to accept circuit collections as input.Improved plotting and saving functions.
Updated documentation.
Fixed
Fixed bugs in Cirq and Qiskit interfaces.
Removed
Removed
make_nr().Removed
reconstruct_pauli_errors()(its functionality was intergrated intofit()).