{"id":28639739,"url":"https://github.com/deepakkumar1984/arithmetica","last_synced_at":"2025-07-22T18:33:48.264Z","repository":{"id":40880662,"uuid":"185782389","full_name":"deepakkumar1984/Arithmetica","owner":"deepakkumar1984","description":"This is a simple library to build and simulate your own quantum computing algorithms in C#, yes in C#.","archived":false,"fork":false,"pushed_at":"2022-06-22T23:32:27.000Z","size":63261,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-10T06:39:15.171Z","etag":null,"topics":["array","computing","image-processing","linear","maths","matrix","multi","ndarray","quantum","vector"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/deepakkumar1984.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-05-09T11:01:47.000Z","updated_at":"2022-06-22T23:32:17.000Z","dependencies_parsed_at":"2022-08-24T17:10:28.736Z","dependency_job_id":null,"html_url":"https://github.com/deepakkumar1984/Arithmetica","commit_stats":null,"previous_names":["tech-quantum/arithmetica"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/deepakkumar1984/Arithmetica","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deepakkumar1984%2FArithmetica","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deepakkumar1984%2FArithmetica/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deepakkumar1984%2FArithmetica/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deepakkumar1984%2FArithmetica/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/deepakkumar1984","download_url":"https://codeload.github.com/deepakkumar1984/Arithmetica/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deepakkumar1984%2FArithmetica/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266552641,"owners_count":23947181,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-22T02:00:09.085Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["array","computing","image-processing","linear","maths","matrix","multi","ndarray","quantum","vector"],"created_at":"2025-06-12T19:41:11.158Z","updated_at":"2025-07-22T18:33:48.224Z","avatar_url":"https://github.com/deepakkumar1984.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"This is a simple library to build and simulate your own quantum computing algorithms in C#, yes in C#.\n\n## How to use the library\n* Create a new .NET core or Windows console project.\n* Right-Click on the solution and select Managed NuGet References.\n* Search for “Arithmetica”, select and install the latest version\n* Open the class file and import namespace “using Arithmetica” to start using the library and its functions.\n\n\n## Complex Matrix Example\n\n```csharp\n//Define a 2x2 complex matrix\nComplexMatrix matrix = new ComplexMatrix(2, 2);\nmatrix[0, 0] = new Complex(2, 2);\nmatrix[0, 1] = new Complex(1, 2);\nmatrix[1, 0] = new Complex(3, 1);\nmatrix[1, 1] = new Complex(2, 3);\nConsole.WriteLine(\"First Matrix\");\nConsole.WriteLine(matrix.ToString());\n\n//Define a comple vector of length 2\nComplexVector vector = new ComplexVector(2);\nvector[0] = new Complex(2, 1);\nvector[1] = new Complex(1, 3);\nConsole.WriteLine(\"Second Vector\");\nConsole.WriteLine(vector.ToString());\n\n// Multiplying a 2x2 matrix with a vector will result a vector\nvar result = matrix * vector;\n\nConsole.WriteLine(\"Result Vector\");\nConsole.WriteLine(result.ToString());\n\n```\n\n## Quantum Teleportation\n```csharp\n//Create a register with 2 Qubits\nQuantumRegister register = new QuantumRegister(2);\n\n//Create a blank circuit with the regiter initialised\nQuantumCircuit circuit = new QuantumCircuit(register);\n\n//Initialize the tranported counter\nint transported = 0;\n\n//Let try to teleport 25 quantum information\nfor (int i = 0; i \u003c 25; i++)\n{\n\tvar send = GetRandom();\n\n\t//Initial the first Qubit with the particle to be teleported\n\tcircuit.INIT(0, send);\n\n\t//Hadamard gate to apply superposition to the first quantum bit which means the first qubit will have both 0 and 1\n\tcircuit.H(0);\n\n\t//Controlled not gate to entangle the two qubit\n\tcircuit.CNOT(0, 1);\n\n\t//Measure the first will collapse the quantum state and bring it to reality whic will be either one or zero\n\tcircuit.Measure(0);\n\n\t//Store the first state\n\tvar res1 = register[0].QState;\n\n\t//Measure the second particle and store the value\n\tcircuit.Measure(1);\n\tvar res2 = register[1].QState;\n\n\tConsole.WriteLine(\"Send: {0}, Received: {1}\", res1, res2);\n\n\t//If you compare the result the two result will be same which states that the information is teleported.\n\tif (res1 == res2)\n\t\ttransported++;\n\n\tregister.Reset();\n}\n\n//var result = circuit.Execute(1000);\nConsole.WriteLine(\"Teleported count: \" + transported);\n```\n\nNuget package available, search with name Arithmetica\n\nAPI Documentation: https://tech-quantum.github.io/Arithmetica/api/Arithmetica.html\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeepakkumar1984%2Farithmetica","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdeepakkumar1984%2Farithmetica","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeepakkumar1984%2Farithmetica/lists"}