-
Add native support for
rxx
,ryy
andrzz
gates for translation from qiskit -
Add
from_openqasm
andfrom_openqasm_file
methods forCircuit
-
Add
circuit_params
argument for translation from qiskit to make the interface universal and consistent with otherfrom_
methods -
Add
shifts
tuple parameter forexperimental.parameter_shift_grad
API so that we can also customize finite difference gradient from this method -
Add
std
method for backends -
Add
NoiseModel
class to programmably configure the global error model when simulating the quantum circuit -
Add
tc.channels.composedkraus
to compose the different Kraus operators as a new one -
Add direct support for noise model via
sample_expectation_ps
andexpectation
methods, both Monte Carlo trajectory and density matrix evolution approaches are supported
- Improve the efficiency of
sample_expectation_ps
method by using cached state
-
Fixed
unitary_kraus
of Circuit class support for multi-qubit kraus channels, previous implementation fails to reshape the multi-qubit kraus tensor as matrix -
Fixed
kraus_to_super_gate
bug 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
phase
andcphase
gates when transforming to qiskit -
Add native support for
rxx
,ryy
,rzz
andu
,cu
gates when transforming to qiskit -
Add native support for
u
gate when transforming from qiskit -
Add circuit
from_qsim_file
method to load Google random circuit structure -
Add
searchsorted
method for backend -
Add
probability_sample
method for backend as an alternative forrandom_choice
since it supportsstatus
as external randomness format -
Add
status
support forsample
andsample_expection_ps
methods
- The inner mechanism for
sample_expectation_ps
is changed to sample representation from count representation for a fast speed
-
Fixed the breaking change introduced in jax 0.3.18,
jax._src
is no longer imported into the from the public jax namespace. -
tc.quantum.correlation_from_samples
now 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
iswap
gate translation to qiskit with support for parameters
-
Add support for weighted graph QAOA in
tc.templates.blocks.QAOA_block
-
Add
AbstractCircuit
to and from json capability (experimental support, subject to change) -
Add alias for
sd
andtd
gate -
Add
phase
gate andcphase
gate for the circuit -
Add U gate and CU gate following OpenQASM 3.0 convention
-
Add
tc.gates.get_u_parameter
to 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.py
example to demonstrate nested vmap and architecture search possibility -
Add
gate_count
method onAbstractCircuit
to count gates of given type in the circuit -
Add
gate_summary
method onAbstractCircuit
to 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
iswap
gate 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_kraus2
implementation, change tounitary_kraus
instead
-
Add
sample_expectation_ps
method forBaseCircuit
, which measure the Pauli string expectation considering measurement shots -
Add alias
expps
forexpectation_ps
andsexpps
forsampled_expectation_ps
-
Add
counts_d2s
andcounts_s2d
in quantum module to transform different representation of measurement shots results -
Add vmap enhanced
parameter_shift_grad
in experimental module (API subjects to change) -
Add
parameter_shift.py
script in examples showcasing how to use parameter shift grad wrapper -
Add
vmap_randomness.py
script in examples showcasing how to vmap external random generators -
Add
noise_sampling_jit.py
script 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
MPSCircuit
simulator -
Add the
expectation_ps
method toMPSCircuit
(moving toAbstractCircuit
) -
Add six format of measurement results support and their transformation in quantum module
-
Add format option in
Circuit.sample
while maintain the backward compatibility -
Add
tc.utils.arg_alias
which is a decorator that adds alias argument for function with the doc fixed accordingly -
Add quantum channel auto resgisteration method in
Circuit
class
-
rxx
,ryy
,rzz
gates now has 1/2 factor before theta consitent withrx
,ry
,rz
gates. (breaking change) -
replace
status
arguments insample
method asrandom_generator
(new convention: status for 0, 1 uniform randomness and random_generator for random key) (breaking change) -
Rewrite the expectation method of
MPSCircuit
to make it general -
Adjusted the initialization method for
MPSCircuit
(move the from_wavefunction method and allow QuVector input) (breaking change) -
tc.quantum.measurement_counts
aliased astc.quantum.measurement_results
and change the function arguments (breaking change) -
Refactor backend to use multiple inheritance approach instead of reflection method
-
Add jit support for
sample
method whenallow_state=True
-
Fix the bug that 128 type is converted to 64 value
-
Fix
arg_alias
bug when the keyword arguments is None by design -
Fix
arg_alias
when the docstring for each argument is in multiple lines -
Noise channel apply methods in
DMCircuit
can also absorbstatus
keyword (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_measurements
for 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
,mpogates
andgate_aliases
back toBaseCircuit
for backward compatibility -
Add auto conversion of dtype for
unitary
gate
-
Add
device
anddevice_move
methods 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_gate
method forDMCircuit
class -
Add
status
arguments as external randomness forperfect_sampling
andmeasure
methods -
DMCircuit
now supportsmps_inputs
andmpo_dminputs
-
Add decorator
tc.interfaces.args_to_tensor
to 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, nowDMCircuit
supports 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
dtype
backend method which returns the dtype string -
Add TensorFlow interface
-
Add
to_dlpack
andfrom_dlpack
method on backends -
Add
enable_dlpack
option on interfaces and torchnn -
Add
inverse
method for Circuit (#26)
-
Refactor
interfaces
code 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
numpy
method bug in pytorch backend when the input tensor requires grad (#24) and when the tensor is on GPU (#25) -
Fixed
TorchLayer
parameter list auto registeration -
Pytorch interface is now device aware (#25)
-
Add
enable_lightcone
option in circuitexpectation
method, where only gates within casual lightcone of local observable is contracted. -
Add
benchmark
function 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
,arange
methods on backend -
Brand new
sample
API 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.Gate
as inputs -
Add
tree_flatten
andtree_unflatten
method 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
,ryy
andrzz
gate
-
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_input
dtype auto correction enabled
-
Add
quoperator
method to getQuOperator
representation of the circuit unitary -
Add
coo_sparse_matrix_from_numpy
method on backend, where the scipy coo matrix is converted to sparse tensor in corresponding backend -
Add sparse tensor to scipy coo matrix implementation in
numpy
method
tc.quantum.PauliStringSum2COO
,tc.quantum.PauliStringSum2Dense
, andtc.quantum.heisenberg_hamiltonian
now return the tensor in current backend format ifnumpy
option sets to False. (Breaking change: previously, the return are fixed in TensorFlow format)
DMCircuit
also 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
eigvalsh
method on backend
-
post_select
method return the measurement result int tensor now, consistent withcond_measure
-
Circuit.measure
now point tomeasure_jit
-
Add
expectation_ps
method forDMCircuit
-
Add
measure
andsample
forDMCircuit
-
With
Circuit.vis_tex
, for the Circuit has customized input state, the default visualization is psi instead of all zeros now -
general_kraus
is synced withapply_general_kraus
forDMCircuit
-
Fix dtype incompatible issue in kraus methods between status and prob
-
add
utils.append
to build function pipeline -
add
mean
method on backends -
add trigonometric methods on backends
-
add
conditional_gate
to support quantum ops based on previous measurment results -
add
expectation_ps
as shortcut to get Pauli string expectation -
add
append
andprepend
to compose circuits -
add
matrix
method to get the circuit unitary matrix
-
change the return information of
unitary_kraus
andgeneral_kraus
methods -
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
sample
forperfect_sampling
method -
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_expectation
in templates.measurements for a unified expectation interface -
add
templates.chems
module 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
gather1d
method on backends for 1d tensor indexing -
add
dataset
module 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
td
andsd
gates for dagger version of T gate and S gate -
add
argmax
andargmin
as backend methods -
add
expectation_before
methods fortc.Circuit
for further manipulation on the tensornetwork
-
refined repr for
tc.gates.Gate
-
expectation API now supports int index besides list indexes
-
make consistent
Gate
return for channels -
fixed bug on list optimizer for contraction
-
stability for QR operator in terms of automatic differentiation
-
add
hessian
method on backends -
add further automatic pipelines for visualization by generating pdf or images
-
add
reshape2
method on backends as a short cut to reshape a tensor with all legs 2-d -
add
reshapem
method on backends to reshape any tensor as a square matrix -
add
controlled
andocontrolled
API to generate more gates -
add
crx
,cry
,crz
gate onCircuit
-
add
__repr__
and__str__
for backend object -
tc.expectation
now support ket arg as quvector form
-
sizen
correctly returns 1 for tensor of no shape -
fixed
convert_to_tensor
bug in numpy backend in TensorNetwork -
any_gate
also support Gate format instead of matrix -
matrix_for_gate
works now for backends more than numpy
-
expectation
API now also accepts plain tensor instead oftc.Gate
. -
DMCircuit
andDMCircuit2
are all pointing the efficent implementations (breaking changes)
-
add
solve
method on backends to solve linear equations -
add full quantum natural gradient examples and
qng
method in experimental module -
add
concat
method to backends -
add
stop_gradient
method to backends -
add
has_aux
arg onvvag
method -
add
imag
method on backends -
add
Circuit.vis_tex
interface that returns the quantikz circuit latex
-
contractor, dtype and backend set are default to return objects,
with tc.runtime_backend("jax") as K
orK = tc.set_backend("jax")
could work -
change
perfect_sampling
to usemeasure_jit
behind the scene -
anygate
automatically reshape the unitary input to 2-d leg for users' good -
quantum.renyi_entropy
computation with correct prefactor -
Circuit
gate can provided other names by name attr -
example_block
support param auto reshape for users' good
-
make four algorithms for quantum natural gradient consistent and correct
-
torch
real
is now a real
-
add
quantum.heisenberg_hamiltonian
for hamiltonian generation shortcut -
add
has_aux
parameter in backend methodsgrad
andvalue_and_grad
, the semantic syntax is the same as jax -
add
optimizer
class 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
jvp
methods for tensorflow, jax, torch backends, and ensure pytree support injvp
andvjp
interfaces for tensorflow and jax backends; also ensure complex support forjvp
andvjp
-
add
jacfwd
andjacrev
for backend methods (experimental API, may have bugs and subject to changes)
- fix
matmul
bug on tensornetwork tensorflow backend
-
delete
qcode
IR forCircuit
, useqir
instead (breaking changes) -
basic circuit running is ok on pytorch backend with some complex support fixing
-
add
get_random_state
andrandom_split
methods 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_centric
decorator intc.templates.blocks
to transform circuit-to-circuit funtion to state-to-state function -
add
interfaces.scipy_optimize_interface
to transform quantum function intoscipy.optimize.minimize
campatible form
-
avoid error on watch non
tf.Tensor
in 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
)