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

Noise Aware ZNE #96

Merged
merged 12 commits into from
Mar 16, 2024
Merged

Noise Aware ZNE #96

merged 12 commits into from
Mar 16, 2024

Conversation

daniel-mills-cqc
Copy link
Collaborator

@daniel-mills-cqc daniel-mills-cqc commented Jan 6, 2024

Adds noise aware zero noise extrapolation, in particular as a new folding method. There were a couple of changes to other parts of ZNE needed to make this possible:

  • ZNE no longer does 'factor 1 folding' (i.e. using the base noise of the device) by default. A MitEx which just scales the noise has been added
  • The folding methods may now generate many circuits, for example in this case sampling many noisy circuits. I expect this to be of more general use.

Otherwise, I think I have pushed enums and kwargs too far here. I would like to move to having a Folding base class which other folding methods can inherit from. Their behaviour can be defined when they are initialised, rather than counting on kwargs being passed. The reason I have not done this here is because it would change the API significantly, and make the ZNE section of the manual redundant, so I thought I'd get your approval first.

Here is an example, which is also included in the tests:

from pytket import OpType, Circuit
from qermit.noise_model import NoiseModel, PauliErrorTranspile, ErrorDistribution
from pytket.pauli import Pauli
from qermit.noise_model import TranspilerBackend, PauliErrorTranspile
from qermit.zero_noise_extrapolation.zne import gen_ZNE_MitEx, Folding, Fit
from qermit.taskgraph.mittask import ObservableExperiment, AnsatzCircuit
from qermit.taskgraph.utils import ObservableTracker
from pytket.utils import QubitPauliOperator
from pytket.pauli import QubitPauliString
from pytket.unit_id import Qubit
import numpy as np
from itertools import product

# Here we are creating the PTM of an error model
# which acts XI with rate 0.1
ptm = np.diag([1,1,1,1,1,1,1,1,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8])
# This index dixtionary maps Paulis to their index in the PTM
pauli_index = {pauli: index for index, pauli in enumerate(product([Pauli.I, Pauli.X, Pauli.Y, Pauli.Z], repeat=2))}
error_distribution = ErrorDistribution.from_ptm(ptm, pauli_index)

# This print will verify the above
print(error_distribution.distribution)

# This error model will act on the CZ gate,
# and will be acted by the backend created below.
noise_model = NoiseModel(
    noise_model={
        OpType.CZ:error_distribution
    }
)
transpiler = PauliErrorTranspile(noise_model=noise_model)
backend = TranspilerBackend(transpiler=transpiler)

# Note that this particular example of ZNE
# will run with unevenly distributed noise
# scaling values.
zne_mitex = gen_ZNE_MitEx(
    backend=backend,
    noise_scaling_list=[3.6, 1, 4, 2, 2.5, 3, 3.3],
    show_fit=True,
    folding_type=Folding.noise_aware,
    fit_type=Fit.exponential,
    noise_model=noise_model,
    n_noisy_circuit_samples=1000,
)

circuit_noisy = Circuit(2).CZ(0,1)

qps_noisy_noisy = QubitPauliString(map={Qubit(0):Pauli.Z, Qubit(1):Pauli.Z})

qubit_pauli_operator_noisy = QubitPauliOperator(
    dictionary = {
        qps_noisy_noisy:1,
    }
)

observable_tracker_noisy = ObservableTracker(
    qubit_pauli_operator=qubit_pauli_operator_noisy
)

shots=10000
ansatz_circuit_noisy = AnsatzCircuit(
    Circuit=circuit_noisy,
    Shots=shots,
    SymbolsDict={}
)

observable_experiment_noisy = ObservableExperiment(
    AnsatzCircuit=ansatz_circuit_noisy,
    ObservableTracker=observable_tracker_noisy,
)

qubit_pauli_operator_list = zne_mitex.run(
    mitex_wires=[observable_experiment_noisy]
)

producing:
Screenshot 2024-03-09 at 15 33 26

@daniel-mills-cqc daniel-mills-cqc marked this pull request as ready for review January 9, 2024 16:48
lagos_backend = IBMQEmulatorBackend(
"ibm_lagos", instance='partner-cqc/internal/default'
)
lagos_backend = IBMQEmulatorBackend("ibmq_mumbai")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please rename to mumbai_backend

Copy link
Collaborator

@sjdilkes sjdilkes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mostly looking good - a few small changes + the expected changes to the noise scaling

def transform(circuit: Circuit) -> Circuit:
return circuit

return CustomPass(transform=transform)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd just do this:
return CustomPass(transform=lambda circuit: circuit)

def transform(circuit: Circuit) -> Circuit:
return circuit

return CustomPass(transform=transform)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same again: return CustomPass(transform=lambda circuit: circuit)


return CustomPass(transform=transform)

def rebase_pass(self):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

return type for function (BasePass?)

self,
circuits: Sequence[Circuit],
n_shots: Sequence[int],
) -> List[uuid.UUID]:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, do you use uuid.UUID instead of ResultHandle in this mock backend?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do, in part as I don't know how to create new unique ResultHandle objects. Do you happen to know how to do that?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Never mind, figured it out :P

@@ -101,6 +101,10 @@ def gen_UnCorrelated_SPAM_MitRes(
"""
if backend.backend_info is None:
raise ValueError("Backend has no backend_info attribute.")
if backend.backend_info.architecture is None:
raise ValueError(
"Backend Architecture has no specified Nodes, please use a Backend with a specified Architecture."
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd change the error message to:
BackendInfo stored by Backend has no defined Architecture, please use a Backend with a specified Architecture.

:type n_noisy_circuit_samples: int
"""

noise_model = kwargs.get("noise_model", NoiseModel(noise_model={}))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is my line where I get too pedantic with types in python, but I'd do: noise_model: NoiseModel = ... - understood if you'd prefer not to though!

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! I think you're right that annotating kwargs is best.

"""

noise_model = kwargs.get("noise_model", NoiseModel(noise_model={}))
n_noisy_circuit_samples = kwargs.get("n_noisy_circuit_samples", 1)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

n_noisy_circuit_samples: int =

noise_model = kwargs.get("noise_model", NoiseModel(noise_model={}))
n_noisy_circuit_samples = kwargs.get("n_noisy_circuit_samples", 1)

scaled_noise_model = noise_model.scale(scaling_factor=noise_scaling - 1)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

scaled_noise_model: NoiseModel =

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would you expect mypy to be able to infer this from the signature of scale? Just curious, I don't mind being over cautious in any case :P.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This suggestion was less for mypy and more for me! I just find it helpful, where they're easily defined, to just set the type - less things to track mentally!

for index in experiment_index_list:
merged_qpo_list[index] = QubitPauliOperator(dictionary=index_to_merged_qpo_dict[index])

return (merged_qpo_list, )
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could try:
return(merged_qpo_list = [ QubitPauliOperator(index_to_merged_qpo_dict.get(index, {})) for index in range(max(experiment_index_list) + 1) ],)

might be more confusing though?

If not I'd still type merged_qpo_list: List[QubitPauliOperatpr] - in this case I think it makes it clearer that this is the first time the object has been created, which is helpful to know at the bottom of a function

Copy link
Collaborator

@sjdilkes sjdilkes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@daniel-mills-cqc daniel-mills-cqc merged commit 67044e5 into develop Mar 16, 2024
11 checks passed
@daniel-mills-cqc daniel-mills-cqc deleted the noise_aware_zne branch April 12, 2024 10:41
daniel-mills-cqc added a commit that referenced this pull request Nov 18, 2024
* Uniform task labels (#36)

* Make _label case uniform

A VERY small PR making the case used for _label uniform.

* Capitalise Ex

* Pytket v1 upgrade (#41)

* Upgrade to pytket v1.0.1

This primarily includes:
- remove Rebase passes
- change module names

* Remove unused imports

* Add capitilisation

* Update docs with change to pytket version

* Correct version requirements

* Correct verson requirements

Co-authored-by: Daniel Mills <[email protected]>
Co-authored-by: Daniel Mills <[email protected]>

* Remove Partial SPAM correcter (#42)

* remove all traces

* update docs

* Update build_and_test.yml

* Remove copy.copy (#43)

* update use of copy.copy in code

remove in many cases

* copy.deepcopy -> deepcopy

* reintroduce necessary copy

* fix typo

* Add ObservableTracker.clear method (#44)

* Shot splitter mitres (#40)

* Add shot splitting mitres

* Better python practice with shot splitting

* Correct comment format

* Change function name

* Add a compiled shot splitting metres

* Correct typing on split_index

* Use OutcomeArray to gather results

* Correct comment spelling

* Add splitting mitres to docs

* Rebuild docs

Co-authored-by: Daniel Mills <[email protected]>
Co-authored-by: Daniel Mills <[email protected]>
Co-authored-by: Daniel Mills <[email protected]>

* Remove appendix from LICENSE file (#46)

* Update graph visualisation (#37)

* update to vertical visualisation

* Update mitresgraph.png

* Delete mitresgraph.png

* update manual images

* update mitex manual images

* update docs image

* rebuild docs and manual

Co-authored-by: sjdilkes <[email protected]>

* Add basic "_cache" attribute for storing all generated edge data from run() (#47)

* add bad cache

* smarten how cache works

* qermit.mittask -> qermit.taskgraph

* add .cache to mitres and mitex

* remove redundant print

* add "run_basic" method (#48)

* Correct qubit mutation (#50)

* Add qubit relabelling task

* Correct typing

* Add documentation

* Add tests

* Code reformatting

* Correct manual

* Rebuild docs

* Add missing tasks to docs

Co-authored-by: Daniel Mills <[email protected]>

* Minor edits, rebuild docs and manual (#49)

* add bad cache

* smarten how cache works

* qermit.mittask -> qermit.taskgraph

* add .cache to mitres and mitex

* add "run_basic" method

* fix obvious issues

* qermit -> Qermit

* Update index.rst

* Update index.rst

* q -> Q

* rebuild manual and docs

* remove print

* rebuild docs and manual

* add "real" string back

* update docs

* update docs

* Update pytket version to 1~(#55)

* update pytket

* update

* Remove pytket from test requirements, and cast mean

* Update zne.py

* Remove use of RebaseToCliffordSingles

* BLACK FORMAT

Co-authored-by: Daniel Mills <[email protected]>
Co-authored-by: sjdilkes <[email protected]>

* Add `characterisation` attribute to TaskGraph and pass as kwarg to TaskGraph.run  (#61)

* Update _version.py

* Update zne_test.py

* Add characterisation attribute to taskgraph

allow to be passed at run

* ignore numpy

* set mittask characterisation attribute when running

* Update frame_randomisation_test.py

* update pytket version

* Update frame_randomisation_test.py

* revert pytket changes

* update versioning

* Update SPAM correction to use characterisation instead of BackendInfo

* Update full_spam_test.py

* use characteriastoin in CCL

* update manual

* Add Spectral Filtering Method (#63)

* Initial commit with outline of protocol

* Remove unnecessary wires

* Add result extraction

* Output qpo

* Add test

* Add characterisation cache

* Add documentation

* Add spectral filtering tests

* Generalise tests to more complicated qpo

* Add type annotation

* Remove caches

* Add documentation

* Split FFT from formatting component

* Add tests for graph generation and new FFT and formating task

* Add tests, docs and type annotation for small coefficient filter

* Document FFT and related tasks

* Document SignalFilter

* Clean up some documentation

* Minor corrctions to typing

* Simplify NDArray typing

* Change to List type annotation

* Add additioinal documentation

* Address Silas PR comments

* Code Formatting

* Formatting and type checking

* Add compiled docs

* Compile manual

* Add spectral fiiltering to docs index

* Remove use of np array

* Correct typing

Co-authored-by: Daniel Mills <[email protected]>
Co-authored-by: Daniel Mills <[email protected]>

* Update python version (#66)

* Update copyright (#69)

* Update pytket version to 1.11(#67)

* Change copyright

* Add noise scaling via 2 qubit gate folding (#72)

* Add 2 qubit gate folding

* Run black

* Import isclose

* Add test call to main call

---------

Co-authored-by: dan-mills-cqc <[email protected]>

* update docs

* Add failing tests (#76)

* Add failing SPAM test

* Add test backends

* Add pytket-quantinuum to test requirements

* Remove myqos imports

* Add test init

* Add failing ZNE test

* Add types and docs to mock backend

* Fix pytket-quantinuum test version

---------

Co-authored-by: dan-mills-cqc <[email protected]>
Co-authored-by: dan-mills-cqc <[email protected]>

* ZNE Include all Qubit Map (#78)

* add failing test

* Add complete workflow failing test

* Pass list of node maps

* Correct documentation

---------

Co-authored-by: dan-mills-cqc <[email protected]>

* Add removed wires in get_full_transition_tomography_circuits (#75)

* Add coverage for removing wires, also format

* Remove added DecomposeBoxes

* format

* Move MockQuantinuumBackend to qermit subdirectory, update FullyConneted architeture constructed

* remove pytest fails

* Update test_requirements.txt

* Update mock_quantinuum_backend.py

* Format code and add format check to CI (#77)

* Format code and add format check to CI

* Revert some formatting

* Add coverage to requirements

* Add flake8 to test requirements

* Install test requirements before running tests

* Update README with formatting change

* Correct formatting

---------

Co-authored-by: dan-mills-cqc <[email protected]>
Co-authored-by: dan-mills-cqc <[email protected]>

* Update versions

* Fix mock backend tests (#82)

* Extend mock mackend gateset

* Reduce optimisation level

* Remove unrequired changes

* Add n_cl_reg to mock quantinuum backend

* Change node names to match updates quaninuum backends

---------

Co-authored-by: dan-mills-cqc <[email protected]>
Co-authored-by: dan-mills-cqc <[email protected]>

* Make cache visible (#86)

* Make cache visible

* Add test for visible cache

---------

Co-authored-by: dan-mills-cqc <[email protected]>

* Use equivalence check between characterisation (#84)

I believe it's okay if they are not exactly the same list of nodes?

* correct duplication of experiment mitex (#85)

Co-authored-by: dan-mills-cqc <[email protected]>

* Docs/update docs theme (#90)

* add build and .venv to .gitignore

* update theme configuration in conf.py

* update theme requirements

* replace CQC logo with Quantinuum logo

* remove refernce to old logo in index.rst

* add built files to .gitignore

* update copyright

* update docs theme in user manual

* add source code links to API docs

* update old links in index

* remove redundant .gitignore line

* Add doc build to tests (#89)

Co-authored-by: dan-mills-cqc <[email protected]>

* Make Folding and Fit methods staticmethod (#87)

* Remove self

* Add @staticmethod decorator

* Repair high compute tests

---------

Co-authored-by: dan-mills-cqc <[email protected]>
Co-authored-by: dan-mills-cqc <[email protected]>

* Postselection and leakage example (#88)

* Add postselection and leakage example

* Add documentation

* add rst files

* Code formatting

* add reset and reorder compilation

* Add test comparing to pytket method

* remove post_select from manager

move to using one work postselect

* remove post_select from mitres

* Remove post_select from tests

* Silas corrections

* Correct formatting

---------

Co-authored-by: dan-mills-cqc <[email protected]>

* Separate NoisyAerBackend (#91)

* Sperate noisyaerbackend from mock quantinuum

* Correct mypy

* Add docstrings on gate sets

* Update test requirements

* Remove commented out gate set

* Correct code formatting

* Move noise model definition

* Correct gateset

---------

Co-authored-by: dan-mills-cqc <[email protected]>

* Reformat code with `black` (#92)

* Reformat black

* Add copyright notices

* Fix mypy issues

* appease CI

* Update versions

* Correct type annotatioin (#94)

* Correct type annotatioin

* Remove prints

* Additional typing corrections

* install testing requirements

* Correct workflow formatting

* Correct all type errors

* Minor code style changes

---------

Co-authored-by: dan-mills-cqc <[email protected]>

* Pauli Noise Model Backend (#95)

* Add noise model

* Correct imports

* Use if instead of case

* Add stabiliser

* Remove tqdm

* Remove tqdm

* Remove total

* Rename to noise model module

* Remove error sampler

* Extend testing

* Correct typing in pytket 1.21.0

* Add documentation to ErrorDistribution

* Move to using counter in logical error distribution

* Correct logical error simulation test

* Finish noise model documentation

* Document Stabiliser

* Document transpiler backend

* Remove reference to stabiliser

* Add QermitPauli

* Silas requests

* Rename to set_rng and move private methods

* Noise Aware ZNE (#96)

* remove noise scale by 1 as default

* Allow list of circuits when scaling and add noise scaled mitex

* Add noise aware noise scaling

* Add additional documentation

* Add end to end noise aware zne test

* Test scaling and merge

* Repair haging test by removing plot

* Review Corrections

* Use ResultHandle

* Move to using PTMs for scaling

* Correct formatting and add docs

* Additional inline docs

---------

Co-authored-by: Daniel Mills <[email protected]>
Co-authored-by: Daniel Mills <[email protected]>

* Modernise Build System (#98)

* Use toml

* bump python version

* Add optional dependencies

* Remove editable install

* Correct toml formatting

* Remove optinoal

* Revet changes

* Allow editable builds

* Correct build system

* Add authors

* Add optional dependencies

* Correct toml formatting

* True -> true

* Make optional deps optional

* Use os matrix

* Add runs-on

* Correct MockQuantinuumBackend type annotaion

---------

Co-authored-by: Daniel Mills <[email protected]>

* Support parallelism in noisy simulator (#97)

* Support parallelism in noisy backend

* Add documentation and type annotation

* Correct some doc strings

* Correct test requirements

* Move away from using provider

* include qiskit-ibmq-provider as dependency

* Check install versions

* Move away from using IBMQ

* Spawn threads in tests

* Default to one core

* Correct formatting

---------

Co-authored-by: Daniel Mills <[email protected]>

* Update pytket-quantinuum (#100)

* Update pytket-quantinuum

* Update workflow versions

* Add pytket-quantinuum to docs dependencies

* Add issue to project workflow (#101)

* fix: Update develop (#110)

* Qermit 0.5.0 (#93)

* Uniform task labels (#36)

* Make _label case uniform

A VERY small PR making the case used for _label uniform.

* Capitalise Ex

* Pytket v1 upgrade (#41)

* Upgrade to pytket v1.0.1

This primarily includes:
- remove Rebase passes
- change module names

* Remove unused imports

* Add capitilisation

* Update docs with change to pytket version

* Correct version requirements

* Correct verson requirements

Co-authored-by: Daniel Mills <[email protected]>
Co-authored-by: Daniel Mills <[email protected]>

* Remove Partial SPAM correcter (#42)

* remove all traces

* update docs

* Update build_and_test.yml

* Remove copy.copy (#43)

* update use of copy.copy in code

remove in many cases

* copy.deepcopy -> deepcopy

* reintroduce necessary copy

* fix typo

* Add ObservableTracker.clear method (#44)

* Shot splitter mitres (#40)

* Add shot splitting mitres

* Better python practice with shot splitting

* Correct comment format

* Change function name

* Add a compiled shot splitting metres

* Correct typing on split_index

* Use OutcomeArray to gather results

* Correct comment spelling

* Add splitting mitres to docs

* Rebuild docs

Co-authored-by: Daniel Mills <[email protected]>
Co-authored-by: Daniel Mills <[email protected]>
Co-authored-by: Daniel Mills <[email protected]>

* Remove appendix from LICENSE file (#46)

* Update graph visualisation (#37)

* update to vertical visualisation

* Update mitresgraph.png

* Delete mitresgraph.png

* update manual images

* update mitex manual images

* update docs image

* rebuild docs and manual

Co-authored-by: sjdilkes <[email protected]>

* Add basic "_cache" attribute for storing all generated edge data from run() (#47)

* add bad cache

* smarten how cache works

* qermit.mittask -> qermit.taskgraph

* add .cache to mitres and mitex

* remove redundant print

* add "run_basic" method (#48)

* Correct qubit mutation (#50)

* Add qubit relabelling task

* Correct typing

* Add documentation

* Add tests

* Code reformatting

* Correct manual

* Rebuild docs

* Add missing tasks to docs

Co-authored-by: Daniel Mills <[email protected]>

* Minor edits, rebuild docs and manual (#49)

* add bad cache

* smarten how cache works

* qermit.mittask -> qermit.taskgraph

* add .cache to mitres and mitex

* add "run_basic" method

* fix obvious issues

* qermit -> Qermit

* Update index.rst

* Update index.rst

* q -> Q

* rebuild manual and docs

* remove print

* rebuild docs and manual

* add "real" string back

* update docs

* update docs

* Update pytket version to 1~(#55)

* update pytket

* update

* Remove pytket from test requirements, and cast mean

* Update zne.py

* Remove use of RebaseToCliffordSingles

* BLACK FORMAT

Co-authored-by: Daniel Mills <[email protected]>
Co-authored-by: sjdilkes <[email protected]>

* Add `characterisation` attribute to TaskGraph and pass as kwarg to TaskGraph.run  (#61)

* Update _version.py

* Update zne_test.py

* Add characterisation attribute to taskgraph

allow to be passed at run

* ignore numpy

* set mittask characterisation attribute when running

* Update frame_randomisation_test.py

* update pytket version

* Update frame_randomisation_test.py

* revert pytket changes

* update versioning

* Update SPAM correction to use characterisation instead of BackendInfo

* Update full_spam_test.py

* use characteriastoin in CCL

* update manual

* Add Spectral Filtering Method (#63)

* Initial commit with outline of protocol

* Remove unnecessary wires

* Add result extraction

* Output qpo

* Add test

* Add characterisation cache

* Add documentation

* Add spectral filtering tests

* Generalise tests to more complicated qpo

* Add type annotation

* Remove caches

* Add documentation

* Split FFT from formatting component

* Add tests for graph generation and new FFT and formating task

* Add tests, docs and type annotation for small coefficient filter

* Document FFT and related tasks

* Document SignalFilter

* Clean up some documentation

* Minor corrctions to typing

* Simplify NDArray typing

* Change to List type annotation

* Add additioinal documentation

* Address Silas PR comments

* Code Formatting

* Formatting and type checking

* Add compiled docs

* Compile manual

* Add spectral fiiltering to docs index

* Remove use of np array

* Correct typing

Co-authored-by: Daniel Mills <[email protected]>
Co-authored-by: Daniel Mills <[email protected]>

* Update python version (#66)

* Update copyright (#69)

* Update pytket version to 1.11(#67)

* Change copyright

* Add noise scaling via 2 qubit gate folding (#72)

* Add 2 qubit gate folding

* Run black

* Import isclose

* Add test call to main call

---------

Co-authored-by: dan-mills-cqc <[email protected]>

* update docs

* Add failing tests (#76)

* Add failing SPAM test

* Add test backends

* Add pytket-quantinuum to test requirements

* Remove myqos imports

* Add test init

* Add failing ZNE test

* Add types and docs to mock backend

* Fix pytket-quantinuum test version

---------

Co-authored-by: dan-mills-cqc <[email protected]>
Co-authored-by: dan-mills-cqc <[email protected]>

* ZNE Include all Qubit Map (#78)

* add failing test

* Add complete workflow failing test

* Pass list of node maps

* Correct documentation

---------

Co-authored-by: dan-mills-cqc <[email protected]>

* Add removed wires in get_full_transition_tomography_circuits (#75)

* Add coverage for removing wires, also format

* Remove added DecomposeBoxes

* format

* Move MockQuantinuumBackend to qermit subdirectory, update FullyConneted architeture constructed

* remove pytest fails

* Update test_requirements.txt

* Update mock_quantinuum_backend.py

* Format code and add format check to CI (#77)

* Format code and add format check to CI

* Revert some formatting

* Add coverage to requirements

* Add flake8 to test requirements

* Install test requirements before running tests

* Update README with formatting change

* Correct formatting

---------

Co-authored-by: dan-mills-cqc <[email protected]>
Co-authored-by: dan-mills-cqc <[email protected]>

* Update versions

* Fix mock backend tests (#82)

* Extend mock mackend gateset

* Reduce optimisation level

* Remove unrequired changes

* Add n_cl_reg to mock quantinuum backend

* Change node names to match updates quaninuum backends

---------

Co-authored-by: dan-mills-cqc <[email protected]>
Co-authored-by: dan-mills-cqc <[email protected]>

* Make cache visible (#86)

* Make cache visible

* Add test for visible cache

---------

Co-authored-by: dan-mills-cqc <[email protected]>

* Use equivalence check between characterisation (#84)

I believe it's okay if they are not exactly the same list of nodes?

* correct duplication of experiment mitex (#85)

Co-authored-by: dan-mills-cqc <[email protected]>

* Docs/update docs theme (#90)

* add build and .venv to .gitignore

* update theme configuration in conf.py

* update theme requirements

* replace CQC logo with Quantinuum logo

* remove refernce to old logo in index.rst

* add built files to .gitignore

* update copyright

* update docs theme in user manual

* add source code links to API docs

* update old links in index

* remove redundant .gitignore line

* Add doc build to tests (#89)

Co-authored-by: dan-mills-cqc <[email protected]>

* Make Folding and Fit methods staticmethod (#87)

* Remove self

* Add @staticmethod decorator

* Repair high compute tests

---------

Co-authored-by: dan-mills-cqc <[email protected]>
Co-authored-by: dan-mills-cqc <[email protected]>

* Postselection and leakage example (#88)

* Add postselection and leakage example

* Add documentation

* add rst files

* Code formatting

* add reset and reorder compilation

* Add test comparing to pytket method

* remove post_select from manager

move to using one work postselect

* remove post_select from mitres

* Remove post_select from tests

* Silas corrections

* Correct formatting

---------

Co-authored-by: dan-mills-cqc <[email protected]>

* Separate NoisyAerBackend (#91)

* Sperate noisyaerbackend from mock quantinuum

* Correct mypy

* Add docstrings on gate sets

* Update test requirements

* Remove commented out gate set

* Correct code formatting

* Move noise model definition

* Correct gateset

---------

Co-authored-by: dan-mills-cqc <[email protected]>

* Reformat code with `black` (#92)

* Reformat black

* Add copyright notices

* Fix mypy issues

* appease CI

* Update versions

* Correct type annotatioin (#94)

* Correct type annotatioin

* Remove prints

* Additional typing corrections

* install testing requirements

* Correct workflow formatting

* Correct all type errors

* Minor code style changes

---------

Co-authored-by: dan-mills-cqc <[email protected]>

---------

Co-authored-by: Daniel Mills <[email protected]>
Co-authored-by: Daniel Mills <[email protected]>
Co-authored-by: Silas Dilkes <[email protected]>
Co-authored-by: Daniel Mills <[email protected]>
Co-authored-by: Seyon Sivarajah <[email protected]>
Co-authored-by: sjdilkes <[email protected]>
Co-authored-by: cqc-melf <[email protected]>
Co-authored-by: CalMacCQ <[email protected]>

* Convert tests to floats

* Correct typing

* Ignore sympy when typing

---------

Co-authored-by: Daniel Mills <[email protected]>
Co-authored-by: Daniel Mills <[email protected]>
Co-authored-by: Silas Dilkes <[email protected]>
Co-authored-by: Daniel Mills <[email protected]>
Co-authored-by: Seyon Sivarajah <[email protected]>
Co-authored-by: sjdilkes <[email protected]>
Co-authored-by: cqc-melf <[email protected]>
Co-authored-by: CalMacCQ <[email protected]>

---------

Co-authored-by: Daniel Mills <[email protected]>
Co-authored-by: Daniel Mills <[email protected]>
Co-authored-by: Silas Dilkes <[email protected]>
Co-authored-by: Daniel Mills <[email protected]>
Co-authored-by: Seyon Sivarajah <[email protected]>
Co-authored-by: sjdilkes <[email protected]>
Co-authored-by: cqc-melf <[email protected]>
Co-authored-by: CalMacCQ <[email protected]>
Co-authored-by: Daniel Mills <[email protected]>
Co-authored-by: Daniel Mills <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants