- Add support for parameter expression in qiskit translation
-
Add translation of r gate from qiskit
-
Add
detmethod at backends -
Add fermion Gaussian state simulator in
fgs.py -
Add
partial_transposeandentanglement_negativitymethod inquantum.py -
Add
reduced_wavefunctionmethod inquantum.pyto get reduced pure state
-
move ensemble module to applications/ai (breaking changes)
-
tc2qiskit now record qiskit measure with incremental clbit from 0
-
Support degenerate eigenvalue for jax backend
eighmethod when using AD -
Fixed
cugate translation from qiskit to avoid qiskit bug -
Fixed jax refactoring (0.4.24) where SVD and QR return a namedtuple instead of a tuple
-
Fix qiskit<1.0 and tf<2.16
-
Add multiple GPU VQE examples using jax pmap
-
Add
with_proboption togeneral_krausso that the probability of each option can be returned together -
Add benchmark example showcasing new way of implementing matrix product using vmap
-
Add keras3 example showcasing integration with tc
-
Add circuit copy method that avoid shallow copy issue
Circuit.copy() -
Add end to end infrastructures and methods for classical shadow in
shadows.py -
Add classical shadow tutorial
-
Add NN-VQE tutorial
-
improve the
adaptive_vmapto support internal jit and pytree output -
fix
pauli_gatesdtype unchange issue when set new dtype (not recommend to use this attr anymore) -
fix rem
apply_correctionbug when non-numpy backend is set -
fix tf warning for
castwith higher version of tf
- The static method
BaseCircuit.copyis renamed asBaseCircuit.copy_nodes(breaking changes)
-
c.measure_instruction(*qubits)now supports multiple ints specified at the same time -
c.expectation_ps()now also supportspsargument directly (pauli structures) -
Add tc version print in
tc.about()method -
tc now supports fancy batch indexing for gates, e.g.
c.rxx([0, 1, 2], [1, 2, 3], theta=K.ones([3])) -
Task management via group tag (when
submit_taskandlist_tasks) -
batch_expectation_psnow supports local device without topology and thus unify the interface for numerical exact simulation, numerical simulation with measurement shots and QPU experiments -
introduce two stage compiling for
batch_expectation_psto save some compiling overhead -
Add experimental support for ODE backend pulse level control simulation/analog quantum computing
-
make the pulse level control support differentiating the end time
-
Add new qem module with qem methods: zne, dd and rc
-
tc.results.counts.plot_histogramnow can dispatch kws to corresponding qiskit method -
New implementation for
c.inverse()to partially avoid unrecognized gate name issue -
Fixed bug for
batch_expectation_psfor jax backend -
Partially fix the SVD numerical stability bug on tf backend when using
MPSCircuit -
List syntax for gate now supports range
-
Add
tc.TorchHardwarLayerfor shortcut layer construction of quantum hardware experiments -
Add cotengra contractor setup shortcut
-
Add simplecompiler module to assite qiskit compile for better performance when targeting rz native basis
-
Add compiler and cloud namespace to the global tensorcircuit namespace
-
Refactor composed compiler pipeline interface to include simple_compiler, using
DefaultCompilerfor now (breaking) -
Refactor
batch_submit_templatewrapper to make it a standard abstraction layer between tc cloud infras andbatch_expectation_psabstraction, providing another way to adpot other cloud providers with onlybatch_submit_templateimplemented
-
submit_taskreturn (list of dict vs dict) follows the data type of provided circuit instead of the number of circuits -
Fix qubit mapping related bug when using
batch_expectation_psorsimple_compile
-
Cloud module for Tencent QCloud is now merged into the master branch and ready to release
-
Add
tc.about()to print related software versions and configs -
Torch support is upgraded to 2.0, and now support native vmap and native functional grad, and thus
vvag. Still jit support is conflict with these functional transformations and be turned off by default -
Add
torch_interfaces_kwsthat support static keyword arguments when wrapping with the interface -
Add
gpu_memory_sharefunction and enable it by default -
Add
scanmethods for backends -
Add example demontrating how jax compiling time can be accelerated by
jax.lax.scan
-
Add tests and fixed some missing methods for cupy backend, cupy backend is now ready to use (though still not guaranteed)
-
Fix adjoint gate numpy conversion for fixed gate case
-
Sometime, tf just return IndexedSlice instead of tensor from gradient API, partially fix this in tc backend methods
- Upgraded black and mypy==1.2.0 (breaking change for developers)
-
Add
initial_mappingcircuit method to return a new circuit with givenlogical_physical_mapping -
Add
get_positional_logical_mappingcircuit method to return the mapping when only part of the qubits are measured -
results.rem.ReadoutMitclass now support three layers of abstraction on qubits: positional, logical, and physical -
Add an example script demonstrating how tc can use external contraction path finder wirtten in Julia
-
Add
cals_from_apimethod forReadoutMitclass which can acquire the readout error information from the api -
Add experimental compiler module
-
Make the compiler infra more ready for a pipeline compling
-
When translating to qiskit, multicontrol gate is manipulated specifically instead of a general unitary
-
Add qft blocks in template module
-
Add Tensorcircuit MacOS (univerisal) installation guide
-
Add KerasLayer without jit (quantum hardware compatible)
-
Add regularizer support for KerasLayer
-
Add methods in quantum module for translating ps list and xyz argument dict
-
Add
templates.ensemble.baggingmodule for bagging ensemble method -
The speed of Pauli string sum Hamiltonian generation is improved by a divide-and-conquer sum
-
Circuit nosify in noise model now support all circuit attributes apart from qubit number
-
Some string warnings are fixed by using r-string
-
Fix bug in
tc.quantum.quimb2qopwhen mps is the input -
Fix bug in translation.py when qiskit is not installed
-
Rem results after
apply_correctionis now sorted -
Fix
KerasLayerso that it supports null weights -
Fix tf optimizer bug and optimizer compatibility issue with tf2.11
-
Add
c.probability()method to return probability amplitude -
Add results module including funtionalities on count dict manipulation and readout error mitigation (local/global calibriation, scalable counts and expectation mitigation from research papers)
-
Add
_extra_qirto store information on hardware level measurement and reset -
Add
enable_instructionoption into_qiskitmethod that enables measurements in qiskit export -
Add circuit method
measure_instruction,barrier_instructionandreset_instructionfor hardware level instruction flags -
Auto unroll composite qiskit instructions when translating to tc circuit
-
Add
binding_parametersargument for translating parameterized qiskit circuit to tc circuit -
Add
keep_measure_orderbool option tofrom_openqasmmethods so that the measure instruction order is kept by qiskit -
Add Chinese translation for doc Sharpbit
-
Add
circuit_constructorargument forqiskit2tcmethod, so that we can support more circuit class than circuit and dmcircuit
-
Fix adjoint possible bug with agnostic backend
-
Fix
sigmoidbug on pytorch backend -
Fix
relubug on pytorch backend -
Ignore ComplexWarning for
castmethod on numpy and jax backend -
Fix
vjpmethod bug on tensorflow backend, where none is replaced with zeros
-
Add native support for
rxx,ryyandrzzgates for translation from qiskit -
Add
from_openqasmandfrom_openqasm_filemethods forCircuit -
Add
circuit_paramsargument for translation from qiskit to make the interface universal and consistent with otherfrom_methods -
Add
shiftstuple parameter forexperimental.parameter_shift_gradAPI so that we can also customize finite difference gradient from this method -
Add
stdmethod for backends -
Add
NoiseModelclass to programmably configure the global error model when simulating the quantum circuit -
Add
tc.channels.composedkrausto compose the different Kraus operators as a new one -
Add direct support for noise model via
sample_expectation_psandexpectationmethods, both Monte Carlo trajectory and density matrix evolution approaches are supported
- Improve the efficiency of
sample_expectation_psmethod by using cached state
-
Fixed
unitary_krausof Circuit class support for multi-qubit kraus channels, previous implementation fails to reshape the multi-qubit kraus tensor as matrix -
Fixed
kraus_to_super_gatebug when multi-qubit kraus channels are presented on tensorflow backend
-
Finished quantum noise modeling and simulation development stage 1. Add more quantum channels and the differentiable transformation between different channel forms. Add readout error support for sample and sample_expectation_ps methods.
-
Add new parameter shift gradient API that supports finite measurement shots and the corresponding example scripts
-
Add openqasm format transformation method
c.to_openqasm() -
Add native support for
phaseandcphasegates when transforming to qiskit -
Add native support for
rxx,ryy,rzzandu,cugates when transforming to qiskit -
Add native support for
ugate when transforming from qiskit -
Add circuit
from_qsim_filemethod to load Google random circuit structure -
Add
searchsortedmethod for backend -
Add
probability_samplemethod for backend as an alternative forrandom_choicesince it supportsstatusas external randomness format -
Add
statussupport forsampleandsample_expection_psmethods
- The inner mechanism for
sample_expectation_psis changed to sample representation from count representation for a fast speed
-
Fixed the breaking change introduced in jax 0.3.18,
jax._srcis no longer imported into the from the public jax namespace. -
tc.quantum.correlation_from_samplesnow fix the sign error with odd number of spins -
Updated to the latest version of mypy and get rid of lots of type: ignored
-
Fix the dtype bug when float is pass to u gate or phase gate
-
Fix to qiskit bug when parameterized gate has default nonset parameters
-
Fix
iswapgate translation to qiskit with support for parameters
-
Add support for weighted graph QAOA in
tc.templates.blocks.QAOA_block -
Add
AbstractCircuitto and from json capability (experimental support, subject to change) -
Add alias for
sdandtdgate -
Add
phasegate andcphasegate for the circuit -
Add U gate and CU gate following OpenQASM 3.0 convention
-
Add
tc.gates.get_u_parameterto solve the three Euler angle for the U gate given the matrix -
Add
GateVF.ided()method to kron quantum gate with identity gate -
Add
batched_parameters_structures.pyexample to demonstrate nested vmap and architecture search possibility -
Add
gate_countmethod onAbstractCircuitto count gates of given type in the circuit -
Add
gate_summarymethod onAbstractCircuitto count gate by type as a dict -
Add ccx as another alias for toffoli gate
-
Seperate channel auto register for circuit class with unitary and general case
-
The old standalone depolarizing implementation can now be called via
c.depolarizing_reference
-
Move
iswapgate to vgates list -
Fix possible bug when vmap is nested in different order (only affect tensorflow backend)
-
Fix bug when multi input function accept the same variable in different args and gradient or jvp/vjp is required (only affect tensorflow backend)
-
Fix the use of rev over rev jacobian for hessian method and back to the efficient solution of fwd over rev order due to the solution of nested vmap issue on tf backend
-
Identify potential bug in
unitary_kraus2implementation, change tounitary_krausinstead
-
Add
sample_expectation_psmethod forBaseCircuit, which measure the Pauli string expectation considering measurement shots -
Add alias
exppsforexpectation_psandsexppsforsampled_expectation_ps -
Add
counts_d2sandcounts_s2din quantum module to transform different representation of measurement shots results -
Add vmap enhanced
parameter_shift_gradin experimental module (API subjects to change) -
Add
parameter_shift.pyscript in examples showcasing how to use parameter shift grad wrapper -
Add
vmap_randomness.pyscript in examples showcasing how to vmap external random generators -
Add
noise_sampling_jit.pyscript showcasing how real device simulation with sample method is efficiently implemented with Monte Carlo and jit -
Add jit support and external random management for
tc.quantum.measurement_counts -
Add MPO gate support for multiple qubit gates in
MPSCircuitsimulator -
Add the
expectation_psmethod toMPSCircuit(moving toAbstractCircuit) -
Add six format of measurement results support and their transformation in quantum module
-
Add format option in
Circuit.samplewhile maintain the backward compatibility -
Add
tc.utils.arg_aliaswhich is a decorator that adds alias argument for function with the doc fixed accordingly -
Add quantum channel auto resgisteration method in
Circuitclass
-
rxx,ryy,rzzgates now has 1/2 factor before theta consitent withrx,ry,rzgates. (breaking change) -
replace
statusarguments insamplemethod asrandom_generator(new convention: status for 0, 1 uniform randomness and random_generator for random key) (breaking change) -
Rewrite the expectation method of
MPSCircuitto make it general -
Adjusted the initialization method for
MPSCircuit(move the from_wavefunction method and allow QuVector input) (breaking change) -
tc.quantum.measurement_countsaliased astc.quantum.measurement_resultsand change the function arguments (breaking change) -
Refactor backend to use multiple inheritance approach instead of reflection method
-
Add jit support for
samplemethod whenallow_state=True -
Fix the bug that 128 type is converted to 64 value
-
Fix
arg_aliasbug when the keyword arguments is None by design -
Fix
arg_aliaswhen the docstring for each argument is in multiple lines -
Noise channel apply methods in
DMCircuitcan also absorbstatuskeyword (directly omitting it) for a consistent API withCircuit
-
Add overload of plus sign for TensorFlow SparseTensor
-
Add support of dict or list of tensors as the input for
tc.KerasLayer -
Add support of multiple tensor inputs for
tc.TorchLayer -
Both gate index and
expectation(_ps)now support negative qubit index, eg.c.H(-1)with the same meaning as numpy indexing -
Add
tc.templates.measurements.parameterized_local_measurementsfor local Pauli string evaluation
-
Change pytest xdist option in check_all.sh to
-n auto -
Further refactor the circuit abstraction as AbstractCircuit and BaseCircuit
-
Add
sgates,vgates,mpogatesandgate_aliasesback toBaseCircuitfor backward compatibility -
Add auto conversion of dtype for
unitarygate
-
Add
deviceanddevice_movemethods on backend with universal device string representation -
Add
to_qir,from_qir,to_circuit,inverse,from_qiskit,to_qiskit,sample,prepend,append,cond_measurment,select_gatemethod forDMCircuitclass -
Add
statusarguments as external randomness forperfect_samplingandmeasuremethods -
DMCircuitnow supportsmps_inputsandmpo_dminputs -
Add decorator
tc.interfaces.args_to_tensorto auto convert function inputs as tensor format
- Refactor circuit and dmcircuit with common methods now in
basecircuit.py, and merge dmcircuit.py and dmcircuit2.py, nowDMCircuitsupports MPO gate and qir representation
- Patially solve the issue with visualization on
cond_measure(#50)
-
PyTorch backend support multi pytrees version of
tree_map -
Add
dtypebackend method which returns the dtype string -
Add TensorFlow interface
-
Add
to_dlpackandfrom_dlpackmethod on backends -
Add
enable_dlpackoption on interfaces and torchnn -
Add
inversemethod for Circuit (#26)
-
Refactor
interfacescode as a submodule and add pytree support for args -
Change the way to register global setup internally, so that we can skip the list of all submodules
-
Refactor the tensortrans code to a pytree perspective
-
Fixed
numpymethod bug in pytorch backend when the input tensor requires grad (#24) and when the tensor is on GPU (#25) -
Fixed
TorchLayerparameter list auto registeration -
Pytorch interface is now device aware (#25)
-
Add
enable_lightconeoption in circuitexpectationmethod, where only gates within casual lightcone of local observable is contracted. -
Add
benchmarkfunction into utils
-
Fixed a vital bug on circuit expectation evaluation, a wrongly transposed operator connection is fixed.
-
Name passed in gate application now works as Node name
-
Add PyTorch nn Module wrapper in
torchnn -
Add
reverse,mod,left_shift,right_shift,arangemethods on backend -
Brand new
sampleAPI with batch support and sampling from state support -
add more methods in global namespace, and add alias
KerasLayer/TorchLayer
- Fixed bug in merge single gates when all gates are single-qubit ones
- The default contractor enable preprocessing feature where single-qubit gates are merged firstly
-
Add more type auto conversion for
tc.gates.Gateas inputs -
Add
tree_flattenandtree_unflattenmethod on backends -
Add torch optimizer to the backend agnostic optimizer abstraction
- Refactor the tree utils, add native torch support for pytree utils
-
grad in torch backend now support pytrees
-
fix float parameter issue in translation to qiskit circuit (#19)
- Add
rxx,ryyandrzzgate
-
Fix installation issue with tensorflow requirements on MACOS with M1 chip
-
Improve M1 macOS compatibility with unjit tensorflow ops
-
Fixed SVD backprop bug on jax backend of wide matrix
-
mps_inputdtype auto correction enabled
-
Add
quoperatormethod to getQuOperatorrepresentation of the circuit unitary -
Add
coo_sparse_matrix_from_numpymethod on backend, where the scipy coo matrix is converted to sparse tensor in corresponding backend -
Add sparse tensor to scipy coo matrix implementation in
numpymethod
tc.quantum.PauliStringSum2COO,tc.quantum.PauliStringSum2Dense, andtc.quantum.heisenberg_hamiltoniannow return the tensor in current backend format ifnumpyoption sets to False. (Breaking change: previously, the return are fixed in TensorFlow format)
DMCircuitalso supports array instead of gate as the operator
-
fix translation issue to qiskit when the input parameter is in numpy form
-
type conversion in measure API when high precision is set
-
fix bug in to_qiskit with new version qiskit
- Add
eigvalshmethod on backend
-
post_selectmethod return the measurement result int tensor now, consistent withcond_measure -
Circuit.measurenow point tomeasure_jit
-
Add
expectation_psmethod forDMCircuit -
Add
measureandsampleforDMCircuit
-
With
Circuit.vis_tex, for the Circuit has customized input state, the default visualization is psi instead of all zeros now -
general_krausis synced withapply_general_krausforDMCircuit -
Fix dtype incompatible issue in kraus methods between status and prob
-
add
utils.appendto build function pipeline -
add
meanmethod on backends -
add trigonometric methods on backends
-
add
conditional_gateto support quantum ops based on previous measurment results -
add
expectation_psas shortcut to get Pauli string expectation -
add
appendandprependto compose circuits -
add
matrixmethod to get the circuit unitary matrix
-
change the return information of
unitary_krausandgeneral_krausmethods -
add alias for any gate as unitary
- add QuOperator convert tools which can convert MPO in the form of TensorNetwork and Quimb into MPO in the form of QuOperator
- quantum Hamiltonian generation now support the direct return of numpy form matrix
- unitary_kraus and general_kraus API now supports the mix input of array and Node as kraus list
-
add gradient free scipy interface for optimization
-
add qiskit circuit to tensorcircuit circuit methods
-
add draw method on circuit from qiskit transform pipeline
-
futher refactor VQNHE code in applications
-
add alias
sampleforperfect_samplingmethod -
optimize VQNHE pipeline for a more stable training loop (breaking changes in some APIs)
- Circuit inputs will convert to tensor first
-
add sigmoid method on backends
-
add MPO expectation template function for MPO evaluation on circuit
-
add
operator_expectationin templates.measurements for a unified expectation interface -
add
templates.chemsmodule for interface between tc and openfermion on quantum chemistry related tasks -
add tc.Circuit to Qiskit QuantumCircuit transformation
-
fix the bug in QuOperator.from_local_tensor where the dtype should always be in numpy context
-
fix MPO copy when apply MPO gate on the circuit
- allow multi-qubit gate in multicontrol gate
-
new universal contraction analyse tools and pseudo contraction rehearsals for debug
-
add
gather1dmethod on backends for 1d tensor indexing -
add
datasetmodule in template submodule for dataset preprocessing and embedding -
MPO format quantum gate is natively support now
-
add multicontrol gates in MPO format
- fixed real operation on some methods in templates.measurements
- add gatef key in circuit IR dict for the gate function, while replace gate key with the gate node or MPO (breaking change)
-
add
tdandsdgates for dagger version of T gate and S gate -
add
argmaxandargminas backend methods -
add
expectation_beforemethods fortc.Circuitfor further manipulation on the tensornetwork
-
refined repr for
tc.gates.Gate -
expectation API now supports int index besides list indexes
-
make consistent
Gatereturn for channels -
fixed bug on list optimizer for contraction
-
stability for QR operator in terms of automatic differentiation
-
add
hessianmethod on backends -
add further automatic pipelines for visualization by generating pdf or images
-
add
reshape2method on backends as a short cut to reshape a tensor with all legs 2-d -
add
reshapemmethod on backends to reshape any tensor as a square matrix -
add
controlledandocontrolledAPI to generate more gates -
add
crx,cry,crzgate onCircuit -
add
__repr__and__str__for backend object -
tc.expectationnow support ket arg as quvector form
-
sizencorrectly returns 1 for tensor of no shape -
fixed
convert_to_tensorbug in numpy backend in TensorNetwork -
any_gatealso support Gate format instead of matrix -
matrix_for_gateworks now for backends more than numpy
-
expectationAPI now also accepts plain tensor instead oftc.Gate. -
DMCircuitandDMCircuit2are all pointing the efficent implementations (breaking changes)
-
add
solvemethod on backends to solve linear equations -
add full quantum natural gradient examples and
qngmethod in experimental module -
add
concatmethod to backends -
add
stop_gradientmethod to backends -
add
has_auxarg onvvagmethod -
add
imagmethod on backends -
add
Circuit.vis_texinterface that returns the quantikz circuit latex
-
contractor, dtype and backend set are default to return objects,
with tc.runtime_backend("jax") as KorK = tc.set_backend("jax")could work -
change
perfect_samplingto usemeasure_jitbehind the scene -
anygateautomatically reshape the unitary input to 2-d leg for users' good -
quantum.renyi_entropycomputation with correct prefactor -
Circuitgate can provided other names by name attr -
example_blocksupport param auto reshape for users' good
-
make four algorithms for quantum natural gradient consistent and correct
-
torch
realis now a real
-
add
quantum.heisenberg_hamiltonianfor hamiltonian generation shortcut -
add
has_auxparameter in backend methodsgradandvalue_and_grad, the semantic syntax is the same as jax -
add
optimizerclass on tensorflow and jax backend, so that a minimal and unified backend agnostic optimizer interface is provided -
add
quantum.mutual_information, add support on mixed state forquantum.reduced_density_matrix -
add
jvpmethods for tensorflow, jax, torch backends, and ensure pytree support injvpandvjpinterfaces for tensorflow and jax backends; also ensure complex support forjvpandvjp -
add
jacfwdandjacrevfor backend methods (experimental API, may have bugs and subject to changes)
- fix
matmulbug on tensornetwork tensorflow backend
-
delete
qcodeIR forCircuit, useqirinstead (breaking changes) -
basic circuit running is ok on pytorch backend with some complex support fixing
-
add
get_random_stateandrandom_splitmethods to backends -
add qir representation of circuit,
c.to_qir()andCircuit.from_qir()methods -
fine-grained control on backend, dtype and contractor setup:
tc.set_function_backend()for function level decorator andtc.runtime_backend()as with context manager -
add
state_centricdecorator intc.templates.blocksto transform circuit-to-circuit funtion to state-to-state function -
add
interfaces.scipy_optimize_interfaceto transform quantum function intoscipy.optimize.minimizecampatible form
-
avoid error on watch non
tf.Tensorin tensorflow backend grad method -
circuit preprocessing simplification with only single qubit gates
-
avoid the bug when random from jax backend with jitted function
-
refresh the state cache in Circuit when new gate is applied
- refactor
tc.gates(breaking API onrgate->r_gate,iswapgate->iswap_gate)