Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] adding noisy circuit simulation #140

Open
wants to merge 90 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
90 commits
Select commit Hold shift + click to select a range
a98ed97
add fsimg
rezah Mar 12, 2021
f316b82
fixing style
rezah Mar 12, 2021
2ae1753
fixed python-style circuit class
rezah Mar 12, 2021
4befb5e
fix style test_operators.py
rezah Mar 12, 2021
7465662
minor fix
rezah Mar 13, 2021
0fd8ed4
add fsimt
rezah Mar 16, 2021
4db93ba
edit
rezah Mar 16, 2021
3b156cd
erro fixed
rezah Mar 16, 2021
a4d7e77
fsim native gate form
rezah Mar 17, 2021
fa22b2d
Fix fsimg
rezah Mar 17, 2021
dabcdb3
share-tags
rezah Mar 20, 2021
e521edb
fix Ptensor
rezah Apr 5, 2021
d4765f1
+fix Ptensor
rezah Apr 5, 2021
40f3314
developed
rezah Jun 24, 2021
3e5c53c
Merge branch 'jcmgray:develop' into develop
rezah Jun 24, 2021
9b09576
Merge branch 'jcmgray:develop' into develop
rezah Aug 12, 2021
3bd2be3
Merge branch 'jcmgray:develop' into develop
rezah Aug 25, 2021
ee266b0
fix merged issuies
rezah Aug 25, 2021
2ae66ee
fixed remaining
rezah Aug 25, 2021
783cd4e
Merge branch 'jcmgray:develop' into develop
rezah Sep 2, 2021
5ca3c0e
fixed merge
rezah Sep 2, 2021
7bb4480
Merge branch 'develop' of github.com:rezah/quimb into develop
rezah Sep 2, 2021
9b9bfb5
Merge branch 'develop' into Try
rezah Sep 2, 2021
cf7c8e0
Merge branch 'jcmgray:develop' into develop
rezah Sep 14, 2021
fdacf8e
Merge branch 'develop' into Try
rezah Sep 14, 2021
aec9411
Merge branch 'jcmgray:develop' into develop
rezah Jan 5, 2022
e7b7255
Merge branch 'jcmgray:develop' into develop
rezah Mar 3, 2022
648d442
Merge branch 'Try' of github.com:rezah/quimb into Try
Mar 7, 2022
841d13c
tag_share added to circuit class
rezah Mar 7, 2022
a85dba3
Merge branch 'Try' of github.com:rezah/quimb into Try
Mar 7, 2022
9b9ff2f
Merge branch 'develop' into Try
rezah Mar 8, 2022
05c45c6
added FSIMT
Mar 15, 2022
cc562a0
Merge branch 'Try' of github.com:rezah/quimb into Try
rezah Mar 15, 2022
e819d22
add self.copy()
rezah Mar 22, 2022
d8cda89
added qubit reuse and optimizer clean
Mar 29, 2022
0f4d557
Merge branch 'Try' of github.com:rezah/quimb into Try
Mar 29, 2022
0be3bc3
fixed a bug
Mar 29, 2022
8c7fac7
Quimb to qiskit
Apr 4, 2022
cbb4c2b
qiskit circuit+
rezah Apr 8, 2022
1071c9c
Merge branch 'jcmgray:develop' into develop
rezah May 11, 2022
6633f8a
revise+
rezah May 13, 2022
8d5f2cb
added optimal qubit reuse/measure
rezah May 16, 2022
0226713
added measure X
rezah May 18, 2022
a8fea48
Merge remote-tracking branch 'origin/develop' into Try
rezah May 19, 2022
8686cf1
modified label_
rezah May 20, 2022
e35e295
fixed tags
rezah May 23, 2022
c6cf4a5
Merge remote-tracking branch 'origin/Try' into Try
rezah May 26, 2022
c45fe92
added parity_error_mitigation
rezah Jun 13, 2022
d468991
added Qreg
rezah Jun 14, 2022
381951a
fixed parity by adding H-gate
rezah Jun 14, 2022
0d6f62d
remove measure on physical qubit
rezah Jun 14, 2022
3c07d8f
+bug
rezah Jun 14, 2022
78e2071
+bug
rezah Jun 14, 2022
0d1a476
+bug
rezah Jun 15, 2022
f1d72c6
Merge remote-tracking branch 'Origin/Try' into Try
rezah Jun 16, 2022
6914087
added leakage
rezah Jun 30, 2022
1d59b10
add adjacont qubits
rezah Jun 30, 2022
7c590c5
added leakage+
rezah Jun 30, 2022
cae63ff
added leakage-all
rezah Jul 1, 2022
a7253f9
added open-qasm
rezah Sep 13, 2022
e663df5
Merge remote-tracking branch 'remotes/origin/Try' into Try
rezah Sep 13, 2022
5ad66d0
fixed RZZ & to_qiskit
rezah Sep 13, 2022
796dd78
Merge remote-tracking branch 'remotes/origin/Try' into Try
rezah Sep 13, 2022
6cb3c2a
fixed QuimbCircuit_to_open_qasm
rezah Sep 13, 2022
e1d9d6b
fixed QuimbCircuit_to_open_qasm+
rezah Sep 14, 2022
ffcc3a1
Merge branch 'jcmgray:develop' into develop
rezah Sep 15, 2022
cf50cf0
+raw rho
rezah Sep 19, 2022
af9f1e9
add_fun(conj)+tests pass
rezah Sep 19, 2022
8a82aed
+ more noisy models
rezah Sep 20, 2022
2c2bfde
noisy-model added fully
rezah Sep 21, 2022
23cf29f
+fixed error model
rezah Sep 21, 2022
ad3139a
fixed tags
rezah Sep 21, 2022
422f984
fixed retag for \rho
rezah Sep 22, 2022
ef997f0
added rho_ket, clean_up rho
rezah Sep 23, 2022
84887a4
fixed G, rho
rezah Sep 23, 2022
53bf475
added RXX gate
rezah Sep 28, 2022
ae4523c
added RYY gate
rezah Sep 29, 2022
c6449e6
fixed RYY gate
rezah Sep 29, 2022
4654bb7
fixed RYY gate
rezah Sep 29, 2022
cd46302
fixed RYY gate
rezah Sep 29, 2022
7c7f24a
fixed RYY gate
rezah Sep 29, 2022
ba7c75f
fixed RYY gate
rezah Sep 29, 2022
7563903
fixed RYY gate
rezah Sep 29, 2022
0272fd5
fixed gate_tags
rezah Sep 30, 2022
0213f40
fixed gate_tags
rezah Sep 30, 2022
2883432
Merge branch 'jcmgray:develop' into develop
rezah Oct 22, 2022
03ad27a
merge to develop
rezah Oct 22, 2022
aca6d36
added super_operator U
rezah Nov 10, 2022
e565268
fixed update_circuit_params
rezah Nov 16, 2022
c90cab6
fixed update_params_from
rezah Nov 23, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions quimb/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@
swap,
iswap,
fsim,
fsimt,
fsimg,
ncontrolled_gate,
controlled,
Expand Down Expand Up @@ -343,6 +344,7 @@
'swap',
'iswap',
'fsim',
'fsimt',
'fsimg',
'ncontrolled_gate',
'controlled',
Expand Down
2 changes: 2 additions & 0 deletions quimb/gates.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,5 @@

U3 = operators.U_gate
fsim = operators.fsim
fsimg = operators.fsimg
fsimt = operators.fsimt
31 changes: 31 additions & 0 deletions quimb/gen/operators.py
Original file line number Diff line number Diff line change
Expand Up @@ -352,6 +352,37 @@ def fsim(theta, phi, dtype=complex, **kwargs):
return gate


def fsimt(theta, dtype=complex, **kwargs):
r"""The 'fermionic simulation' gate:

.. math::

\mathrm{fsim}(\theta, \phi) =
\begin{bmatrix}
1 & 0 & 0 & 0\\
0 & \cos(\theta) & sin(\theta) & 0\\
0 & - sin(\theta) & \cos(\theta) & 0\\
0 & 0 & 0 & 1
\end{bmatrix}

Note that ``theta`` and ``phi`` should be specified in radians and the sign
convention with this gate varies. Here for example,
``fsim(- pi / 2, 0) == iswap()``.
"""
from cmath import cos, sin, exp

a = cos(theta)
b = sin(theta)
gate = [[1, 0, 0, 0],
[0, a, b, 0],
[0, -b, a, 0],
[0, 0, 0, 1]]

gate = qu(gate, dtype=dtype, **kwargs)
make_immutable(gate)
return gate


@functools.lru_cache(maxsize=256)
def fsimg(theta, zeta, chi, gamma, phi, dtype=complex, **kwargs):
r"""The 'fermionic simulation' gate, with:
Expand Down
1 change: 1 addition & 0 deletions quimb/tensor/array_ops.py
Original file line number Diff line number Diff line change
Expand Up @@ -486,6 +486,7 @@ def __init__(self, fn, params, shape=None):
self._shape_fn_id = id(fn)

def copy(self):
self.data
new = PArray(self.fn, self.params, self.shape)
new._data = self._data # for efficiency
return new
Expand Down
Loading